diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LargeAmbientOcclusionDenoised.asset b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LargeAmbientOcclusionDenoised.asset index 048fa0c8ae5..bfe0eff6921 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LargeAmbientOcclusionDenoised.asset +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LargeAmbientOcclusionDenoised.asset @@ -33,8 +33,8 @@ MonoBehaviour: active: 1 m_AdvancedMode: 0 quality: - m_OverrideState: 0 - m_Value: 1 + m_OverrideState: 1 + m_Value: 3 rayTracing: m_OverrideState: 1 m_Value: 1 @@ -71,24 +71,6 @@ MonoBehaviour: m_Value: serializedVersion: 2 m_Bits: 4294967295 - rayLength: - m_OverrideState: 1 - m_Value: 10 - min: 0 - max: 50 - sampleCount: - m_OverrideState: 0 - m_Value: 4 - min: 1 - max: 64 - denoise: - m_OverrideState: 1 - m_Value: 1 - denoiserRadius: - m_OverrideState: 1 - m_Value: 1 - min: 0.001 - max: 1 m_StepCount: m_OverrideState: 0 m_Value: 6 @@ -110,6 +92,24 @@ MonoBehaviour: m_Value: 2 min: 1 max: 8 + m_RayLength: + m_OverrideState: 1 + m_Value: 10 + min: 0 + max: 50 + m_SampleCount: + m_OverrideState: 1 + m_Value: 4 + min: 1 + max: 64 + m_Denoise: + m_OverrideState: 1 + m_Value: 1 + m_DenoiserRadius: + m_OverrideState: 1 + m_Value: 1 + min: 0.001 + max: 1 --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 @@ -147,6 +147,9 @@ MonoBehaviour: skyAmbientMode: m_OverrideState: 1 m_Value: 0 + fogType: + m_OverrideState: 0 + m_Value: 0 --- !u!114 &6873565285517369310 MonoBehaviour: m_ObjectHideFlags: 3 @@ -199,6 +202,27 @@ MonoBehaviour: hdriSky: m_OverrideState: 1 m_Value: {fileID: 8900000, guid: 21bb9ef0ab3fe414bacf326d4f1d8ee2, type: 3} + enableDistortion: + m_OverrideState: 0 + m_Value: 0 + procedural: + m_OverrideState: 0 + m_Value: 1 + flowmap: + m_OverrideState: 0 + m_Value: {fileID: 0} + upperHemisphereOnly: + m_OverrideState: 0 + m_Value: 1 + scrollDirection: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + scrollSpeed: + m_OverrideState: 0 + m_Value: 2 + min: 0 enableBackplate: m_OverrideState: 0 m_Value: 0 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LargeAmbientOcclusionNoisy.asset b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LargeAmbientOcclusionNoisy.asset index be79b2fec89..ca117bbdcb3 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LargeAmbientOcclusionNoisy.asset +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LargeAmbientOcclusionNoisy.asset @@ -33,8 +33,8 @@ MonoBehaviour: active: 1 m_AdvancedMode: 0 quality: - m_OverrideState: 0 - m_Value: 1 + m_OverrideState: 1 + m_Value: 3 rayTracing: m_OverrideState: 1 m_Value: 1 @@ -71,24 +71,6 @@ MonoBehaviour: m_Value: serializedVersion: 2 m_Bits: 4294967295 - rayLength: - m_OverrideState: 1 - m_Value: 10 - min: 0 - max: 50 - sampleCount: - m_OverrideState: 0 - m_Value: 4 - min: 1 - max: 64 - denoise: - m_OverrideState: 0 - m_Value: 1 - denoiserRadius: - m_OverrideState: 1 - m_Value: 1 - min: 0.001 - max: 1 m_StepCount: m_OverrideState: 0 m_Value: 6 @@ -110,6 +92,24 @@ MonoBehaviour: m_Value: 2 min: 1 max: 8 + m_RayLength: + m_OverrideState: 1 + m_Value: 10 + min: 0 + max: 50 + m_SampleCount: + m_OverrideState: 1 + m_Value: 4 + min: 1 + max: 64 + m_Denoise: + m_OverrideState: 1 + m_Value: 0 + m_DenoiserRadius: + m_OverrideState: 1 + m_Value: 1 + min: 0.001 + max: 1 --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 @@ -147,6 +147,9 @@ MonoBehaviour: skyAmbientMode: m_OverrideState: 1 m_Value: 0 + fogType: + m_OverrideState: 0 + m_Value: 0 --- !u!114 &6873565285517369310 MonoBehaviour: m_ObjectHideFlags: 3 @@ -199,6 +202,27 @@ MonoBehaviour: hdriSky: m_OverrideState: 1 m_Value: {fileID: 8900000, guid: 21bb9ef0ab3fe414bacf326d4f1d8ee2, type: 3} + enableDistortion: + m_OverrideState: 0 + m_Value: 0 + procedural: + m_OverrideState: 0 + m_Value: 1 + flowmap: + m_OverrideState: 0 + m_Value: {fileID: 0} + upperHemisphereOnly: + m_OverrideState: 0 + m_Value: 1 + scrollDirection: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + scrollSpeed: + m_OverrideState: 0 + m_Value: 2 + min: 0 enableBackplate: m_OverrideState: 0 m_Value: 0 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LocalAmbeintOcclusionDenoised.asset b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LocalAmbeintOcclusionDenoised.asset index 9477ccddafd..5d94160f73c 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LocalAmbeintOcclusionDenoised.asset +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LocalAmbeintOcclusionDenoised.asset @@ -29,8 +29,8 @@ MonoBehaviour: active: 1 m_AdvancedMode: 0 quality: - m_OverrideState: 0 - m_Value: 1 + m_OverrideState: 1 + m_Value: 3 rayTracing: m_OverrideState: 1 m_Value: 1 @@ -67,24 +67,6 @@ MonoBehaviour: m_Value: serializedVersion: 2 m_Bits: 4294967295 - rayLength: - m_OverrideState: 1 - m_Value: 1 - min: 0 - max: 50 - sampleCount: - m_OverrideState: 1 - m_Value: 4 - min: 1 - max: 64 - denoise: - m_OverrideState: 1 - m_Value: 1 - denoiserRadius: - m_OverrideState: 1 - m_Value: 0.5 - min: 0.001 - max: 1 m_StepCount: m_OverrideState: 1 m_Value: 6 @@ -106,3 +88,21 @@ MonoBehaviour: m_Value: 2 min: 1 max: 8 + m_RayLength: + m_OverrideState: 1 + m_Value: 1 + min: 0 + max: 50 + m_SampleCount: + m_OverrideState: 1 + m_Value: 4 + min: 1 + max: 64 + m_Denoise: + m_OverrideState: 1 + m_Value: 1 + m_DenoiserRadius: + m_OverrideState: 1 + m_Value: 0.5 + min: 0.001 + max: 1 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LocalAmbientOcclusionNoisy.asset b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LocalAmbientOcclusionNoisy.asset index 4cbba3e7bf9..cc33c97869b 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LocalAmbientOcclusionNoisy.asset +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LocalAmbientOcclusionNoisy.asset @@ -52,6 +52,27 @@ MonoBehaviour: hdriSky: m_OverrideState: 1 m_Value: {fileID: 8900000, guid: 5fb993a599e7e9b4b825e1a28e6d2c07, type: 3} + enableDistortion: + m_OverrideState: 0 + m_Value: 0 + procedural: + m_OverrideState: 0 + m_Value: 1 + flowmap: + m_OverrideState: 0 + m_Value: {fileID: 0} + upperHemisphereOnly: + m_OverrideState: 0 + m_Value: 1 + scrollDirection: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + scrollSpeed: + m_OverrideState: 0 + m_Value: 2 + min: 0 enableBackplate: m_OverrideState: 0 m_Value: 0 @@ -116,8 +137,8 @@ MonoBehaviour: active: 1 m_AdvancedMode: 0 quality: - m_OverrideState: 0 - m_Value: 1 + m_OverrideState: 1 + m_Value: 3 rayTracing: m_OverrideState: 1 m_Value: 1 @@ -154,24 +175,6 @@ MonoBehaviour: m_Value: serializedVersion: 2 m_Bits: 4294967295 - rayLength: - m_OverrideState: 1 - m_Value: 0.2 - min: 0 - max: 50 - sampleCount: - m_OverrideState: 1 - m_Value: 2 - min: 1 - max: 64 - denoise: - m_OverrideState: 0 - m_Value: 0 - denoiserRadius: - m_OverrideState: 0 - m_Value: 16 - min: 1 - max: 32 m_StepCount: m_OverrideState: 0 m_Value: 6 @@ -193,6 +196,24 @@ MonoBehaviour: m_Value: 2 min: 1 max: 6 + m_RayLength: + m_OverrideState: 1 + m_Value: 0.2 + min: 0 + max: 50 + m_SampleCount: + m_OverrideState: 1 + m_Value: 2 + min: 1 + max: 64 + m_Denoise: + m_OverrideState: 1 + m_Value: 0 + m_DenoiserRadius: + m_OverrideState: 0 + m_Value: 16 + min: 1 + max: 32 --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 @@ -229,3 +250,6 @@ MonoBehaviour: skyAmbientMode: m_OverrideState: 0 m_Value: 0 + fogType: + m_OverrideState: 0 + m_Value: 0 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationDenoised1.asset b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationDenoised1.asset index bf3d9cf48c6..89b12d05b82 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationDenoised1.asset +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationDenoised1.asset @@ -75,6 +75,27 @@ MonoBehaviour: hdriSky: m_OverrideState: 1 m_Value: {fileID: 8900000, guid: 614ae0372d7dfb847a1926990e89fa06, type: 3} + enableDistortion: + m_OverrideState: 0 + m_Value: 0 + procedural: + m_OverrideState: 0 + m_Value: 1 + flowmap: + m_OverrideState: 0 + m_Value: {fileID: 0} + upperHemisphereOnly: + m_OverrideState: 0 + m_Value: 1 + scrollDirection: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + scrollSpeed: + m_OverrideState: 0 + m_Value: 2 + min: 0 enableBackplate: m_OverrideState: 0 m_Value: 0 @@ -155,8 +176,8 @@ MonoBehaviour: active: 1 m_AdvancedMode: 0 quality: - m_OverrideState: 0 - m_Value: 1 + m_OverrideState: 1 + m_Value: 3 enable: m_OverrideState: 1 m_Value: 1 @@ -196,52 +217,52 @@ MonoBehaviour: m_Value: serializedVersion: 2 m_Bits: 4294967295 - rayLength: + mode: + m_OverrideState: 1 + m_Value: 1 + sampleCount: + m_OverrideState: 1 + m_Value: 5 + min: 1 + max: 32 + bounceCount: + m_OverrideState: 1 + m_Value: 2 + min: 1 + max: 31 + m_RayLength: m_OverrideState: 1 m_Value: 2.2 min: 0.001 max: 50 - clampValue: + m_ClampValue: m_OverrideState: 1 m_Value: 0.83 min: 0.001 max: 10 - mode: - m_OverrideState: 1 - m_Value: 1 - fullResolution: + m_FullResolution: m_OverrideState: 0 m_Value: 0 - upscaleRadius: + m_UpscaleRadius: m_OverrideState: 0 m_Value: 2 min: 2 max: 4 - sampleCount: - m_OverrideState: 1 - m_Value: 5 - min: 1 - max: 32 - bounceCount: - m_OverrideState: 1 - m_Value: 2 - min: 1 - max: 31 - denoise: + m_Denoise: m_OverrideState: 1 m_Value: 1 - halfResolutionDenoiser: + m_HalfResolutionDenoiser: m_OverrideState: 0 m_Value: 0 - denoiserRadius: + m_DenoiserRadius: m_OverrideState: 0 m_Value: 0.6 min: 0.001 max: 1 - secondDenoiserPass: + m_SecondDenoiserPass: m_OverrideState: 0 m_Value: 1 - secondDenoiserRadius: + m_SecondDenoiserRadius: m_OverrideState: 0 m_Value: 0.3 min: 0.001 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationDenoised1Half.asset b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationDenoised1Half.asset index 90a3803ac3d..645dc8e4abe 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationDenoised1Half.asset +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationDenoised1Half.asset @@ -75,6 +75,27 @@ MonoBehaviour: hdriSky: m_OverrideState: 1 m_Value: {fileID: 8900000, guid: 614ae0372d7dfb847a1926990e89fa06, type: 3} + enableDistortion: + m_OverrideState: 0 + m_Value: 0 + procedural: + m_OverrideState: 0 + m_Value: 1 + flowmap: + m_OverrideState: 0 + m_Value: {fileID: 0} + upperHemisphereOnly: + m_OverrideState: 0 + m_Value: 1 + scrollDirection: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + scrollSpeed: + m_OverrideState: 0 + m_Value: 2 + min: 0 enableBackplate: m_OverrideState: 0 m_Value: 0 @@ -155,8 +176,8 @@ MonoBehaviour: active: 1 m_AdvancedMode: 0 quality: - m_OverrideState: 0 - m_Value: 1 + m_OverrideState: 1 + m_Value: 3 enable: m_OverrideState: 1 m_Value: 1 @@ -196,52 +217,52 @@ MonoBehaviour: m_Value: serializedVersion: 2 m_Bits: 4294967295 - rayLength: + mode: + m_OverrideState: 1 + m_Value: 1 + sampleCount: + m_OverrideState: 1 + m_Value: 5 + min: 1 + max: 32 + bounceCount: + m_OverrideState: 1 + m_Value: 2 + min: 1 + max: 31 + m_RayLength: m_OverrideState: 1 m_Value: 2.2 min: 0.001 max: 50 - clampValue: + m_ClampValue: m_OverrideState: 1 m_Value: 0.83 min: 0.001 max: 10 - mode: - m_OverrideState: 1 - m_Value: 1 - fullResolution: + m_FullResolution: m_OverrideState: 0 m_Value: 0 - upscaleRadius: + m_UpscaleRadius: m_OverrideState: 0 m_Value: 2 min: 2 max: 4 - sampleCount: - m_OverrideState: 1 - m_Value: 5 - min: 1 - max: 32 - bounceCount: - m_OverrideState: 1 - m_Value: 2 - min: 1 - max: 31 - denoise: + m_Denoise: m_OverrideState: 1 m_Value: 1 - halfResolutionDenoiser: + m_HalfResolutionDenoiser: m_OverrideState: 1 m_Value: 1 - denoiserRadius: + m_DenoiserRadius: m_OverrideState: 0 m_Value: 0.6 min: 0.001 max: 1 - secondDenoiserPass: + m_SecondDenoiserPass: m_OverrideState: 0 m_Value: 1 - secondDenoiserRadius: + m_SecondDenoiserRadius: m_OverrideState: 0 m_Value: 0.3 min: 0.001 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationDenoised2.asset b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationDenoised2.asset index 591ccfbca3c..24b4ee6f21f 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationDenoised2.asset +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationDenoised2.asset @@ -75,6 +75,27 @@ MonoBehaviour: hdriSky: m_OverrideState: 1 m_Value: {fileID: 8900000, guid: 614ae0372d7dfb847a1926990e89fa06, type: 3} + enableDistortion: + m_OverrideState: 0 + m_Value: 0 + procedural: + m_OverrideState: 0 + m_Value: 1 + flowmap: + m_OverrideState: 0 + m_Value: {fileID: 0} + upperHemisphereOnly: + m_OverrideState: 0 + m_Value: 1 + scrollDirection: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + scrollSpeed: + m_OverrideState: 0 + m_Value: 2 + min: 0 enableBackplate: m_OverrideState: 0 m_Value: 0 @@ -155,8 +176,8 @@ MonoBehaviour: active: 1 m_AdvancedMode: 0 quality: - m_OverrideState: 0 - m_Value: 1 + m_OverrideState: 1 + m_Value: 3 enable: m_OverrideState: 1 m_Value: 1 @@ -196,52 +217,52 @@ MonoBehaviour: m_Value: serializedVersion: 2 m_Bits: 4294967295 - rayLength: + mode: + m_OverrideState: 1 + m_Value: 1 + sampleCount: + m_OverrideState: 1 + m_Value: 5 + min: 1 + max: 32 + bounceCount: + m_OverrideState: 1 + m_Value: 2 + min: 1 + max: 31 + m_RayLength: m_OverrideState: 1 m_Value: 2.2 min: 0.001 max: 50 - clampValue: + m_ClampValue: m_OverrideState: 1 m_Value: 0.83 min: 0.001 max: 10 - mode: - m_OverrideState: 1 - m_Value: 1 - fullResolution: + m_FullResolution: m_OverrideState: 0 m_Value: 0 - upscaleRadius: + m_UpscaleRadius: m_OverrideState: 0 m_Value: 2 min: 2 max: 4 - sampleCount: - m_OverrideState: 1 - m_Value: 5 - min: 1 - max: 32 - bounceCount: - m_OverrideState: 1 - m_Value: 2 - min: 1 - max: 31 - denoise: + m_Denoise: m_OverrideState: 1 m_Value: 1 - halfResolutionDenoiser: + m_HalfResolutionDenoiser: m_OverrideState: 0 m_Value: 0 - denoiserRadius: + m_DenoiserRadius: m_OverrideState: 0 m_Value: 0.6 min: 0.001 max: 1 - secondDenoiserPass: + m_SecondDenoiserPass: m_OverrideState: 1 m_Value: 1 - secondDenoiserRadius: + m_SecondDenoiserRadius: m_OverrideState: 0 m_Value: 0.3 min: 0.001 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationFog.asset b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationFog.asset index 009a1c7443b..45faada58a3 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationFog.asset +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationFog.asset @@ -175,6 +175,27 @@ MonoBehaviour: hdriSky: m_OverrideState: 1 m_Value: {fileID: 8900000, guid: 614ae0372d7dfb847a1926990e89fa06, type: 3} + enableDistortion: + m_OverrideState: 0 + m_Value: 0 + procedural: + m_OverrideState: 0 + m_Value: 1 + flowmap: + m_OverrideState: 0 + m_Value: {fileID: 0} + upperHemisphereOnly: + m_OverrideState: 0 + m_Value: 1 + scrollDirection: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + scrollSpeed: + m_OverrideState: 0 + m_Value: 2 + min: 0 enableBackplate: m_OverrideState: 0 m_Value: 0 @@ -256,8 +277,8 @@ MonoBehaviour: active: 1 m_AdvancedMode: 0 quality: - m_OverrideState: 0 - m_Value: 1 + m_OverrideState: 1 + m_Value: 3 enable: m_OverrideState: 1 m_Value: 1 @@ -297,52 +318,52 @@ MonoBehaviour: m_Value: serializedVersion: 2 m_Bits: 4294967295 - rayLength: + mode: + m_OverrideState: 1 + m_Value: 1 + sampleCount: + m_OverrideState: 1 + m_Value: 5 + min: 1 + max: 32 + bounceCount: + m_OverrideState: 1 + m_Value: 2 + min: 1 + max: 31 + m_RayLength: m_OverrideState: 1 m_Value: 2.2 min: 0.001 max: 50 - clampValue: + m_ClampValue: m_OverrideState: 1 m_Value: 0.83 min: 0.001 max: 10 - mode: - m_OverrideState: 1 - m_Value: 1 - fullResolution: + m_FullResolution: m_OverrideState: 0 m_Value: 0 - upscaleRadius: + m_UpscaleRadius: m_OverrideState: 0 m_Value: 2 min: 2 max: 4 - sampleCount: - m_OverrideState: 1 - m_Value: 5 - min: 1 - max: 32 - bounceCount: - m_OverrideState: 1 - m_Value: 2 - min: 1 - max: 31 - denoise: + m_Denoise: m_OverrideState: 1 m_Value: 1 - halfResolutionDenoiser: + m_HalfResolutionDenoiser: m_OverrideState: 0 m_Value: 0 - denoiserRadius: + m_DenoiserRadius: m_OverrideState: 0 m_Value: 0.6 min: 0.001 max: 1 - secondDenoiserPass: + m_SecondDenoiserPass: m_OverrideState: 1 m_Value: 1 - secondDenoiserRadius: + m_SecondDenoiserRadius: m_OverrideState: 0 m_Value: 0.3 min: 0.001 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationPerfFull.asset b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationPerfFull.asset index 19475acf80a..e283a5e7c0e 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationPerfFull.asset +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationPerfFull.asset @@ -75,6 +75,27 @@ MonoBehaviour: hdriSky: m_OverrideState: 1 m_Value: {fileID: 8900000, guid: 614ae0372d7dfb847a1926990e89fa06, type: 3} + enableDistortion: + m_OverrideState: 0 + m_Value: 0 + procedural: + m_OverrideState: 0 + m_Value: 1 + flowmap: + m_OverrideState: 0 + m_Value: {fileID: 0} + upperHemisphereOnly: + m_OverrideState: 0 + m_Value: 1 + scrollDirection: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + scrollSpeed: + m_OverrideState: 0 + m_Value: 2 + min: 0 enableBackplate: m_OverrideState: 0 m_Value: 0 @@ -155,8 +176,8 @@ MonoBehaviour: active: 1 m_AdvancedMode: 0 quality: - m_OverrideState: 0 - m_Value: 1 + m_OverrideState: 1 + m_Value: 3 enable: m_OverrideState: 1 m_Value: 1 @@ -196,52 +217,52 @@ MonoBehaviour: m_Value: serializedVersion: 2 m_Bits: 4294967295 - rayLength: + mode: + m_OverrideState: 1 + m_Value: 1 + sampleCount: + m_OverrideState: 1 + m_Value: 5 + min: 1 + max: 32 + bounceCount: + m_OverrideState: 1 + m_Value: 2 + min: 1 + max: 31 + m_RayLength: m_OverrideState: 1 m_Value: 2.2 min: 0.001 max: 50 - clampValue: + m_ClampValue: m_OverrideState: 1 m_Value: 0.83 min: 0.001 max: 10 - mode: - m_OverrideState: 1 - m_Value: 1 - fullResolution: + m_FullResolution: m_OverrideState: 1 m_Value: 1 - upscaleRadius: + m_UpscaleRadius: m_OverrideState: 0 m_Value: 2 min: 2 max: 4 - sampleCount: - m_OverrideState: 1 - m_Value: 5 - min: 1 - max: 32 - bounceCount: - m_OverrideState: 1 - m_Value: 2 - min: 1 - max: 31 - denoise: + m_Denoise: m_OverrideState: 0 m_Value: 1 - halfResolutionDenoiser: + m_HalfResolutionDenoiser: m_OverrideState: 0 m_Value: 0 - denoiserRadius: + m_DenoiserRadius: m_OverrideState: 0 m_Value: 0.6 min: 0.001 max: 1 - secondDenoiserPass: + m_SecondDenoiserPass: m_OverrideState: 0 m_Value: 1 - secondDenoiserRadius: + m_SecondDenoiserRadius: m_OverrideState: 0 m_Value: 0.3 min: 0.001 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationPerfHalf.asset b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationPerfHalf.asset index 5b651afb450..d97ba7e5b2f 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationPerfHalf.asset +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/GlobalIlluminationPerfHalf.asset @@ -75,6 +75,27 @@ MonoBehaviour: hdriSky: m_OverrideState: 1 m_Value: {fileID: 8900000, guid: 614ae0372d7dfb847a1926990e89fa06, type: 3} + enableDistortion: + m_OverrideState: 0 + m_Value: 0 + procedural: + m_OverrideState: 0 + m_Value: 1 + flowmap: + m_OverrideState: 0 + m_Value: {fileID: 0} + upperHemisphereOnly: + m_OverrideState: 0 + m_Value: 1 + scrollDirection: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + scrollSpeed: + m_OverrideState: 0 + m_Value: 2 + min: 0 enableBackplate: m_OverrideState: 0 m_Value: 0 @@ -155,8 +176,8 @@ MonoBehaviour: active: 1 m_AdvancedMode: 0 quality: - m_OverrideState: 0 - m_Value: 1 + m_OverrideState: 1 + m_Value: 3 enable: m_OverrideState: 1 m_Value: 1 @@ -196,52 +217,52 @@ MonoBehaviour: m_Value: serializedVersion: 2 m_Bits: 4294967295 - rayLength: + mode: + m_OverrideState: 1 + m_Value: 1 + sampleCount: + m_OverrideState: 1 + m_Value: 5 + min: 1 + max: 32 + bounceCount: + m_OverrideState: 1 + m_Value: 2 + min: 1 + max: 31 + m_RayLength: m_OverrideState: 1 m_Value: 2.2 min: 0.001 max: 50 - clampValue: + m_ClampValue: m_OverrideState: 1 m_Value: 0.83 min: 0.001 max: 10 - mode: - m_OverrideState: 1 - m_Value: 1 - fullResolution: + m_FullResolution: m_OverrideState: 0 m_Value: 0 - upscaleRadius: + m_UpscaleRadius: m_OverrideState: 0 m_Value: 2 min: 2 max: 4 - sampleCount: - m_OverrideState: 1 - m_Value: 5 - min: 1 - max: 32 - bounceCount: - m_OverrideState: 1 - m_Value: 2 - min: 1 - max: 31 - denoise: + m_Denoise: m_OverrideState: 0 m_Value: 1 - halfResolutionDenoiser: + m_HalfResolutionDenoiser: m_OverrideState: 0 m_Value: 0 - denoiserRadius: + m_DenoiserRadius: m_OverrideState: 0 m_Value: 0.6 min: 0.001 max: 1 - secondDenoiserPass: + m_SecondDenoiserPass: m_OverrideState: 0 m_Value: 1 - secondDenoiserRadius: + m_SecondDenoiserRadius: m_OverrideState: 0 m_Value: 0.3 min: 0.001 diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 93b62e43bad..065664c1ddd 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -140,6 +140,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added support for transparent Unlit in path tracing. - Added a minimal lit used for RTGI in peformance mode. - Added procedural metering mask that can follow an object +- Added presets quality settings for RTAO and RTGI. ### Fixed - Fix when rescale probe all direction below zero (1219246) diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/AmbientOcclusionEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/AmbientOcclusionEditor.cs index 0c4347c2084..20de4995594 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/AmbientOcclusionEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/AmbientOcclusionEditor.cs @@ -81,14 +81,21 @@ public override void OnInspectorGUI() if (HDRenderPipeline.pipelineSupportsRayTracing && m_RayTracing.overrideState.boolValue && m_RayTracing.value.boolValue) { PropertyField(m_LayerMask, EditorGUIUtility.TrTextContent("Layer Mask", "Layer mask used to include the objects for ambient occlusion.")); - PropertyField(m_RayLength, EditorGUIUtility.TrTextContent("Ray Length", "Controls the length of ambient occlusion rays.")); - PropertyField(m_SampleCount, EditorGUIUtility.TrTextContent("Sample Count", "Number of samples for ray traced ambient occlusion.")); - PropertyField(m_Denoise, EditorGUIUtility.TrTextContent("Denoise", "Enable denoising on the ray traced ambient occlusion.")); + base.OnInspectorGUI(); // Quality Setting + GUI.enabled = useCustomValue; { EditorGUI.indentLevel++; - PropertyField(m_DenoiserRadius, EditorGUIUtility.TrTextContent("Denoiser Radius", "Radius parameter for the denoising.")); + PropertyField(m_RayLength, EditorGUIUtility.TrTextContent("Ray Length", "Controls the length of ambient occlusion rays.")); + PropertyField(m_SampleCount, EditorGUIUtility.TrTextContent("Sample Count", "Number of samples for ray traced ambient occlusion.")); + PropertyField(m_Denoise, EditorGUIUtility.TrTextContent("Denoise", "Enable denoising on the ray traced ambient occlusion.")); + { + EditorGUI.indentLevel++; + PropertyField(m_DenoiserRadius, EditorGUIUtility.TrTextContent("Denoiser Radius", "Radius parameter for the denoising.")); + EditorGUI.indentLevel--; + } EditorGUI.indentLevel--; } + GUI.enabled = true; } else { diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Raytracing/GlobalIlluminationEditor.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Raytracing/GlobalIlluminationEditor.cs index 7a1981a2f8d..1606a2aa3e7 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Raytracing/GlobalIlluminationEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Raytracing/GlobalIlluminationEditor.cs @@ -83,6 +83,19 @@ public override void OnEnable() m_SecondDenoiserRadius = Unpack(o.Find(x => x.secondDenoiserRadius)); } + public void DenoiserGUI() + { + PropertyField(m_Denoise); + { + EditorGUI.indentLevel++; + PropertyField(m_HalfResolutionDenoiser); + PropertyField(m_DenoiserRadius); + PropertyField(m_SecondDenoiserPass); + PropertyField(m_SecondDenoiserRadius); + EditorGUI.indentLevel--; + } + } + public override void OnInspectorGUI() { @@ -112,8 +125,6 @@ public override void OnInspectorGUI() { rayTracingSettingsDisplayed = true; PropertyField(m_LayerMask); - PropertyField(m_RayLength); - PropertyField(m_ClampValue); if (currentAsset.currentPlatformRenderPipelineSettings.supportedRayTracingMode == RenderPipelineSettings.SupportedRayTracingMode.Both) { PropertyField(m_Mode); @@ -121,40 +132,54 @@ public override void OnInspectorGUI() switch (m_Mode.value.GetEnumValue()) { case RayTracingMode.Performance: - { - PropertyField(m_FullResolution); - PropertyField(m_UpscaleRadius); - } - break; + { + base.OnInspectorGUI(); // Quality Setting + EditorGUI.indentLevel++; + GUI.enabled = useCustomValue; + PropertyField(m_RayLength); + PropertyField(m_ClampValue); + PropertyField(m_FullResolution); + PropertyField(m_UpscaleRadius); + DenoiserGUI(); + GUI.enabled = true; + EditorGUI.indentLevel--; + + } + break; case RayTracingMode.Quality: - { - PropertyField(m_SampleCount); - PropertyField(m_BounceCount); - } - break; + { + PropertyField(m_RayLength); + PropertyField(m_ClampValue); + PropertyField(m_SampleCount); + PropertyField(m_BounceCount); + DenoiserGUI(); + } + break; } EditorGUI.indentLevel--; } else if (currentAsset.currentPlatformRenderPipelineSettings.supportedRayTracingMode == RenderPipelineSettings.SupportedRayTracingMode.Quality) { + PropertyField(m_RayLength); + PropertyField(m_ClampValue); PropertyField(m_SampleCount); PropertyField(m_BounceCount); + DenoiserGUI(); } else { + base.OnInspectorGUI(); // Quality Setting + EditorGUI.indentLevel++; + GUI.enabled = useCustomValue; + PropertyField(m_RayLength); + PropertyField(m_ClampValue); PropertyField(m_FullResolution); PropertyField(m_UpscaleRadius); - } - - PropertyField(m_Denoise); - { - EditorGUI.indentLevel++; - PropertyField(m_HalfResolutionDenoiser); - PropertyField(m_DenoiserRadius); - PropertyField(m_SecondDenoiserPass); - PropertyField(m_SecondDenoiserRadius); + DenoiserGUI(); + GUI.enabled = true; EditorGUI.indentLevel--; } + } } 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 ae46f065fc4..d9f0e87e4d5 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/GlobalIllumination.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/GlobalIllumination.cs @@ -1,4 +1,5 @@ using System; +using UnityEngine.Serialization; namespace UnityEngine.Rendering.HighDefinition { @@ -123,14 +124,32 @@ public int filterRadius /// /// Controls the length of GI rays. /// - [Tooltip("Controls the length of GI rays.")] - public ClampedFloatParameter rayLength = new ClampedFloatParameter(10f, 0.001f, 50f); + public float rayLength + { + get + { + if (!UsesQualitySettings() || mode == RayTracingMode.Quality) + return m_RayLength.value; + else + return GetLightingQualitySettings().RTGIRayLength[(int)quality.value]; + } + set { m_RayLength.value = value; } + } /// /// Controls the clamp of intensity. /// - [Tooltip("Controls the clamp of intensity.")] - public ClampedFloatParameter clampValue = new ClampedFloatParameter(1.0f, 0.001f, 10.0f); + public float clampValue + { + get + { + if (!UsesQualitySettings() || mode == RayTracingMode.Quality) + return m_ClampValue.value; + else + return GetLightingQualitySettings().RTGIClampValue[(int)quality.value]; + } + set { m_ClampValue.value = value; } + } /// /// Controls which version of the effect should be used. @@ -142,14 +161,32 @@ public int filterRadius /// /// Defines if the effect should be evaluated at full resolution. /// - [Tooltip("Full Resolution")] - public BoolParameter fullResolution = new BoolParameter(false); + public bool fullResolution + { + get + { + if (!UsesQualitySettings()) + return m_FullResolution.value; + else + return GetLightingQualitySettings().RTGIFullResolution[(int)quality.value]; + } + set { m_FullResolution.value = value; } + } /// /// Defines what radius value should be used to pre-filter the signal. /// - [Tooltip("Upscale Radius")] - public ClampedIntParameter upscaleRadius = new ClampedIntParameter(2, 2, 4); + public int upscaleRadius + { + get + { + if (!UsesQualitySettings()) + return m_UpscaleRadius.value; + else + return GetLightingQualitySettings().RTGIUpScaleRadius[(int)quality.value]; + } + set { m_UpscaleRadius.value = value; } + } // Quality /// @@ -168,31 +205,113 @@ public int filterRadius /// /// Defines if the ray traced global illumination should be denoised. /// - [Tooltip("Denoise the ray-traced GI.")] - public BoolParameter denoise = new BoolParameter(false); + public bool denoise + { + get + { + if (!UsesQualitySettings() || mode == RayTracingMode.Quality) + return m_Denoise.value; + else + return GetLightingQualitySettings().RTGIDenoise[(int)quality.value]; + } + set { m_Denoise.value = value; } + } /// /// Defines if the denoiser should be evaluated at half resolution. /// - [Tooltip("Use a half resolution denoiser.")] - public BoolParameter halfResolutionDenoiser = new BoolParameter(false); + public bool halfResolutionDenoiser + { + get + { + if (!UsesQualitySettings() || mode == RayTracingMode.Quality) + return m_HalfResolutionDenoiser.value; + else + return GetLightingQualitySettings().RTGIHalfResDenoise[(int)quality.value]; + } + set { m_HalfResolutionDenoiser.value = value; } + } /// /// Controls the radius of the global illumination denoiser (First Pass). /// - [Tooltip("Controls the radius of the GI denoiser (First Pass).")] - public ClampedFloatParameter denoiserRadius = new ClampedFloatParameter(0.6f, 0.001f, 1.0f); + public float denoiserRadius + { + get + { + if (!UsesQualitySettings() || mode == RayTracingMode.Quality) + return m_DenoiserRadius.value; + else + return GetLightingQualitySettings().RTGIDenoiserRadius[(int)quality.value]; + } + set { m_DenoiserRadius.value = value; } + } /// /// Defines if the second denoising pass should be enabled. /// - [Tooltip("Enable second denoising pass.")] - public BoolParameter secondDenoiserPass = new BoolParameter(false); + public bool secondDenoiserPass + { + get + { + if (!UsesQualitySettings() || mode == RayTracingMode.Quality) + return m_SecondDenoiserPass.value; + else + return GetLightingQualitySettings().RTGISecondDenoise[(int)quality.value]; + } + set { m_SecondDenoiserPass.value = value; } + } /// /// Controls the radius of the global illumination denoiser (Second Pass). /// + public float secondDenoiserRadius + { + get + { + if (!UsesQualitySettings() || mode == RayTracingMode.Quality) + return m_SecondDenoiserRadius.value; + else + return GetLightingQualitySettings().RTGISecondDenoiserRadius[(int)quality.value]; + } + set { m_SecondDenoiserRadius.value = value; } + } + + // RTGI + [SerializeField, FormerlySerializedAs("rayLength")] + [Tooltip("Controls the length of GI rays.")] + public ClampedFloatParameter m_RayLength = new ClampedFloatParameter(0.5f, 0f, 50f); + + [SerializeField, FormerlySerializedAs("clampValue")] + [Tooltip("Controls the clamp of intensity.")] + private ClampedFloatParameter m_ClampValue = new ClampedFloatParameter(1.0f, 0.001f, 10.0f); + + [SerializeField, FormerlySerializedAs("fullResolution")] + [Tooltip("Full Resolution")] + public BoolParameter m_FullResolution = new BoolParameter(false); + + [SerializeField, FormerlySerializedAs("upscaleRadius")] + [Tooltip("Upscale Radius")] + public ClampedIntParameter m_UpscaleRadius = new ClampedIntParameter(2, 2, 4); + + [SerializeField, FormerlySerializedAs("denoise")] + [Tooltip("Denoise the ray-traced GI.")] + public BoolParameter m_Denoise = new BoolParameter(false); + + [SerializeField, FormerlySerializedAs("halfResolutionDenoiser")] + [Tooltip("Use a half resolution denoiser.")] + public BoolParameter m_HalfResolutionDenoiser = new BoolParameter(false); + + [SerializeField, FormerlySerializedAs("denoiserRadius")] + [Tooltip("Controls the radius of the GI denoiser (First Pass).")] + public ClampedFloatParameter m_DenoiserRadius = new ClampedFloatParameter(0.6f, 0.001f, 1.0f); + + [SerializeField, FormerlySerializedAs("secondDenoiserPass")] + [Tooltip("Enable second denoising pass.")] + public BoolParameter m_SecondDenoiserPass = new BoolParameter(false); + + [SerializeField, FormerlySerializedAs("secondDenoiserRadius")] [Tooltip("Controls the radius of the GI denoiser (Second Pass).")] - public ClampedFloatParameter secondDenoiserRadius = new ClampedFloatParameter(0.3f, 0.001f, 0.5f); + public ClampedFloatParameter m_SecondDenoiserRadius = new ClampedFloatParameter(0.3f, 0.001f, 0.5f); } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.cs index 74170876cb9..587cd892582 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.cs @@ -53,22 +53,62 @@ public sealed class AmbientOcclusion : VolumeComponentWithQuality /// /// Controls the length of ray traced ambient occlusion rays. /// - public ClampedFloatParameter rayLength = new ClampedFloatParameter(0.5f, 0f, 50f); + public float rayLength + { + get + { + if (!UsesQualitySettings()) + return m_RayLength.value; + else + return GetLightingQualitySettings().RTAORayLength[(int)quality.value]; + } + set { m_RayLength.value = value; } + } /// /// Number of samples for evaluating the effect. /// - public ClampedIntParameter sampleCount = new ClampedIntParameter(4, 1, 64); + public int sampleCount + { + get + { + if (!UsesQualitySettings()) + return m_SampleCount.value; + else + return GetLightingQualitySettings().RTAOSampleCount[(int)quality.value]; + } + set { m_SampleCount.value = value; } + } /// /// Defines if the ray traced ambient occlusion should be denoised. /// - public BoolParameter denoise = new BoolParameter(false); + public bool denoise + { + get + { + if (!UsesQualitySettings()) + return m_Denoise.value; + else + return GetLightingQualitySettings().RTAODenoise[(int)quality.value]; + } + set { m_Denoise.value = value; } + } /// /// Controls the radius of the ray traced ambient occlusion denoiser. /// - public ClampedFloatParameter denoiserRadius = new ClampedFloatParameter(0.5f, 0.001f, 1.0f); + public float denoiserRadius + { + get + { + if (!UsesQualitySettings()) + return m_DenoiserRadius.value; + else + return GetLightingQualitySettings().RTAODenoiserRadius[(int)quality.value]; + } + set { m_DenoiserRadius.value = value; } + } /// /// Number of steps to take along one signed direction during horizon search (this is the number of steps in positive and negative direction). Increasing the value can lead to detection @@ -148,22 +188,29 @@ public int directionCount set { m_DirectionCount.value = value; } } + // SSAO [SerializeField, FormerlySerializedAs("stepCount")] private ClampedIntParameter m_StepCount = new ClampedIntParameter(6, 2, 32); - [SerializeField, FormerlySerializedAs("fullResolution")] private BoolParameter m_FullResolution = new BoolParameter(false); - [SerializeField, FormerlySerializedAs("maximumRadiusInPixels")] private ClampedIntParameter m_MaximumRadiusInPixels = new ClampedIntParameter(40, 16, 256); - // Temporal only parameter [SerializeField, FormerlySerializedAs("bilateralUpsample")] private BoolParameter m_BilateralUpsample = new BoolParameter(true); - // Non-temporal only parameters [SerializeField, FormerlySerializedAs("directionCount")] private ClampedIntParameter m_DirectionCount = new ClampedIntParameter(2, 1, 6); + + // RTAO + [SerializeField, FormerlySerializedAs("rayLength")] + private ClampedFloatParameter m_RayLength = new ClampedFloatParameter(0.5f, 0f, 50f); + [SerializeField, FormerlySerializedAs("sampleCount")] + public ClampedIntParameter m_SampleCount = new ClampedIntParameter(1, 1, 64); + [SerializeField, FormerlySerializedAs("denoise")] + public BoolParameter m_Denoise = new BoolParameter(true); + [SerializeField, FormerlySerializedAs("denoiserRadius")] + public ClampedFloatParameter m_DenoiserRadius = new ClampedFloatParameter(1.0f, 0.001f, 1.0f); } partial class AmbientOcclusionSystem diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/GlobalLightingQualitySettings.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/GlobalLightingQualitySettings.cs index f7bacf1b677..31ad235af21 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/GlobalLightingQualitySettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/GlobalLightingQualitySettings.cs @@ -67,6 +67,60 @@ internal GlobalLightingQualitySettings() SSGIFilterRadius[(int)ScalableSettingLevelParameter.Level.Low] = 2; SSGIFilterRadius[(int)ScalableSettingLevelParameter.Level.Medium] = 5; SSGIFilterRadius[(int)ScalableSettingLevelParameter.Level.High] = 7; + + // Ray Traced Ambient Occlusion + RTAORayLength[(int)ScalableSettingLevelParameter.Level.Low] = 0.5f; + RTAORayLength[(int)ScalableSettingLevelParameter.Level.Medium] = 3.0f; + RTAORayLength[(int)ScalableSettingLevelParameter.Level.High] = 20.0f; + + RTAOSampleCount[(int)ScalableSettingLevelParameter.Level.Low] = 1; + RTAOSampleCount[(int)ScalableSettingLevelParameter.Level.Medium] = 2; + RTAOSampleCount[(int)ScalableSettingLevelParameter.Level.High] = 8; + + RTAODenoise[(int)ScalableSettingLevelParameter.Level.Low] = true; + RTAODenoise[(int)ScalableSettingLevelParameter.Level.Medium] = true; + RTAODenoise[(int)ScalableSettingLevelParameter.Level.High] = true; + + RTAODenoiserRadius[(int)ScalableSettingLevelParameter.Level.Low] = 0.25f; + RTAODenoiserRadius[(int)ScalableSettingLevelParameter.Level.Medium] = 0.5f; + RTAODenoiserRadius[(int)ScalableSettingLevelParameter.Level.High] = 0.65f; + + // RTGI + RTGIRayLength[(int)ScalableSettingLevelParameter.Level.Low] = 50.0f; + RTGIRayLength[(int)ScalableSettingLevelParameter.Level.Medium] = 50.0f; + RTGIRayLength[(int)ScalableSettingLevelParameter.Level.High] = 50.0f; + + RTGIFullResolution[(int)ScalableSettingLevelParameter.Level.Low] = false; + RTGIFullResolution[(int)ScalableSettingLevelParameter.Level.Medium] = false; + RTGIFullResolution[(int)ScalableSettingLevelParameter.Level.High] = true; + + RTGIClampValue[(int)ScalableSettingLevelParameter.Level.Low] = 0.5f; + RTGIClampValue[(int)ScalableSettingLevelParameter.Level.Medium] = 0.8f; + RTGIClampValue[(int)ScalableSettingLevelParameter.Level.High] = 1.5f; + + RTGIUpScaleRadius[(int)ScalableSettingLevelParameter.Level.Low] = 4; + RTGIUpScaleRadius[(int)ScalableSettingLevelParameter.Level.Medium] = 4; + RTGIUpScaleRadius[(int)ScalableSettingLevelParameter.Level.High] = 4; + + RTGIDenoise[(int)ScalableSettingLevelParameter.Level.Low] = true; + RTGIDenoise[(int)ScalableSettingLevelParameter.Level.Medium] = true; + RTGIDenoise[(int)ScalableSettingLevelParameter.Level.High] = true; + + RTGIHalfResDenoise[(int)ScalableSettingLevelParameter.Level.Low] = true; + RTGIHalfResDenoise[(int)ScalableSettingLevelParameter.Level.Medium] = false; + RTGIHalfResDenoise[(int)ScalableSettingLevelParameter.Level.High] = false; + + RTGIDenoiserRadius[(int)ScalableSettingLevelParameter.Level.Low] = 0.66f; + RTGIDenoiserRadius[(int)ScalableSettingLevelParameter.Level.Medium] = 0.66f; + RTGIDenoiserRadius[(int)ScalableSettingLevelParameter.Level.High] = 1.0f; + + RTGISecondDenoise[(int)ScalableSettingLevelParameter.Level.Low] = true; + RTGISecondDenoise[(int)ScalableSettingLevelParameter.Level.Medium] = true; + RTGISecondDenoise[(int)ScalableSettingLevelParameter.Level.High] = true; + + RTGISecondDenoiserRadius[(int)ScalableSettingLevelParameter.Level.Low] = 0.33f; + RTGISecondDenoiserRadius[(int)ScalableSettingLevelParameter.Level.Medium] = 0.33f; + RTGISecondDenoiserRadius[(int)ScalableSettingLevelParameter.Level.High] = 0.5f; } internal static GlobalLightingQualitySettings NewDefault() => new GlobalLightingQualitySettings(); @@ -105,6 +159,36 @@ internal GlobalLightingQualitySettings() [System.NonSerialized] public int[] SSGIFilterRadius = new int[s_QualitySettingCount]; + // Ray Traced Ambient Occlusion + /// Controls the length of ray traced ambient occlusion rays. + public float[] RTAORayLength = new float[s_QualitySettingCount]; + /// Number of samples for evaluating the effect. + public int[] RTAOSampleCount = new int[s_QualitySettingCount]; + /// Defines if the ray traced ambient occlusion should be denoised. + public bool[] RTAODenoise = new bool[s_QualitySettingCount]; + /// Controls the radius of the ray traced ambient occlusion denoiser. + public float[] RTAODenoiserRadius = new float[s_QualitySettingCount]; + + // Ray Traced Global Illumination + /// Controls the length of ray traced global illumination rays. + public float[] RTGIRayLength = new float[s_QualitySettingCount]; + /// Controls if the effect should be computed at full resolution. + public bool[] RTGIFullResolution = new bool[s_QualitySettingCount]; + /// Clamp value used to reduce the variance in the integration signal. + public float[] RTGIClampValue = new float[s_QualitySettingCount]; + /// Radius for the up-sample pass. + public int[] RTGIUpScaleRadius = new int[s_QualitySettingCount]; + /// Flag that enables the first denoising pass. + public bool[] RTGIDenoise = new bool[s_QualitySettingCount]; + /// Flag that defines if the denoiser should be evaluated at half resolution. + public bool[] RTGIHalfResDenoise = new bool[s_QualitySettingCount]; + /// Flag that defines the radius of the first denoiser. + public float[] RTGIDenoiserRadius = new float[s_QualitySettingCount]; + /// Flag that enables the second denoising pass. + public bool[] RTGISecondDenoise = new bool[s_QualitySettingCount]; + /// Flag that defines the radius of the second denoiser. + public float[] RTGISecondDenoiserRadius = new float[s_QualitySettingCount]; + // TODO: Volumetric fog quality // TODO: Shadows. This needs to be discussed further as there is an idiosyncracy here as we have different level of quality settings, diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingAmbientOcclusion.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingAmbientOcclusion.cs index 627335f6b38..e1f4b22aa01 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingAmbientOcclusion.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingAmbientOcclusion.cs @@ -85,8 +85,8 @@ public void RenderAO(HDCamera hdCamera, CommandBuffer cmd, RTHandle outputTextur cmd.SetRayTracingAccelerationStructure(aoShader, HDShaderIDs._RaytracingAccelerationStructureName, accelerationStructure); // Inject the ray generation data (be careful of the global constant buffer limitation) - globalCB._RaytracingRayMaxLength = aoSettings.rayLength.value; - globalCB._RaytracingNumSamples = aoSettings.sampleCount.value; + globalCB._RaytracingRayMaxLength = aoSettings.rayLength; + globalCB._RaytracingNumSamples = aoSettings.sampleCount; ConstantBuffer.PushGlobal(cmd, globalCB, HDShaderIDs._ShaderVariablesRaytracing); // Set the data for the ray generation @@ -110,7 +110,7 @@ public void RenderAO(HDCamera hdCamera, CommandBuffer cmd, RTHandle outputTextur using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.RaytracingFilterAmbientOcclusion))) { - if(aoSettings.denoise.value) + if(aoSettings.denoise) { // Grab the history buffer RTHandle ambientOcclusionHistory = hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.RaytracedAmbientOcclusion) @@ -131,7 +131,7 @@ public void RenderAO(HDCamera hdCamera, CommandBuffer cmd, RTHandle outputTextur // Apply the diffuse denoiser HDDiffuseDenoiser diffuseDenoiser = m_RenderPipeline.GetDiffuseDenoiser(); - diffuseDenoiser.DenoiseBuffer(cmd, hdCamera, m_AOIntermediateBuffer1, outputTexture, aoSettings.denoiserRadius.value); + diffuseDenoiser.DenoiseBuffer(cmd, hdCamera, m_AOIntermediateBuffer1, outputTexture, aoSettings.denoiserRadius); } else { diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingIndirectDiffuse.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingIndirectDiffuse.cs index 3d23a25dba5..e6f48d232f7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingIndirectDiffuse.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingIndirectDiffuse.cs @@ -142,11 +142,11 @@ DeferredLightingRTParameters PrepareIndirectDiffuseDeferredLightingRTParameters( } deferredParameters.globalCB = m_ShaderVariablesRayTracingCB; - deferredParameters.globalCB._RaytracingIntensityClamp = settings.clampValue.value; + deferredParameters.globalCB._RaytracingIntensityClamp = settings.clampValue; deferredParameters.globalCB._RaytracingPreExposition = 1; deferredParameters.globalCB._RaytracingDiffuseRay = 1; deferredParameters.globalCB._RaytracingIncludeSky = 1; - deferredParameters.globalCB._RaytracingRayMaxLength = settings.rayLength.value; + deferredParameters.globalCB._RaytracingRayMaxLength = settings.rayLength; deferredParameters.globalCB._RayTracingDiffuseLightingOnly = deferredParameters.diffuseLightingOnly ? 1 : 0; return deferredParameters; @@ -171,7 +171,7 @@ void RenderIndirectDiffusePerformance(HDCamera hdCamera, CommandBuffer cmd, Scri using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.RaytracingIntegrateIndirectDiffuse))) { // Fetch the new sample kernel - int currentKernel = indirectDiffuseCS.FindKernel(settings.fullResolution.value ? "RaytracingIndirectDiffuseFullRes" : "RaytracingIndirectDiffuseHalfRes"); + int currentKernel = indirectDiffuseCS.FindKernel(settings.fullResolution ? "RaytracingIndirectDiffuseFullRes" : "RaytracingIndirectDiffuseHalfRes"); // Inject the ray-tracing sampling data blueNoise.BindDitheredRNGData8SPP(cmd); @@ -206,7 +206,7 @@ void RenderIndirectDiffusePerformance(HDCamera hdCamera, CommandBuffer cmd, Scri using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.RaytracingFilterIndirectDiffuse))) { // Fetch the right filter to use - int currentKernel = indirectDiffuseCS.FindKernel(settings.fullResolution.value ? "IndirectDiffuseIntegrationUpscaleFullRes" : "IndirectDiffuseIntegrationUpscaleHalfRes"); + int currentKernel = indirectDiffuseCS.FindKernel(settings.fullResolution ? "IndirectDiffuseIntegrationUpscaleFullRes" : "IndirectDiffuseIntegrationUpscaleHalfRes"); // Inject all the parameters for the compute cmd.SetComputeTextureParam(indirectDiffuseCS, currentKernel, HDShaderIDs._DepthTexture, m_SharedRTManager.GetDepthStencilBuffer()); @@ -216,7 +216,7 @@ void RenderIndirectDiffusePerformance(HDCamera hdCamera, CommandBuffer cmd, Scri cmd.SetComputeTextureParam(indirectDiffuseCS, currentKernel, HDShaderIDs._BlueNoiseTexture, blueNoise.textureArray16RGB); cmd.SetComputeTextureParam(indirectDiffuseCS, currentKernel, HDShaderIDs._UpscaledIndirectDiffuseTextureRW, intermediateBuffer1); cmd.SetComputeTextureParam(indirectDiffuseCS, currentKernel, HDShaderIDs._ScramblingTexture, m_Asset.renderPipelineResources.textures.scramblingTex); - cmd.SetComputeIntParam(indirectDiffuseCS, HDShaderIDs._SpatialFilterRadius, settings.upscaleRadius.value); + cmd.SetComputeIntParam(indirectDiffuseCS, HDShaderIDs._SpatialFilterRadius, settings.upscaleRadius); // Texture dimensions int texWidth = hdCamera.actualWidth; @@ -234,7 +234,7 @@ void RenderIndirectDiffusePerformance(HDCamera hdCamera, CommandBuffer cmd, Scri HDUtils.BlitCameraTexture(cmd, intermediateBuffer1, m_IndirectDiffuseBuffer0); // Denoise if required - if (settings.denoise.value) + if (settings.denoise) { DenoiseIndirectDiffuseBuffer(hdCamera, cmd, settings); } @@ -277,9 +277,9 @@ void BindRayTracedIndirectDiffuseData(CommandBuffer cmd, HDCamera hdCamera cmd.SetRayTracingTextureParam(indirectDiffuseShader, HDShaderIDs._SkyTexture, m_SkyManager.GetSkyReflection(hdCamera)); // Update global constant buffer - m_ShaderVariablesRayTracingCB._RaytracingRayMaxLength = settings.rayLength.value; + m_ShaderVariablesRayTracingCB._RaytracingRayMaxLength = settings.rayLength; m_ShaderVariablesRayTracingCB._RaytracingNumSamples = settings.sampleCount.value; - m_ShaderVariablesRayTracingCB._RaytracingIntensityClamp = settings.clampValue.value; + m_ShaderVariablesRayTracingCB._RaytracingIntensityClamp = settings.clampValue; m_ShaderVariablesRayTracingCB._RaytracingMaxRecursion = settings.bounceCount.value; ConstantBuffer.PushGlobal(cmd, m_ShaderVariablesRayTracingCB, HDShaderIDs._ShaderVariablesRaytracing); } @@ -317,7 +317,7 @@ void RenderIndirectDiffuseQuality(HDCamera hdCamera, CommandBuffer cmd, Scriptab using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.RaytracingFilterIndirectDiffuse))) { - if (giSettings.denoise.value) + if (giSettings.denoise) { DenoiseIndirectDiffuseBuffer(hdCamera, cmd, giSettings); } @@ -348,17 +348,17 @@ void DenoiseIndirectDiffuseBuffer(HDCamera hdCamera, CommandBuffer cmd, GlobalIl // Apply the first pass of our denoiser HDDiffuseDenoiser diffuseDenoiser = GetDiffuseDenoiser(); - diffuseDenoiser.DenoiseBuffer(cmd, hdCamera, intermediateBuffer1, m_IndirectDiffuseBuffer0, settings.denoiserRadius.value, singleChannel: false, halfResolutionFilter: settings.halfResolutionDenoiser.value); + diffuseDenoiser.DenoiseBuffer(cmd, hdCamera, intermediateBuffer1, m_IndirectDiffuseBuffer0, settings.denoiserRadius, singleChannel: false, halfResolutionFilter: settings.halfResolutionDenoiser); // If the second pass is requested, do it otherwise blit - if (settings.secondDenoiserPass.value) + if (settings.secondDenoiserPass) { // Grab the low frequency history buffer RTHandle indirectDiffuseHistoryLF = hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.RaytracedIndirectDiffuseLF) ?? hdCamera.AllocHistoryFrameRT((int)HDCameraFrameHistoryType.RaytracedIndirectDiffuseLF, IndirectDiffuseHistoryBufferAllocatorFunction, 1); temporalFilter.DenoiseBuffer(cmd, hdCamera, m_IndirectDiffuseBuffer0, indirectDiffuseHistoryLF, intermediateBuffer1, singleChannel: false, historyValidity: historyValidity); - diffuseDenoiser.DenoiseBuffer(cmd, hdCamera, intermediateBuffer1, m_IndirectDiffuseBuffer0, settings.secondDenoiserRadius.value, singleChannel: false, halfResolutionFilter: settings.halfResolutionDenoiser.value); + diffuseDenoiser.DenoiseBuffer(cmd, hdCamera, intermediateBuffer1, m_IndirectDiffuseBuffer0, settings.secondDenoiserRadius, singleChannel: false, halfResolutionFilter: settings.halfResolutionDenoiser); } } }