This commit is contained in:
Andras Schmelczer 2026-05-17 14:12:01 +01:00
commit 80ed37298b
73 changed files with 3619 additions and 1295 deletions

View file

@ -33,10 +33,10 @@ export class SimulationFrameRenderer {
this.textures.copyTrailMapAToB(commandEncoder);
if (isErasing) {
if (this.pipelines.eraserAgentPipeline.hasActiveMask()) {
const eraserMask = this.textures.clearEraserMask(commandEncoder);
this.pipelines.eraserTexturePipeline.execute(commandEncoder, eraserMask);
this.pipelines.eraserTexturePipeline.executeMultiTarget(
const eraserMask = this.textures.eraserMask.getTextureView();
this.pipelines.eraserTexturePipeline.executeCombined(
commandEncoder,
eraserMask,
this.textures.sourceMapA.getTextureView(),
this.textures.influenceMapA.getTextureView(),
this.textures.trailMapB.getTextureView()
@ -59,7 +59,8 @@ export class SimulationFrameRenderer {
this.pipelines.diffusionPipeline.execute(
commandEncoder,
this.textures.trailMapB.getTextureView(),
this.textures.trailMapA.getTextureView()
this.textures.trailMapA.getTextureView(),
this.textures.trailMapA.getSize()
);
const canvasTexture = this.pipelines.renderPipeline.execute(
commandEncoder,
@ -70,12 +71,14 @@ export class SimulationFrameRenderer {
this.pipelines.diffusionPipeline.execute(
commandEncoder,
this.textures.sourceMapA.getTextureView(),
this.textures.sourceMapB.getTextureView()
this.textures.sourceMapB.getTextureView(),
this.textures.sourceMapB.getSize()
);
this.pipelines.brushEffectDiffusionPipeline.execute(
commandEncoder,
this.textures.influenceMapA.getTextureView(),
this.textures.influenceMapB.getTextureView()
this.textures.influenceMapB.getTextureView(),
this.textures.influenceMapB.getSize()
);
this.device.queue.submit([commandEncoder.finish()]);