From f4431eee3680a5d4b8c5dc569d70c231b3a2fc1d Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 12 May 2024 13:06:35 +0200 Subject: fix: set material colors --- src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 8efbf6b..8f01cd2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,6 +3,7 @@ use std::path::Path; use engine::camera::fly::{Extension as FlyCameraExtension, Options as FlyCameraOptions}; use engine::camera::Camera; +use engine::color::Color; use engine::data_types::dimens::Dimens; use engine::ecs::sole::Single; use engine::event::Start as StartEvent; @@ -49,6 +50,9 @@ fn main() -> Result<(), Box> create_cube_mesh(cube_vertex_builder_cb), MaterialBuilder::new() .textures([texture]) + .diffuse(Color::WHITE_F32) + .ambient(Color::WHITE_F32) + .specular(Color::WHITE_F32) .ambient_map(texture_id) .diffuse_map(texture_id) .specular_map(texture_id) @@ -70,6 +74,9 @@ fn main() -> Result<(), Box> create_cube_mesh(cube_vertex_builder_cb), MaterialBuilder::new() .textures([light_source_texture]) + .diffuse(Color::WHITE_F32) + .ambient(Color::WHITE_F32) + .specular(Color::WHITE_F32) .ambient_map(light_source_texture_id) .diffuse_map(light_source_texture_id) .specular_map(light_source_texture_id) -- cgit v1.2.3-18-g5258