Skip to content

Commit

Permalink
WebGLRenderer: Check for EXT_color_buffer_float for transmission. (#…
Browse files Browse the repository at this point in the history
…27761)

* fix: some feature need webgl extension

* chore: revert code

* chore: revert code

* chore: remove webgl1

* chore: remove webgl1
  • Loading branch information
susiwen8 committed Mar 4, 2024
1 parent b09f60e commit 3941fd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderers/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ class WebGLRenderer {

_transmissionRenderTarget = new WebGLRenderTarget( 1, 1, {
generateMipmaps: true,
type: extensions.has( 'EXT_color_buffer_half_float' ) ? HalfFloatType : UnsignedByteType,
type: ( extensions.has( 'EXT_color_buffer_half_float' ) || extensions.has( 'EXT_color_buffer_float' ) ) ? HalfFloatType : UnsignedByteType,
minFilter: LinearMipmapLinearFilter,
samples: 4
} );
Expand Down Expand Up @@ -2294,7 +2294,7 @@ class WebGLRenderer {

}

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

if ( textureType !== UnsignedByteType && utils.convert( textureType ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_TYPE ) && // Edge and Chrome Mac < 52 (#9513)
textureType !== FloatType && ! halfFloatSupportedByExt ) {
Expand Down

0 comments on commit 3941fd4

Please sign in to comment.