Skip to content

Commit

Permalink
Add support for RG_INTEGER format in WebGLTextures.getInternalFormat (#…
Browse files Browse the repository at this point in the history
…27688)

Co-authored-by: Jure <jure@vntana.com>
  • Loading branch information
Aloalo and jure-vnt authored Feb 5, 2024
1 parent 86a94fd commit 85e5dda
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 @@ -173,6 +173,17 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,

}

if ( glFormat === _gl.RG_INTEGER ) {

if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.RG8UI;
if ( glType === _gl.UNSIGNED_SHORT ) internalFormat = _gl.RG16UI;
if ( glType === _gl.UNSIGNED_INT ) internalFormat = _gl.RG32UI;
if ( glType === _gl.BYTE ) internalFormat = _gl.RG8I;
if ( glType === _gl.SHORT ) internalFormat = _gl.RG16I;
if ( glType === _gl.INT ) internalFormat = _gl.RG32I;

}

if ( glFormat === _gl.RGBA ) {

const transfer = forceLinearTransfer ? LinearTransfer : ColorManagement.getTransfer( colorSpace );
Expand Down

0 comments on commit 85e5dda

Please sign in to comment.