Name

PShader

Examples
size(120, 120, P2D)
# Shaders files must be in the "data" folder to load correctly
blur = loadShader("blur.glsl")
stroke(0, 102, 153)
rectMode(CENTER)
rect(width/2-15, height/2, 50, 50)
ellipse(width/2+15, height/2, 75, 75)
filter(blur)
Description This class encapsulates a GLSL shader program, including a vertex and a fragment shader. It's compatible with the P2D and P3D renderers, but not with the default renderer. Use the loadShader() function to load your shader code. [Note: It's strongly encouraged to use loadShader() to create a PShader object, rather than calling the PShader constructor manually.]

Updated on Mon Sep 21 15:53:25 2020.

If you see any errors or have comments, please let us know.