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

Method DrawPostFxMaterial

Source/Engine/Renderer/Renderer.cpp:322–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320}
321
322void Renderer::DrawPostFxMaterial(GPUContext* context, const RenderContext& renderContext, MaterialBase* material, GPUTexture* output, GPUTextureView* input)
323{
324 CHECK(material && material->IsPostFx());
325 CHECK(context && output);
326
327 context->ResetSR();
328 context->SetViewport((float)output->Width(), (float)output->Height());
329 context->SetRenderTarget(output->View());
330 context->FlushState();
331
332 MaterialBase::BindParameters bindParams(context, renderContext);
333 bindParams.Input = input;
334 material->Bind(bindParams);
335
336 context->DrawFullscreenTriangle();
337 context->ResetRenderTarget();
338}
339
340void Renderer::DrawActors(RenderContext& renderContext, const Array<Actor*>& customActors)
341{

Callers 1

RenderMethod · 0.80

Calls 8

ResetSRMethod · 0.45
SetViewportMethod · 0.45
SetRenderTargetMethod · 0.45
ViewMethod · 0.45
FlushStateMethod · 0.45
BindMethod · 0.45
ResetRenderTargetMethod · 0.45

Tested by

no test coverage detected