Files
UnrealEngineUWP/Engine/Source/Runtime/Renderer/Public
graham wihlidal 9c8fa1c395 Implemented a GPU Scene API for primitives explicitly enabling/disabling WPO support driven by events. This will be important for disabling WPO overhead in Nanite and other systems when unnecessary. The material system MayModifyMeshPosition hints are insufficient when using an MICD with static params that ultimately disable WPO, but the material system still reports WPO usage. This hint can also be used in new LOD systems to disable expensive features like WPO in the distance, but without doing a full shader switch. Nanite now supports a debug view that shows WPO off (red) and on (green) for meshes in the scene (r.Nanite.Visualize EvaluateWPO).
This change also remaps the original bEvaluateWorldPositionOffset on SMC into bEvaluateWorldPositionOffsetInRayTracing, because this var was only ever driven by ray tracing specific methods. The original bEvaluateWorldPositionOffset is now used by this more generic API.

Lastly, a new cvar (r.OptimizedWPO) has been added that indicates if the hint should be respected or not (default is false, which means WPO is always active, regardless of hint)

#rb rune.stubbe, marc.audy, derek.ehrman
[FYI] brian.karis, jamie.hayes, ola.olsson, andrew.lauritzen, jian.ru
#preflight 6244a8dcdc6183e3f5f8de98

#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 19564957 via CL 19564973 via CL 19564978
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)

[CL 19566743 by graham wihlidal in ue5-main branch]
2022-03-30 19:41:19 -04:00
..
2022-03-14 18:50:02 -04:00