new PostProcessPlugin(shaderCode, includeMainCanvas, feedbackTexture)postProcess.js:31Create global post processing shader
shaderCode string optionalShadertoy style mainImage code, or an effect alone like postProcessVignette(),
which postProcessEffects joins; a pass-through when left out
includeMainCanvas boolean optional, default falsecombine mainCanvas onto glCanvas
feedbackTexture boolean optional, default falsealso pass the shader's own output from the previous frame as iChannel1,
for trails and echoes; iChannel0 is still the frame just drawn
// create the post process plugin object
new PostProcessPlugin(shaderCode);
Is the pass on? Off, the frame shows as the engine drew it, the shader is kept,
and the feedback texture holds the last frame drawn with it on
The previous frame's output, iChannel1, when feedbackTexture is set
Shader for post processing
The shadertoy style mainImage code it shades with, see setShaderCode
Texture for post processing
The game's own values for the shader, a uniform each
by its name, a number a float and a list of 2 to 4 numbers a vector, set every frame as they are; an
effect setting can be one of these names, so it changes every frame without making the shader again, all
but glow's size, which sets how many samples it takes; adding or removing a name makes the shader again,
and the shader is first made at the first render, so values set right after the plugin are in it; a name
is a GLSL name not starting with an underscore, which the effects keep for their own, nor i and a capital
or gl_, and not c, uv or p, the names mainImage works on
Shade with new code from the next frame on, to switch effects while the game runs; the shader is made again
shaderCode string optionalShadertoy style mainImage code, postProcessEffects builds it, or an effect
alone; none passes the frame through