Skip to content

[HDRP] Fix tube light mode #3871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed SRP batcher not compatible with Decal (case 1311586).
- Fixed error message when having MSAA and Screen Space Shadows (case 1318698).
- Fixed Nans happening when the history render target is bigger than the current viewport (case 1321139).
- Fixed Tube and Disc lights mode selection (case 1317776)

### Changed
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,9 @@ static void DrawGeneralContent(SerializedHDLight serialized, Editor owner)
}
EditorGUI.showMixedValue = false;

//Draw the mode
serialized.settings.DrawLightmapping();
// Draw the mode, for Tube and Disc lights, there is only one choice, so we can disable the enum.
using (new EditorGUI.DisabledScope(serialized.areaLightShape == AreaLightShape.Tube || serialized.areaLightShape == AreaLightShape.Disc))
serialized.settings.DrawLightmapping();

if (updatedLightType == HDLightType.Area)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@ void ResolveAreaShape()
legacyLight.type = LightType.Disc;
#if UNITY_EDITOR
legacyLight.lightmapBakeType = LightmapBakeType.Baked;
#endif
}
else if (areaLightShape == AreaLightShape.Tube)
{
#if UNITY_EDITOR
legacyLight.lightmapBakeType = LightmapBakeType.Realtime;
#endif
}
else
Expand Down