--- title: Shader --- An opaque compiled shader module. Create via `context:loadShader`. ## Constructors ### `new` {/* new: (wgslAssetName: string) -> Shader */}
```lua new(wgslAssetName: string) -> Shader ```
Load a pre-compiled WGSL shader embedded in the Rive file. The name must match a shader asset added in the editor (e.g. "myEffect.wgsl"). Raw WGSL source strings are not accepted at runtime.