Skip to content

Commit c7d06c0

Browse files
committed
r138 (bis) (bis) (bis)
1 parent 52eda73 commit c7d06c0

File tree

5 files changed

+15
-30
lines changed

5 files changed

+15
-30
lines changed

build/three.cjs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,6 +1869,7 @@ class Texture extends EventDispatcher {
18691869
this.unpackAlignment = source.unpackAlignment;
18701870
this.encoding = source.encoding;
18711871
this.userData = JSON.parse(JSON.stringify(source.userData));
1872+
this.needsUpdate = true;
18721873
return this;
18731874
}
18741875

@@ -2635,6 +2636,7 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
26352636

26362637
for (let i = 0; i < count; i++) {
26372638
this.texture[i] = texture.clone();
2639+
this.texture[i].isRenderTargetTexture = true;
26382640
}
26392641
}
26402642

@@ -16801,7 +16803,7 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
1680116803
const textureProperties = properties.get(texture);
1680216804
if (texture.isVideoTexture) updateVideoTexture(texture);
1680316805

16804-
if (texture.version > 0 && textureProperties.__version !== texture.version) {
16806+
if (texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version) {
1680516807
const image = texture.image;
1680616808

1680716809
if (image === null) {
@@ -20342,12 +20344,6 @@ function WebGLRenderer(parameters = {}) {
2034220344
uniforms.spotLightShadows.needsUpdate = value;
2034320345
uniforms.rectAreaLights.needsUpdate = value;
2034420346
uniforms.hemisphereLights.needsUpdate = value;
20345-
uniforms.directionalShadowMap.needsUpdate = value;
20346-
uniforms.directionalShadowMatrix.needsUpdate = value;
20347-
uniforms.spotShadowMap.needsUpdate = value;
20348-
uniforms.spotShadowMatrix.needsUpdate = value;
20349-
uniforms.pointShadowMap.needsUpdate = value;
20350-
uniforms.pointShadowMatrix.needsUpdate = value;
2035120347
}
2035220348

2035320349
function materialNeedsLights(material) {
@@ -20380,8 +20376,7 @@ function WebGLRenderer(parameters = {}) {
2038020376
// are midframe flushes and an external depth buffer. Disable use of the extension.
2038120377
if (extensions.has('WEBGL_multisampled_render_to_texture') === true) {
2038220378
console.warn('THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided');
20383-
renderTarget.useRenderToTexture = false;
20384-
renderTarget.useRenderbuffer = true;
20379+
renderTargetProperties.__useRenderToTexture = false;
2038520380
}
2038620381
}
2038720382
}

build/three.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,6 +1871,7 @@
18711871
this.unpackAlignment = source.unpackAlignment;
18721872
this.encoding = source.encoding;
18731873
this.userData = JSON.parse(JSON.stringify(source.userData));
1874+
this.needsUpdate = true;
18741875
return this;
18751876
}
18761877

@@ -2637,6 +2638,7 @@
26372638

26382639
for (let i = 0; i < count; i++) {
26392640
this.texture[i] = texture.clone();
2641+
this.texture[i].isRenderTargetTexture = true;
26402642
}
26412643
}
26422644

@@ -16803,7 +16805,7 @@
1680316805
const textureProperties = properties.get(texture);
1680416806
if (texture.isVideoTexture) updateVideoTexture(texture);
1680516807

16806-
if (texture.version > 0 && textureProperties.__version !== texture.version) {
16808+
if (texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version) {
1680716809
const image = texture.image;
1680816810

1680916811
if (image === null) {
@@ -20344,12 +20346,6 @@
2034420346
uniforms.spotLightShadows.needsUpdate = value;
2034520347
uniforms.rectAreaLights.needsUpdate = value;
2034620348
uniforms.hemisphereLights.needsUpdate = value;
20347-
uniforms.directionalShadowMap.needsUpdate = value;
20348-
uniforms.directionalShadowMatrix.needsUpdate = value;
20349-
uniforms.spotShadowMap.needsUpdate = value;
20350-
uniforms.spotShadowMatrix.needsUpdate = value;
20351-
uniforms.pointShadowMap.needsUpdate = value;
20352-
uniforms.pointShadowMatrix.needsUpdate = value;
2035320349
}
2035420350

2035520351
function materialNeedsLights(material) {
@@ -20382,8 +20378,7 @@
2038220378
// are midframe flushes and an external depth buffer. Disable use of the extension.
2038320379
if (extensions.has('WEBGL_multisampled_render_to_texture') === true) {
2038420380
console.warn('THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided');
20385-
renderTarget.useRenderToTexture = false;
20386-
renderTarget.useRenderbuffer = true;
20381+
renderTargetProperties.__useRenderToTexture = false;
2038720382
}
2038820383
}
2038920384
}

build/three.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/three.module.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2312,6 +2312,8 @@ class Texture extends EventDispatcher {
23122312

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

2315+
this.needsUpdate = true;
2316+
23152317
return this;
23162318

23172319
}
@@ -3345,6 +3347,7 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
33453347
for ( let i = 0; i < count; i ++ ) {
33463348

33473349
this.texture[ i ] = texture.clone();
3350+
this.texture[ i ].isRenderTargetTexture = true;
33483351

33493352
}
33503353

@@ -22607,7 +22610,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
2260722610

2260822611
if ( texture.isVideoTexture ) updateVideoTexture( texture );
2260922612

22610-
if ( texture.version > 0 && textureProperties.__version !== texture.version ) {
22613+
if ( texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version ) {
2261122614

2261222615
const image = texture.image;
2261322616

@@ -27788,13 +27791,6 @@ function WebGLRenderer( parameters = {} ) {
2778827791
uniforms.rectAreaLights.needsUpdate = value;
2778927792
uniforms.hemisphereLights.needsUpdate = value;
2779027793

27791-
uniforms.directionalShadowMap.needsUpdate = value;
27792-
uniforms.directionalShadowMatrix.needsUpdate = value;
27793-
uniforms.spotShadowMap.needsUpdate = value;
27794-
uniforms.spotShadowMatrix.needsUpdate = value;
27795-
uniforms.pointShadowMap.needsUpdate = value;
27796-
uniforms.pointShadowMatrix.needsUpdate = value;
27797-
2779827794
}
2779927795

2780027796
function materialNeedsLights( material ) {
@@ -27842,8 +27838,7 @@ function WebGLRenderer( parameters = {} ) {
2784227838
if ( extensions.has( 'WEBGL_multisampled_render_to_texture' ) === true ) {
2784327839

2784427840
console.warn( 'THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided' );
27845-
renderTarget.useRenderToTexture = false;
27846-
renderTarget.useRenderbuffer = true;
27841+
renderTargetProperties.__useRenderToTexture = false;
2784727842

2784827843
}
2784927844

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "three",
3-
"version": "0.138.2",
3+
"version": "0.138.3",
44
"description": "JavaScript 3D library",
55
"type": "module",
66
"main": "./build/three.js",

0 commit comments

Comments
 (0)