Skip to content

@modoki/engine / index / MaterialParamOverride

Interface: MaterialParamOverride

Traits

kind

kind: "texture" | "uniform" | "prop"

How target is applied. Defaults to 'uniform' when omitted by authored data.


ref?

optional ref?: string

For 'texture' (2D custom materials only): a sprite/texture GUID bound to the shader's target texture param (an extra sampler), overriding that param's manifest DEFAULT for this instance. Static (not driven — MaterialInstance sources are scalar-only). The renderer (Scene2D) resolves + refcounts it exactly like the manifest-default path.


source?

optional source?: MaterialParamSource

What feeds the parameter each frame ('uniform'/'prop'). A 'texture' override has no source — it's a STATIC per-instance value; omit it.


target

target: string

Parameter name. For 'uniform', the userData key the shader reads. For 'prop', the material property name. For 'texture', the shader's texture-param name.

Built with Modoki.