summaryrefslogtreecommitdiff
path: root/UI/button.gdshader
diff options
context:
space:
mode:
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