summaryrefslogtreecommitdiff
path: root/engine/src/renderer/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/renderer/mod.rs')
-rw-r--r--engine/src/renderer/mod.rs18
1 files changed, 3 insertions, 15 deletions
diff --git a/engine/src/renderer/mod.rs b/engine/src/renderer/mod.rs
index fbb86f7..e2a567a 100644
--- a/engine/src/renderer/mod.rs
+++ b/engine/src/renderer/mod.rs
@@ -385,30 +385,18 @@ fn apply_light(
gl_shader_program.set_uniform_vec_3fv(
cstr!("material.ambient"),
- &material
- .ambient()
- .cloned()
- .unwrap_or(Color { red: 1.0, green: 1.0, blue: 1.0 })
- .into(),
+ &material.ambient().clone().into(),
);
gl_shader_program.set_uniform_vec_3fv(
cstr!("material.diffuse"),
- &material
- .diffuse()
- .cloned()
- .unwrap_or(Color { red: 1.0, green: 1.0, blue: 1.0 })
- .into(),
+ &material.diffuse().clone().into(),
);
#[allow(clippy::cast_possible_wrap)]
gl_shader_program.set_uniform_vec_3fv(
cstr!("material.specular"),
- &material
- .specular()
- .cloned()
- .unwrap_or(Color { red: 1.0, green: 1.0, blue: 1.0 })
- .into(),
+ &material.specular().clone().into(),
);
#[allow(clippy::cast_possible_wrap)]