aboutsummaryrefslogtreecommitdiff
path: root/game/src/GameSession/ProvinceIndexSampler.gdshaderinc
diff options
context:
space:
mode:
author Spartan322 <Megacake1234@gmail.com>2023-06-03 20:37:10 +0200
committer Spartan322 <Megacake1234@gmail.com>2023-06-03 20:37:10 +0200
commitcef940108fe15752c3ef66f43f5169403fa2f71d (patch)
treefe4de5a05830e3bddeae78f74f729503b7cee1e9 /game/src/GameSession/ProvinceIndexSampler.gdshaderinc
parent73e29d02e48739aba5ca5db1b9575c67e795400f (diff)
Reorganize the file structure of the files in `game/src`
Diffstat (limited to 'game/src/GameSession/ProvinceIndexSampler.gdshaderinc')
-rw-r--r--game/src/GameSession/ProvinceIndexSampler.gdshaderinc18
1 files changed, 0 insertions, 18 deletions
diff --git a/game/src/GameSession/ProvinceIndexSampler.gdshaderinc b/game/src/GameSession/ProvinceIndexSampler.gdshaderinc
deleted file mode 100644
index 65f73d8..0000000
--- a/game/src/GameSession/ProvinceIndexSampler.gdshaderinc
+++ /dev/null
@@ -1,18 +0,0 @@
-
-// Province shape texture
-uniform sampler2DArray province_shape_tex : repeat_enable, filter_nearest;
-// Province shape subdivisions
-uniform vec2 province_shape_subdivisions;
-
-uvec3 vec3_to_uvec3(vec3 v) {
- return uvec3(v * 255.0);
-}
-uvec3 read_uvec3(vec2 uv) {
- uv *= province_shape_subdivisions;
- vec2 subdivision_coords = mod(floor(uv), province_shape_subdivisions);
- float idx = subdivision_coords.x + subdivision_coords.y * province_shape_subdivisions.x;
- return vec3_to_uvec3(texture(province_shape_tex, vec3(uv, idx)).rgb);
-}
-uint uvec2_to_uint(uvec2 v) {
- return (v.y << 8u) | v.x;
-}