Search Issue Tracker

By Design

Votes

0

Found in

2022.2.11f1

2023.1.0b8

2023.2.0a6

Issue ID

UUM-30314

Regression

Yes

Light on the GameObject with a custom shader flickers when Render Path is changed from "Forward" or "Deferred" to "Forward+"

--

-

How to reproduce:
1. Open the project “IN_35281”
2. Open the “SampleScene” Scene
3. Change the “Rendering Path” to the “Forward+” in the “Assets/Settings/UniversalRenderer”
4. Select the “Cube” GameObject in the Hierarchy
5. Move around the “Cube” GameObject in the Scene view

Expected result: light reflection on the “Cube” GameObject doesn’t flicker
Actual result: light reflection on the “Cube” GameObject flickers

Reproducible with: 2022.2.0b16, 2022.2.11f1, 2023.1.0b8, 2023.2.0a6
Not reproducible with: 2022.2.0b15
Couldn't test with: 2020.3.46f1, 2021.3.20f1 (no "Forward+" rendering on these versions)

Reproducible on: Windows 10 Pro

Note: also reproducible in Player and Play Mode

  1. Resolution Note:

    We don't have a stable interface for custom lighting in URP, so this can change from time to time. Have a look at how the URP BRDF is implemented in the link below. Important parts are using the LIGHT_LOOP_* macros instead of a raw loop, and making sure the _FORWARD_PLUS multi-compile is in your shader.

    https://github.com/Unity-Technologies/Graphics/blob/f56d2b265eb9e01b0376623e909f98c88bc60662/Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl#L314

    https://github.com/Unity-Technologies/Graphics/blob/f56d2b265eb9e01b0376623e909f98c88bc60662/Packages/com.unity.render-pipelines.universal/Shaders/Lit.shader#L147

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.