Py5Graphics.shader()

Applies the shader specified by the parameters.

Description

Applies the shader specified by the parameters. It’s compatible with the P2D and P3D renderers, but not with the default renderer.

This method is the same as shader() but linked to a Py5Graphics object. To see example code for how it can be used, see shader().

Underlying Java method: PGraphics.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 September 11, 2021 16:51:34pm UTC