|
@@ -192,6 +192,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
var _glExtensionCompressedTexturePVRTC;
|
|
var _glExtensionCompressedTexturePVRTC;
|
|
var _glExtensionElementIndexUint;
|
|
var _glExtensionElementIndexUint;
|
|
var _glExtensionFragDepth;
|
|
var _glExtensionFragDepth;
|
|
|
|
+ var _glExtensionBlendMinMax;
|
|
|
|
|
|
|
|
|
|
initGL();
|
|
initGL();
|
|
@@ -300,6 +301,12 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ this.supportsBlendMinMax = function () {
|
|
|
|
+
|
|
|
|
+ return _glExtensionBlendMinMax;
|
|
|
|
+
|
|
|
|
+ };
|
|
|
|
+
|
|
this.getMaxAnisotropy = function () {
|
|
this.getMaxAnisotropy = function () {
|
|
|
|
|
|
return _maxAnisotropy;
|
|
return _maxAnisotropy;
|
|
@@ -5597,7 +5604,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
for ( var i = 0, il = mipmaps.length; i < il; i ++ ) {
|
|
for ( var i = 0, il = mipmaps.length; i < il; i ++ ) {
|
|
|
|
|
|
mipmap = mipmaps[ i ];
|
|
mipmap = mipmaps[ i ];
|
|
- if ( texture.format !== THREE.RGBAFormat ) {
|
|
|
|
|
|
+ if ( texture.format !== THREE.RGBAFormat && texture.format !== THREE.RGBFormat ) {
|
|
if ( _compressedTextureFormats.indexOf( glFormat ) > -1 ) {
|
|
if ( _compressedTextureFormats.indexOf( glFormat ) > -1 ) {
|
|
_gl.compressedTexImage2D( _gl.TEXTURE_2D, i, glFormat, mipmap.width, mipmap.height, 0, mipmap.data );
|
|
_gl.compressedTexImage2D( _gl.TEXTURE_2D, i, glFormat, mipmap.width, mipmap.height, 0, mipmap.data );
|
|
} else {
|
|
} else {
|
|
@@ -5743,7 +5750,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
for ( var j = 0, jl = mipmaps.length; j < jl; j ++ ) {
|
|
for ( var j = 0, jl = mipmaps.length; j < jl; j ++ ) {
|
|
|
|
|
|
mipmap = mipmaps[ j ];
|
|
mipmap = mipmaps[ j ];
|
|
- if ( texture.format !== THREE.RGBAFormat ) {
|
|
|
|
|
|
+ if ( texture.format !== THREE.RGBAFormat && texture.format !== THREE.RGBFormat ) {
|
|
|
|
|
|
if ( _compressedTextureFormats.indexOf( glFormat ) > -1 ) {
|
|
if ( _compressedTextureFormats.indexOf( glFormat ) > -1 ) {
|
|
_gl.compressedTexImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glFormat, mipmap.width, mipmap.height, 0, mipmap.data );
|
|
_gl.compressedTexImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glFormat, mipmap.width, mipmap.height, 0, mipmap.data );
|
|
@@ -6074,6 +6081,13 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if ( _glExtensionBlendMinMax !== undefined ) {
|
|
|
|
+
|
|
|
|
+ if ( p === THREE.MinEquation ) return _glExtensionBlendMinMax.MIN_EXT;
|
|
|
|
+ if ( p === THREE.MaxEquation ) return _glExtensionBlendMinMax.MAX_EXT;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
};
|
|
};
|
|
@@ -6202,6 +6216,8 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
_glExtensionElementIndexUint = _gl.getExtension( 'OES_element_index_uint' );
|
|
_glExtensionElementIndexUint = _gl.getExtension( 'OES_element_index_uint' );
|
|
|
|
|
|
|
|
+ _glExtensionBlendMinMax = _gl.getExtension( 'EXT_blend_minmax' );
|
|
|
|
+
|
|
|
|
|
|
if ( _glExtensionTextureFloat === null ) {
|
|
if ( _glExtensionTextureFloat === null ) {
|
|
|
|
|
|
@@ -6239,6 +6255,12 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if ( _glExtensionBlendMinMax === null ) {
|
|
|
|
+
|
|
|
|
+ console.log( 'THREE.WebGLRenderer: min max blend equations not supported.' );
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
if ( _gl.getShaderPrecisionFormat === undefined ) {
|
|
if ( _gl.getShaderPrecisionFormat === undefined ) {
|
|
|
|
|
|
_gl.getShaderPrecisionFormat = function () {
|
|
_gl.getShaderPrecisionFormat = function () {
|