Interface ShaderNormalViewConfig
interface ShaderNormalViewConfig {
distanceEncodeRange?: number;
space?: "view" | "world";
worldPosLocation?: number;
worldPosVarying?: string;
}
distanceEncodeRange?: number;
space?: "view" | "world";
worldPosLocation?: number;
worldPosVarying?: string;
}
Index
Properties
Optional Readonlydistance Encode Range
distanceEncodeRange?: number
When set, the output ALPHA encodes the fragment's view distance normalized by this range
(clamp(viewZ / range, 0, 1)) so a consumer can fade the effect with distance. Clear the target's
alpha to 1 as the "no geometry" sentinel. When omitted, alpha is a flat 1 (validity only).
Optional Readonlyspace
space?: "view" | "world"
Output space of the encoded normal: "view" (default — ready for
Blender-style screen-space curvature) or "world".
Optional Readonlyworld Pos Location
worldPosLocation?: number
@location() of that varying in the vertex output struct. Default 0.
Optional Readonlyworld Pos Varying
worldPosVarying?: string
Name of the world-position varying the source vertex stage emits. Default "vWorldPos".
Configuration for createShaderNormalMaterialView.