Sets the p5.Shader object to apply for strokes.
This method applies the given shader to strokes, allowing customization of how lines and outlines are drawn in 3D space. The shader will be used for strokes until resetShader() is called or another strokeShader is applied.
The shader will be used for:
- Strokes only, regardless of whether the uniform
uStrokeWeight
is present.
To further customize its behavior, refer to the various hooks provided by the baseStrokeShader() method, which allow control over stroke weight, vertex positions, colors, and more.
Ejemplos
Sintaxis
strokeShader(s)
Parámetros
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().