* There was a bug where if the first view family didn't use ray tracing, the ray tracing scene would never be updated. Now the ray tracing scene is updated on the first view family using ray tracing. Also cleaned up multiple places we compute "bAnyRayTracingPassEnabled" by moving that flag to FDeferredSceneRenderer.
* There was another bug where view specific light ray tracing RDG buffers were created during the scene renderer that updates the ray tracing scene, potentially leading to those RDG buffers being used outside the graph where they were created. Now the view specific light buffers are created in each scene renderer. The code was cleaned up so the buffer creation logic only has access to the static "FSceneView", not any of the transient state in "FViewInfo", to enforce that there are no dependencies on transient state.
#jira none
#rnx
#rb jeremy.moore
#preflight 62a959fc3774a57fdc489013
[CL 20668768 by jason hoerner in ue5-main branch]
* Add FRayTracingScene::BuildInitializationData, which builds FRayTracingSceneWithGeometryInstances
* Add FRayTracingScene::CreateWithInitializationData() that consumes FRayTracingSceneWithGeometryInstances data
* Run BuildInitializationData() as soon as ray tracing instance culling tasks finish
* Wait for scene initialization data in FDeferredShadingSceneRenderer::DispatchRayTracingWorldUpdates()
This saves ~0.2-0.3ms of rendering thread time in large scenes.
#rb tiago.costa
#preflight 62a93a39012193af3f2f69c7
[CL 20664335 by Yuriy ODonnell in ue5-main branch]
- Remove detailed Nanite stat scopes
- and add top level scopes
- make sure Shadow Depths include VSM page allocations
#rb rune.stubbe
#preflight 62a1e1029a3e81e9041423f5
#ROBOMERGE-AUTHOR: ola.olsson
#ROBOMERGE-SOURCE: CL 20574204 via CL 20574230 via CL 20574246
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v954-20466795)
[CL 20575422 by ola olsson in ue5-main branch]
The refactor to get rid of the FSceneTextures and FSceneTexturesConfig global singletons has also been preserved. The FViewFamilyInfo is used to hold those structures, so client facing API functions that lack a scene renderer reference can still pull the FSceneTextures[Config] from the view family pointer. All other scene renderer state has been moved from FViewFamilyInfo back into FSceneRenderer.
#jira none
#rnx
#rb ola.olsson krzysztof.narkowicz zach.bethel
#preflight 629f770e233ae0a8f8fb7f2e
[CL 20540730 by jason hoerner in ue5-main branch]
- FRayTracingCullPrimitiveInstancesClosure was using the group bounds when culling instances inside a group so those instances were never culled anyway.
- This saves around 0.2ms in CitySample (0.7ms if not using ParallelFor).
#rb yuriy.odonnell
#preflight 629e236b732d8e28401c610c
[CL 20522278 by tiago costa in ue5-main branch]
This change only refreshes the command cache after having updated all primitive scene infos
#rb Yuriy.ODonnell
#preflight 62993d711941378d7c7c83cb
[CL 20477982 by chris kulla in ue5-main branch]
This logic took primitives with a material using static lighting and moved velocity writing to a second pass.
Seems like that is some old behavior and after asking around it isn't well known why we had it.
Anyway it's not good to pay the cost of that second pass, so removing that.
#preflight 628fd8f574630984fd4d4464
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 20392160 via CL 20392172 via CL 20392182
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)
[CL 20398501 by jeremy moore in ue5-main branch]
- Decals materials are evaluated using callable shaders in PathTracingKernel.
- Decals are culled using a 2D grid similar to the existing light grid.
- In order to correctly handle decal blending order, decals are sorted using the same logic as the rasterizer on CPU. The compute shader that builds the decal grid maintains the correct order.
- Decal materials are wrapped in FRayTracingDecalMaterialShader. The instance parameters of each decal are bound using uniform buffers.
#preflight 628f3fed2f2409bc1e7a6414
#rb Yuriy.ODonnell, chris.kulla, Jeremy.Moore
[CL 20377336 by tiago costa in ue5-main branch]
- FRHIRayTracingScene is created with NumCallableShaderSlots.
- Application can add entries to SBT using CallableCommands array.
- ShaderBindings are generated from CallableCommands in BindRayTracingMaterialPipeline(...) once the RTPSO is available so CallableShaderIndex is known.
- Shader Bindings are then merged and set during WaitForRayTracingScene.
#rb yuriy.odonnell
#preflight 628d4053b378b39d419afc4d
[CL 20356249 by tiago costa in ue5-main branch]
Promote OnGetOnScreenMessages delegate from private to protected so that all derived renderers from SceneRenderer can add screen messages without modifying the header.
#jira UE-152824
#preflight 628d3a697a34ff0c891f7cac
#rb Tiago.Costa
[CL 20355433 by Tiantian Xie in ue5-main branch]
Remove unecessary mutable type qualifiers from FMeshProcessorShaders.
#rb yuriy.odonnell
#preflight 628cf1e17778f10598b1e011
[CL 20349077 by tiago costa in ue5-main branch]
- Buffers allocated using RDG.
- Use TRDGUniformBufferRef instead of TUniformBufferRef to be able to include SHADER_PARAMETER_RDG_BUFFER_SRV inside the uniform buffer.
#rb yuriy.odonnell
#preflight 628ba79c573a7de2c427c332
[CL 20330573 by tiago costa in ue5-main branch]
* Change LumenVisualize to support inline ray tracing.
* Add BuildLumenHardwareRayTracingMaterialBindings to build bindings when shader pipelines are disabled.
* Pass RayTracingSceneMetadata to all Lumen shaders to be able to reconstruct WorldNormal.
* Fix CardPageLastUsedBuffer to not use GWhiteVertexBufferWithRDG which is not a structured buffer.
#rb yuriy.odonnell, krzysztof.narkowicz
#preflight 6288d03b6f11ac6727a043c9
#ROBOMERGE-AUTHOR: aleksander.netzel
#ROBOMERGE-SOURCE: CL 20321027 via CL 20321048 via CL 20321071
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)
[CL 20322446 by aleksander netzel in ue5-main branch]