Browse Source

Merge pull request #15108 from WestLangley/dev-background_order

WebGLBackground: clarify background's render order
Mr.doob 6 years ago
parent
commit
f98fd6e4b3
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/renderers/webgl/WebGLBackground.js

+ 2 - 0
src/renderers/webgl/WebGLBackground.js

@@ -73,6 +73,7 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
 			boxMesh.material.uniforms.tCube.value = ( background.isWebGLRenderTargetCube ) ? background.texture : background;
 			boxMesh.material.uniforms.tFlip.value = ( background.isWebGLRenderTargetCube ) ? 1 : - 1;
 
+			// push to the pre-sorted opaque render list
 			renderList.push( boxMesh, boxMesh.geometry, boxMesh.material, 0, null );
 
 		} else if ( background && background.isTexture ) {
@@ -100,6 +101,7 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
 
 			planeMesh.material.uniforms.t2D.value = background;
 
+			// push to the pre-sorted opaque render list
 			renderList.push( planeMesh, planeMesh.geometry, planeMesh.material, 0, null );
 
 		}