From 5b33766a069f21984c7d8d36b109290bca3b9512 Mon Sep 17 00:00:00 2001 From: rcmz Date: Mon, 18 Nov 2024 22:58:55 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=AA=B2=20Fixes=20the=20incinerate=20effec?= =?UTF-8?q?t=20to=20be=20circular=20instead=20of=20the=20aspect=20ratio=20?= =?UTF-8?q?of=20the=20window?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/shaders/incinerate.frag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/shaders/incinerate.frag b/resources/shaders/incinerate.frag index a3bca19..276b64c 100644 --- a/resources/shaders/incinerate.frag +++ b/resources/shaders/incinerate.frag @@ -78,7 +78,7 @@ void main() { // Now we compute a 2D gradient in [0..1] which covers the entire window. The dark // regions will be burned first, the bright regions in the end. We mix a radial gradient // with some noise. The center of the radial gradient is positioned at uStartPos. - float circle = length(iTexCoord - uStartPos); + float circle = length((iTexCoord - uStartPos) * (uSize.xy / max(uSize.x, uSize.y))); vec2 uv = iTexCoord / uScale * uSize / 1.5; float smokeNoise =