diff options
Diffstat (limited to 'game/src/Game/GlobalClass')
-rw-r--r-- | game/src/Game/GlobalClass/ShaderManager.gd | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/game/src/Game/GlobalClass/ShaderManager.gd b/game/src/Game/GlobalClass/ShaderManager.gd index ace3c3a..a6d555f 100644 --- a/game/src/Game/GlobalClass/ShaderManager.gd +++ b/game/src/Game/GlobalClass/ShaderManager.gd @@ -38,28 +38,32 @@ func set_up_shader(material : Material, add_cosmetic_textures : bool) -> Error: if province_shape_texture == null: push_error("Failed to get province shape texture!") ret = FAILED - shader_material.set_shader_parameter(param_province_shape_tex, province_shape_texture) + else: + shader_material.set_shader_parameter(param_province_shape_tex, province_shape_texture) var subdivisions := GameSingleton.get_province_shape_image_subdivisions() if subdivisions.x < 1 or subdivisions.y < 1: push_error("Invalid province shape image subdivision: ", subdivisions.x, "x", subdivisions.y) ret = FAILED - shader_material.set_shader_parameter(param_province_shape_subdivisions, Vector2(subdivisions)) + else: + shader_material.set_shader_parameter(param_province_shape_subdivisions, Vector2(subdivisions)) if add_cosmetic_textures: # Province colour texture var map_province_colour_texture := GameSingleton.get_province_colour_texture() if map_province_colour_texture == null: - push_error("Failed to get province colour image!") + push_error("Failed to get province colour texture!") ret = FAILED - shader_material.set_shader_parameter(param_province_colour_tex, map_province_colour_texture) + else: + shader_material.set_shader_parameter(param_province_colour_tex, map_province_colour_texture) # Terrain texture var terrain_texture := GameSingleton.get_terrain_texture() if terrain_texture == null: push_error("Failed to get terrain texture!") ret = FAILED - shader_material.set_shader_parameter(param_terrain_tex, terrain_texture) + else: + shader_material.set_shader_parameter(param_terrain_tex, terrain_texture) # Stripe texture if _set_shader_texture(shader_material, &"map/terrain/stripes.dds", param_stripe_tex) != OK: |