Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
cmhhelgeson committed Oct 19, 2023
1 parent bd105d7 commit ecd8446
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/sample/normalMap/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
} from './utils';

const MAT4X4_BYTES = 64;

enum TextureAtlas {
Spiral,
Toybox,
Expand Down Expand Up @@ -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<PBRDescriptor>;
{
const response = await createPBRDescriptor(device, [
Expand Down Expand Up @@ -167,6 +166,7 @@ SampleInitFactoryWebGPU(
{ sampleType: 'float' },
{ sampleType: 'float' },
],
// Multiple bindgroups that accord to the layout defined above
[
[
sampler,
Expand Down Expand Up @@ -222,6 +222,7 @@ SampleInitFactoryWebGPU(
return modelMatrix;
}

// Change the model mapping type
const getMappingType = (arr: Uint32Array) => {
switch (settings['Bump Mode']) {
case 'Diffuse Texture':
Expand All @@ -244,7 +245,6 @@ SampleInitFactoryWebGPU(
break;
}
};

const mappingType: Uint32Array = new Uint32Array([0]);

const texturedCubePipeline = create3DRenderPipeline(
Expand All @@ -260,7 +260,6 @@ SampleInitFactoryWebGPU(
);

let currentSurfaceBindGroup = 0;

const onChangeTexture = () => {
currentSurfaceBindGroup = TextureAtlas[settings.Texture];
};
Expand Down

0 comments on commit ecd8446

Please sign in to comment.