Skip to content

Commit

Permalink
Merge pull request #7999 from Unity-Technologies/internal/2023.1/staging
Browse files Browse the repository at this point in the history
Internal/2023.1/staging
  • Loading branch information
UnityAljosha authored Nov 21, 2023
2 parents b5a23ba + 48388ea commit 699aa6d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ public override int SupportedCameraStackingTypes()
StencilState m_DefaultStencilState;
LightCookieManager m_LightCookieManager;
IntermediateTextureMode m_IntermediateTextureMode;
bool m_VulkanEnablePreTransform;

// Materials used in URP Scriptable Render Passes
Material m_BlitMaterial = null;
Expand Down Expand Up @@ -353,6 +354,8 @@ public UniversalRenderer(UniversalRendererData data) : base(data)
LensFlareCommonSRP.mergeNeeded = 0;
LensFlareCommonSRP.maxLensFlareWithOcclusionTemporalSample = 1;
LensFlareCommonSRP.Initialize();

m_VulkanEnablePreTransform = GraphicsSettings.HasShaderDefine(BuiltinShaderDefine.UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION);
}

/// <inheritdoc />
Expand Down Expand Up @@ -738,7 +741,8 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re
#if UNITY_ANDROID || UNITY_WEBGL
// GLES can not use render texture's depth buffer with the color buffer of the backbuffer
// in such case we create a color texture for it too.
if (SystemInfo.graphicsDeviceType != GraphicsDeviceType.Vulkan)
// If Vulkan PreTransform is enabled we can't mix backbuffer and intermediate render target due to screen orientation mismatch
if (SystemInfo.graphicsDeviceType != GraphicsDeviceType.Vulkan || m_VulkanEnablePreTransform)
createColorTexture |= createDepthTexture;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ public IEnumerator MoveDirectoryTests()
yield return null;

CloseGraphWindow();

// Wait for any potential compilation to finish before entering cleanup, which deletes the files
while (ShaderUtil.anythingCompiling)
{
yield return null;
}
}
}
}

0 comments on commit 699aa6d

Please sign in to comment.