Shadow options every shadow-casting light takes, whichever way its shadow is placed
const tuning: LightShadowCommonOptions = { bias: 0.002, normalBias: 0.05 };const sun = new DirectionalLight({ castShadow: true, shadow: { cascades: 3, ...tuning } }); Copy
const tuning: LightShadowCommonOptions = { bias: 0.002, normalBias: 0.05 };const sun = new DirectionalLight({ castShadow: true, shadow: { cascades: 3, ...tuning } });
LightShadowOptions For the full option set.
Optional
Depth offset that keeps a surface from shadowing itself; see LightShadow.bias
0.001 Copy
0.001
const sun = new DirectionalLight({ castShadow: true, shadow: { bias: 0.002 } }); Copy
const sun = new DirectionalLight({ castShadow: true, shadow: { bias: 0.002 } });
Offset along the surface normal that keeps a surface from shadowing itself; see LightShadow.normalBias
const sun = new DirectionalLight({ castShadow: true, shadow: { normalBias: 0.05 } }); Copy
const sun = new DirectionalLight({ castShadow: true, shadow: { normalBias: 0.05 } });
Shadow options every shadow-casting light takes, whichever way its shadow is placed
Example
See
LightShadowOptions For the full option set.