Skip to content

buildFragmentSource

buildFragmentSource(fragment, uniforms): string

Defined in: packages/engine/src/render/shader.ts:30

The fragment source three compiles: the engine’s inputs, one declaration per uniform in uniforms, then fragment. Three sets the precision, and on a compile error it prints the source with the failing line marked.

Parameter Type
fragment string
uniforms Record<string, ShaderValue>

string