applyShader function
Adds a shader to the surface from a custom effect's setup.
import { applyShader } from '@dioramajs/diorama/glsl'Call the result to remove it.
function applyShader<P extends ParamSpec>(
ctx: EffectContext<P>,
shader: GlslSource,
options?: ApplyOptions,
): OffParameters
| Name | Type | Description |
|---|---|---|
ctx | EffectContext<P> | |
shader | GlslSource | |
options? | ApplyOptions | Default |
Also exported from @dioramajs/glsl.
Defined in packages/glsl/src/runtime.ts.