Add tiny UI
This commit is contained in:
parent
e3d0af56e2
commit
6a752a57e9
30 changed files with 627 additions and 210 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { setUpFullScreenQuad } from '../../utils/graphics/full-screen-quad/full-screen-quad';
|
||||
import { generateNoise } from '../../utils/graphics/noise/noise';
|
||||
import { smartCompile } from '../../utils/smart-compile';
|
||||
import { smartCompile } from '../../utils/webgpu/smart-compile';
|
||||
import { CommonParameters } from '../common-parameters';
|
||||
import shader from './diffuse.wgsl';
|
||||
import { DiffusionSettings } from './diffusion-settings';
|
||||
|
|
@ -11,7 +11,7 @@ export class DiffusionPipeline {
|
|||
private readonly pipeline: GPURenderPipeline;
|
||||
private readonly uniforms: GPUBuffer;
|
||||
private readonly quadVertexBuffer: GPUBuffer;
|
||||
private readonly noise: GPUTexture;
|
||||
private readonly noise: GPUTextureView;
|
||||
|
||||
private bindGroup?: GPUBindGroup;
|
||||
private previousTrailMapIn?: GPUTexture;
|
||||
|
|
@ -128,7 +128,7 @@ export class DiffusionPipeline {
|
|||
},
|
||||
{
|
||||
binding: 3,
|
||||
resource: this.noise.createView(),
|
||||
resource: this.noise,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
|
@ -136,4 +136,9 @@ export class DiffusionPipeline {
|
|||
this.previousTrailMapIn = trailMapIn;
|
||||
}
|
||||
}
|
||||
|
||||
public destroy() {
|
||||
this.quadVertexBuffer.destroy();
|
||||
this.uniforms.destroy();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue