summaryrefslogtreecommitdiff
path: root/UI/button.gdshader
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-10-03 20:39:59 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-10-03 20:39:59 +0200
commitb069ea91b095d80667475c06e62712c1bd7b537f (patch)
treefc279d57c99c21e0ed416151b24eb2bc45aab6f5 /UI/button.gdshader
parent5442988a8ccecb9c323fc98557391a15ff245b87 (diff)
next commit
Diffstat (limited to 'UI/button.gdshader')
-rw-r--r--UI/button.gdshader14
1 files changed, 14 insertions, 0 deletions
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