Browse Source

WebGPUTextures: Clean up.

Mugen87 4 years ago
parent
commit
2a6229d49d
1 changed files with 12 additions and 13 deletions
  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 );