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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
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