-
Notifications
You must be signed in to change notification settings - Fork 855
Improve performance of OnDemand reflection probes [NEED C++] #2775
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
Disabled ApplyMaterialPropertyDrawers when rendering HDRP to avoid unwanted perf spikes
It appears that you made a non-draft PR! |
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.
With the PR there is 40ms improvement, but discussing with Julien it seems that majority of ms time is still taken by "CullScriptable" on user project(https://forum.unity.com/threads/hdrp-enable-camera-is-really-slow.988695/). It still uses up to 175ms which causes frame stutters.
Attaching my findings:
EmptyProject with terrain enabled:
… into hd/improve-ondemand-probe-perf # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs
Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com>
* Not checking NdotL since it's not really valid for area lights (We have multiple valid light directions, not one) * Changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
* Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
* Fixed access to invalid Contexts references after exiting playmode. * Fixed comparison gizmo after playmode. * Fixes from PR feedback
… conserving specular color option for the specular input parametrization (similar to case 1257050) (#3060)
…phics into hd/improve-ondemand-probe-perf # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/Lighting/ProbeVolume/ProbeVolumeLighting.cs # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.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.
… into hd/improve-ondemand-probe-perf # Conflicts: # com.unity.render-pipelines.high-definition/CHANGELOG.md # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs
… into hd/improve-ondemand-probe-perf
Currently waiting for this C++ PR to land: https://ono.unity3d.com/unity/unity/pull-request/123697/_/terrain/getactiveterrainsnoalloc |
… into hd/improve-ondemand-probe-perf # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs
… into hd/improve-ondemand-probe-perf # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs
Purpose of this PR
Requires Ono PR: https://ono.unity3d.com/unity/unity/pull-request/123697/_/terrain/getactiveterrainsnoalloc
When using OnDemand reflection probes, unwanted performance spikes were occuring. This PR aims at improving this by doing several things:
This should improve https://fogbugz.unity3d.com/f/cases/1293225/
Testing status
Tested the small repro project provided in the fogbugz case.
Spikes should be much improved. There should still be smaller spikes because we do render the probe regularly (so 6 more camera renders) but antyhing else than rendering should be mostly gone.
It might be worth testing Detail Renderer (is that even supported in HDRP?) as it may have been impacted by the C++ change.
Also, checking the original user project would be good.
@Unity-Technologies/gfx-qa-hdrp here's a link to an editor with the C++ changes required to run the HDRP branch: https://bokken-artifacts-ui.bf.unity3d.com/katana-production/proj0-Build_WindowsEditor/39048765_11_01_2021_22_20_11_+0000/build/ZippedForTeamCity.zip