提交 653a5ec8 编写于 作者: M Mr.doob

Updated builds.

上级 a229ffdf
......@@ -14602,6 +14602,10 @@
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;
function render( renderList, scene, camera, forceClear ) {
......@@ -14610,11 +14614,15 @@
if ( background === null ) {
setClear( clearColor, clearAlpha );
currentBackground = null;
currentBackgroundVersion = 0;
} else if ( background && background.isColor ) {
setClear( background, 1 );
forceClear = true;
currentBackground = null;
currentBackgroundVersion = 0;
}
......@@ -14666,9 +14674,20 @@
}
boxMesh.material.uniforms.tCube.value = ( background.isWebGLRenderTargetCube ) ? background.texture : background;
var texture = background.isWebGLRenderTargetCube ? background.texture : background;
boxMesh.material.uniforms.tCube.value = texture;
boxMesh.material.uniforms.tFlip.value = ( background.isWebGLRenderTargetCube ) ? 1 : - 1;
if ( currentBackground !== background ||
currentBackgroundVersion !== texture.version ) {
boxMesh.material.needsUpdate = true;
currentBackground = background;
currentBackgroundVersion = texture.version;
}
// push to the pre-sorted opaque render list
renderList.push( boxMesh, boxMesh.geometry, boxMesh.material, 0, null );
......@@ -14717,6 +14736,17 @@
planeMesh.material.uniforms.uvTransform.value.copy( background.matrix );
if ( currentBackground !== background ||
currentBackgroundVersion !== background.version ) {
planeMesh.material.needsUpdate = true;
currentBackground = background;
currentBackgroundVersion = background.version;
}
// push to the pre-sorted opaque render list
renderList.push( planeMesh, planeMesh.geometry, planeMesh.material, 0, null );
此差异已折叠。
......@@ -14596,6 +14596,10 @@ 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;
function render( renderList, scene, camera, forceClear ) {
......@@ -14604,11 +14608,15 @@ 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;
}
......@@ -14660,9 +14668,20 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
}
boxMesh.material.uniforms.tCube.value = ( background.isWebGLRenderTargetCube ) ? background.texture : background;
var texture = background.isWebGLRenderTargetCube ? background.texture : background;
boxMesh.material.uniforms.tCube.value = texture;
boxMesh.material.uniforms.tFlip.value = ( background.isWebGLRenderTargetCube ) ? 1 : - 1;
if ( currentBackground !== background ||
currentBackgroundVersion !== texture.version ) {
boxMesh.material.needsUpdate = true;
currentBackground = background;
currentBackgroundVersion = texture.version;
}
// push to the pre-sorted opaque render list
renderList.push( boxMesh, boxMesh.geometry, boxMesh.material, 0, null );
......@@ -14711,6 +14730,17 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
planeMesh.material.uniforms.uvTransform.value.copy( background.matrix );
if ( currentBackground !== background ||
currentBackgroundVersion !== background.version ) {
planeMesh.material.needsUpdate = true;
currentBackground = background;
currentBackgroundVersion = background.version;
}
// push to the pre-sorted opaque render list
renderList.push( planeMesh, planeMesh.geometry, planeMesh.material, 0, null );
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册