Jelajahi Sumber

Correct case of enum names

Popov72 4 tahun lalu
induk
melakukan
26706fe638

+ 14 - 14
src/Engines/WebGPU/webgpuConstants.ts

@@ -142,20 +142,20 @@ export enum TextureFormat {
     Depth32Float = "depth32float",
     Depth24Plus = "depth24plus",
     Depth24PlusStencil8 = "depth24plus-stencil8",
-    BC1RGBAUNORM = "bc1-rgba-unorm",
-    BC1RGBAUNORMSRGB = "bc1-rgba-unorm-srgb",
-    BC2RGBAUNORM = "bc2-rgba-unorm",
-    BC2RGBAUNORMSRGB = "bc2-rgba-unorm-srgb",
-    BC3RGBAUNORM = "bc3-rgba-unorm",
-    BC3RGBAUNORMSRGB = "bc3-rgba-unorm-srgb",
-    BC4RUNORM = "bc4-r-unorm",
-    BC4RSNORM = "bc4-r-snorm",
-    BC5RGUNORM = "bc5-rg-unorm",
-    BC5RGSNORM = "bc5-rg-snorm",
-    BC6HRGBUFLOAT = "bc6h-rgb-ufloat",
-    BC6HRGBSFLOAT = "bc6h-rgb-sfloat",
-    BC7RGBAUNORM = "bc7-rgba-unorm",
-    BC7RGBAUNORMSRGB = "bc7-rgba-unorm-srgb"
+    BC1RGBAUNorm = "bc1-rgba-unorm",
+    BC1RGBAUnormSRGB = "bc1-rgba-unorm-srgb",
+    BC2RGBAUnorm = "bc2-rgba-unorm",
+    BC2RGBAUnormSRGB = "bc2-rgba-unorm-srgb",
+    BC3RGBAUnorm = "bc3-rgba-unorm",
+    BC3RGBAUnormSRGB = "bc3-rgba-unorm-srgb",
+    BC4RUnorm = "bc4-r-unorm",
+    BC4RSnorm = "bc4-r-snorm",
+    BC5RGUnorm = "bc5-rg-unorm",
+    BC5RGSnorm = "bc5-rg-snorm",
+    BC6HRGBUFloat = "bc6h-rgb-ufloat",
+    BC6HRGBSFloat = "bc6h-rgb-sfloat",
+    BC7RGBAUnorm = "bc7-rgba-unorm",
+    BC7RGBAUnormSRGB = "bc7-rgba-unorm-srgb"
 }
 export enum TextureComponentType {
     Float = "float",

+ 10 - 10
src/Engines/WebGPU/webgpuTextureHelper.ts

@@ -221,21 +221,21 @@ export class WebGPUTextureHelper {
 
     private _getBlockInformationFromFormat(format: GPUTextureFormat): { width: number, height: number, length: number } {
         switch (format) {
-            case WebGPUConstants.TextureFormat.BC7RGBAUNORM:
-            case WebGPUConstants.TextureFormat.BC7RGBAUNORMSRGB:
+            case WebGPUConstants.TextureFormat.BC7RGBAUnorm:
+            case WebGPUConstants.TextureFormat.BC7RGBAUnormSRGB:
                 return { width: 4, height: 4, length: 16 };
-            case WebGPUConstants.TextureFormat.BC6HRGBUFLOAT:
+            case WebGPUConstants.TextureFormat.BC6HRGBUFloat:
                 return { width: 4, height: 4, length: 16 };
-            case WebGPUConstants.TextureFormat.BC6HRGBSFLOAT:
+            case WebGPUConstants.TextureFormat.BC6HRGBSFloat:
                 return { width: 4, height: 4, length: 16 };
-            case WebGPUConstants.TextureFormat.BC3RGBAUNORM:
-            case WebGPUConstants.TextureFormat.BC3RGBAUNORMSRGB:
+            case WebGPUConstants.TextureFormat.BC3RGBAUnorm:
+            case WebGPUConstants.TextureFormat.BC3RGBAUnormSRGB:
                 return { width: 4, height: 4, length: 16 };
-            case WebGPUConstants.TextureFormat.BC2RGBAUNORM:
-            case WebGPUConstants.TextureFormat.BC2RGBAUNORMSRGB:
+            case WebGPUConstants.TextureFormat.BC2RGBAUnorm:
+            case WebGPUConstants.TextureFormat.BC2RGBAUnormSRGB:
                 return { width: 4, height: 4, length: 16 };
-            case WebGPUConstants.TextureFormat.BC1RGBAUNORM:
-            case WebGPUConstants.TextureFormat.BC1RGBAUNORMSRGB:
+            case WebGPUConstants.TextureFormat.BC1RGBAUNorm:
+            case WebGPUConstants.TextureFormat.BC1RGBAUnormSRGB:
                 return { width: 4, height: 4, length: 8 };
 
             case WebGPUConstants.TextureFormat.RGBA16Float:

+ 6 - 6
src/Engines/webgpuEngine.ts

@@ -1056,17 +1056,17 @@ export class WebGPUEngine extends Engine {
     private _getWebGPUTextureFormat(type: number, format: number): GPUTextureFormat {
         switch (format) {
             case Constants.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM:
-                return WebGPUConstants.TextureFormat.BC7RGBAUNORM;
+                return WebGPUConstants.TextureFormat.BC7RGBAUnorm;
             case Constants.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT:
-                return WebGPUConstants.TextureFormat.BC6HRGBUFLOAT;
+                return WebGPUConstants.TextureFormat.BC6HRGBUFloat;
             case Constants.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT:
-                return WebGPUConstants.TextureFormat.BC6HRGBSFLOAT;
+                return WebGPUConstants.TextureFormat.BC6HRGBSFloat;
             case Constants.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5:
-                return WebGPUConstants.TextureFormat.BC3RGBAUNORM;
+                return WebGPUConstants.TextureFormat.BC3RGBAUnorm;
             case Constants.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3:
-                return WebGPUConstants.TextureFormat.BC2RGBAUNORM;
+                return WebGPUConstants.TextureFormat.BC2RGBAUnorm;
             case Constants.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1:
-                return WebGPUConstants.TextureFormat.BC1RGBAUNORM;
+                return WebGPUConstants.TextureFormat.BC1RGBAUNorm;
         }
 
         switch (type) {