mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Updated shader examples
This commit is contained in:
@@ -8,9 +8,8 @@ void setup() {
|
||||
size(400, 400, P3D);
|
||||
canvas = createGraphics(400, 400, P3D);
|
||||
|
||||
fisheye = loadShader(PShader.TEXTURED, "FishEye.glsl");
|
||||
fisheye.set("aperture", 180.0);
|
||||
shader(fisheye);
|
||||
fisheye = loadShader("FishEye.glsl");
|
||||
fisheye.set("aperture", 180.0);
|
||||
}
|
||||
|
||||
void draw() {
|
||||
@@ -31,7 +30,6 @@ void draw() {
|
||||
canvas.box(50);
|
||||
canvas.endDraw();
|
||||
|
||||
// The rendering of this image will be done through the fisheye shader, since
|
||||
// it was set as the PShader.TEXTURED shader of the main surface.
|
||||
shader(fisheye);
|
||||
image(canvas, 0, 0, width, height);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user