File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
apps/typegpu-docs/src/content/examples/image-processing Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 99// https://webgpu.github.io/webgpu-samples/?sample=imageBlur
1010
1111// -- Hooks into the example environment
12- import {
13- addElement ,
14- addSliderPlumParameter ,
15- onFrame ,
16- } from '@typegpu/example-toolkit' ;
12+ import { addElement , addSliderPlumParameter } from '@typegpu/example-toolkit' ;
1713// --
1814import {
1915 arrayOf ,
@@ -254,7 +250,7 @@ const renderPipeline = runtime.makeRenderPipeline({
254250 } ,
255251} ) ;
256252
257- onFrame ( ( ) => {
253+ const render = ( ) => {
258254 computePipelines [ 0 ] . execute ( {
259255 workgroups : [
260256 Math . ceil ( srcWidth / runtime . readPlum ( settingsPlum ) . blockDim ) ,
@@ -295,4 +291,9 @@ onFrame(() => {
295291 } ) ;
296292
297293 runtime . flush ( ) ;
298- } ) ;
294+ } ;
295+
296+ render ( ) ;
297+
298+ runtime . onPlumChange ( filterSize , ( ) => render ( ) ) ;
299+ runtime . onPlumChange ( iterations , ( ) => render ( ) ) ;
You can’t perform that action at this time.
0 commit comments