Sets maximum distance for shadow rendering from camera.
Takes light (light handle from b3dCreateLight), maxDistance (maximum shadow rendering distance from camera in units).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
lightInt
maxDistanceDouble
Returns
Void
Quick Summary
Sets maximum distance for shadow rendering from camera.
Takes light (light handle from b3dCreateLight), maxDistance (maximum shadow rendering distance from camera in units).
Returns nothing.
Technical Exegesis...
Sets maximum distance for shadow rendering from camera. Takes light (light handle from b3dCreateLight), maxDistance (maximum distance from camera where shadows render in units, objects farther don't cast/receive shadows, typical 50-500). Returns nothing. Limits shadow rendering range to improve performance by not rendering shadows for distant objects.
Sets maximum distance for shadow rendering from camera. Takes light (light handle from b3dCreateLight), maxDistance (maximum distance from camera where shadows render in units, objects farther don't cast/receive shadows, typical 50-500). Returns nothing. Limits shadow rendering range to improve performance by not rendering shadows for distant objects.
Distance culling: shadows only rendered for objects within maxDistance from camera (objects closer than maxDistance participate in shadow map, objects farther excluded from shadow rendering, reduces shadow map draw calls and complexity), camera-relative (distance measured from active camera position, shadows follow camera). Performance optimization: smaller maxDistance = fewer objects in shadow map = better performance, larger maxDistance = more coverage but higher cost.
Typical values: indoor (maxDistance 30-100 for small spaces), outdoor (maxDistance 100-300 for medium environments), large open world (maxDistance 200-500 for vast landscapes). Use cases: (1) LOD shadows (disable shadows beyond certain distance), (2) Performance tuning (reduce shadow cost on low-end hardware), (3) Artistic control (limit shadow extent for stylized look).
Trade-off: smaller maxDistance improves performance but shadows pop in/out (sudden appearance at distance threshold, may be jarring), larger maxDistance smoother but higher cost. Cascade shadows: directional lights may use multiple cascades (each cascade has different distance range, maxDistance may limit outermost cascade).