Skip to content

Commit d4c53d6

Browse files
authored
Now reflection probes cannot have SSAO, SSGI, SSR, ray tracing effects or volumetric reprojection. (#2755)
1 parent fefc3b9 commit d4c53d6

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2222
- Volume parameter of type Cubemap can now accept Cubemap render textures and custom render textures.
2323
- Removed the superior clamping value for the recursive rendering max ray length.
2424
- Removed the superior clamping value for the ray tracing light cluster size.
25+
- Now reflection probes cannot have SSAO, SSGI, SSR, ray tracing effects or volumetric reprojection.
2526

2627
## [10.3.0] - 2020-12-01
2728

com.unity.render-pipelines.high-definition/Documentation~/Override-Ambient-Occlusion.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,4 @@ The properties visible in the Inspector change depending on whether or not you e
7474
### Screen-space ambient occlusion
7575

7676
A screen-space effect only processes what is on the screen at a given point in time. This means that objects outside of the field of view cannot visually occlude objects in the view. You can sometimes see this on the edges of the screen.
77+
When rendering [Reflection Probes](Reflection-Probe.md) screen space ambient occlusion is not supported.

com.unity.render-pipelines.high-definition/Documentation~/Override-Screen-Space-GI.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,4 @@ The properties visible in the Inspector change depending on whether or not you e
7070
### Ray-traced global illumination
7171

7272
Currently, ray tracing in HDRP does not support [decals](decal.md). This means that ray-traced global illumination does not affect decals in your Scene.
73+
When rendering [Reflection Probes](Reflection-Probe.md) screen space global illumination is not supported.

com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Getting-Started.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ HDRP ray tracing in Unity 2020.2 has the following limitations:
219219
- Does not support MSAA.
220220
- For renderers that have [LODs](https://docs.unity3d.com/2019.3/Documentation/Manual/LevelOfDetail.html), the ray tracing acceleration structure only includes the highest level LOD and ignores the lower LODs.
221221
- Does not support [Graphics.DrawMesh](https://docs.unity3d.com/ScriptReference/Graphics.DrawMesh.html).
222+
- Ray tracing is not supported when rendering [Reflection Probes](Reflection-Probe.md).
222223

223224
## Unsupported features of path tracing
224225

com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/FrameSettings.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ internal static void Sanitize(ref FrameSettings sanitizedFrameSettings, Camera c
737737
bool reflectionPlanar = GeometryUtils.IsProjectionMatrixOblique(camera.projectionMatrix);
738738
bool preview = HDUtils.IsRegularPreviewCamera(camera);
739739
bool sceneViewFog = CoreUtils.IsSceneViewFogEnabled(camera);
740+
bool temporalAccumulationAllowed = (!reflection || (reflection && reflectionPlanar));
740741

741742
switch (renderPipelineSettings.supportedLitShaderMode)
742743
{
@@ -756,27 +757,29 @@ internal static void Sanitize(ref FrameSettings sanitizedFrameSettings, Camera c
756757
sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.ContactShadows] &= !preview;
757758
sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.ScreenSpaceShadows] &= renderPipelineSettings.hdShadowInitParams.supportScreenSpaceShadows && sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.OpaqueObjects];
758759
bool pipelineSupportsRayTracing = HDRenderPipeline.GatherRayTracingSupport(renderPipelineSettings);
759-
bool rayTracingActive = sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.RayTracing] &= pipelineSupportsRayTracing && !preview;
760+
// Ray tracing effects are not allowed on reflection probes due to the accumulation process.
761+
bool rayTracingActive = sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.RayTracing] &= pipelineSupportsRayTracing && !preview && temporalAccumulationAllowed;
760762

761763
//MSAA only supported in forward
762764
// TODO: The work will be implemented piecemeal to support all passes
763765
bool msaa = sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.MSAA] &= renderPipelineSettings.supportMSAA && sanitizedFrameSettings.litShaderMode == LitShaderMode.Forward && !pipelineSupportsRayTracing;
764766
sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.AlphaToMask] &= msaa;
765767

766768
// No recursive reflections
767-
bool ssr = sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.SSR] &= renderPipelineSettings.supportSSR && !msaa && !preview;
769+
bool ssr = sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.SSR] &= renderPipelineSettings.supportSSR && !msaa && !preview && temporalAccumulationAllowed;
768770
sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.TransparentSSR] &= ssr && renderPipelineSettings.supportSSRTransparent && sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.TransparentObjects];
769771
sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.Refraction] &= !preview;
770-
sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.SSAO] &= renderPipelineSettings.supportSSAO && !preview && sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.OpaqueObjects];
771-
sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.SSGI] &= renderPipelineSettings.supportSSGI && !preview && sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.OpaqueObjects];
772+
// Because the camera is shared between the faces of the reflection probes, we cannot allow effects that rely on the accumulation process
773+
sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.SSAO] &= renderPipelineSettings.supportSSAO && !preview && sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.OpaqueObjects] && temporalAccumulationAllowed;
774+
sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.SSGI] &= renderPipelineSettings.supportSSGI && !preview && sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.OpaqueObjects] && temporalAccumulationAllowed;
772775
sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.SubsurfaceScattering] &= renderPipelineSettings.supportSubsurfaceScattering;
773776

774777
// We must take care of the scene view fog flags in the editor
775778
bool atmosphericScattering = sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.AtmosphericScattering] &= sceneViewFog && !preview;
776779

777780
// Volumetric are disabled if there is no atmospheric scattering
778781
sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.Volumetrics] &= renderPipelineSettings.supportVolumetrics && atmosphericScattering; //&& !preview induced by atmospheric scattering
779-
sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.ReprojectionForVolumetrics] &= !preview;
782+
sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.ReprojectionForVolumetrics] &= !preview && temporalAccumulationAllowed;
780783

781784
sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.LightLayers] &= renderPipelineSettings.supportLightLayers && !preview;
782785
// We allow the user to enable exposure control on planar reflections, but not on reflection probes.

0 commit comments

Comments
 (0)