mirror of
https://github.com/processing/processing4.git
synced 2026-02-02 21:29:17 +01:00
17 lines
360 B
Plaintext
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);
|
|
}
|