Disables shadow casting for light (frees shadow map texture). Takes light (light entity handle). Returns nothing. Validates entity is ENTITY_LIGHT type, destroys shadow map texture (calls DestroyShadowMap and sets shadowMap=nullptr), sets light->castsShadows=false. Frees GPU resources and stops shadow rendering.
This function disables shadows.
Disables shadow casting for light (frees shadow map texture). Takes light (light entity handle). Returns nothing. Validates entity is ENTITY_LIGHT type, destroys shadow map texture (calls DestroyShadowMap and sets shadowMap=nullptr), sets light->castsShadows=false. Frees GPU resources and stops shadow rendering.
This function disables shadows. Shadow cleanup: destroys shadow map texture (frees GPU memory, releases render target views), sets light->shadowMap=nullptr (prevents dangling pointer), sets light->castsShadows=false (stops shadow rendering). Use cases: (1) Performance optimization (disable shadows for distant lights, toggle shadows based on graphics settings), (2) Dynamic toggling (enable shadows when light important, disable when off-screen), (3) Cleanup (disable before freeing light entity), (4) Runtime adjustments (reduce shadow count when framerate drops), (5) Stylized rendering (disable shadows for cartoon look). Common patterns: disable distant lights for light in distantLights then b3dDisableShadows(light), toggle shadows if graphicsQuality < HIGH then b3dDisableShadows(light). Typical usage: disable shadows for lights that move off-screen or become less important, disable during cleanup before freeing entities, toggle based on performance monitoring. Performance: frees shadow map GPU memory (2048x2048 depth map = 16MB, cube map 512x512x6 = 6MB), reduces rendering cost (no shadow pass for this light, faster frames). Safe to call: safe to call on lights without shadows (no-op if shadowMap==nullptr), safe to call on invalid handles (returns silently), safe to call multiple times (only frees once). Shadow map destruction: calls DestroyShadowMap helper (releases DirectX resources, frees texture memory), prevents GPU memory leaks. Validation: returns silently if invalid light handle or non-light entity (no error printed unlike EnableShadows). Related: b3dEnableShadows enables shadows and allocates shadow map, b3dLightCastsShadows checks if light casts shadows (returns 0 after disabling).