How to switch between different shaders
in
Core Library Questions
•
1 year ago
Is it possibly to change a shader in a running sketch?
For example:
Thanks in advance.
For example:
- void setup() {
- ...
- shader1 = loadShader(PShader.FLAT, "shader1.glsl");
- shader2 = loadShader(PShader.FLAT, "shader2.glsl");
- shader(shader1);
- ...
- }
- void keyReleased() {
- shader(shader2);
- }
Thanks in advance.
1