Skip to content

Commit

Permalink
Updated builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Sep 19, 2021
1 parent 1756481 commit 0fd81f8
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
20 changes: 16 additions & 4 deletions build/three.js
Original file line number Diff line number Diff line change
Expand Up @@ -11743,6 +11743,14 @@
scene.background = background;
}

_setEncoding(uniform, texture) {
if (this._renderer.capabilities.isWebGL2 === true && texture.format === RGBAFormat && texture.type === UnsignedByteType && texture.encoding === sRGBEncoding) {
uniform.value = ENCODINGS[LinearEncoding];
} else {
uniform.value = ENCODINGS[texture.encoding];
}
}

_textureToCubeUV(texture, cubeUVRenderTarget) {
const renderer = this._renderer;

Expand All @@ -11765,8 +11773,9 @@
uniforms['texelSize'].value.set(1.0 / texture.image.width, 1.0 / texture.image.height);
}

uniforms['inputEncoding'].value = ENCODINGS[texture.encoding];
uniforms['outputEncoding'].value = ENCODINGS[cubeUVRenderTarget.texture.encoding];
this._setEncoding(uniforms['inputEncoding'], texture);

this._setEncoding(uniforms['outputEncoding'], cubeUVRenderTarget.texture);

_setViewport(cubeUVRenderTarget, 0, 0, 3 * SIZE_MAX, 2 * SIZE_MAX);

Expand Down Expand Up @@ -11856,8 +11865,11 @@

blurUniforms['dTheta'].value = radiansPerPixel;
blurUniforms['mipInt'].value = LOD_MAX - lodIn;
blurUniforms['inputEncoding'].value = ENCODINGS[targetIn.texture.encoding];
blurUniforms['outputEncoding'].value = ENCODINGS[targetIn.texture.encoding];

this._setEncoding(blurUniforms['inputEncoding'], targetIn.texture);

this._setEncoding(blurUniforms['outputEncoding'], targetIn.texture);

const outputSize = _sizeLods[lodOut];
const x = 3 * Math.max(0, SIZE_MAX - 2 * outputSize);
const y = (lodOut === 0 ? 0 : 2 * SIZE_MAX) + 2 * outputSize * (lodOut > LOD_MAX - LOD_MIN ? lodOut - LOD_MAX + LOD_MIN : 0);
Expand Down
2 changes: 1 addition & 1 deletion build/three.min.js

Large diffs are not rendered by default.

23 changes: 19 additions & 4 deletions build/three.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -15293,6 +15293,20 @@ class PMREMGenerator {

}

_setEncoding( uniform, texture ) {

if ( this._renderer.capabilities.isWebGL2 === true && texture.format === RGBAFormat && texture.type === UnsignedByteType && texture.encoding === sRGBEncoding ) {

uniform.value = ENCODINGS[ LinearEncoding ];

} else {

uniform.value = ENCODINGS[ texture.encoding ];

}

}

_textureToCubeUV( texture, cubeUVRenderTarget ) {

const renderer = this._renderer;
Expand Down Expand Up @@ -15328,8 +15342,8 @@ class PMREMGenerator {

}

uniforms[ 'inputEncoding' ].value = ENCODINGS[ texture.encoding ];
uniforms[ 'outputEncoding' ].value = ENCODINGS[ cubeUVRenderTarget.texture.encoding ];
this._setEncoding( uniforms[ 'inputEncoding' ], texture );
this._setEncoding( uniforms[ 'outputEncoding' ], cubeUVRenderTarget.texture );

_setViewport( cubeUVRenderTarget, 0, 0, 3 * SIZE_MAX, 2 * SIZE_MAX );

Expand Down Expand Up @@ -15460,8 +15474,9 @@ class PMREMGenerator {

blurUniforms[ 'dTheta' ].value = radiansPerPixel;
blurUniforms[ 'mipInt' ].value = LOD_MAX - lodIn;
blurUniforms[ 'inputEncoding' ].value = ENCODINGS[ targetIn.texture.encoding ];
blurUniforms[ 'outputEncoding' ].value = ENCODINGS[ targetIn.texture.encoding ];

this._setEncoding( blurUniforms[ 'inputEncoding' ], targetIn.texture );
this._setEncoding( blurUniforms[ 'outputEncoding' ], targetIn.texture );

const outputSize = _sizeLods[ lodOut ];
const x = 3 * Math.max( 0, SIZE_MAX - 2 * outputSize );
Expand Down

0 comments on commit 0fd81f8

Please sign in to comment.