diff options
author | Hop311 <Hop3114@gmail.com> | 2023-12-04 10:47:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 10:47:51 +0100 |
commit | e01d332f407420db84fbfd207f18c3fec1c1b6a3 (patch) | |
tree | b963c671239ecd693d4162afe4b1b9d3b064554e /game/src/Game/GlobalClass/ShaderManager.gd | |
parent | 9165f5980c5cfe75b3bad4303a5822340f6adcfc (diff) | |
parent | 6e350a3dc0b596b1f76fab3b943b67b7713ea4fa (diff) |
Merge pull request #168 from OpenVicProject/update-sim
Sim submodule update + compatibility fixes
Diffstat (limited to 'game/src/Game/GlobalClass/ShaderManager.gd')
-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: |