aboutsummaryrefslogtreecommitdiff
path: root/client/player/interact_marker.gdshader
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-10-06 21:21:51 +0200
committertpart <tpart120@proton.me>2024-10-10 11:48:42 +0200
commit8fc3db922922e87fa5f8bdb09e4a3b6b2d4cf96e (patch)
treea4112644eea7edbc060f0c0a419a28374e41f66e /client/player/interact_marker.gdshader
parent4ee632304449b77689bf075d3dbcd2466210e118 (diff)
downloadhurrycurry-8fc3db922922e87fa5f8bdb09e4a3b6b2d4cf96e.tar
hurrycurry-8fc3db922922e87fa5f8bdb09e4a3b6b2d4cf96e.tar.bz2
hurrycurry-8fc3db922922e87fa5f8bdb09e4a3b6b2d4cf96e.tar.zst
Categorize interact marker; Fix misplaced file
Diffstat (limited to 'client/player/interact_marker.gdshader')
-rw-r--r--client/player/interact_marker.gdshader47
1 files changed, 0 insertions, 47 deletions
diff --git a/client/player/interact_marker.gdshader b/client/player/interact_marker.gdshader
deleted file mode 100644
index 3720290f..00000000
--- a/client/player/interact_marker.gdshader
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- Hurry Curry! - a game about cooking
- Copyright 2024 nokoe
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, version 3 of the License only.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-*/
-shader_type spatial;
-
-uniform float max_width = .1;
-uniform float marker_length = .5;
-uniform float pulse_speed = 4.;
-uniform bool interactive = false;
-uniform bool interacting = false;
-
-void fragment() {
- if (interacting) {
- ALBEDO = vec3(0., 0., 15.);
- } else if (interactive) {
- ALBEDO = vec3(15., 0., 0.);
- } else {
- ALBEDO = vec3(.1, .1, .1);
- }
- vec2 uv = abs(2. * UV.xy - 1.);
- float m_length = marker_length / max_width;
- float anim;
- if (interactive || interacting) {
- anim = sin(TIME * pulse_speed) * .5 + 1.;
- } else {
- anim = .5;
- }
- float alpha = step(
- 1. - max_width * anim, max(uv.x, uv.y))
- * step(1. - max_width * m_length, min(uv.x, uv.y)
- );
- ALPHA = alpha;
-}