summaryrefslogtreecommitdiff
path: root/engine/src/lighting.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-05-24 21:05:04 +0200
committerHampusM <hampus@hampusmat.com>2025-05-24 21:05:04 +0200
commitcfe142fc6c4f820331d776a424140a25c1843378 (patch)
tree483b46b62c5650040bcb45bed24100748bbfd237 /engine/src/lighting.rs
parentee4ba449f7d25b275738d382cbd3a06ecfcd599a (diff)
feat(engine): make PointLight position field in local space
Diffstat (limited to 'engine/src/lighting.rs')
-rw-r--r--engine/src/lighting.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/engine/src/lighting.rs b/engine/src/lighting.rs
index 48adb0e..09dd980 100644
--- a/engine/src/lighting.rs
+++ b/engine/src/lighting.rs
@@ -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(),