Skip to content

Commit

Permalink
Merge pull request #18420 from WestLangley/dev_webgl_background
Browse files Browse the repository at this point in the history
WebGLBackground: prevent background material recompile in certain cases
  • Loading branch information
WestLangley authored Jan 19, 2020
2 parents cdd956e + d5df73e commit 617ea9a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/renderers/webgl/WebGLBackground.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {

var planeMesh;
var boxMesh;
// Store the current background texture and its `version`
// so we can recompile the material accordingly.

var currentBackground = null;
var currentBackgroundVersion = 0;
var currentTonemapping = null;
Expand All @@ -43,15 +42,11 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
if ( background === null ) {

setClear( clearColor, clearAlpha );
currentBackground = null;
currentBackgroundVersion = 0;

} else if ( background && background.isColor ) {

setClear( background, 1 );
forceClear = true;
currentBackground = null;
currentBackgroundVersion = 0;

}

Expand Down

0 comments on commit 617ea9a

Please sign in to comment.