Skip to content

Commit b2289b0

Browse files
Fixed a warning happening when putting the range of lights to 0. (#2264)
Co-authored-by: sebastienlagarde <[email protected]>
1 parent f7cda6c commit b2289b0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ The version number for this package has increased due to a version update of a r
4545
- Fixed undo after enabling compositor.
4646
- Fixed the ray tracing shadow UI being displayed while it shouldn't (case 1286391).
4747
- Fixed issues with physically-based DoF, improved speed and robustness
48+
- Fixed a warning happening when putting the range of lights to 0.
4849

4950
### Changed
5051
- Combined occlusion meshes into one to reduce draw calls and state changes with XR single-pass.

com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,9 @@ static void DrawEmissionContent(SerializedHDLight serialized, Editor owner)
732732
#else
733733
serialized.settings.DrawRange(false);
734734
#endif
735+
// Make sure the range is not 0.0
736+
serialized.settings.range.floatValue = Mathf.Max(0.001f, serialized.settings.range.floatValue);
737+
735738
if (EditorGUI.EndChangeCheck())
736739
{
737740
// For GI we need to detect any change on additional data and call SetLightDirty + For intensity we need to detect light shape change

0 commit comments

Comments
 (0)