aboutsummaryrefslogtreecommitdiff
path: root/game/src/Game/GlobalClass/ShaderManager.gd
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2023-11-16 00:54:57 +0100
committer hop311 <hop3114@gmail.com>2023-11-16 00:54:57 +0100
commit3490e740a7235dce236fc2ce973e5cbf64d6e727 (patch)
tree283c52e391c09ca8c4fb7ab6d81f4351c0fa7025 /game/src/Game/GlobalClass/ShaderManager.gd
parentbc0b3c61ae0b742da304cada451fba1df72bb0ad (diff)
Striped mapmodes
Diffstat (limited to 'game/src/Game/GlobalClass/ShaderManager.gd')
-rw-r--r--game/src/Game/GlobalClass/ShaderManager.gd9
1 files changed, 9 insertions, 0 deletions
diff --git a/game/src/Game/GlobalClass/ShaderManager.gd b/game/src/Game/GlobalClass/ShaderManager.gd
index fd91e31..1af606c 100644
--- a/game/src/Game/GlobalClass/ShaderManager.gd
+++ b/game/src/Game/GlobalClass/ShaderManager.gd
@@ -8,6 +8,8 @@ const param_hover_index : StringName = &"hover_index"
const param_selected_index : StringName = &"selected_index"
const param_terrain_tex : StringName = &"terrain_tex"
const param_terrain_tile_factor : StringName = &"terrain_tile_factor"
+const param_stripe_tex : StringName = &"stripe_tex"
+const param_stripe_tile_factor : StringName = &"stripe_tile_factor"
func set_up_shader(material : Material, add_cosmetic_textures : bool) -> Error:
# Shader Material
@@ -46,4 +48,11 @@ func set_up_shader(material : Material, add_cosmetic_textures : bool) -> Error:
return FAILED
shader_material.set_shader_parameter(param_terrain_tex, terrain_texture)
+ # Stripe texture
+ var stripe_texture := AssetManager.get_texture(&"map/terrain/stripes.dds")
+ if stripe_texture == null:
+ push_error("Failed to get stripe texture!")
+ return FAILED
+ shader_material.set_shader_parameter(param_stripe_tex, stripe_texture)
+
return OK