From f077a569b001645dbed448db863035f004cac7ad Mon Sep 17 00:00:00 2001 From: Edwin Jakobs Date: Mon, 8 Jul 2024 23:11:18 +0200 Subject: [PATCH] [orx-fx] Fix pixel-direction.frag --- orx-jumpflood/src/shaders/glsl/pixel-direction.frag | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/orx-jumpflood/src/shaders/glsl/pixel-direction.frag b/orx-jumpflood/src/shaders/glsl/pixel-direction.frag index 1fc7fd09..ed723805 100644 --- a/orx-jumpflood/src/shaders/glsl/pixel-direction.frag +++ b/orx-jumpflood/src/shaders/glsl/pixel-direction.frag @@ -32,10 +32,10 @@ void main() { pixelDistance *= vec2(1.0, -1.0); } - float length = length(pixelDistance); + float length_ = length(pixelDistance); if (unitDirection) { - if (length >= 1E-6) { - pixelDistance /= length; + if (length_ >= 1E-6) { + pixelDistance /= length_; } } @@ -61,7 +61,7 @@ void main() { if (signedMagnitude) { float s = -sign(o_color.b - 0.5); o_color.rg *= s; - o_color.b = s * length; + o_color.b = s * length_; } } } \ No newline at end of file