You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- js_mode><description>This part of the Processing API is not supported in JavaScript mode</description></js_mode -->
<example>
<image />
<code><![CDATA[
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)
]]></code>
</example>
<description><![CDATA[
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 <b>loadShader()</b> function to load your shader code. [Note: It's strongly encouraged to use <b>loadShader()</b> to create a PShader object, rather than calling the PShader constructor manually.]