Sets the p5.Shader object to apply for images.
This method allows the user to apply a custom shader to images, enabling advanced visual effects such as pixel manipulation, color adjustments, or dynamic behavior. The shader will be applied to the image drawn using the image() function.
The shader will be used exclusively for:
image()
calls, applying only when drawing 2D images.- This shader will NOT apply to images used in texture() or other 3D contexts. Any attempts to use the imageShader in these cases will be ignored.
Ejemplos
Sintaxis
imageShader(s)
Parámetros
s
p5.Shader: p5.Shader object to apply for images.
Notice any errors or typos? Please let us know. Please feel free to edit src/webgl/material.js and open a pull request!
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().