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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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