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

r138 (bis) (bis) (bis)

上级 52eda737
......@@ -1869,6 +1869,7 @@ class Texture extends EventDispatcher {
this.unpackAlignment = source.unpackAlignment;
this.encoding = source.encoding;
this.userData = JSON.parse(JSON.stringify(source.userData));
this.needsUpdate = true;
return this;
}
......@@ -2635,6 +2636,7 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
for (let i = 0; i < count; i++) {
this.texture[i] = texture.clone();
this.texture[i].isRenderTargetTexture = true;
}
}
......@@ -16801,7 +16803,7 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
const textureProperties = properties.get(texture);
if (texture.isVideoTexture) updateVideoTexture(texture);
if (texture.version > 0 && textureProperties.__version !== texture.version) {
if (texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version) {
const image = texture.image;
if (image === null) {
......@@ -20342,12 +20344,6 @@ function WebGLRenderer(parameters = {}) {
uniforms.spotLightShadows.needsUpdate = value;
uniforms.rectAreaLights.needsUpdate = value;
uniforms.hemisphereLights.needsUpdate = value;
uniforms.directionalShadowMap.needsUpdate = value;
uniforms.directionalShadowMatrix.needsUpdate = value;
uniforms.spotShadowMap.needsUpdate = value;
uniforms.spotShadowMatrix.needsUpdate = value;
uniforms.pointShadowMap.needsUpdate = value;
uniforms.pointShadowMatrix.needsUpdate = value;
}
function materialNeedsLights(material) {
......@@ -20380,8 +20376,7 @@ function WebGLRenderer(parameters = {}) {
// are midframe flushes and an external depth buffer. Disable use of the extension.
if (extensions.has('WEBGL_multisampled_render_to_texture') === true) {
console.warn('THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided');
renderTarget.useRenderToTexture = false;
renderTarget.useRenderbuffer = true;
renderTargetProperties.__useRenderToTexture = false;
}
}
}
......@@ -1871,6 +1871,7 @@
this.unpackAlignment = source.unpackAlignment;
this.encoding = source.encoding;
this.userData = JSON.parse(JSON.stringify(source.userData));
this.needsUpdate = true;
return this;
}
......@@ -2637,6 +2638,7 @@
for (let i = 0; i < count; i++) {
this.texture[i] = texture.clone();
this.texture[i].isRenderTargetTexture = true;
}
}
......@@ -16803,7 +16805,7 @@
const textureProperties = properties.get(texture);
if (texture.isVideoTexture) updateVideoTexture(texture);
if (texture.version > 0 && textureProperties.__version !== texture.version) {
if (texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version) {
const image = texture.image;
if (image === null) {
......@@ -20344,12 +20346,6 @@
uniforms.spotLightShadows.needsUpdate = value;
uniforms.rectAreaLights.needsUpdate = value;
uniforms.hemisphereLights.needsUpdate = value;
uniforms.directionalShadowMap.needsUpdate = value;
uniforms.directionalShadowMatrix.needsUpdate = value;
uniforms.spotShadowMap.needsUpdate = value;
uniforms.spotShadowMatrix.needsUpdate = value;
uniforms.pointShadowMap.needsUpdate = value;
uniforms.pointShadowMatrix.needsUpdate = value;
}
function materialNeedsLights(material) {
......@@ -20382,8 +20378,7 @@
// are midframe flushes and an external depth buffer. Disable use of the extension.
if (extensions.has('WEBGL_multisampled_render_to_texture') === true) {
console.warn('THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided');
renderTarget.useRenderToTexture = false;
renderTarget.useRenderbuffer = true;
renderTargetProperties.__useRenderToTexture = false;
}
}
}
此差异已折叠。
......@@ -2312,6 +2312,8 @@ class Texture extends EventDispatcher {
this.userData = JSON.parse( JSON.stringify( source.userData ) );
this.needsUpdate = true;
return this;
}
......@@ -3345,6 +3347,7 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
for ( let i = 0; i < count; i ++ ) {
this.texture[ i ] = texture.clone();
this.texture[ i ].isRenderTargetTexture = true;
}
......@@ -22607,7 +22610,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
if ( texture.isVideoTexture ) updateVideoTexture( texture );
if ( texture.version > 0 && textureProperties.__version !== texture.version ) {
if ( texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version ) {
const image = texture.image;
......@@ -27788,13 +27791,6 @@ function WebGLRenderer( parameters = {} ) {
uniforms.rectAreaLights.needsUpdate = value;
uniforms.hemisphereLights.needsUpdate = value;
uniforms.directionalShadowMap.needsUpdate = value;
uniforms.directionalShadowMatrix.needsUpdate = value;
uniforms.spotShadowMap.needsUpdate = value;
uniforms.spotShadowMatrix.needsUpdate = value;
uniforms.pointShadowMap.needsUpdate = value;
uniforms.pointShadowMatrix.needsUpdate = value;
}
function materialNeedsLights( material ) {
......@@ -27842,8 +27838,7 @@ function WebGLRenderer( parameters = {} ) {
if ( extensions.has( 'WEBGL_multisampled_render_to_texture' ) === true ) {
console.warn( 'THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided' );
renderTarget.useRenderToTexture = false;
renderTarget.useRenderbuffer = true;
renderTargetProperties.__useRenderToTexture = false;
}
{
"name": "three",
"version": "0.138.2",
"version": "0.138.3",
"description": "JavaScript 3D library",
"type": "module",
"main": "./build/three.js",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册