MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / addInst

Method addInst

Engine/source/lighting/shadowMap/shadowMapPass.cpp:252–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252void ShadowRenderPassManager::addInst( RenderInst *inst )
253{
254 PROFILE_SCOPE(ShadowRenderPassManager_addInst);
255
256 if ( inst->type == RIT_Mesh )
257 {
258 MeshRenderInst *meshRI = static_cast<MeshRenderInst*>( inst );
259 if ( !meshRI->matInst )
260 return;
261
262 const BaseMaterialDefinition *mat = meshRI->matInst->getMaterial();
263 if ( !mat->castsShadows() || (mat->isTranslucent() && !mat->isAlphatest()))
264 {
265 // Do not add this instance, return here and avoid the default behavior
266 // of calling up to Parent::addInst()
267 return;
268 }
269 }
270
271 Parent::addInst(inst);
272}

Callers 15

prepRenderImageMethod · 0.45
prepRenderImageMethod · 0.45
prepRenderImageMethod · 0.45
prepRenderImageMethod · 0.45
prepRenderImageMethod · 0.45
innerRenderMethod · 0.45
renderMethod · 0.45
_renderBlockMethod · 0.45
prepRenderImageMethod · 0.45
prepRenderImageMethod · 0.45

Calls 4

castsShadowsMethod · 0.80
isTranslucentMethod · 0.80
isAlphatestMethod · 0.80
getMaterialMethod · 0.45

Tested by

no test coverage detected