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.
Ejemplos
Sintaxis
baseFilterShader()
Parámetros
Returns
Referencias Relacionadas
copyToContext
Copia el shader de un contexto de dibujo a otro.
setUniform
Establece los valores de las variables uniformes (globales) del shader.
ambientMaterial
Establece el color ambiental del material de la superficie de las formas.
createFilterShader
Crea un objeto p5.Shader para ser utilizado con la función filter().