diff --git a/src/platform/graphics/constants.js b/src/platform/graphics/constants.js index 547767cc1d1..8b591299e4e 100644 --- a/src/platform/graphics/constants.js +++ b/src/platform/graphics/constants.js @@ -971,38 +971,6 @@ export const PIXELFORMAT_DXT3_SRGBA = 55; */ export const PIXELFORMAT_DXT5_SRGBA = 56; -/** - * Format equivalent to {@link PIXELFORMAT_PVRTC_2BPP_RGB_1} but sampled in linear color space. - * - * @type {number} - * @category Graphics - */ -export const PIXELFORMAT_PVRTC_2BPP_SRGB_1 = 57; - -/** - * Format equivalent to {@link PIXELFORMAT_PVRTC_2BPP_RGBA_1} but sampled in linear color space. - * - * @type {number} - * @category Graphics - */ -export const PIXELFORMAT_PVRTC_2BPP_SRGBA_1 = 58; - -/** - * Format equivalent to {@link PIXELFORMAT_PVRTC_4BPP_RGB_1} but sampled in linear color space. - * - * @type {number} - * @category Graphics - */ -export const PIXELFORMAT_PVRTC_4BPP_SRGB_1 = 59; - -/** - * Format equivalent to {@link PIXELFORMAT_PVRTC_4BPP_RGBA_1} but sampled in linear color space. - * - * @type {number} - * @category Graphics - */ -export const PIXELFORMAT_PVRTC_4BPP_SRGBA_1 = 60; - /** * Format equivalent to {@link PIXELFORMAT_ETC2_RGB} but sampled in linear color space. * @@ -1123,10 +1091,10 @@ export const pixelFormatInfo = new Map([ [PIXELFORMAT_ETC1, { name: 'ETC1', blockSize: 8, ldr: true }], [PIXELFORMAT_ETC2_RGB, { name: 'ETC2_RGB', blockSize: 8, ldr: true, srgbFormat: PIXELFORMAT_ETC2_SRGB }], [PIXELFORMAT_ETC2_RGBA, { name: 'ETC2_RGBA', blockSize: 16, ldr: true, srgbFormat: PIXELFORMAT_ETC2_SRGBA }], - [PIXELFORMAT_PVRTC_2BPP_RGB_1, { name: 'PVRTC_2BPP_RGB_1', ldr: true, blockSize: 8, srgbFormat: PIXELFORMAT_PVRTC_2BPP_SRGB_1 }], - [PIXELFORMAT_PVRTC_2BPP_RGBA_1, { name: 'PVRTC_2BPP_RGBA_1', ldr: true, blockSize: 8, srgbFormat: PIXELFORMAT_PVRTC_2BPP_SRGBA_1 }], - [PIXELFORMAT_PVRTC_4BPP_RGB_1, { name: 'PVRTC_4BPP_RGB_1', ldr: true, blockSize: 8, srgbFormat: PIXELFORMAT_PVRTC_4BPP_SRGB_1 }], - [PIXELFORMAT_PVRTC_4BPP_RGBA_1, { name: 'PVRTC_4BPP_RGBA_1', ldr: true, blockSize: 8, srgbFormat: PIXELFORMAT_PVRTC_4BPP_SRGBA_1 }], + [PIXELFORMAT_PVRTC_2BPP_RGB_1, { name: 'PVRTC_2BPP_RGB_1', ldr: true, blockSize: 8 }], + [PIXELFORMAT_PVRTC_2BPP_RGBA_1, { name: 'PVRTC_2BPP_RGBA_1', ldr: true, blockSize: 8 }], + [PIXELFORMAT_PVRTC_4BPP_RGB_1, { name: 'PVRTC_4BPP_RGB_1', ldr: true, blockSize: 8 }], + [PIXELFORMAT_PVRTC_4BPP_RGBA_1, { name: 'PVRTC_4BPP_RGBA_1', ldr: true, blockSize: 8 }], [PIXELFORMAT_ASTC_4x4, { name: 'ASTC_4x4', blockSize: 16, ldr: true, srgbFormat: PIXELFORMAT_ASTC_4x4_SRGB }], [PIXELFORMAT_ATC_RGB, { name: 'ATC_RGB', blockSize: 8, ldr: true }], [PIXELFORMAT_ATC_RGBA, { name: 'ATC_RGBA', blockSize: 16, ldr: true }], @@ -1138,10 +1106,6 @@ export const pixelFormatInfo = new Map([ [PIXELFORMAT_DXT1_SRGB, { name: 'DXT1_SRGB', blockSize: 8, ldr: true, srgb: true }], [PIXELFORMAT_DXT3_SRGBA, { name: 'DXT3_SRGBA', blockSize: 16, ldr: true, srgb: true }], [PIXELFORMAT_DXT5_SRGBA, { name: 'DXT5_SRGBA', blockSize: 16, ldr: true, srgb: true }], - [PIXELFORMAT_PVRTC_2BPP_SRGB_1, { name: 'PVRTC_2BPP_SRGB_1', blockSize: 8, ldr: true, srgb: true }], - [PIXELFORMAT_PVRTC_2BPP_SRGBA_1, { name: 'PVRTC_2BPP_SRGBA_1', blockSize: 8, ldr: true, srgb: true }], - [PIXELFORMAT_PVRTC_4BPP_SRGB_1, { name: 'PVRTC_4BPP_SRGB_1', blockSize: 8, ldr: true, srgb: true }], - [PIXELFORMAT_PVRTC_4BPP_SRGBA_1, { name: 'PVRTC_4BPP_SRGBA_1', blockSize: 8, ldr: true, srgb: true }], [PIXELFORMAT_ETC2_SRGB, { name: 'ETC2_SRGB', blockSize: 8, ldr: true, srgb: true }], [PIXELFORMAT_ETC2_SRGBA, { name: 'ETC2_SRGBA', blockSize: 16, ldr: true, srgb: true }], [PIXELFORMAT_ASTC_4x4_SRGB, { name: 'ASTC_4x4_SRGB', blockSize: 16, ldr: true, srgb: true }], diff --git a/src/platform/graphics/webgl/webgl-texture.js b/src/platform/graphics/webgl/webgl-texture.js index c40c5b43418..45f24d2ac3a 100644 --- a/src/platform/graphics/webgl/webgl-texture.js +++ b/src/platform/graphics/webgl/webgl-texture.js @@ -10,8 +10,7 @@ import { PIXELFORMAT_R32I, PIXELFORMAT_R32U, PIXELFORMAT_RG16I, PIXELFORMAT_RG16U, PIXELFORMAT_RG32I, PIXELFORMAT_RG32U, PIXELFORMAT_RG8I, PIXELFORMAT_RG8U, PIXELFORMAT_RGBA16I, PIXELFORMAT_RGBA16U, PIXELFORMAT_RGBA32I, PIXELFORMAT_RGBA32U, PIXELFORMAT_RGBA8I, PIXELFORMAT_RGBA8U, PIXELFORMAT_R16F, PIXELFORMAT_RG16F, PIXELFORMAT_R8, PIXELFORMAT_RG8, - PIXELFORMAT_DXT1_SRGB, PIXELFORMAT_DXT3_SRGBA, PIXELFORMAT_DXT5_SRGBA, PIXELFORMAT_PVRTC_2BPP_SRGB_1, - PIXELFORMAT_PVRTC_2BPP_SRGBA_1, PIXELFORMAT_PVRTC_4BPP_SRGB_1, PIXELFORMAT_PVRTC_4BPP_SRGBA_1, + PIXELFORMAT_DXT1_SRGB, PIXELFORMAT_DXT3_SRGBA, PIXELFORMAT_DXT5_SRGBA, PIXELFORMAT_ETC2_SRGB, PIXELFORMAT_ETC2_SRGBA, PIXELFORMAT_ASTC_4x4_SRGB, PIXELFORMAT_SBGRA8, PIXELFORMAT_BC6F, PIXELFORMAT_BC6UF, PIXELFORMAT_BC7, PIXELFORMAT_BC7_SRGBA, PIXELFORMAT_DEPTH16 @@ -252,22 +251,6 @@ class WebglTexture { this._glFormat = gl.SRGB_ALPHA; this._glInternalFormat = device.extCompressedTextureS3TC_SRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT; break; - case PIXELFORMAT_PVRTC_2BPP_SRGB_1: - this._glFormat = gl.SRGB; - this._glInternalFormat = device.extCompressedTexturePVRTC.COMPRESSED_SRGB_PVRTC_2BPPV1_EXT; - break; - case PIXELFORMAT_PVRTC_2BPP_SRGBA_1: - this._glFormat = gl.SRGB_ALPHA; - this._glInternalFormat = device.extCompressedTexturePVRTC.COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT; - break; - case PIXELFORMAT_PVRTC_4BPP_SRGB_1: - this._glFormat = gl.SRGB; - this._glInternalFormat = device.extCompressedTexturePVRTC.COMPRESSED_SRGB_PVRTC_4BPPV1_EXT; - break; - case PIXELFORMAT_PVRTC_4BPP_SRGBA_1: - this._glFormat = gl.SRGB_ALPHA; - this._glInternalFormat = device.extCompressedTexturePVRTC.COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT; - break; case PIXELFORMAT_ETC2_SRGB: this._glFormat = gl.RGB; this._glInternalFormat = device.extCompressedTextureETC.COMPRESSED_RGB8_ETC2; diff --git a/src/platform/graphics/webgpu/constants.js b/src/platform/graphics/webgpu/constants.js index faaef6b9341..317a0229dd0 100644 --- a/src/platform/graphics/webgpu/constants.js +++ b/src/platform/graphics/webgpu/constants.js @@ -9,8 +9,7 @@ import { PIXELFORMAT_R32I, PIXELFORMAT_R32U, PIXELFORMAT_RG16I, PIXELFORMAT_RG16U, PIXELFORMAT_RG32I, PIXELFORMAT_RG32U, PIXELFORMAT_RG8I, PIXELFORMAT_RG8U, PIXELFORMAT_RGBA16I, PIXELFORMAT_RGBA16U, PIXELFORMAT_RGBA32I, PIXELFORMAT_RGBA32U, PIXELFORMAT_RGBA8I, PIXELFORMAT_RGBA8U, PIXELFORMAT_R16F, PIXELFORMAT_RG16F, PIXELFORMAT_R8, PIXELFORMAT_RG8, - PIXELFORMAT_DXT1_SRGB, PIXELFORMAT_DXT3_SRGBA, PIXELFORMAT_DXT5_SRGBA, PIXELFORMAT_PVRTC_2BPP_SRGB_1, - PIXELFORMAT_PVRTC_2BPP_SRGBA_1, PIXELFORMAT_PVRTC_4BPP_SRGB_1, PIXELFORMAT_PVRTC_4BPP_SRGBA_1, + PIXELFORMAT_DXT1_SRGB, PIXELFORMAT_DXT3_SRGBA, PIXELFORMAT_DXT5_SRGBA, PIXELFORMAT_ETC2_SRGB, PIXELFORMAT_ETC2_SRGBA, PIXELFORMAT_SBGRA8, PIXELFORMAT_BC6F, PIXELFORMAT_BC6UF, PIXELFORMAT_BC7, PIXELFORMAT_BC7_SRGBA, PIXELFORMAT_ASTC_4x4_SRGB, @@ -83,10 +82,6 @@ gpuTextureFormats[PIXELFORMAT_BC7] = 'bc7-rgba-unorm'; gpuTextureFormats[PIXELFORMAT_DXT1_SRGB] = 'bc1-rgba-unorm-srgb'; gpuTextureFormats[PIXELFORMAT_DXT3_SRGBA] = 'bc2-rgba-unorm-srgb'; gpuTextureFormats[PIXELFORMAT_DXT5_SRGBA] = 'bc3-rgba-unorm-srgb'; -gpuTextureFormats[PIXELFORMAT_PVRTC_2BPP_SRGB_1] = ''; -gpuTextureFormats[PIXELFORMAT_PVRTC_2BPP_SRGBA_1] = ''; -gpuTextureFormats[PIXELFORMAT_PVRTC_4BPP_SRGB_1] = ''; -gpuTextureFormats[PIXELFORMAT_PVRTC_4BPP_SRGBA_1] = ''; gpuTextureFormats[PIXELFORMAT_ETC2_SRGB] = 'etc2-rgb8unorm-srgb'; gpuTextureFormats[PIXELFORMAT_ETC2_SRGBA] = 'etc2-rgba8unorm-srgb'; gpuTextureFormats[PIXELFORMAT_BC7_SRGBA] = 'bc7-rgba-unorm-srgb';