Skip to content

Commit 501a84a

Browse files
author
Pierre GAC
committed
Merge remote-tracking branch 'remotes/upstream/v2' into v2
2 parents dff4cfe + b60390a commit 501a84a

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1212
### Fixed
1313
- Potential fp16 overflow in Depth of Field that could cause NaN on some platforms.
1414
- Error with Screen-space Reflections when HDR is disabled.
15+
- Internal "copy" materials were recreated on every frame after the asset bundle-related fix from 2.1.7.
1516

1617
## [2.1.7] - 2019-06-12
1718

PostProcessing/Runtime/PostProcessLayer.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ public enum Antialiasing
120120
[SerializeField]
121121
PostProcessResources m_Resources;
122122

123+
// Some juggling needed to track down reference to the resource asset when loaded from asset
124+
// bundle (guid conflict)
125+
PostProcessResources m_OldResources;
126+
123127
// UI states
124128
#if UNITY_2017_1_OR_NEWER
125129
[UnityEngine.Scripting.Preserve]
@@ -807,7 +811,13 @@ public bool HasActiveEffects(PostProcessEvent evt, PostProcessRenderContext cont
807811

808812
void SetupContext(PostProcessRenderContext context)
809813
{
810-
RuntimeUtilities.UpdateResources(m_Resources);
814+
// Juggling required when a scene with post processing is loaded from an asset bundle
815+
// See #1148230
816+
if (m_OldResources != m_Resources)
817+
{
818+
RuntimeUtilities.UpdateResources(m_Resources);
819+
m_OldResources = m_Resources;
820+
}
811821

812822
m_IsRenderingInSceneView = context.camera.cameraType == CameraType.SceneView;
813823
context.isSceneView = m_IsRenderingInSceneView;

0 commit comments

Comments
 (0)