@@ -90,6 +90,9 @@ const RED_INTEGER = 0x8D94;
90
90
const RGB_INTEGER = 0x8D98 ;
91
91
const RGBA_INTEGER = 0x8D99 ;
92
92
93
+ const SRGB_ALPHA_EXT = 0x8C42 ;
94
+
95
+
93
96
const formatInfo = { } ;
94
97
{
95
98
// NOTE: this is named `numColorComponents` vs `numComponents` so we can let Uglify mangle
@@ -133,6 +136,7 @@ function getTextureInternalFormatInfo(internalFormat) {
133
136
t [ LUMINANCE_ALPHA ] = { bytesPerElement : [ 2 , 4 , 4 , 8 ] , type : [ UNSIGNED_BYTE , HALF_FLOAT , HALF_FLOAT_OES , FLOAT ] , } ;
134
137
t [ RGB ] = { bytesPerElement : [ 3 , 6 , 6 , 12 , 2 ] , type : [ UNSIGNED_BYTE , HALF_FLOAT , HALF_FLOAT_OES , FLOAT , UNSIGNED_SHORT_5_6_5 ] , } ;
135
138
t [ RGBA ] = { bytesPerElement : [ 4 , 8 , 8 , 16 , 2 , 2 ] , type : [ UNSIGNED_BYTE , HALF_FLOAT , HALF_FLOAT_OES , FLOAT , UNSIGNED_SHORT_4_4_4_4 , UNSIGNED_SHORT_5_5_5_1 ] , } ;
139
+ t [ SRGB_ALPHA_EXT ] = { bytesPerElement : [ 4 , 8 , 8 , 16 , 2 , 2 ] , type : [ UNSIGNED_BYTE , HALF_FLOAT , HALF_FLOAT_OES , FLOAT , UNSIGNED_SHORT_4_4_4_4 , UNSIGNED_SHORT_5_5_5_1 ] , } ;
136
140
t [ DEPTH_COMPONENT ] = { bytesPerElement : [ 2 , 4 ] , type : [ UNSIGNED_INT , UNSIGNED_SHORT ] , } ;
137
141
t [ DEPTH_STENCIL ] = { bytesPerElement : [ 4 ] , } ;
138
142
@@ -380,4 +384,4 @@ function getBytesForMipUncompressed(internalFormat, width, height, depth, type)
380
384
export function getBytesForMip ( internalFormat , width , height , depth , type ) {
381
385
const fn = compressedTextureFunctions . get ( internalFormat ) ;
382
386
return fn ? fn ( width , height , depth ) : getBytesForMipUncompressed ( internalFormat , width , height , depth , type ) ;
383
- } ;
387
+ } ;
0 commit comments