From b069ea91b095d80667475c06e62712c1bd7b537f Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Thu, 3 Oct 2024 20:39:59 +0200 Subject: next commit --- UI/button.gdshader | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 UI/button.gdshader (limited to 'UI/button.gdshader') diff --git a/UI/button.gdshader b/UI/button.gdshader new file mode 100644 index 0000000..0c89fa5 --- /dev/null +++ b/UI/button.gdshader @@ -0,0 +1,14 @@ +shader_type canvas_item; + +uniform float adjust = 0.0; + +void fragment() { + // Called for every pixel the material is visible on. + vec4 tex = texture(TEXTURE, UV); + + if (adjust < 0.0) { + COLOR.rgb = tex.rgb - vec3(0.2); + } else if (adjust > 0.0) { + COLOR.rgb = tex.rgb + vec3(0.2); + } +} \ No newline at end of file -- cgit v1.2.3