b3dLightShadowMaxDistance

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

light Int
maxDistance Double

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.

Example

Example.bam
; Medium-range shadows for balanced performance
sun = b3dCreateLight(1)
b3dLightShadowMaxDistance(sun, 150.0)

; Close-range indoor shadows
spotlight = b3dCreateLight(2)
b3dLightShadowMaxDistance(spotlight, 50.0)

; Long-range outdoor shadows
b3dLightShadowMaxDistance(sun, 350.0)