MCPcopy Create free account
hub / github.com/carbonengine/trinity / PrepareShadowMapForLights

Method PrepareShadowMapForLights

trinity/Eve/EveSpaceScene.cpp:2472–2485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2470}
2471
2472bool EveSpaceScene::PrepareShadowMapForLights( Tr2RenderContext& renderContext, const Tr2TextureAL& shadowMap )
2473{
2474 CCP_STATS_ZONE( __FUNCTION__ );
2475
2476 // Using depth stencil as shadow map
2477 renderContext.m_esm.PushRenderTarget( Tr2TextureAL() ); //empty texture
2478 renderContext.m_esm.PushDepthStencilBuffer( shadowMap );
2479
2480 // we want a clean depth buffer for this
2481 renderContext.SetReadOnlyDepth( false );
2482 CR( renderContext.Clear( Tr2RenderContextEnum::CLEARFLAGS_ZBUFFER, 0, 0, 0 ) );
2483
2484 return true;
2485}
2486
2487void EveSpaceScene::RenderShadowMapForSpotLight(
2488 Tr2RenderContext& renderContext,

Callers

nothing calls this directly

Calls 5

Tr2TextureALClass · 0.50
PushRenderTargetMethod · 0.45
SetReadOnlyDepthMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected