Procházet zdrojové kódy

WebGPUTextures: Clean up.

Mugen87 před 5 roky
rodič
revize
2a6229d49d
1 změnil soubory, kde provedl 12 přidání a 13 odebrání
  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 );