Skip to content

Commit

Permalink
Update WebGLTextures.js (mrdoob#26450)
Browse files Browse the repository at this point in the history
  • Loading branch information
RenaudRohlinger committed Jul 17, 2023
1 parent 101d516 commit 9e580ac
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/renderers/webgl/WebGLTextures.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,17 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,

}

if ( glFormat === _gl.RED_INTEGER ) {

if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.R8UI;
if ( glType === _gl.UNSIGNED_SHORT ) internalFormat = _gl.R16UI;
if ( glType === _gl.UNSIGNED_INT ) internalFormat = _gl.R32UI;
if ( glType === _gl.BYTE ) internalFormat = _gl.R8I;
if ( glType === _gl.SHORT ) internalFormat = _gl.R16I;
if ( glType === _gl.INT ) internalFormat = _gl.R32I;

}

if ( glFormat === _gl.RG ) {

if ( glType === _gl.FLOAT ) internalFormat = _gl.RG32F;
Expand Down

0 comments on commit 9e580ac

Please sign in to comment.