|
|
@@ -174,13 +174,13 @@ class WebGLTextureUtils {
|
|
|
|
|
|
}
|
|
|
|
|
|
- let ext_texture_norm16;
|
|
|
+ let extTextureNorm16 = null;
|
|
|
|
|
|
if ( normalized ) {
|
|
|
|
|
|
- ext_texture_norm16 = extensions.get( 'EXT_texture_norm16' );
|
|
|
+ extTextureNorm16 = extensions.get( 'EXT_texture_norm16' );
|
|
|
|
|
|
- if ( ! ext_texture_norm16 ) {
|
|
|
+ if ( ! extTextureNorm16 ) {
|
|
|
|
|
|
warn( 'WebGLRenderer: Unable to use normalized textures without EXT_texture_norm16 extension' );
|
|
|
|
|
|
@@ -196,8 +196,8 @@ class WebGLTextureUtils {
|
|
|
if ( glType === gl.HALF_FLOAT ) internalFormat = gl.R16F;
|
|
|
if ( glType === gl.UNSIGNED_BYTE ) internalFormat = gl.R8;
|
|
|
if ( glType === gl.BYTE ) internalFormat = gl.R8_SNORM;
|
|
|
- if ( glType === gl.UNSIGNED_SHORT && ext_texture_norm16 ) internalFormat = ext_texture_norm16.R16_EXT;
|
|
|
- if ( glType === gl.SHORT && ext_texture_norm16 ) internalFormat = ext_texture_norm16.R16_SNORM_EXT;
|
|
|
+ if ( glType === gl.UNSIGNED_SHORT && extTextureNorm16 ) internalFormat = extTextureNorm16.R16_EXT;
|
|
|
+ if ( glType === gl.SHORT && extTextureNorm16 ) internalFormat = extTextureNorm16.R16_SNORM_EXT;
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -218,8 +218,8 @@ class WebGLTextureUtils {
|
|
|
if ( glType === gl.HALF_FLOAT ) internalFormat = gl.RG16F;
|
|
|
if ( glType === gl.UNSIGNED_BYTE ) internalFormat = gl.RG8;
|
|
|
if ( glType === gl.BYTE ) internalFormat = gl.RG8_SNORM;
|
|
|
- if ( glType === gl.UNSIGNED_SHORT && ext_texture_norm16 ) internalFormat = ext_texture_norm16.RG16_EXT;
|
|
|
- if ( glType === gl.SHORT && ext_texture_norm16 ) internalFormat = ext_texture_norm16.RG16_SNORM_EXT;
|
|
|
+ if ( glType === gl.UNSIGNED_SHORT && extTextureNorm16 ) internalFormat = extTextureNorm16.RG16_EXT;
|
|
|
+ if ( glType === gl.SHORT && extTextureNorm16 ) internalFormat = extTextureNorm16.RG16_SNORM_EXT;
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -242,8 +242,8 @@ class WebGLTextureUtils {
|
|
|
if ( glType === gl.HALF_FLOAT ) internalFormat = gl.RGB16F;
|
|
|
if ( glType === gl.UNSIGNED_BYTE ) internalFormat = ( transfer === SRGBTransfer ) ? gl.SRGB8 : gl.RGB8;
|
|
|
if ( glType === gl.BYTE ) internalFormat = gl.RGB8_SNORM;
|
|
|
- if ( glType === gl.UNSIGNED_SHORT && ext_texture_norm16 ) internalFormat = ext_texture_norm16.RGB16_EXT;
|
|
|
- if ( glType === gl.SHORT && ext_texture_norm16 ) internalFormat = ext_texture_norm16.RGB16_SNORM_EXT;
|
|
|
+ if ( glType === gl.UNSIGNED_SHORT && extTextureNorm16 ) internalFormat = extTextureNorm16.RGB16_EXT;
|
|
|
+ if ( glType === gl.SHORT && extTextureNorm16 ) internalFormat = extTextureNorm16.RGB16_SNORM_EXT;
|
|
|
if ( glType === gl.UNSIGNED_SHORT_5_6_5 ) internalFormat = gl.RGB565;
|
|
|
if ( glType === gl.UNSIGNED_SHORT_5_5_5_1 ) internalFormat = gl.RGB5_A1;
|
|
|
if ( glType === gl.UNSIGNED_SHORT_4_4_4_4 ) internalFormat = gl.RGB4;
|
|
|
@@ -271,8 +271,8 @@ class WebGLTextureUtils {
|
|
|
if ( glType === gl.HALF_FLOAT ) internalFormat = gl.RGBA16F;
|
|
|
if ( glType === gl.UNSIGNED_BYTE ) internalFormat = ( transfer === SRGBTransfer ) ? gl.SRGB8_ALPHA8 : gl.RGBA8;
|
|
|
if ( glType === gl.BYTE ) internalFormat = gl.RGBA8_SNORM;
|
|
|
- if ( glType === gl.UNSIGNED_SHORT && ext_texture_norm16 ) internalFormat = ext_texture_norm16.RGBA16_EXT;
|
|
|
- if ( glType === gl.SHORT && ext_texture_norm16 ) internalFormat = ext_texture_norm16.RGBA16_SNORM_EXT;
|
|
|
+ if ( glType === gl.UNSIGNED_SHORT && extTextureNorm16 ) internalFormat = extTextureNorm16.RGBA16_EXT;
|
|
|
+ if ( glType === gl.SHORT && extTextureNorm16 ) internalFormat = extTextureNorm16.RGBA16_SNORM_EXT;
|
|
|
if ( glType === gl.UNSIGNED_SHORT_4_4_4_4 ) internalFormat = gl.RGBA4;
|
|
|
if ( glType === gl.UNSIGNED_SHORT_5_5_5_1 ) internalFormat = gl.RGB5_A1;
|
|
|
|