aboutsummaryrefslogtreecommitdiff
path: root/game/src/Game/GlobalClass/ShaderManager.gd
diff options
context:
space:
mode:
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