ShaderParam
此内容尚不支持你的语言。
Defined in: sdk/src/render/shaderReflect.ts:29
Properties
Section titled “Properties”default
Section titled “default”default:
number[]
Defined in: sdk/src/render/shaderReflect.ts:35
Default components for a scalar/vector param (length 1–4); empty for a texture.
defaultTexture?
Section titled “defaultTexture?”
optionaldefaultTexture?:string
Defined in: sdk/src/render/shaderReflect.ts:37
Default texture hint for a texture param (e.g. “white”); undefined otherwise.
displayName
Section titled “displayName”displayName:
string
Defined in: sdk/src/render/shaderReflect.ts:33
Human label for the inspector row (leading u_ stripped, capitalized).
group?
Section titled “group?”
optionalgroup?:string
Defined in: sdk/src/render/shaderReflect.ts:46
group(Name): the parameter group an inspector shows it under (Base,
Normal, Emissive…). Absent: no group. A clause the engine’s own parser does not read, so it changes nothing drawn.
layered?
Section titled “layered?”
optionallayered?:true
Defined in: sdk/src/render/shaderReflect.ts:63
Declared textureArray: a 2D texture array, sampled with a layer index
(texture(u_x, vec3(uv, layer))). Set it with Material.tex on a handle from
createTextureArrayFromPixels. Absent means a plain 2D texture.
name:
string
Defined in: sdk/src/render/shaderReflect.ts:30
range?
Section titled “range?”
optionalrange?:object
Defined in: sdk/src/render/shaderReflect.ts:39
Optional slider bounds from range(min,max).
max:
number
min:
number
texel?
Section titled “texel?”
optionaltexel?:"data"
Defined in: sdk/src/render/shaderReflect.ts:51
texel(data): a texture whose texels this shader reads as numbers (a normal,
packed roughness), which sRGB decode would bend. Absent means colour.
type:
ShaderParamType
Defined in: sdk/src/render/shaderReflect.ts:31
optionalui?:string
Defined in: sdk/src/render/shaderReflect.ts:41
Optional UI hint from ui(...), e.g. “slider”.
worldUnits?
Section titled “worldUnits?”
optionalworldUnits?:1|-1
Defined in: sdk/src/render/shaderReflect.ts:57
unit(length) (1) or unit(perLength) (-1): the default and range are written at 100 world units a metre, the
engine’s reference, and follow the project’s units per metre where a material leaves the param unset
(ecs/worldUnits.ts; shaderParamInUnits is what an inspector shows). Absent is a plain number.