|
@@ -6155,7 +6155,7 @@ var premultiplied_alpha_fragment = "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.r
|
|
|
|
|
|
var project_vertex = "vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;";
|
|
|
|
|
|
-var dithering_fragment = "#if defined( DITHERING )\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif";
|
|
|
+var dithering_fragment = "#if defined( DITHERING )\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif";
|
|
|
|
|
|
var dithering_pars_fragment = "#if defined( DITHERING )\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif";
|
|
|
|
|
@@ -6183,7 +6183,7 @@ var specularmap_fragment = "float specularStrength;\n#ifdef USE_SPECULARMAP\n\tv
|
|
|
|
|
|
var specularmap_pars_fragment = "#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif";
|
|
|
|
|
|
-var tonemapping_fragment = "#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif";
|
|
|
+var tonemapping_fragment = "#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif";
|
|
|
|
|
|
var tonemapping_pars_fragment = "#ifndef saturate\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) );\n}";
|
|
|
|
|
@@ -15762,6 +15762,7 @@ function CubeTexture( images, mapping, wrapS, wrapT, magFilter, minFilter, forma
|
|
|
|
|
|
images = images !== undefined ? images : [];
|
|
|
mapping = mapping !== undefined ? mapping : CubeReflectionMapping;
|
|
|
+ format = format !== undefined ? format : RGBFormat;
|
|
|
|
|
|
Texture.call( this, images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
|
|
|
|
|
@@ -17865,7 +17866,7 @@ function reversePainterSortStable( a, b ) {
|
|
|
|
|
|
return a.renderOrder - b.renderOrder;
|
|
|
|
|
|
- } if ( a.z !== b.z ) {
|
|
|
+ } else if ( a.z !== b.z ) {
|
|
|
|
|
|
return b.z - a.z;
|
|
|
|
|
@@ -20222,23 +20223,10 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
var textureProperties = properties.get( texture );
|
|
|
|
|
|
- if ( texture.image && textureProperties.__image__webglTextureCube ) {
|
|
|
-
|
|
|
- // cube texture
|
|
|
-
|
|
|
- _gl.deleteTexture( textureProperties.__image__webglTextureCube );
|
|
|
-
|
|
|
- } else {
|
|
|
+ if ( textureProperties.__webglInit === undefined ) return;
|
|
|
|
|
|
- // 2D texture
|
|
|
+ _gl.deleteTexture( textureProperties.__webglTexture );
|
|
|
|
|
|
- if ( textureProperties.__webglInit === undefined ) return;
|
|
|
-
|
|
|
- _gl.deleteTexture( textureProperties.__webglTexture );
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- // remove all webgl properties
|
|
|
properties.remove( texture );
|
|
|
|
|
|
}
|
|
@@ -20335,7 +20323,6 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
function setTextureCube( texture, slot ) {
|
|
|
|
|
|
var textureProperties = properties.get( texture );
|
|
@@ -20344,18 +20331,10 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
if ( texture.version > 0 && textureProperties.__version !== texture.version ) {
|
|
|
|
|
|
- if ( ! textureProperties.__image__webglTextureCube ) {
|
|
|
-
|
|
|
- texture.addEventListener( 'dispose', onTextureDispose );
|
|
|
-
|
|
|
- textureProperties.__image__webglTextureCube = _gl.createTexture();
|
|
|
-
|
|
|
- info.memory.textures ++;
|
|
|
-
|
|
|
- }
|
|
|
+ initTexture( textureProperties, texture );
|
|
|
|
|
|
state.activeTexture( 33984 + slot );
|
|
|
- state.bindTexture( 34067, textureProperties.__image__webglTextureCube );
|
|
|
+ state.bindTexture( 34067, textureProperties.__webglTexture );
|
|
|
|
|
|
_gl.pixelStorei( 37440, texture.flipY );
|
|
|
|
|
@@ -20456,7 +20435,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
} else {
|
|
|
|
|
|
state.activeTexture( 33984 + slot );
|
|
|
- state.bindTexture( 34067, textureProperties.__image__webglTextureCube );
|
|
|
+ state.bindTexture( 34067, textureProperties.__webglTexture );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -20523,20 +20502,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
}
|
|
|
|
|
|
- function uploadTexture( textureProperties, texture, slot ) {
|
|
|
-
|
|
|
- var textureType;
|
|
|
-
|
|
|
- if ( texture.isDataTexture3D ) {
|
|
|
-
|
|
|
- textureType = 32879;
|
|
|
-
|
|
|
- } else {
|
|
|
-
|
|
|
- textureType = 3553;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+ function initTexture( textureProperties, texture ) {
|
|
|
|
|
|
if ( textureProperties.__webglInit === undefined ) {
|
|
|
|
|
@@ -20549,12 +20515,17 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
info.memory.textures ++;
|
|
|
|
|
|
}
|
|
|
- state.activeTexture( 33984 + slot );
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- state.bindTexture( textureType, textureProperties.__webglTexture );
|
|
|
+ function uploadTexture( textureProperties, texture, slot ) {
|
|
|
+
|
|
|
+ var textureType = ( texture.isDataTexture3D ) ? 32879 : 3553;
|
|
|
|
|
|
+ initTexture( textureProperties, texture );
|
|
|
|
|
|
+ state.activeTexture( 33984 + slot );
|
|
|
+ state.bindTexture( textureType, textureProperties.__webglTexture );
|
|
|
|
|
|
_gl.pixelStorei( 37440, texture.flipY );
|
|
|
_gl.pixelStorei( 37441, texture.premultiplyAlpha );
|
|
@@ -40655,7 +40626,7 @@ PositionalAudio.prototype = Object.assign( Object.create( Audio.prototype ), {
|
|
|
|
|
|
Object3D.prototype.updateMatrixWorld.call( this, force );
|
|
|
|
|
|
- if ( this.isPlaying === false ) return;
|
|
|
+ if ( this.hasPlaybackControl === true && this.isPlaying === false ) return;
|
|
|
|
|
|
this.matrixWorld.decompose( position, quaternion, scale );
|
|
|
|