shader

fun Canvas.shader(shader: Shader, block: Canvas.() -> Unit)

Executes a block of code while using the given shader for 3D drawing on the canvas.

Parameters

shader

The shader to use.

block

The block of code to execute while the shader is active.