Files
processing4/java/examples/Topics/Shaders/Landscape/Landscape.pde
2012-09-03 01:31:49 +00:00

17 lines
360 B
Plaintext

PShader landscape;
void setup() {
size(320, 240, P2D);
landscape = loadShader("landscape.glsl");
landscape.set("resolution", float(width), float(height));
noStroke();
}
void draw() {
landscape.set("time", millis() / 1000.0);
landscape.set("mouse", float(mouseX), height - float(mouseY));
shader(landscape);
rect(0, 0, width, height);
}