aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/map/progress.gdshader26
-rw-r--r--client/map/tiles/conveyor_direction.gdshader14
-rw-r--r--client/menu/blur_mix.gdshader4
-rw-r--r--client/menu/grayscale.gdshader8
-rw-r--r--client/menu/menu_background.gdshader20
-rw-r--r--client/menu/setup.tscn2
-rw-r--r--client/player/interact_marker.gdshader36
7 files changed, 56 insertions, 54 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;
}
diff --git a/client/menu/blur_mix.gdshader b/client/menu/blur_mix.gdshader
index 668ef57d..706903d5 100644
--- a/client/menu/blur_mix.gdshader
+++ b/client/menu/blur_mix.gdshader
@@ -23,6 +23,6 @@ uniform vec4 color_over: source_color;
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
void fragment() {
- vec4 blurred = textureLod(SCREEN_TEXTURE, SCREEN_UV, blur_amount);
- COLOR = mix(blurred, color_over, mix_amount);
+ vec4 blurred = textureLod(SCREEN_TEXTURE, SCREEN_UV, blur_amount);
+ COLOR = mix(blurred, color_over, mix_amount);
} \ No newline at end of file
diff --git a/client/menu/grayscale.gdshader b/client/menu/grayscale.gdshader
index 7c11b777..cc132c54 100644
--- a/client/menu/grayscale.gdshader
+++ b/client/menu/grayscale.gdshader
@@ -18,8 +18,8 @@
shader_type canvas_item;
void fragment() {
- float brightness = 0.2126 * COLOR.r + 0.7152 * COLOR.g + 0.0722 * COLOR.b;
- brightness = (brightness - .5) * 2.;
- COLOR.rgb = vec3(brightness);
- COLOR.a *= 1. - brightness;
+ float brightness = 0.2126 * COLOR.r + 0.7152 * COLOR.g + 0.0722 * COLOR.b;
+ brightness = (brightness - .5) * 2.;
+ COLOR.rgb = vec3(brightness);
+ COLOR.a *= 1. - brightness;
}
diff --git a/client/menu/menu_background.gdshader b/client/menu/menu_background.gdshader
index 763c7b42..e6365dfa 100644
--- a/client/menu/menu_background.gdshader
+++ b/client/menu/menu_background.gdshader
@@ -22,14 +22,14 @@ uniform vec3 ccloud : source_color;
uniform vec3 csky : source_color;
void fragment() {
- vec2 uv = UV * 0.9;
- uv += TIME * vec2(0.001,0.002);
-
- float f = texture(noise, uv).x;
- f = 1. - f;
- f = pow(f, 1.5);
- f = floor(f*5.)/5.;
- f = pow(f, 2.);
-
- ALBEDO = mix(csky, ccloud, f);
+ vec2 uv = UV * 0.9;
+ uv += TIME * vec2(0.001,0.002);
+
+ float f = texture(noise, uv).x;
+ f = 1. - f;
+ f = pow(f, 1.5);
+ f = floor(f*5.)/5.;
+ f = pow(f, 2.);
+
+ ALBEDO = mix(csky, ccloud, f);
}
diff --git a/client/menu/setup.tscn b/client/menu/setup.tscn
index 5ef6a260..04064966 100644
--- a/client/menu/setup.tscn
+++ b/client/menu/setup.tscn
@@ -91,6 +91,8 @@ layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
+offset_right = 1152.0
+offset_bottom = 648.0
grow_horizontal = 2
grow_vertical = 2
follow_focus = true
diff --git a/client/player/interact_marker.gdshader b/client/player/interact_marker.gdshader
index 1a1b9c63..eee76270 100644
--- a/client/player/interact_marker.gdshader
+++ b/client/player/interact_marker.gdshader
@@ -23,22 +23,22 @@ uniform float pulse_speed = 4.;
uniform bool interactive = false;
void fragment() {
- 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) {
- 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;
+ 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) {
+ 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;
}