MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / RunCustomPostFxPass

Method RunCustomPostFxPass

Source/Engine/Renderer/RenderList.cpp:468–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466}
467
468void RenderList::RunCustomPostFxPass(GPUContext* context, RenderContext& renderContext, PostProcessEffectLocation location, GPUTexture*& input, GPUTexture*& output)
469{
470 if (!(renderContext.View.Flags & ViewFlags::CustomPostProcess))
471 return;
472 for (PostProcessEffect* fx : renderContext.List->PostFx)
473 {
474 if (fx->Location == location)
475 {
476 context->ResetSR();
477 if (fx->UseSingleTarget || output == nullptr)
478 {
479 fx->Render(context, renderContext, input, nullptr);
480 }
481 else
482 {
483 fx->Render(context, renderContext, input, output);
484 Swap(input, output);
485 }
486 context->ResetRenderTarget();
487 context->ResetSR();
488 }
489 }
490}
491
492bool RenderList::HasAnyPostFx(const RenderContext& renderContext, PostProcessEffectLocation postProcess) const
493{

Callers 2

RenderInnerFunction · 0.80
FillMethod · 0.80

Calls 4

SwapFunction · 0.50
ResetSRMethod · 0.45
RenderMethod · 0.45
ResetRenderTargetMethod · 0.45

Tested by

no test coverage detected