Patches

Shader

Shader

Create custom visual effects using shader code written in SKSL (Skia Shading Language). The Shader Layer allows you to define procedural graphics, image filters, and advanced visual effects that run directly on the GPU.

The shader receives the layer’s child content as a texture input and can transform it using custom algorithms. You can also create fully procedural effects that generate visuals from scratch using mathematical functions. Uniforms allow you to expose parameters that can be animated or controlled from the patch graph.

Child layers placed inside the Shader Layer are rendered to a texture and passed to the shader as input. This enables you to apply custom effects to existing layer content, such as blur, color adjustments, distortions, or stylized filters.

The shader code editor is available in the Inspector when the layer is selected. Use the Uniforms input to pass dynamic values from your patch graph into the shader. See Shader Basics for more information.

Shader Layer

  • Enable
  • Position
  • Anchor
  • Size
  • Opacity
  • Scale
  • Rotation
  • Pivot
  • Shader
  • Uniforms
  • Shadow Color
  • Shadow Opacity
  • Shadow Radius
  • Shadow Offset

Enable

A boolean that is true when the layer is displayed.

Position

The position to display the layer. Use Point 3D to set Z position.

Anchor

The anchor point to position the layer relative to. See Coordinates for more information.

Size

The size of the layer.

Opacity

The opacity of the layer.

Scale

The scale of the layer.

Rotation

The rotation of the layer. Use Point 3D to set X or Y rotations.

Pivot

The pivot to rotate and scale the layer about. See Coordinates for more information.

Shader

The SKSL shader code that defines the visual effect. The shader receives the layer’s child content as input and outputs the final pixel color.

Uniforms

A JSON object containing custom parameters passed to the shader. These values can be animated to create dynamic effects.

Shadow Color

The color of the shadow.

Shadow Opacity

The opacity of the shadow. By default, the opacity is 0, which disables the shadow.

Shadow Radius

The blur radius of the shadow.

Shadow Offset

The size of the shadow relative to the size of the layer.