The new light grid can localize the influcence of each light much better despite being built only in 2D. Some logic is duplicated between the path tracer and decals which use a similar system. It should be possible to share some of the logic with future refactors.
This refactor also allows more than 256 lights (no code was actively depending on this limit anymore after the removal of RTR and RTGI). However there is still a fixed number of lights available per grid cell. Using the "Light Grid Occupancy" debug mode can help visualize where this might be occurring.
The following cvars can be used to control memory usage and performance:
* r.RayTracing.LightGridResolution: Resolution of the 2D grid which holds lights
* r.RayTracing.LightGridMaxCount: Maximum number of lights per grid cell (if there are fewer lights than this in the scene, that number will be used instead)
Code cleanup: Refactor LIGHT_TYPE_* definitions to be shared across shaders and C++ code and remove duplicated definitions.
#jira UE-170690
#rb Aleksander.Netzel
[CL 29508005 by chris kulla in ue5-main branch]
generate heatmap and hit stats info of the top K primitives.
#jira
#rb tiago.costa, Tiantian.Xie, aleksander.netzel
[CL 28109999 by xujie chen in ue5-main branch]
[FYI] xujie.chen
Original CL Desc
-----------------------------------------------------------------
Debug Visualization: count the number of rays hits per scene primitive
generate heatmap and hit stats info of the top K primitives.
#jira
#rb tiago.costa, Tiantian.Xie, aleksander.netzel
[CL 28019088 by aleksander netzel in ue5-main branch]
generate heatmap and hit stats info of the top K primitives.
#jira
#rb tiago.costa, Tiantian.Xie, aleksander.netzel
[CL 28015352 by xujie chen in ue5-main branch]
* Collect instance AABBs when building RayTracingScene
* Output depth from RayTracingDebug pass for depth testing the instance AABBs
* Render instance AABBs as boxes with depth testing to accumulate the overlap which is then converted to heatmap and blended on top of RayTracingDebug output
* Non-GPUScene instances are not yet supported in this mode.
#rb yuriy.odonnell, tiago.costa
#preflight 63485810ad0f7e2f20eb5db2
[CL 22524168 by aleksander netzel in ue5-main branch]
* "Dynamic Instances" - shows instances that go through dynamic path in green and all others in red
* "Proxy Type" - shows instances colored by proxy type hash
* "Picker" - allows picking instances/triangles with a mouse to show BLAS and instance info.
#rb Yuriy.Odonnell
#preflight 62d50b99d54af4b9a223b388
[CL 21143807 by aleksander netzel in ue5-main branch]
* Added RaytracingTraversalStatistics to create, capture and print TraceRayInline traversal statistics.
* In inline raytracing shaders you only need to call TraceRayInlineAccumulateStatistics() which will gather the results of the most recent TraceRayInline call.
* New debug visualization mode 'Traversal Statistics' that will print to the screen the traversal statistics for primary rays.
#rb Yuriy.Odonnell
#preflight 62860caa2b53e2be4c8ceee2
[CL 20277869 by aleksander netzel in ue5-main branch]
#rb none
#JIRA
#ROBOMERGE-SOURCE: CL 5317515 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)
[CL 5336839 by juan canada in Main branch]
#rb none
#JIRA
#ROBOMERGE-OWNER: Juan.Canada
#ROBOMERGE-AUTHOR: juan.canada
#ROBOMERGE-SOURCE: CL 5317515 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)
[CL 5335728 by Juan Canada in Main branch]