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
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
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