Commit Graph

3 Commits

Author SHA1 Message Date
jamie hayes
abdf8baa6b Fix viewport scale issues with Nanite visualization and dynamic resolution scaling
#rb zach.bethel, rune.stubbe
#lockdown michal.valient
#preflight 6164d73b8a396c000168defc

#ROBOMERGE-AUTHOR: jamie.hayes
#ROBOMERGE-SOURCE: CL 17782739 via CL 17986640 via CL 18368339 via CL 18368374
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18368391 by jamie hayes in ue5-release-engine-test branch]
2021-12-03 10:13:12 -05:00
graham wihlidal
48db6219f0 Fixed Nanite visualization rendering to correctly support dynamic resolution scaling.
#rb ola.olsson
[FYI] brian.karis, guillaume.abadie, jeff.farris, jerome.platteaux
#lockdown michal.valient
#preflight 614d954e008d4b000130ba8d

#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 17619946 via CL 17963503 via CL 18365270 via CL 18365308
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18365323 by graham wihlidal in ue5-release-engine-test branch]
2021-12-03 00:34:14 -05:00
graham wihlidal
9948e93c6b Implemented a Nanite visualization overview, with a data-driven tile layout. This is similar to the gbuffer overview, except using a custom global shader instead of the post process material shader approach. Additionally, I managed to do this with just a single Nanite cull/raster pass. We already had a rasterizer permutation for retail vs. any visualization enabled, but it was a single ordinal mode. The rasterizer would do a 64b max and a 32b add. Was worried I needed arrays, multi-pass, strided output buffer, etc.. but then realized max is only used by raster mode, and add is only used by overdraw mode. I changed it all to a bitmask, run the rasterizer with that, and then multi-pass all the modes in screen space off the buffer.
Renamed Material Depth -> Material ID, and Hit Proxy Depth -> Hit Proxy ID

Moved Material ID into the Standard commands grouping, as it can be useful for content creators.

Made the editor hide all the Advanced commands by default, can make them available in the UX with r.Nanite.Visualize.Advanced now. Command line has full access to all of them, regardless of this setting.

Renamed r.Nanite.DebugSceneComposite to r.Nanite.Visualize.Composite, and changed the behavior for -1=default, 0=off, 1=on
Renamed r.Nanite.DebugSobelFilter to r.Nanite.Visualize.EdgeDetect and defaulted it on for content creator benefit.

Removed int4 VisualizeConfig member from Rasterizer UB, and added 32bit visualization mode mask instead.
Removed 32bit RasterStateReverseCull member from Rasterizer UB, and folded it into pre-existing 32bit RenderFlags

Renamed Nanite::FDebugVisualizeCS -> Nanite::FNaniteVisualizeCS
Renamed DebugVisualize.usf -> Visualize.usf

Made all visualizations composite against scene depth by default, except the overdraw mode.

Changed overdraw view mode to use ColorMapInferno from ColorMap.ush

#rb brian.karis
#fyi michal.valient, rune.stubbe

[CL 15828833 by graham wihlidal in ue5-main branch]
2021-03-25 15:02:12 -04:00