This reference is for Processing 3.0+. If you have a previous version, use the reference included with your software in the Help menu. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.
Class | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name | set() |
||||||||||||||||||||
Examples | PImage tex; PShader deform; void setup() { size(640, 360, P2D); tex = loadImage("tex1.jpg"); deform = loadShader("deform.glsl"); deform.set("resolution", float(width), float(height)); } void draw() { deform.set("time", millis() / 1000.0); deform.set("mouse", float(mouseX), float(mouseY)); shader(deform); image(tex, 0, 0, width, height); } | ||||||||||||||||||||
Description | Sets the uniform variables inside the shader to modify the effect while the program is running. | ||||||||||||||||||||
Syntax | .set(name, x) .set(name, x, y) .set(name, x, y, z) .set(name, x, y, z, w) .set(name, vec) .set(name, vec, ncoords) .set(name, boolvec, ncoords) .set(name, mat) .set(name, mat, use3x3) .set(name, tex) | ||||||||||||||||||||
Parameters |
| ||||||||||||||||||||
Returns | void |
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.