diff options
Diffstat (limited to 'engine/src/lighting.rs')
| -rw-r--r-- | engine/src/lighting.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/src/lighting.rs b/engine/src/lighting.rs index 48adb0e..9ab2ca8 100644 --- a/engine/src/lighting.rs +++ b/engine/src/lighting.rs @@ -1,8 +1,8 @@ use ecs::{Component, Sole}; +use crate::builder; use crate::color::Color; use crate::data_types::vector::Vec3; -use crate::util::builder; builder! { #[builder(name = PointLightBuilder, derives = (Debug, Clone))] @@ -10,7 +10,8 @@ builder! { #[non_exhaustive] pub struct PointLight { - pub position: Vec3<f32>, + /// Position in local space. + pub local_position: Vec3<f32>, pub diffuse: Color<f32>, pub specular: Color<f32>, pub attenuation_params: AttenuationParams, @@ -31,7 +32,7 @@ impl Default for PointLight fn default() -> Self { Self { - position: Vec3::default(), + 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 }, attenuation_params: AttenuationParams::default(), @@ -58,7 +59,6 @@ pub struct AttenuationParams impl Default for AttenuationParams { - #[must_use] fn default() -> Self { Self { |
