From ecd8446f99b1c1bb65905b1663a6460d9a2ec43e Mon Sep 17 00:00:00 2001 From: cmhhelgeson <62450112+cmhhelgeson@users.noreply.github.com> Date: Thu, 19 Oct 2023 15:53:32 -0700 Subject: [PATCH] Test --- src/sample/normalMap/main.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/sample/normalMap/main.ts b/src/sample/normalMap/main.ts index 22b834df..b0528e59 100644 --- a/src/sample/normalMap/main.ts +++ b/src/sample/normalMap/main.ts @@ -14,7 +14,6 @@ import { } from './utils'; const MAT4X4_BYTES = 64; - enum TextureAtlas { Spiral, Toybox, @@ -81,7 +80,7 @@ SampleInitFactoryWebGPU( usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST, }); - // Create PBR info + // Create PBR info (diffuse, normal, and depth/height textures) let spiralPBR: Required; { const response = await createPBRDescriptor(device, [ @@ -167,6 +166,7 @@ SampleInitFactoryWebGPU( { sampleType: 'float' }, { sampleType: 'float' }, ], + // Multiple bindgroups that accord to the layout defined above [ [ sampler, @@ -222,6 +222,7 @@ SampleInitFactoryWebGPU( return modelMatrix; } + // Change the model mapping type const getMappingType = (arr: Uint32Array) => { switch (settings['Bump Mode']) { case 'Diffuse Texture': @@ -244,7 +245,6 @@ SampleInitFactoryWebGPU( break; } }; - const mappingType: Uint32Array = new Uint32Array([0]); const texturedCubePipeline = create3DRenderPipeline( @@ -260,7 +260,6 @@ SampleInitFactoryWebGPU( ); let currentSurfaceBindGroup = 0; - const onChangeTexture = () => { currentSurfaceBindGroup = TextureAtlas[settings.Texture]; };