Skip to content

Commit

Permalink
Fix multiscale VO darkening transparent windows when used with new Fr…
Browse files Browse the repository at this point in the history
…eeIVA depth masks
  • Loading branch information
LGhassen committed Oct 30, 2024
1 parent 7d8f237 commit e9c89ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions Source/PostProcessing/Effects/MultiScaleVO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ enum Pass
// command buffer warning
RenderTexture m_AmbientOnlyAO;

readonly RenderTargetIdentifier[] m_MRT =
{
BuiltinRenderTextureType.GBuffer0, // Albedo, Occ
BuiltinRenderTextureType.CameraTarget // Ambient
};

public MultiScaleVO(AmbientOcclusion settings)
{
m_Settings = settings;
Expand Down Expand Up @@ -532,7 +526,7 @@ public void CompositeAmbientOnly(PostProcessRenderContext context)
var cmd = context.command;
cmd.BeginSample("Ambient Occlusion Composite");
cmd.SetGlobalTexture(ShaderIDs.MSVOcclusionTexture, m_AmbientOnlyAO);
cmd.BlitFullscreenTriangle(BuiltinRenderTextureType.None, m_MRT, BuiltinRenderTextureType.CameraTarget, m_PropertySheet, (int)Pass.CompositionDeferred);
cmd.BlitFullscreenTriangle(BuiltinRenderTextureType.None, BuiltinRenderTextureType.GBuffer0, BuiltinRenderTextureType.CameraTarget, m_PropertySheet, (int)Pass.CompositionDeferred);
cmd.EndSample("Ambient Occlusion Composite");
}

Expand Down
4 changes: 2 additions & 2 deletions Source/PostProcessing/PostProcessLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,8 @@ void BuildCommandBuffers()
context.command = m_LegacyCmdBufferBeforeReflections;
ao.RenderAmbientOnly(context);

// Composite with GBuffer right before the lighting pass
context.command = m_LegacyCmdBufferBeforeLighting;
// Composite with GBuffer before reflections pass with Deferred uses for ambient
context.command = m_LegacyCmdBufferBeforeReflections;
ao.CompositeAmbientOnly(context);
}
else if (isAmbientOcclusionOpaque)
Expand Down

0 comments on commit e9c89ae

Please sign in to comment.