b3dLightShadowNearFar

Sets shadow camera near and far planes for a light. Takes light (light handle from b3dCreateLight), nearPlane (shadow camera near clip distance in units), farPlane (shadow camera far clip distance in units). Returns nothing.

3D Graphics

Parameters & Returns

Parameters

light Int
nearPlane Double
farPlane Double

Returns

Void

Quick Summary

Sets shadow camera near and far planes for a light. Takes light (light handle from b3dCreateLight), nearPlane (shadow camera near clip distance in units), farPlane (shadow camera far clip distance in units). Returns nothing.

Technical Exegesis...

Sets shadow camera near and far planes for a light's shadow rendering. Takes light (light handle from b3dCreateLight with shadow casting enabled), nearPlane (shadow camera near clip plane distance in units, objects closer than this don't cast shadows, typical 0.1-1.0), farPlane (shadow camera far clip plane distance in units, objects farther than this don't cast shadows, typical 50-500). Returns nothing. Configures shadow map depth range in DirectX 12 rendering system.

Example

Example.bam
; Outdoor sun light with medium-range shadows
sun = b3dCreateLight(1)  ; Directional light
b3dLightShadowNearFar(sun, 1.0, 150.0)

; Indoor spot light with tight precision
spotlight = b3dCreateLight(2)  ; Spot light
b3dLightShadowNearFar(spotlight, 0.1, 25.0)

; Point light for medium area
pointLight = b3dCreateLight(3)
b3dLightShadowNearFar(pointLight, 0.5, 50.0)