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
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed useless editor repaint when using lod bias.
- Fixed multi-editing with new light intensity slider.
- Fixed issue with density volumes flickering when editing shape box.
- Fixed issue with image layers in the graphics compositor (case 1289936).

## [10.2.0] - 2020-10-19

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ public void UpdateOutputCamera()
{
var compositorData = m_LayerCamera.GetComponent<AdditionalCompositorData>();
if (compositorData)
compositorData.clearColorTexture = (m_Show && m_InputTexture != null) ? m_InputTexture : Texture2D.blackTexture;
compositorData.clearColorTexture = (m_Show && m_InputTexture != null) ? m_InputTexture : (m_LayerPositionInStack == 0) ? Texture2D.blackTexture : null;
}

if (m_LayerCamera.enabled)
Expand Down Expand Up @@ -653,14 +653,16 @@ public void SetupLayerCamera(CompositorLayer targetLayer, int layerPositionInSta
{
if (layerPositionInStack != 0)
{
// The next layer in the stack should clear with the texture of the previous layer: this will copy the content of the target RT to the RTHandle and preserve post process
// The next layer in the stack should clear with the texture of the previous layer:
// this will copy the content of the target RT to the RTHandle and preserve post process
// Unless we have an image layer with a valid texture: in this case we use the texture as clear color
cameraData.clearColorMode = HDAdditionalCameraData.ClearColorMode.None;
var compositorData = m_LayerCamera.GetComponent<AdditionalCompositorData>();
if (!compositorData)
{
compositorData = m_LayerCamera.gameObject.AddComponent<AdditionalCompositorData>();
}
if (m_Type != LayerType.Image)
if (m_Type != LayerType.Image || (m_Type == LayerType.Image && m_InputTexture == null))
{
compositorData.clearColorTexture = targetLayer.GetRenderTarget();
compositorData.clearDepthTexture = targetLayer.m_RTHandle;
Expand Down