Skip to content

Commit

Permalink
Prevent background material recompile in certain cases
Browse files Browse the repository at this point in the history
  • Loading branch information
WestLangley committed Jan 18, 2020
1 parent 3346310 commit d5df73e
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 d5df73e

Please sign in to comment.