diff --git a/src/sample/imageBlur/blur.wgsl b/src/sample/imageBlur/blur.wgsl index e19d4615..07f5631e 100644 --- a/src/sample/imageBlur/blur.wgsl +++ b/src/sample/imageBlur/blur.wgsl @@ -51,7 +51,7 @@ fn main( tile[r][4u * LocalInvocationID.x + c] = textureSampleLevel(inputTex, samp, - (vec2(loadIndex) + vec2(0.25, 0.25)) / vec2(dims), 0.0).rgb; + (vec2(loadIndex) + vec2(0.5, 0.5)) / vec2(dims), 0.0).rgb; } } diff --git a/src/sample/imageBlur/main.ts b/src/sample/imageBlur/main.ts index 6b142a68..b2d63ce4 100644 --- a/src/sample/imageBlur/main.ts +++ b/src/sample/imageBlur/main.ts @@ -222,6 +222,8 @@ const init: SampleInit = async ({ canvasRef, gui }) => { let blockDim: number; const updateSettings = () => { + settings.filterSize += 1; + blockDim = tileDim - (settings.filterSize - 1); device.queue.writeBuffer( blurParamsBuffer,