From 68d92d79efb2206c3a2e4ade975c324542772395 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Sat, 20 May 2023 21:53:32 +0100 Subject: [PATCH] Fix artifacts --- src/pipelines/diffusion/diffuse.wgsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pipelines/diffusion/diffuse.wgsl b/src/pipelines/diffusion/diffuse.wgsl index 7371f7e..447b92a 100644 --- a/src/pipelines/diffusion/diffuse.wgsl +++ b/src/pipelines/diffusion/diffuse.wgsl @@ -31,10 +31,10 @@ fn fragment(@location(0) uv: vec2) -> @location(0) vec4 { current += change / 4; - let decayed = vec4( + let decayed = clamp(vec4( current.rgb * settings.decayRateTrails, current.a * settings.decayRateBrush - ); + ), vec4(0), vec4(1)); return decayed; }