Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 07a01a0

Browse files
committed
Fixed scene view flickering with custom effects and allowInSceneView set to false
1 parent 0e32ecf commit 07a01a0

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88

99
### Fixed
1010
- Color grading would output negative values in some cases and break rendering on some platforms.
11+
- Custom effects with `allowInSceneView` set to `false` could make the scene view flicker to black.
1112

1213
## [2.1.2] - 2018-12-05
1314

PostProcessing/Runtime/PostProcessLayer.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,17 @@ public bool HasActiveEffects(PostProcessEvent evt, PostProcessRenderContext cont
745745

746746
foreach (var item in list)
747747
{
748-
if (item.bundle.settings.IsEnabledAndSupported(context))
748+
bool enabledAndSupported = item.bundle.settings.IsEnabledAndSupported(context);
749+
750+
if (context.isSceneView)
751+
{
752+
if (item.bundle.attribute.allowInSceneView && enabledAndSupported)
753+
return true;
754+
}
755+
else if (enabledAndSupported)
756+
{
749757
return true;
758+
}
750759
}
751760

752761
return false;

0 commit comments

Comments
 (0)