Commit b3fb141c authored by Philip Trettner's avatar Philip Trettner

Added general post-process pass to rendering pipeline

parent 772ea5c1
......@@ -16,6 +16,8 @@ enum class RenderPassType
Shadow,
/// Postprocess (no dept test, no culling) after opaque, before transparency resolve
PostprocessOpaque,
/// Postprocess (no dept test, no culling) after transparency resolve, in linear space
PostprocessAll,
};
}
}
......@@ -204,6 +204,20 @@ void RenderingPipeline::render(const std::function<void(RenderPass const& pass)>
// NO invert because blending
}
// Postprocess pass after transparency
{
RenderPass rp;
rp.type = RenderPassType::PostprocessAll;
rp.pipeline = this;
rp.camera = &cam;
rp.depthTarget = mTargetDepth;
rp.framebuffer = (toColorTmp ? mFboToColor : mFboToColorTmp);
auto fbo = (toColorTmp ? mFboToColor : mFboToColorTmp)->bind();
renderFunc(rp);
}
// TODO: ToneMapping, Gamma Correction
{
auto fbo = (toColorTmp ? mFboToColorTmp : mFboToColor)->bind();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment