API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

I

interfaceShaderOptions

@codexo/exojs / rendering / stable

Construction options for Shader. At least one language must be supplied. Provide `glsl` for WebGL2, `wgsl` for WebGPU, or both for backend-portable materials. The source is compiled lazily on first use against the active backend; an unsupported backend at draw time throws with a clear error.

4
props
0
methods
0
events
Import
import { ShaderOptions } from '@codexo/exojs'

Construction options for Shader.

At least one language must be supplied. Provide `glsl` for WebGL2, `wgsl` for WebGPU, or both for backend-portable materials. The source is compiled lazily on first use against the active backend; an unsupported backend at draw time throws with a clear error.

Properties4
glsl?: { fragment: string; vertex?: string }
GLSL ES 3.00 sources for the WebGL2 backend. fragment is required; vertex may be omitted where the consumer owns the vertex stage - a SpriteMaterial (the sprite vertex program is engine-owned) or a ShaderFilter (the fullscreen quad). A mesh or particle material needs both.
uniformBlocks?: B
Named blocks the shader reads through their record keys. Blocks take bindings 0..n-1 of the consumer's user bind group in declaration order, with texture bindings following after them.
uniforms?: F
Fields of a single block the shader reads through the instance name uniforms. Declaring it switches materials and filters built on this source to typed accessors and generates the block's GLSL and WGSL declarations.
wgsl?: string
WGSL source for the WebGPU backend. Vertex and fragment entry points live in the same source file (WGSL convention).
Source