diff options
| author | HampusM <hampus@hampusmat.com> | 2026-07-17 03:06:04 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-07-17 03:06:04 +0200 |
| commit | 65e24308babb2ed4f33fb6f1d7b531df676bd70d (patch) | |
| tree | df9477d4b805cc6866a086833d6118505804dd3a /engine/src/lighting.rs | |
| parent | 649d4d4ab2f54ca12f75d2cba50e1adef2350dbe (diff) | |
refactor(engine): change Color struct into a enum
Diffstat (limited to 'engine/src/lighting.rs')
| -rw-r--r-- | engine/src/lighting.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engine/src/lighting.rs b/engine/src/lighting.rs index f085b17..abe3d56 100644 --- a/engine/src/lighting.rs +++ b/engine/src/lighting.rs @@ -1,5 +1,5 @@ use crate::builder; -use crate::color::Color; +use crate::color::{Color, Rgb}; use crate::data_types::vector::Vec3; use crate::ecs::{Component, Sole}; use crate::reflection::Reflection; @@ -33,8 +33,8 @@ impl Default for PointLight { Self { local_position: Vec3::default(), - diffuse: Color { red: 0.5, green: 0.5, blue: 0.5 }, - specular: Color { red: 1.0, green: 1.0, blue: 1.0 }, + diffuse: Color::Rgb(Rgb { r: 0.5, g: 0.5, b: 0.5 }), + specular: Color::Rgb(Rgb::<f32>::white()), attenuation_params: AttenuationParams::default(), } } |
