The Wayback Machine - https://webcf.waybackmachine.org/web/20220312183132/https://github.com/mrdoob/three.js/commit/2a6229d49d403ecf4c09472915bb59a323296fc1
Skip to content
Permalink
Browse files
WebGPUTextures: Clean up.
  • Loading branch information
Mugen87 committed on Sep 25, 2020
1 parent e6b67d3 commit 2a6229d49d403ecf4c09472915bb59a323296fc1
Showing with 12 additions and 13 deletions.
  1. +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;

This comment has been minimized.

Copy link
@mrdoob

This comment has been minimized.

Copy link
@Mugen87

Mugen87 on Sep 26, 2020

Author Collaborator

I've spotted the double break statement right in the moment when I've executed the push of e6b67d3.^^


default:
console.error( 'WebGPURenderer: Unsupported texture format.', format );

0 comments on commit 2a6229d

Please sign in to comment.