Files
UnrealEngineUWP/Engine/Source/Runtime/Renderer
yuriy odonnell e9a5a4dd6c Fix crash when forcing all ray tracing effects off via r.RayTracing.ForceAllRayTracingEffects=0 while a scene contains a light with RT shadows
Setting ForceAllRayTracingEffects=0 is expected to work as if all ray tracing effects (including r.RayTracing.Shadows) were set to 0 and none of the lights should use ray tracing.

When ray tracing pipeline is being initialized in FDeferredShadingSceneRenderer::SetupRayTracingPipelineStates(), the required ray generation shaders are not added by PrepareRayTracingShadows() because it only checks the global RT shadow setting, but not per-light override. This can lead to ray tracing pipeline not getting initialized because the code believes that there are no active RT effects, which leads to a crash later during light rendering.

This change makes the per-light RT shadow state determination respect the global override.

#rb ...
#jira UE-150546
#preflight 626ae72ea5009ff191c484e3

#ROBOMERGE-AUTHOR: yuriy.odonnell
#ROBOMERGE-SOURCE: CL 19969043 in //UE5/Release-5.0/... via CL 19970708
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19973323 by yuriy odonnell in ue5-main branch]
2022-04-28 19:35:16 -04:00
..