diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 05f3d22c748..9b5cbc029a5 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -716,6 +716,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed the transparent SSR dependency not being properly disabled according to the asset dependencies (1260271). - Fixed issue with completely black AO on double sided materials when normal mode is set to None. - Fixed UI drawing of the quaternion (1251235) +- Fix an issue with the quality mode and perf mode on RTR and RTGI and getting rid of unwanted nans (1256923). ### Changed - Improve MIP selection for decals on Transparents diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/GlobalIllumination.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/GlobalIllumination.cs index eba7d983fef..6a5388566b1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/GlobalIllumination.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/GlobalIllumination.cs @@ -11,7 +11,8 @@ public sealed class GlobalIllumination : VolumeComponentWithQuality { bool UsesQualityMode() { - return mode.overrideState && mode == RayTracingMode.Quality; + // The default value is set to quality. So we should be in quality if not overriden or we have an override set to quality + return !mode.overrideState || mode == RayTracingMode.Quality; } /// diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflection.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflection.cs index 181f57109c7..eebc3628114 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflection.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflection.cs @@ -11,7 +11,8 @@ public class ScreenSpaceReflection : VolumeComponentWithQuality { bool UsesRayTracingQualityMode() { - return mode.overrideState && mode == RayTracingMode.Quality; + // The default value is set to quality. So we should be in quality if not overriden or we have an override set to quality + return !mode.overrideState || mode == RayTracingMode.Quality; } bool UsesRayTracing() diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Denoising/ReflectionDenoiser.compute b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Denoising/ReflectionDenoiser.compute index ca6004140da..bb21df6fdfd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Denoising/ReflectionDenoiser.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Denoising/ReflectionDenoiser.compute @@ -165,9 +165,13 @@ void BILATERAL_FILTER(uint3 dispatchThreadId : SV_DispatchThreadID, uint2 groupT float3 colorSum = float3(0.0, 0.0, 0.0); float wSum = 0.0; - uint2 tapCoord = centerCoord - effectiveRadius * passIncr; + int2 tapCoord = centerCoord - effectiveRadius * passIncr; for (int r = -effectiveRadius; r <= effectiveRadius; ++r, tapCoord += passIncr) { + // Make sure the pixel coord we are trying to use is in the screen (not out of bounds) + if (tapCoord.x >= _ScreenSize.x || tapCoord.x < 0 || tapCoord.y >= _ScreenSize.y || tapCoord.y < 0) + continue; + // Compute the weight (skip computation for the center) const BilateralData tapData = TapBilateralData(tapCoord); float w = r ? gaussian(r, sigma) * ComputeBilateralWeight(center, tapData) : 1.0;