reset_shader()

Restores the default shaders.

Examples

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


def draw():
    py5.shader(edges)
    py5.image(img, 0, 0)
    py5.reset_shader()
    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 Java method: resetShader

Syntax

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

Parameters

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

Updated on September 11, 2021 16:51:34pm UTC