Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

ShaderScope interface

Nodes a shader's `build` reads.

View as Markdown
import type { ShaderScope } from '@dioramajs/diorama/glsl'
interface ShaderScope

Members

NameTypeDescription
readonly boxNode<'vec2'>

Box UV before transforms (gl_FragCoord).

readonly fragCoordNode<'vec4'>

gl_FragCoord in CSS px of the box.

readonly functions{ [name: string]: ShaderFunction }

TSL bodies of GLSL prototypes by name.

readonly positionNode<'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 uvNode<'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.