summaryrefslogtreecommitdiff
path: root/client/map
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2024-10-13 19:12:18 +0200
committernokoe <nokoe@mailbox.org>2024-10-13 19:12:18 +0200
commit7b32caf001e8abdfddbaff56851a8951489b69ab (patch)
tree9bf01f88fbb512189f05820ddb1c139c1d3c883c /client/map
parent3d456968cfed17b614aca64fe25ffc74d9753c0b (diff)
downloadhurrycurry-7b32caf001e8abdfddbaff56851a8951489b69ab.tar
hurrycurry-7b32caf001e8abdfddbaff56851a8951489b69ab.tar.bz2
hurrycurry-7b32caf001e8abdfddbaff56851a8951489b69ab.tar.zst
smooth floor checkerboard
Diffstat (limited to 'client/map')
-rw-r--r--client/map/tiles/floor.gdshader32
-rw-r--r--client/map/tiles/floor.pngbin79 -> 0 bytes
-rw-r--r--client/map/tiles/floor.png.import36
-rw-r--r--client/map/tiles/floor_material.tres10
4 files changed, 38 insertions, 40 deletions
diff --git a/client/map/tiles/floor.gdshader b/client/map/tiles/floor.gdshader
new file mode 100644
index 00000000..2e382c84
--- /dev/null
+++ b/client/map/tiles/floor.gdshader
@@ -0,0 +1,32 @@
+/*
+ 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 eps = .01;
+uniform vec3 color : source_color;
+
+void fragment() {
+ vec2 uv = UV;
+ uv = mod(uv, 1.);
+ uv.x = smoothstep(0.5 - eps, 0.5 + eps, uv.x) * smoothstep(1. + eps, 1. - eps, uv.x)
+ + smoothstep(0. + eps, 0. - eps, uv.x);
+ uv.y = smoothstep(0.5 - eps, 0.5 + eps, uv.y) * smoothstep(1. + eps, 1. - eps, uv.y)
+ + smoothstep(0. + eps, 0. - eps, uv.y);
+ uv = uv * 2. - 1.;
+ ALBEDO = max(vec3(uv.x * uv.y), color);
+}
diff --git a/client/map/tiles/floor.png b/client/map/tiles/floor.png
deleted file mode 100644
index 557cb8d3..00000000
--- a/client/map/tiles/floor.png
+++ /dev/null
Binary files differ
diff --git a/client/map/tiles/floor.png.import b/client/map/tiles/floor.png.import
deleted file mode 100644
index 37a774f3..00000000
--- a/client/map/tiles/floor.png.import
+++ /dev/null
@@ -1,36 +0,0 @@
-[remap]
-
-importer="texture"
-type="CompressedTexture2D"
-uid="uid://dexb1ms3xcm4h"
-path.s3tc="res://.godot/imported/floor.png-f30002fe9e7b5dbe5fc67e98616b296a.s3tc.ctex"
-path.etc2="res://.godot/imported/floor.png-f30002fe9e7b5dbe5fc67e98616b296a.etc2.ctex"
-metadata={
-"imported_formats": ["s3tc_bptc", "etc2_astc"],
-"vram_texture": true
-}
-
-[deps]
-
-source_file="res://map/tiles/floor.png"
-dest_files=["res://.godot/imported/floor.png-f30002fe9e7b5dbe5fc67e98616b296a.s3tc.ctex", "res://.godot/imported/floor.png-f30002fe9e7b5dbe5fc67e98616b296a.etc2.ctex"]
-
-[params]
-
-compress/mode=2
-compress/high_quality=false
-compress/lossy_quality=0.7
-compress/hdr_compression=1
-compress/normal_map=0
-compress/channel_pack=0
-mipmaps/generate=true
-mipmaps/limit=-1
-roughness/mode=0
-roughness/src_normal=""
-process/fix_alpha_border=true
-process/premult_alpha=false
-process/normal_map_invert_y=false
-process/hdr_as_srgb=false
-process/hdr_clamp_exposure=false
-process/size_limit=0
-detect_3d/compress_to=0
diff --git a/client/map/tiles/floor_material.tres b/client/map/tiles/floor_material.tres
index 9ae98f89..5ee76e58 100644
--- a/client/map/tiles/floor_material.tres
+++ b/client/map/tiles/floor_material.tres
@@ -1,7 +1,9 @@
-[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://lpi2oc57ldhh"]
+[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://dngt21phuitvu"]
-[ext_resource type="Texture2D" uid="uid://dexb1ms3xcm4h" path="res://map/tiles/floor.png" id="1_o12fq"]
+[ext_resource type="Shader" path="res://map/tiles/floor.gdshader" id="1_7ju4h"]
[resource]
-albedo_texture = ExtResource("1_o12fq")
-texture_filter = 0
+render_priority = 0
+shader = ExtResource("1_7ju4h")
+shader_parameter/eps = 0.01
+shader_parameter/color = Color(0.384314, 0.4, 0.419608, 1)