Referencia imageShader()

imageShader()

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.

Referencias Relacionadas