Skip to content
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

Fix bug on resizing + glow or highlight layer when multiple scenes #8038

Merged
merged 2 commits into from
Apr 20, 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 dist/preview release/what's new.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
- Fix bug in `ShaderMaterial` when using morph targets ([Popov72](https://github.com/Popov72)
- Fix bug in playground where child NME windows would not close before page unload events ([belfortk](https://github.com/belfortk)
- Fixed an issue with stereoscopic rendering ([#8000](https://github.com/BabylonJS/Babylon.js/issues/8000)) ([RaananW](https://github.com/RaananW))
- Fix bug with multiple scenes when resizing the screen and there's a glow or highlight layer active ([Popov72](https://github.com/Popov72)
- Fix an error when compiling with the closure compiler ([ageneau](https://github.com/ageneau/))
- Fix an error in applying texture to sides of `extrudePolygon` using faceUV[1] ([JohnK](https://github.com/BabylonJSGuide/))

Expand Down
7 changes: 4 additions & 3 deletions src/Layers/glowLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,14 @@ export class GlowLayer extends EffectLayer {
internalTexture,
true);

internalTexture = this._blurTexture2.getInternalTexture();
if (internalTexture) {
let internalTexture2 = this._blurTexture2.getInternalTexture();
if (internalTexture2) {
this._scene.postProcessManager.directRender(
this._postProcesses2,
internalTexture,
internalTexture2,
true);
}
this._engine.unBindFramebuffer(internalTexture2 ?? internalTexture, true);
RaananW marked this conversation as resolved.
Show resolved Hide resolved
}
});

Expand Down
1 change: 1 addition & 0 deletions src/Layers/highlightLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ export class HighlightLayer extends EffectLayer {
this._postProcesses,
internalTexture,
true);
this._engine.unBindFramebuffer(internalTexture, true);
}

this.onAfterBlurObservable.notifyObservers(this);
Expand Down