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

glslEffect function

Wraps a GLSL stage pair as an effect.

View as Markdown
import { glslEffect } from '@dioramajs/diorama/glsl'

Bindings, params and varyings are checked up front and reported together as one EFFECT_DEFINITION.

function glslEffect<S extends ParamSpec, O extends ParamSpec = Empty>(
  shader: GlslSource<S>,
  options?: GlslEffectOptions<MergeParams<S, O>> & { readonly params?: O } & CheckParams<O>,
): Effect<WidenSpec<MergeParams<S, O>>>

Parameters

NameTypeDescription
shaderGlslSource<S>
options?GlslEffectOptions<MergeParams<S, O>> & { readonly params?: O } & CheckParams<O>

Also exported from @dioramajs/glsl.

Defined in packages/glsl/src/runtime.ts.