Search Issue Tracker

By Design

Votes

0

Found in

2021.3.24f1

2022.2.17f1

2023.1.0b14

2023.2.0a12

Issue ID

UUM-34322

Regression

No

Camera Component corrupts Transform and Volume GameObjects in Play Mode when using DLSS

-

How to reproduce:
1. Open the “Empty” project
2. Open the “DLSS_Broken_In_Play_Mode“ scene
3. Select “Main Camera” GameObject and in “Camera” Component make sure “HDRP Dynamic Resolution” and “Allow DLSS” fields are Enabled (Camera > Rendering)
4. Enter Play Mode and observe the Game view

Expected result: the “Main Camera” points directly at the “Capsule” GameObject and an outline is rendered around the “Capsule” GameObject
Actual result: the “Main Camera” becomes skewed, points at the “Plane” GameObject, and the outline of the “Capsule” GameObject is rendered in the center of the viewport

Reproduced with: 2021.3.24f1, 2022.2.17f1, 2023.1.0b14, 2023.2.0a12
Could not test with: 2020.3.47f1 (DLSS not supported)

Reproduced on: Windows 10 (by reporter), Windows 11

Notes:
1. Also reproducible in Player
2. During, before, and after entering Play Mode the Transform Component values of the “Main Camera” GameObject stay exactly the same in the Inspector, but when entering Play Mode the Game view does not display the same coordinates

  1. Resolution Note:

    Hello. Looked into this bug. This is an issue inside the custom post process and not HDRP.
    The custom post process will also be incompatible with TAAU which I will explain. I will also explain how to fix this in the custom post process attached (worked on my side)

    The problem:

    DLSS and TAAU Performs upscaling before post processing. That is, rendering of geometry before any post process will do it on the low resolution. After the upressing pass (DLSS or TAAU), post process will run at the final resolution.
    DLSS has an option on the HDRP asset settings called "Injection Point" If you apply the upscaler after the outline pass then this wont be an issue and is a good workaround.

    How to fix it in HDRP Outline:
    Step 1: instead of using camera.actualWidth and camera.actualHeight in HDRPOutline.cs (which return the low resolution dimensions), use (int)camera.postProcessScreenSize.x and (int)camera.postProcessScreenSize.y
    Step 2: in all the shaders were _ScreenSize is used, replace this with _PostProcessScreenSize. This includes the knife-blur, the outline Knife-outline shader, and knife-mask applier

    Will now close this bug as non fix since the issue is in the custom code.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.