diff options
Diffstat (limited to 'client/map')
-rw-r--r-- | client/map/progress.gdshader | 26 | ||||
-rw-r--r-- | client/map/tiles/conveyor_direction.gdshader | 14 |
2 files changed, 20 insertions, 20 deletions
diff --git a/client/map/progress.gdshader b/client/map/progress.gdshader index 2ce33dd6..a5ebf575 100644 --- a/client/map/progress.gdshader +++ b/client/map/progress.gdshader @@ -1,6 +1,6 @@ /* Hurry Curry! - a game about cooking - Copyright 2024 metamuffin + Copyright 2024 nokoe Copyright 2024 tpart This program is free software: you can redistribute it and/or modify @@ -23,18 +23,18 @@ uniform float progress = 0.; uniform bool bad = false; void fragment() { - vec3 color = vec3(0., .5, 0.); - float alpha_fac = 1.; - if (bad) { - color = vec3(1., 0., 0.); - alpha_fac = sin(TIME * 15.) * .5 + 1.; - } - if (UV.x > progress) { - ALPHA = 1.; - color = vec3(0.1, 0.1, 0.1); - } - ALPHA *= alpha_fac; - ALBEDO = color; + vec3 color = vec3(0., .5, 0.); + float alpha_fac = 1.; + if (bad) { + color = vec3(progress, 1. - progress, 0.); + alpha_fac = (sin(TIME * 15.) + 1.) * .5; + } + if (UV.x > progress) { + ALPHA = 1.; + color = vec3(0.1, 0.1, 0.1); + } + ALPHA *= alpha_fac; + ALBEDO = color; } void vertex() { diff --git a/client/map/tiles/conveyor_direction.gdshader b/client/map/tiles/conveyor_direction.gdshader index 7b3565e6..f2bf8154 100644 --- a/client/map/tiles/conveyor_direction.gdshader +++ b/client/map/tiles/conveyor_direction.gdshader @@ -24,11 +24,11 @@ uniform float speed = 1.; uniform float alpha_fac = 1.; void fragment() { - ALBEDO = vec3(1., 1., 0.); - vec2 uv = UV.xy; - uv.x = abs(2. * uv.x - 1.); - float alpha = step( - mod(uv.y - TIME * speed + angle * uv.x, frequency), width - ); - ALPHA = alpha * alpha_fac; + ALBEDO = vec3(1., 1., 0.); + vec2 uv = UV.xy; + uv.x = abs(2. * uv.x - 1.); + float alpha = step( + mod(uv.y - TIME * speed + angle * uv.x, frequency), width + ); + ALPHA = alpha * alpha_fac; } |