Crash in ExtractNormalsForNextFrameReprojection when in Path Tracing view mode.

This crash happens because the DeferredShadingRenderer tries to extract the normal GBuffer target for the next frame.

There is a check bUseGBuffer to make sure that the GBuffer is used, but that value is true in the Path Tracing view mode.

The easiest fix is to change this line, to check bRenderDeferredLighting instead: https://github.com/EpicGames/UnrealEngine/blob/2d53fcab0066b1f16dd956b227720841cad0f6f7/Engine/Source/Runtime/Renderer/Private/DeferredShadingRenderer.cpp\#L2555

Steps to Reproduce
To reproduce:

  1. Create a blank Game project.
  2. Make sure that ray tracing and path tracing is toggled on in project settings
  3. Enable: r.Decal.NormalReprojectionEnabled
  4. Enter the Path Tracing view mode
  5. Crash

Hello [mention removed]​

Thank you for reaching out and reporting this issue.

I’ve made a JIRA report to be added to the Unreal issue tracker website (https://issues.unrealengine.com).

I’ve made sure to include your proposed fix, which helps a lot!

Epic will decide if the issue will be made publicly accessible, and the whole process can take a few days, so keep that in mind.

If/once it is made publicly available, you will be able to track the resolution by checking this link:

I’ll close the case, but feel free to reply if you have anything else to add.

All the best,

@Rafael Pinheiro​