Skip to content

Commit d5df73e

Browse files
committed
Prevent background material recompile in certain cases
1 parent 3346310 commit d5df73e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/renderers/webgl/WebGLBackground.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
1818

1919
var planeMesh;
2020
var boxMesh;
21-
// Store the current background texture and its `version`
22-
// so we can recompile the material accordingly.
21+
2322
var currentBackground = null;
2423
var currentBackgroundVersion = 0;
2524
var currentTonemapping = null;
@@ -43,15 +42,11 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
4342
if ( background === null ) {
4443

4544
setClear( clearColor, clearAlpha );
46-
currentBackground = null;
47-
currentBackgroundVersion = 0;
4845

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

5148
setClear( background, 1 );
5249
forceClear = true;
53-
currentBackground = null;
54-
currentBackgroundVersion = 0;
5550

5651
}
5752

0 commit comments

Comments
 (0)