reset_shader()#

Restores the default shaders.

Examples#

 1def setup():
 2    global edges
 3    global img
 4    py5.size(640, 360, py5.P2D)
 5    img = py5.load_image("leaves.jpg")
 6    edges = py5.load_shader("edges.glsl")
 7
 8
 9def draw():
10    py5.shader(edges)
11    py5.image(img, 0, 0)
12    py5.reset_shader()
13    py5.image(img, py5.width//2, 0)

Description#

Restores the default shaders. Code that runs after reset_shader() will not be affected by previously defined shaders.

Underlying Processing method: resetShader

Syntax#

reset_shader() -> None
reset_shader(kind: int, /) -> None

Parameters#

  • kind: int - type of shader, either POINTS, LINES, or TRIANGLES

Updated on March 22, 2022 21:53:01pm UTC