ShaderScope interface
Nodes a shader's `build` reads.
import type { ShaderScope } from '@dioramajs/diorama/glsl'interface ShaderScopeMembers
| Name | Type | Description |
|---|---|---|
readonly box | Node<'vec2'> | Box UV before transforms (gl_FragCoord). |
readonly fragCoord | Node<'vec4'> | gl_FragCoord in CSS px of the box. |
readonly functions | { [name: string]: ShaderFunction } | TSL bodies of GLSL prototypes by name. |
readonly position | Node<'vec3'> | undefined | Position stage only: the vertex in the plane's local unit square. |
readonly uniforms | { [name: string]: Node | SamplerLike } | Uniform nodes and samplers by GLSL name. |
readonly uv | Node<'vec2'> | Box UV after earlier uv transforms, or the plane UV in a position stage. |
readonly varyings | { [name: string]: Node } | Varying nodes by GLSL name. |
Also exported from @dioramajs/glsl.
Defined in packages/glsl/src/types.ts.