Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion com.unity.render-pipelines.universal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Version Updated
The version number for this package has increased due to a version update of a related graphics package.

### Fixed
## Fixed
- Fixed a performance regression in the 2D renderer regarding the PostProcessPass [case 1347893]
- Fixed a regression where filtering the scene view yielded incorrect visual results [case 1360233] (https://issuetracker.unity3d.com/product/unity/issues/guid/1360233)
- Fixed broken soft shadow filtering. [case 1374960](https://issuetracker.unity3d.com/product/unity/issues/guid/1374960/)
- Fixed incorrect light indexing on Windows Editor with Android target. [case 1378103](https://issuetracker.unity3d.com/product/unity/issues/guid/1378103/)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ void Swap(ref ScriptableRenderer r)
RenderTargetHandle cameraTargetHandle = RenderTargetHandle.GetCameraTarget(cameraData.xr);
RenderTargetIdentifier cameraTarget = (cameraData.targetTexture != null && !cameraData.xr.enabled) ? new RenderTargetIdentifier(cameraData.targetTexture) : cameraTargetHandle.Identifier();

// With camera stacking we not always resolve post to final screen as we might run post-processing in the middle of the stack.
if (m_UseSwapBuffer)
{
cameraTarget = (m_ResolveToScreen) ? cameraTarget : targetDestination;
Expand All @@ -551,9 +552,6 @@ void Swap(ref ScriptableRenderer r)
m_ResolveToScreen = cameraData.resolveFinalTarget || (m_Destination == cameraTargetHandle || m_HasFinalPass == true);
}

// With camera stacking we not always resolve post to final screen as we might run post-processing in the middle of the stack.
bool finishPostProcessOnScreen = m_ResolveToScreen;

#if ENABLE_VR && ENABLE_XR_MODULE
if (cameraData.xr.enabled)
{
Expand All @@ -575,7 +573,7 @@ void Swap(ref ScriptableRenderer r)
// For now, when render post - processing in the middle of the camera stack(not resolving to screen)
// we do an extra blit to ping pong results back to color texture. In future we should allow a Swap of the current active color texture
// in the pipeline to avoid this extra blit.
if (!finishPostProcessOnScreen && !m_UseSwapBuffer)
if (!m_ResolveToScreen && !m_UseSwapBuffer)
{
cmd.SetGlobalTexture(ShaderPropertyId.sourceTex, cameraTarget);
cmd.SetRenderTarget(new RenderTargetIdentifier(m_Source, 0, CubemapFace.Unknown, -1),
Expand All @@ -602,7 +600,7 @@ void Swap(ref ScriptableRenderer r)
// For now, when render post-processing in the middle of the camera stack (not resolving to screen)
// we do an extra blit to ping pong results back to color texture. In future we should allow a Swap of the current active color texture
// in the pipeline to avoid this extra blit.
if (!finishPostProcessOnScreen && !m_UseSwapBuffer)
if (!m_ResolveToScreen && !m_UseSwapBuffer)
{
cmd.SetGlobalTexture(ShaderPropertyId.sourceTex, cameraTarget);
cmd.SetRenderTarget(m_Source, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.DontCare);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,11 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re
if (cameraData.renderType == CameraRenderType.Base)
{
RenderTargetHandle cameraTargetHandle = RenderTargetHandle.GetCameraTarget(cameraData.xr);
bool sceneViewFilterEnabled = camera.sceneViewFilterMode == Camera.SceneViewFilterMode.ShowFiltered;

m_ActiveCameraColorAttachment = (createColorTexture) ? m_ColorBufferSystem.GetBackBuffer() : cameraTargetHandle;
m_ActiveCameraDepthAttachment = (createDepthTexture) ? m_CameraDepthAttachment : cameraTargetHandle;
//Scene filtering redraws the objects on top of the resulting frame. It has to draw directly to the sceneview buffer.
m_ActiveCameraColorAttachment = (createColorTexture && !sceneViewFilterEnabled) ? m_ColorBufferSystem.GetBackBuffer() : cameraTargetHandle;
m_ActiveCameraDepthAttachment = (createDepthTexture && !sceneViewFilterEnabled) ? m_CameraDepthAttachment : cameraTargetHandle;

bool intermediateRenderTexture = createColorTexture || createDepthTexture;

Expand Down