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

Method getShadowMat

Engine/source/terrain/terrCellMaterial.cpp:864–881  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

862}
863
864BaseMatInstance* TerrainCellMaterial::getShadowMat()
865{
866 // Find our material which has some settings
867 // defined on it in script.
868 Material *mat = MATMGR->getMaterialDefinitionByName( "AL_DefaultShadowMaterial" );
869
870 // Create the material instance adding the feature which
871 // handles rendering terrain cut outs.
872 FeatureSet features = MATMGR->getDefaultFeatures();
873 BaseMatInstance *matInst = mat->createMatInstance();
874 if ( !matInst->init( features, getGFXVertexFormat<TerrVertex>() ) )
875 {
876 delete matInst;
877 matInst = NULL;
878 }
879
880 return matInst;
881}
882

Callers

nothing calls this directly

Calls 3

createMatInstanceMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected