Skip to content

Commit

Permalink
WebGLRenderer: Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Jan 12, 2021
1 parent 94c1a4b commit b0f272b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/renderers/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,11 @@ function WebGLRenderer( parameters ) {
extensions.get( 'OES_element_index_uint' );
extensions.get( 'OES_vertex_array_object' );
extensions.get( 'ANGLE_instanced_arrays' );
extensions.get( 'EXT_color_buffer_half_float' );

}

extensions.get( 'OES_texture_float_linear' );
extensions.get( 'EXT_color_buffer_half_float' );

utils = new WebGLUtils( _gl, extensions, capabilities );

Expand Down Expand Up @@ -1894,10 +1894,10 @@ function WebGLRenderer( parameters ) {

}

const halfFloatSupportedByExt = textureType === HalfFloatType && ( extensions.get( 'EXT_color_buffer_half_float' ) || ( capabilities.isWebGL2 && extensions.get( 'EXT_color_buffer_float' ) ) );
const halfFloatSupportedByExt = ( textureType === HalfFloatType ) && ( extensions.has( 'EXT_color_buffer_half_float' ) || ( capabilities.isWebGL2 && extensions.has( 'EXT_color_buffer_float' ) ) );

if ( textureType !== UnsignedByteType && utils.convert( textureType ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_TYPE ) && // 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 === FloatType && ( capabilities.isWebGL2 || extensions.has( 'OES_texture_float' ) || extensions.has( 'WEBGL_color_buffer_float' ) ) ) && // Chrome Mac >= 52 and Firefox
! halfFloatSupportedByExt ) {

console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.' );
Expand Down

0 comments on commit b0f272b

Please sign in to comment.