From 36786b509c21aa9893c5fd6161a9daf9eb582f97 Mon Sep 17 00:00:00 2001 From: Emmanuel Turquin Date: Fri, 2 Oct 2020 03:50:21 +0200 Subject: [PATCH 1/3] Test that a material is non-decal before adding corresp. mesh to the RT AS. --- .../RenderPipeline/Raytracing/HDRaytracingManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs index 9397f95592a..252c72508a1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs @@ -221,8 +221,8 @@ AccelerationStructureStatus AddInstanceToRAS(Renderer currentRenderer, // Grab the material for the current sub-mesh Material currentMaterial = materialArray[meshIdx]; - // The material is transparent if either it has the requested keyword or is in the transparent queue range - if (currentMaterial != null) + // Make sure that the material is both non-null and non-decal + if (currentMaterial != null && !DecalSystem.IsHDRenderPipelineDecal(currentMaterial)) { // Mesh is valid given that all requirements are ok validMesh = true; @@ -233,7 +233,7 @@ AccelerationStructureStatus AddInstanceToRAS(Renderer currentRenderer, || (HDRenderQueue.k_RenderQueue_Transparent.lowerBound <= currentMaterial.renderQueue && HDRenderQueue.k_RenderQueue_Transparent.upperBound >= currentMaterial.renderQueue); - // aggregate the transparency info + // Aggregate the transparency info materialIsOnlyTransparent &= subMeshTransparentArray[meshIdx]; hasTransparentSubMaterial |= subMeshTransparentArray[meshIdx]; From 778c36c20cea28142ec5deb44586681b18c005e3 Mon Sep 17 00:00:00 2001 From: Emmanuel Turquin Date: Fri, 2 Oct 2020 11:19:53 +0200 Subject: [PATCH 2/3] Updated changelog. --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index eed9eae1dd7..705374eeffe 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -146,6 +146,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - When trying to install the local configuration package, if another one is already present the user is now asked whether they want to keep it or not. - Improved MSAA color resolve to fix issues when very bright and very dark samples are resolved together. - Improve performance of GPU light AABB generation +- Meshes assigned with a decal material are not visible anymore in ray-tracing or path-tracing. ## [10.0.0] - 2019-06-10 From 09566a58bed9c53c059e7cd31c6ddf107ca77e85 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Sat, 3 Oct 2020 23:47:32 +0200 Subject: [PATCH 3/3] Update HDRaytracingManager.cs --- .../Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs index 252c72508a1..07007bbd047 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs @@ -222,7 +222,7 @@ AccelerationStructureStatus AddInstanceToRAS(Renderer currentRenderer, Material currentMaterial = materialArray[meshIdx]; // Make sure that the material is both non-null and non-decal - if (currentMaterial != null && !DecalSystem.IsHDRenderPipelineDecal(currentMaterial)) + if (currentMaterial != null && !DecalSystem.IsDecalMaterial(currentMaterial)) { // Mesh is valid given that all requirements are ok validMesh = true;