Fragment shader code or preset name to be applied as a post effect.
You can pass a preset name from ShaderPreset (e.g., "invert", "grayscale", "sepia")
or provide custom shader code.
The shader will receive the rendered canvas as a sampler2D src
uniform.
Standard uniforms available:
sampler2D src
: The input texture (rendered canvas)vec2 resolution
: Canvas resolution in pixelsvec2 offset
: Offset valuesvec4 viewport
: Viewport informationfloat time
: Time in seconds since VFX startedvec2 mouse
: Mouse position in pixelssampler2D backbuffer
: Previous frame texture (if backbuffer is enabled)Optional
uniforms?: VFXUniformsCustom uniform values to be passed to the post effect shader.
Works the same way as element uniforms.
Optional
backbuffer?: booleanWhether the post effect should use a backbuffer for feedback effects.
When enabled, the previous frame's output is available as sampler2D backbuffer
.
Configuration for post effects that are applied to the final canvas output.