Skip to content

Commit f7e1f4f

Browse files
committed
Deploying to gh-pages from @ a7c8b68 🚀
1 parent a0b6855 commit f7e1f4f

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

‎sample/imageBlur/main.js

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎sample/imageBlur/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎sample/imageBlur/main.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const response = await fetch('../../assets/img/Di-3d.png');
6565
const imageBitmap = await createImageBitmap(await response.blob());
6666

6767
const [srcWidth, srcHeight] = [imageBitmap.width, imageBitmap.height];
68-
const cubeTexture = device.createTexture({
68+
const imageTexture = device.createTexture({
6969
size: [srcWidth, srcHeight, 1],
7070
format: 'rgba8unorm',
7171
usage:
@@ -75,7 +75,7 @@ const cubeTexture = device.createTexture({
7575
});
7676
device.queue.copyExternalImageToTexture(
7777
{ source: imageBitmap },
78-
{ texture: cubeTexture },
78+
{ texture: imageTexture },
7979
[imageBitmap.width, imageBitmap.height]
8080
);
8181

@@ -93,6 +93,7 @@ const textures = [0, 1].map(() => {
9393
});
9494
});
9595

96+
// A buffer with 0 in it. Binding this buffer is used to set `flip` to 0
9697
const buffer0 = (() => {
9798
const buffer = device.createBuffer({
9899
size: 4,
@@ -104,6 +105,7 @@ const buffer0 = (() => {
104105
return buffer;
105106
})();
106107

108+
// A buffer with 1 in it. Binding this buffer is used to set `flip` to 1
107109
const buffer1 = (() => {
108110
const buffer = device.createBuffer({
109111
size: 4,
@@ -141,7 +143,7 @@ const computeBindGroup0 = device.createBindGroup({
141143
entries: [
142144
{
143145
binding: 1,
144-
resource: cubeTexture.createView(),
146+
resource: imageTexture.createView(),
145147
},
146148
{
147149
binding: 2,

0 commit comments

Comments
 (0)