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

Method _overrideFeatures

Engine/source/lighting/shadowMap/shadowMatHook.cpp:175–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175void ShadowMaterialHook::_overrideFeatures( ProcessedMaterial *mat,
176 U32 stageNum,
177 MaterialFeatureData &fd,
178 const FeatureSet &features )
179{
180 if ( stageNum != 0 )
181 {
182 fd.features.clear();
183 return;
184 }
185
186 // Disable the base texture if we don't
187 // have alpha test enabled.
188 if ( !fd.features[ MFT_AlphaTest ] )
189 {
190 fd.features.removeFeature( MFT_TexAnim );
191 fd.features.removeFeature( MFT_DiffuseMap );
192 }
193
194 // HACK: Need to figure out how to enable these
195 // suckers without this override call!
196
197 fd.features.setFeature( MFT_ParaboloidVertTransform,
198 features.hasFeature( MFT_ParaboloidVertTransform ) );
199 fd.features.setFeature( MFT_IsSinglePassParaboloid,
200 features.hasFeature( MFT_IsSinglePassParaboloid ) );
201
202 // The paraboloid transform outputs linear depth, so
203 // it needs to use the plain depth out feature.
204 if ( fd.features.hasFeature( MFT_ParaboloidVertTransform ) )
205 fd.features.addFeature( MFT_DepthOut );
206 else
207 fd.features.addFeature( MFT_EyeSpaceDepthOut );
208}
209
210ShadowMatInstance::ShadowMatInstance( Material *mat )
211 : MatInstance( *mat )

Callers

nothing calls this directly

Calls 5

removeFeatureMethod · 0.80
setFeatureMethod · 0.80
hasFeatureMethod · 0.80
addFeatureMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected