shader()
Contents
shader()¶
Applies the shader specified by the parameters.
Examples¶
1 2 3 4 5 6 7 8 9 10 11 | def setup():
global edges
global img
py5.size(640, 360, py5.P2D)
img = py5.load_image("leaves.jpg")
edges = py5.load_shader("edges.glsl")
def draw():
py5.shader(edges)
py5.image(img, 0, 0)
|
Description¶
Applies the shader specified by the parameters. It’s compatible with the P2D
and P3D
renderers, but not with the default renderer.
Underlying Processing method: shader
Syntax¶
shader(shader: Py5Shader, /) -> None
shader(shader: Py5Shader, kind: int, /) -> None
Parameters¶
kind: int - type of shader, either POINTS, LINES, or TRIANGLES
shader: Py5Shader - name of shader file
Updated on March 22, 2022 21:53:01pm UTC