Skip to content

Fix double addition to sorted volume lists #1916

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 1 commit into from
Sep 25, 2020
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.core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ The version number for this package has increased due to a version update of a r
- Fix hierarchicalbox gizmo outside facing check in symetry or homothety mode no longer move the center
- Fix artifacts on Adreno 630 GPUs when using ACES Tonemapping
- Fixed a null ref in the volume component list when there is no volume components in the project.
- Fixed issue with volume manager trying to access a null volume.

### Changed
- Restored usage of ENABLE_VR to fix compilation errors on some platforms.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ public void Register(Volume volume, int layer)
// Look for existing cached layer masks and add it there if needed
foreach (var kvp in m_SortedVolumes)
{
if ((kvp.Key & (1 << layer)) != 0)
// We add the volume to sorted lists only if the layer match and if it doesn't contain the volume already.
if ((kvp.Key & (1 << layer)) != 0 && !kvp.Value.Contains(volume))
kvp.Value.Add(volume);
}

Expand Down