Ver código fonte

Merge pull request #15108 from WestLangley/dev-background_order

WebGLBackground: clarify background's render order
Mr.doob 6 anos atrás
pai
commit
f98fd6e4b3
1 arquivos alterados com 2 adições e 0 exclusões
  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 );
 
 		}