From 4b4f197c5efb3ef863d9327721a505572b2a2c67 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Thu, 14 May 2020 17:28:31 +0200 Subject: [PATCH 1/4] re-enable thumbnail gen only for d3d11 --- .../Editor/Lighting/Reflection/HDCubemapInspector.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs index 21df4435662..0ea5936d6ff 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs @@ -232,11 +232,12 @@ public override Texture2D RenderStaticPreview(string assetPath, Object[] subAsse m_PreviewUtility.ambientColor = Color.black; m_PreviewUtility.BeginStaticPreview(new Rect(0, 0, width, height)); m_PreviewUtility.DrawMesh(sphereMesh, Matrix4x4.identity, previewMaterial, 0); - // TODO: For now we comment this line as it cause out of memory on both DX12 and Vulkan API. + // TODO: For now the following line is D3D11 only as it cause out of memory on both DX12 and Vulkan API. // We will need to invest time to understand what is happening // For now priority is to enable Yamato platform automation - // This mean that cubemap icon will render incorrectly - //m_PreviewUtility.camera.Render(); + // This mean that cubemap icon will render incorrectly on anything but D3D11 + if(SystemInfo.graphicsDeviceType == GraphicsDeviceType.Direct3D11) + m_PreviewUtility.camera.Render(); var outTexture = m_PreviewUtility.EndStaticPreview(); From 0e176a298bdd542a28c2f12b2afcdde1a7cf377b Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Thu, 14 May 2020 17:31:09 +0200 Subject: [PATCH 2/4] Update changelog --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 8a1771e2073..79626c32a39 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -504,7 +504,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed the MaxLightCount being displayed when the light volume debug menu is on ColorAndEdge. - Fixed issue with unclear naming of debug menu for decals. - Fixed z-fighting in scene view when scene lighting is off (case 1203927) -- Fixed issue that prevented cubemap thumbnails from rendering. +- Fixed issue that prevented cubemap thumbnails from rendering (only on D3D11). - Fixed ray tracing with VR single-pass - Fix an exception in ray tracing that happens if two LOD levels are using the same mesh renderer. - Fixed error in the console when switching shader to decal in the material UI. From 2b8e899db23ad77637d8300c5058000fde805004 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Thu, 14 May 2020 17:46:35 +0200 Subject: [PATCH 3/4] try enable metal --- .../Editor/Lighting/Reflection/HDCubemapInspector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs index 0ea5936d6ff..756f2eef93d 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs @@ -236,7 +236,7 @@ public override Texture2D RenderStaticPreview(string assetPath, Object[] subAsse // We will need to invest time to understand what is happening // For now priority is to enable Yamato platform automation // This mean that cubemap icon will render incorrectly on anything but D3D11 - if(SystemInfo.graphicsDeviceType == GraphicsDeviceType.Direct3D11) + if(SystemInfo.graphicsDeviceType == GraphicsDeviceType.Direct3D11 || SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal) m_PreviewUtility.camera.Render(); var outTexture = m_PreviewUtility.EndStaticPreview(); From d4a251df59f0a918ff993204f1ccdf89ddb504ea Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Fri, 15 May 2020 10:34:11 +0200 Subject: [PATCH 4/4] Update changelog and comment --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 2 +- .../Editor/Lighting/Reflection/HDCubemapInspector.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 79626c32a39..e42aa70b4ed 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -504,7 +504,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed the MaxLightCount being displayed when the light volume debug menu is on ColorAndEdge. - Fixed issue with unclear naming of debug menu for decals. - Fixed z-fighting in scene view when scene lighting is off (case 1203927) -- Fixed issue that prevented cubemap thumbnails from rendering (only on D3D11). +- Fixed issue that prevented cubemap thumbnails from rendering (only on D3D11 and Metal). - Fixed ray tracing with VR single-pass - Fix an exception in ray tracing that happens if two LOD levels are using the same mesh renderer. - Fixed error in the console when switching shader to decal in the material UI. diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs index 756f2eef93d..e65b65b5eb0 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs @@ -232,7 +232,7 @@ public override Texture2D RenderStaticPreview(string assetPath, Object[] subAsse m_PreviewUtility.ambientColor = Color.black; m_PreviewUtility.BeginStaticPreview(new Rect(0, 0, width, height)); m_PreviewUtility.DrawMesh(sphereMesh, Matrix4x4.identity, previewMaterial, 0); - // TODO: For now the following line is D3D11 only as it cause out of memory on both DX12 and Vulkan API. + // TODO: For now the following line is D3D11 + Metal only as it cause out of memory on both DX12 and Vulkan API. // We will need to invest time to understand what is happening // For now priority is to enable Yamato platform automation // This mean that cubemap icon will render incorrectly on anything but D3D11