|
@@ -23530,7 +23530,11 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
capabilities = new WebGLCapabilities( _gl, extensions, parameters );
|
|
|
|
|
|
- if ( capabilities.isWebGL2 === false ) {
|
|
|
+ if ( capabilities.isWebGL2 ) {
|
|
|
+
|
|
|
+ extensions.get( 'EXT_color_buffer_float' );
|
|
|
+
|
|
|
+ } else {
|
|
|
|
|
|
extensions.get( 'WEBGL_depth_texture' );
|
|
|
extensions.get( 'OES_texture_float' );
|
|
@@ -23544,6 +23548,7 @@ function WebGLRenderer( parameters ) {
|
|
|
}
|
|
|
|
|
|
extensions.get( 'OES_texture_float_linear' );
|
|
|
+ extensions.get( 'EXT_color_buffer_half_float' );
|
|
|
|
|
|
utils = new WebGLUtils( _gl, extensions, capabilities );
|
|
|
|
|
@@ -25143,9 +25148,11 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ const halfFloatSupportedByExt = textureType === HalfFloatType && ( extensions.get( 'EXT_color_buffer_half_float' ) || ( capabilities.isWebGL2 && extensions.get( 'EXT_color_buffer_float' ) ) );
|
|
|
+
|
|
|
if ( textureType !== UnsignedByteType && utils.convert( textureType ) !== _gl.getParameter( 35738 ) && // IE11, Edge and Chrome Mac < 52 (#9513)
|
|
|
! ( textureType === FloatType && ( capabilities.isWebGL2 || extensions.get( 'OES_texture_float' ) || extensions.get( 'WEBGL_color_buffer_float' ) ) ) && // Chrome Mac >= 52 and Firefox
|
|
|
- ! ( textureType === HalfFloatType && ( capabilities.isWebGL2 ? extensions.get( 'EXT_color_buffer_float' ) : extensions.get( 'EXT_color_buffer_half_float' ) ) ) ) {
|
|
|
+ ! halfFloatSupportedByExt ) {
|
|
|
|
|
|
console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.' );
|
|
|
return;
|