fix refraction + MSAA + TAA (depth resolve)
the depth buffer wasn't resolved in this case. We fix this by always creating a depth buffer resolve pass -- which is a lot more robust. this pass automatically culled if the depth is not used (i.e. TAA or DoF are off). The pass is a no-op if resolving is not needed.
This commit is contained in:
committed by
Mathias Agopian
parent
84f0e97c78
commit
bcd8ce3c93
@@ -442,6 +442,13 @@ void FRenderer::renderJob(ArenaScope& arena, FView& view) {
|
||||
refractionPass(fg, config, colorGradingConfigForColor, pass, view);
|
||||
FrameGraphId<FrameGraphTexture> input = colorPassOutput;
|
||||
|
||||
// resolve depth -- which might be needed because of TAA. This pass will be culled
|
||||
// if the depth is not use below.
|
||||
auto& blackboard = fg.getBlackboard();
|
||||
auto depth = blackboard.get<FrameGraphTexture>("depth");
|
||||
depth = ppm.resolve(fg, "Resolved Depth Buffer", depth);
|
||||
blackboard.put("depth", depth);
|
||||
|
||||
// TAA for color pass
|
||||
if (taaOptions.enabled) {
|
||||
input = ppm.taa(fg, input, view.getFrameHistory(), taaOptions, colorGradingConfig);
|
||||
@@ -458,14 +465,6 @@ void FRenderer::renderJob(ArenaScope& arena, FView& view) {
|
||||
|
||||
if (hasPostProcess) {
|
||||
if (dofOptions.enabled) {
|
||||
|
||||
// dof needs access to the depth buffer, when MSAA is enabled, it might need
|
||||
// to be resolved.
|
||||
auto& blackboard = fg.getBlackboard();
|
||||
auto depth = blackboard.get<FrameGraphTexture>("depth");
|
||||
depth = ppm.resolve(fg, "Resolved Depth Buffer", depth);
|
||||
blackboard.put("depth", depth);
|
||||
|
||||
input = ppm.dof(fg, input, dofOptions, needsAlphaChannel, cameraInfo);
|
||||
}
|
||||
if (colorGrading) {
|
||||
|
||||
Reference in New Issue
Block a user