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

Method Tr2ShadowMap

trinity/Tr2ShadowMap.cpp:26–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24
25using namespace Tr2RenderContextEnum;
26Tr2ShadowMap::Tr2ShadowMap( IRoot* lockobj ) :
27 m_size( SHADOW_MAP_SIZE ),
28 m_height( 2 ),
29 m_width( 8 ),
30 m_splitCount( SHADOW_FRUSTUM_COUNT ),
31 m_disableShimmer( true ),
32 m_oldZFar( 0.0 ),
33 m_useDenoiser( true ),
34 m_debugColorSplit( false ),
35 m_lastNearClip( 0.0f ),
36 m_lastFarClip( 0.0f ),
37 m_shadowSplitMode( Tr2ShadowMap::ShadowSplitMode::STATIC )
38{
39 m_shadowEffect.CreateInstance();
40 m_shadowEffect->SetEffectPathName( "res:/graphics/effect/managed/space/system/ShadowDepth.fx" );
41 m_shadowEffect->SetParameter( BlueSharedString( "EveSpaceSceneCascadedShadowMap" ), Tr2TextureAL{} );
42 m_shadowEffect->SetParameter( BlueSharedString( "DepthMap" ), Tr2TextureAL{} );
43 GlobalStore().RegisterVariable( "EveSpaceSceneShadowMap", static_cast<ITr2TextureProvider*>( nullptr ) );
44 GlobalStore().RegisterVariable( "EveSpaceSceneCascadedShadowMap", static_cast<ITr2TextureProvider*>( nullptr ) );
45
46 m_denoiser.CreateInstance();
47
48 SetStaticShadowSplits();
49}
50
51void Tr2ShadowMap::Setup( uint32_t elementSize, uint32_t elementCount, bool useDenoiser )
52{

Callers

nothing calls this directly

Calls 4

CreateInstanceMethod · 0.80
SetEffectPathNameMethod · 0.80
RegisterVariableMethod · 0.80
SetParameterMethod · 0.45

Tested by

no test coverage detected