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

Method _getShadowMaterial

Engine/source/lighting/common/projectedShadow.cpp:444–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444BaseMatInstance* ProjectedShadow::_getShadowMaterial( BaseMatInstance *inMat )
445{
446 // See if we have an existing material hook.
447 ShadowMaterialHook *hook = static_cast<ShadowMaterialHook*>( inMat->getHook( ShadowMaterialHook::Type ) );
448 if ( !hook )
449 {
450 // Create a hook and initialize it using the incoming material.
451 hook = new ShadowMaterialHook;
452 hook->init( inMat );
453 inMat->addHook( hook );
454 }
455
456 return hook->getShadowMat( ShadowType_Spot );
457}
458
459void ProjectedShadow::_renderToTexture( F32 camDist, const TSRenderState &rdata )
460{

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