Get the base shader for filters.
You can then call baseFilterShader().modify()
and change the following hook:
Hook | Description |
---|---|
| Output the final color for the current pixel. It takes in two parameters:
|
Most of the time, you will need to write your hooks in GLSL ES version 300. If you are using WebGL 1, write your hooks in GLSL ES 100 instead.
Examples
Syntax
baseFilterShader()
Parameters
Returns
Related References
copyToContext
Copies the shader from one drawing context to another.
inspectHooks
Logs the hooks available in this shader, and their current implementation.
modify
Returns a new shader, based on the original, but with custom snippets of shader code replacing default behaviour.
setUniform
Sets the shader’s uniform (global) variables.