Skip to content

Commit

Permalink
r138 (bis) (bis) (bis)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Mar 3, 2022
1 parent 52eda73 commit c7d06c0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 30 deletions.
13 changes: 4 additions & 9 deletions build/three.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}
}
}
Expand Down
13 changes: 4 additions & 9 deletions build/three.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -2637,6 +2638,7 @@

for (let i = 0; i < count; i++) {
this.texture[i] = texture.clone();
this.texture[i].isRenderTargetTexture = true;
}
}

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion build/three.min.js

Large diffs are not rendered by default.

15 changes: 5 additions & 10 deletions build/three.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -2312,6 +2312,8 @@ class Texture extends EventDispatcher {

this.userData = JSON.parse( JSON.stringify( source.userData ) );

this.needsUpdate = true;

return this;

}
Expand Down Expand Up @@ -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;

}

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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;

}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "three",
"version": "0.138.2",
"version": "0.138.3",
"description": "JavaScript 3D library",
"type": "module",
"main": "./build/three.js",
Expand Down

0 comments on commit c7d06c0

Please sign in to comment.