Search Issue Tracker
By Design
Votes
0
Found in [Package]
14.0.0, 13.1.5, 13.1.2, 12.1.4, 12.0.0, 11.0.0, 7.7.1
Issue ID
1400047
Regression
No
[HDRP] Light intensity resets after 2 frames after changing it in the script
How to reproduce:
1. Open attached Unity project (hdrp-light-intensity-issue)
2. Load OutdoorsScene
3. Select Sun gameObject
4. Notice intensity is set to 0
5. Enter play mode
6. Notice intensity is still 0
7. In the console window, you can see that light intensity resets after a couple of frames
Expected result: Intensity should be set to 1000.
Actual result: Intensity is set to 1000 for a couple of frames, then resets to 0.
Reproduced with: 2022.2.0a3 (HDRP 14.0.0), 2022.2.0a1 (HDRP 13.1.2), 2022.1.0b7 (HDRP 13.1.5), 2022.1.0a2 (HDRP 12.0.0), 2021.2.11f1 (HDRP 12.1.4), 2021.2.0a1 (HDRP 11.0.0), 2019.4.33f1 (HDRP 7.7.1)
Notes:
This doesn't happen with the Built-In render pipeline.
This issue doesn't reproduce in the build.
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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note:
This issue is by design. HDRP have its own intensity field that is different from builtin as it rely on physical light unit.
The scripting API to set light is on the HDAdditionalData component: https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@7.1/api/UnityEngine.Rendering.HighDefinition.HDAdditionalLightData.html?_ga=2.187700392.1256829761.1644225368-683797712.1641845328#UnityEngine_Rendering_HighDefinition_HDAdditionalLightData_intensity