Skip to content

@modoki/engine / index / ShaderManifest

Interface: ShaderManifest

A file-based shader manifest (<name>.shader.json). Raw WGSL/GLSL bodies live in sibling <name>.wgsl / <name>.glsl files.

Materials, Shaders & Textures

colorPreserve?

optional colorPreserve?: "alpha"

Opt into NPR color preservation (3D only). 'alpha' = the shader's returned vec4 alpha is a per-pixel preserve mask (0..1) rather than opacity; the loader routes it into the NPR lineColor target. Omitted → fully NPR (grayscale).


id?

optional id?: string


name?

optional name?: string


params

params: ShaderParamSchema


space?

optional space?: "3d" | "2d"

Which render layer this shader targets. '3d' (default) = a Three/TSL NodeMaterial built by fileShaderBuilder (the WGSL/GLSL body is a function returning vec4). '2d' = a PixiJS Shader built by pixiShaderBuilder for the Canvas2D layer (the WGSL/GLSL body is a fragment MAIN that writes outColor from vUV + uTexture + the generated uniform block). The two authoring conventions differ, so space selects the loader.

Built with Modoki.