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
- NullReferenceException is thrown when assigning an Object to a custom DebugUI.ObjectField in Rendering Debugger
- Crash on D3D12CommonShader::ApplyGpuProgram when attaching material which samples "_UnityFBInput0" to "Full Screen Pass Renderer Feature" Component
- SpeedTree meshes and objects count differs when comparing the numbers in the Player with the Editor
- Model and Prefab Preview icons are not updated after upgrading associated Materials to URP
- Game view is rendered white when viewing the Editor with HDR display and Post Proccesing is enabled on the Main Camera with 2D URP
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