diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 525f1a8391e..51809acae69 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed error when disabling opaque objects on a camera with MSAA. - Fixed double camera preview. - Fixed the volumetric clouds cloud map not being centered over the world origin (case 1364465). +- Fixed the emissive being overriden by ray traced sub-surface scattering (case 1364456). ### Changed - Visual Environment ambient mode is now Dynamic by default. diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Subsurface-Scattering.md b/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Subsurface-Scattering.md index 1df1765a2b9..b61f7d12e2d 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Subsurface-Scattering.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Subsurface-Scattering.md @@ -19,3 +19,6 @@ Ray traced subsurface scattering uses the [Volume](Volumes.md) framework, so to | Property | Description | | -------------- | ------------------------------------------------------------ | | **Sample Count** | Defines the number of samples that are cast per pixel to evaluate the subsurface scattering lighting. | + +## Limitations +* Emissive surfaces are incompatible with ray traced sub-surface scattering. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassRayTracingSubSurface.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassRayTracingSubSurface.hlsl index 944a6377b40..588ff1b955c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassRayTracingSubSurface.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassRayTracingSubSurface.hlsl @@ -30,7 +30,8 @@ void ClosestSubSurface(inout RayIntersectionSubSurface rayIntersection : SV_RayP bool isVisible; GetSurfaceAndBuiltinData(fragInput, -incidentDirection, posInput, surfaceData, builtinData, currentVertex, rayIntersection.cone, isVisible); - // make sure we output the normal and the indirect diffuse lighting value + // make sure we output the normal rayIntersection.outNormal = fragInput.tangentToWorld[2]; - rayIntersection.outIndirectDiffuse = builtinData.bakeDiffuseLighting; + // Make sure to output the indirect diffuse lighting value and the emissive value + rayIntersection.outIndirectDiffuse = builtinData.bakeDiffuseLighting + builtinData.emissiveColor; }