From 9fab2606d40e3e8b5e3a4bfde93d676a9d014f28 Mon Sep 17 00:00:00 2001 From: Patrick Exner Date: Tue, 19 Dec 2023 00:37:12 +0100 Subject: [PATCH] Fix Circle Shape Function and update to 4.2 Fixes the circle input posiition to uv for consistency and fix a bug --- addons/ShaderFunction-Extras/Shapes/shapes.gdshaderinc | 2 +- project.godot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/ShaderFunction-Extras/Shapes/shapes.gdshaderinc b/addons/ShaderFunction-Extras/Shapes/shapes.gdshaderinc index 9c51151..1c66cb0 100644 --- a/addons/ShaderFunction-Extras/Shapes/shapes.gdshaderinc +++ b/addons/ShaderFunction-Extras/Shapes/shapes.gdshaderinc @@ -7,7 +7,7 @@ float polygon(vec2 uv, float width, int sides) { } float circle(vec2 uv, float radius, float feather) { - return smoothstep(radius, radius + feather, dot(position, position) * 4.0); + return smoothstep(radius, radius + feather, dot(uv, uv) * 4.0); } float square(vec2 uv, float width) { diff --git a/project.godot b/project.godot index 2809bbe..17c407d 100644 --- a/project.godot +++ b/project.godot @@ -11,5 +11,5 @@ config_version=5 [application] config/name="ShaderFunction-Extras" -config/features=PackedStringArray("4.0", "Forward Plus") +config/features=PackedStringArray("4.2", "Forward Plus") config/icon="res://addons/ShaderFunction-Extras/ShaderFunction-Logo.svg"