Explorar o código

WebGPUTextures: Clean up.

Mugen87 %!s(int64=4) %!d(string=hai) anos
pai
achega
2a6229d49d
Modificáronse 1 ficheiros con 12 adicións e 13 borrados
  1. 12 13
      examples/jsm/renderers/webgpu/WebGPUTextures.js

+ 12 - 13
examples/jsm/renderers/webgpu/WebGPUTextures.js

@@ -562,14 +562,14 @@ class WebGPUTextures {
 						formatGPU = ( encoding === sRGBEncoding ) ? GPUTextureFormat.RGBA8UnormSRGB : GPUTextureFormat.RGBA8Unorm;
 						break;
 
-					case FloatType:
-						formatGPU = GPUTextureFormat.RGBA32Float;
-						break;
-
 					case HalfFloatType:
 						formatGPU = GPUTextureFormat.RGBA16Float;
 						break;
 
+					case FloatType:
+						formatGPU = GPUTextureFormat.RGBA32Float;
+						break;
+
 					default:
 						console.error( 'WebGPURenderer: Unsupported texture type with RGBAFormat.', type );
 
@@ -585,14 +585,14 @@ class WebGPUTextures {
 						formatGPU = GPUTextureFormat.R8Unorm;
 						break;
 
-					case FloatType:
-						formatGPU = GPUTextureFormat.R32Float;
-						break;
-
 					case HalfFloatType:
 						formatGPU = GPUTextureFormat.R16Float;
 						break;
 
+					case FloatType:
+						formatGPU = GPUTextureFormat.R32Float;
+						break;
+
 					default:
 						console.error( 'WebGPURenderer: Unsupported texture type with RedFormat.', type );
 
@@ -608,21 +608,20 @@ class WebGPUTextures {
 						formatGPU = GPUTextureFormat.RG8Unorm;
 						break;
 
-					case FloatType:
-						formatGPU = GPUTextureFormat.RG32Float;
-						break;
-
 					case HalfFloatType:
 						formatGPU = GPUTextureFormat.RG16Float;
 						break;
 
+					case FloatType:
+						formatGPU = GPUTextureFormat.RG32Float;
+						break;
+
 					default:
 						console.error( 'WebGPURenderer: Unsupported texture type with RGFormat.', type );
 
 				}
 
 				break;
-				break;
 
 			default:
 				console.error( 'WebGPURenderer: Unsupported texture format.', format );