diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 6f287bb957a..4ec1d2eb670 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -161,6 +161,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Improved MSAA color resolve to fix issues when very bright and very dark samples are resolved together. - Improve performance of GPU light AABB generation - Removed the max clamp value for the RTR, RTAO and RTGI's ray length (case 1279849). +- Meshes assigned with a decal material are not visible anymore in ray-tracing or path-tracing. ## [10.0.0] - 2019-06-10 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..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 @@ -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.IsDecalMaterial(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];