-
Notifications
You must be signed in to change notification settings - Fork 855
Implementation of SRP Global Settings for HDRP #3054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit c4a0df6.
# Conflicts: # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingReflection.cs # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/FrameSettingsHistory.cs # com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments, probably worth it to write an upgrade guide too (I think you can put it here: https://github.com/Unity-Technologies/Graphics/blob/master/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2021.1-to-2021.2.md)
com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDAssetFactory.cs
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDDefaultSettingsEditor.cs
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDDefaultSettingsEditor.cs
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDEditorUtils.cs
Outdated
Show resolved
Hide resolved
...ity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/EditorDefaultSettings.cs
Show resolved
Hide resolved
...ines.high-definition/Runtime/Material/DiffusionProfile/DiffusionProfileSettings.Migration.cs
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDDefaultSettings.cs
Outdated
Show resolved
Hide resolved
...ines.high-definition/Runtime/Material/DiffusionProfile/DiffusionProfileSettings.Migration.cs
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDDefaultSettings.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good clean up :) Minor comments.
...y.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/RenderPipelineSettings.cs
Outdated
Show resolved
Hide resolved
...y.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedFrameSettings.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly, hard to read due to the amount of change but seams globally good.
com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDDefaultSettingsEditor.cs
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDDefaultSettingsEditor.cs
Show resolved
Hide resolved
{ | ||
case Kind.Default: | ||
hdrpAsset.defaultVolumeProfile = profile; | ||
if (settings != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps you should check this first things in this method and exit quickly if not true then. (or you will try letter to EditorUtility.SetDirty(null); )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still valid. Verify if you can dirty null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this in the last commit.
...ity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/EditorDefaultSettings.cs
Outdated
Show resolved
Hide resolved
...ity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/FrameSettingsHistory.cs
Outdated
Show resolved
Hide resolved
…decal layer names to exist on DefaultSettings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really minor thinks. Nice PR :)
com.unity.render-pipelines.high-definition/Editor/BuildProcessors/HDRPPreprocessShaders.cs
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDAssetFactory.cs
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDAssetFactory.cs
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDAssetFactory.cs
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDAssetFactory.cs
Outdated
Show resolved
Hide resolved
...ender-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDGlobalSettings.cs
Show resolved
Hide resolved
...ender-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDGlobalSettings.cs
Outdated
Show resolved
Hide resolved
...ender-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedHDGlobalSettings.cs
Show resolved
Hide resolved
# Conflicts: # com.unity.render-pipelines.high-definition/CHANGELOG.md # com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs # com.unity.render-pipelines.high-definition/Runtime/Compositor/CompositionManager.cs # com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs # com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScatteringManagerRT.cs # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingAmbientOcclusion.cs # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingReflection.cs
…yles.globalSettingsIcon)
public SerializedProperty renderPipelineResources; | ||
public SerializedProperty renderPipelineRayTracingResources; | ||
|
||
public SerializedFrameSettings defaultFrameSettings; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be better if contain Camera in this name (distinguish from other default)
defaultFrameSettings = new SerializedFrameSettings(serializedObject.FindProperty("m_RenderingPathDefaultCameraFrameSettings"), null); //no overrides in HDRPAsset | ||
defaultBakedOrCustomReflectionFrameSettings = new SerializedFrameSettings(serializedObject.FindProperty("m_RenderingPathDefaultBakedOrCustomReflectionFrameSettings"), null); //no overrides in HDRPAsset | ||
defaultRealtimeReflectionFrameSettings = new SerializedFrameSettings(serializedObject.FindProperty("m_RenderingPathDefaultRealtimeReflectionFrameSettings"), null); //no overrides in HDRPAsset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be sure that TitleDrawingScope comply with the null value.
void OnEnable() | ||
{ | ||
k_Migration.Migrate(this); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Beeing picky] why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted it :)
SetupLayerPriorities(); | ||
} | ||
|
||
static HDRenderPipelineGlobalSettings m_globalSettings; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand well, there is case where we want to change the global settings (using Unity in dofferent context). If it is registered as static here, it will not adapt except if a domain reload occures. Can we assert this is the case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this adapts as in RegisterCustomPasses we are checking the value. (lines 937 - 950). Could you confirm it works for you?
# Conflicts: # com.unity.render-pipelines.core/Editor/CoreEditorStyles.cs # com.unity.render-pipelines.high-definition/CHANGELOG.md # com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2021.1-to-2021.2.md # com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/FrameSettingsUI.Drawers.cs # com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs # com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.RenderGraph.cs # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/PathTracing.cs # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingIndirectDiffuse.cs # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingRecursiveRenderer.cs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As agreed with HDRP Team, go for merge ! ✔️
There's still a few minor issues referenced in the test document.
Those shouldn't impact upgrade process and new users from doing anything and have an obvious workaround and/or are easily dismissible by users.
Once the PR is merged, they'll be converted into bugs to prevent them from lingering too long in alpha versions !
# Conflicts: # com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2021.1-to-2021.2.md # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs
Hi @jenniferd-unity
|
Hi, yes the follow up is here: https://jira.unity3d.com/browse/XPIPELINE-97. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for the clarification.
Made sure HDRenderPipelineGlobalSettings are loaded before pulling its setting for shadervariantloglevel.
…or (cannot create an asset while building a player)
# Conflicts: # TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5011_VolumetricClouds.unity # TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5011_VolumetricCloudsShadows.unity # com.unity.render-pipelines.high-definition/CHANGELOG.md # com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs # com.unity.render-pipelines.high-definition/Runtime/Debug/LightingDebug.cs
Purpose of this PR
Presentation powerpoint here
This is the first implementation of HDRP Global Settings as an asset separate from the HDRPAsset. Further development is planned.
[UI updated on Feb 26th]

I have moved from the HDRenderPipeline.defaultAsset various settings:
No behaviors should be changed on any HDRP project with those changes except:
When upgrading to this new version:
The create menu can be found here:

When deleting the active Global Settings asset, a new one will be created and an error message displayed:
https://user-images.githubusercontent.com/71718938/108837110-145aa980-75d2-11eb-8a70-6c66236f2941.mp4
Asset creation workflow: set as active Asset if created from the HDRP Settings menu only.
https://user-images.githubusercontent.com/71718938/108840941-4faba700-75d7-11eb-853e-0cb2d87876d8.mp4
Testing status
Tried the following locally - on Windows only:
Comments to reviewers
This is the first implementation of HDRP Global Settings as an asset separate from the HDRPAsset. Further development is planned.
JIRA
https://jira.unity3d.com/browse/XPIPELINE-38
https://unity3d.atlassian.net/browse/UR-1967