MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / getShadowMaterial

Method getShadowMaterial

Engine/source/lighting/shadowMap/lightShadowMap.cpp:339–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339BaseMatInstance* LightShadowMap::getShadowMaterial( BaseMatInstance *inMat ) const
340{
341 // See if we have an existing material hook.
342 ShadowMaterialHook *hook = static_cast<ShadowMaterialHook*>( inMat->getHook( ShadowMaterialHook::Type ) );
343 if ( !hook )
344 {
345 // Create a hook and initialize it using the incoming material.
346 hook = new ShadowMaterialHook;
347 hook->init( inMat );
348 inMat->addHook( hook );
349 }
350
351 return hook->getShadowMat( getShadowType() );
352}
353
354U32 LightShadowMap::getBestTexSize( U32 scale ) const
355{

Callers

nothing calls this directly

Calls 4

addHookMethod · 0.80
getHookMethod · 0.45
initMethod · 0.45
getShadowMatMethod · 0.45

Tested by

no test coverage detected