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
- Selector gets stuck in UI if scroll is used while dragging
- Created asset is placed in a new folder when creating a new folder and instantly creating an asset by clicking somewhere else
- Selecting and deleting transition in Animator does not add to Undo History when animation is previewed in Inspector
- GameObjects remain static when updating constraints of PhysicsJoint with "Enable Sleeping" selected in Havok Physics Configuration
- [iOS] Touch input is not clocked and UI is unresponsive when the application is paused mid-drag without lifting the finger
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