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

Method renderEffects

Engine/source/postFx/postEffectManager.cpp:244–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244void PostEffectManager::renderEffects( const SceneRenderState *state,
245 const PFXRenderTime effectTiming,
246 const String &binName )
247{
248
249 // Check the global render effect state as
250 // well as the
251 if ( !smRenderEffects ||
252 ( state && !state->usePostEffects() ))
253 return;
254
255 EffectVector *effects = NULL;
256
257 switch( effectTiming )
258 {
259 case PFXBeforeBin:
260 effects = &mBeforeBinMap[binName];
261 break;
262
263 case PFXAfterBin:
264 effects = &mAfterBinMap[binName];
265 break;
266
267 case PFXAfterDiffuse:
268 effects = &mAfterDiffuseList;
269 break;
270
271 case PFXEndOfFrame:
272 effects = &mEndOfFrameList;
273 break;
274
275 case PFXTexGenOnDemand:
276 break;
277 }
278
279 AssertFatal( effects != NULL, "Bad effect time" );
280
281 // Skip out if we don't have any effects.
282 if ( effects->empty() )
283 return;
284
285 // This is used to pass the output texture
286 // of one effect into the next effect.
287 GFXTexHandle chainTex;
288
289 // Process the effects.
290 for ( U32 i = 0; i < effects->size(); i++ )
291 {
292 PostEffect *effect = (*effects)[i];
293 AssertFatal( effect != NULL, "Somehow this happened" );
294 effect->process( state, chainTex );
295 }
296}
297
298void PostEffectManager::setFrameMatrices( const MatrixF &worldToCamera, const MatrixF &cameraToScreen )
299{

Callers

nothing calls this directly

Calls 4

usePostEffectsMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
processMethod · 0.45

Tested by

no test coverage detected