Add AfterForwardPass for custom postfx render location
This commit is contained in:
@@ -591,22 +591,22 @@ API_ENUM() enum class Quality : byte
|
||||
API_ENUM() enum class MaterialPostFxLocation : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// The after post processing pass using LDR input frame.
|
||||
/// The 'after' post processing pass using LDR input frame.
|
||||
/// </summary>
|
||||
AfterPostProcessingPass = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The before post processing pass using HDR input frame.
|
||||
/// The 'before' post processing pass using HDR input frame.
|
||||
/// </summary>
|
||||
BeforePostProcessingPass = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The before forward pass but after GBuffer with HDR input frame.
|
||||
/// The 'before' forward pass but after GBuffer with HDR input frame.
|
||||
/// </summary>
|
||||
BeforeForwardPass = 2,
|
||||
|
||||
/// <summary>
|
||||
/// The after custom post effects.
|
||||
/// The 'after' custom post effects.
|
||||
/// </summary>
|
||||
AfterCustomPostEffects = 3,
|
||||
|
||||
@@ -620,6 +620,11 @@ API_ENUM() enum class MaterialPostFxLocation : byte
|
||||
/// </summary>
|
||||
AfterAntiAliasingPass = 5,
|
||||
|
||||
/// <summary>
|
||||
/// The 'after' forward pass but before any post processing.
|
||||
/// </summary>
|
||||
AfterForwardPass = 6,
|
||||
|
||||
API_ENUM(Attributes="HideInEditor")
|
||||
MAX,
|
||||
};
|
||||
@@ -664,6 +669,11 @@ API_ENUM() enum class PostProcessEffectLocation
|
||||
/// </summary>
|
||||
AfterGBufferPass = 6,
|
||||
|
||||
/// <summary>
|
||||
/// The 'after' forward pass but before any post processing.
|
||||
/// </summary>
|
||||
AfterForwardPass = 7,
|
||||
|
||||
API_ENUM(Attributes="HideInEditor")
|
||||
MAX,
|
||||
};
|
||||
|
||||
@@ -545,6 +545,10 @@ void RenderInner(SceneRenderTask* task, RenderContext& renderContext, RenderCont
|
||||
RENDER_TARGET_POOL_SET_NAME(frameBuffer, "FrameBuffer");
|
||||
ForwardPass::Instance()->Render(renderContext, lightBuffer, frameBuffer);
|
||||
|
||||
// Material and Custom PostFx
|
||||
renderContext.List->RunMaterialPostFxPass(context, renderContext, MaterialPostFxLocation::AfterForwardPass, frameBuffer, lightBuffer);
|
||||
renderContext.List->RunCustomPostFxPass(context, renderContext, PostProcessEffectLocation::AfterForwardPass, frameBuffer, lightBuffer);
|
||||
|
||||
// Cleanup
|
||||
context->ResetRenderTarget();
|
||||
context->ResetSR();
|
||||
|
||||
Reference in New Issue
Block a user