summaryrefslogtreecommitdiff
path: root/engine/src/lighting.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-05-24 19:18:32 +0200
committerHampusM <hampus@hampusmat.com>2024-05-24 19:18:32 +0200
commit7756fdab0522c52b81f3bc70e2458a3b683f0a20 (patch)
tree9227af67d0c36e81c4864906a8155a050542bd9f /engine/src/lighting.rs
parent8af5413b0fd2b06f71098c1230f79b3e6beb037d (diff)
refactor(engine): make PointLight have a position
Diffstat (limited to 'engine/src/lighting.rs')
-rw-r--r--engine/src/lighting.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/engine/src/lighting.rs b/engine/src/lighting.rs
index 398161f..81dc475 100644
--- a/engine/src/lighting.rs
+++ b/engine/src/lighting.rs
@@ -10,6 +10,7 @@ builder! {
#[non_exhaustive]
pub struct PointLight
{
+ pub position: Vec3<f32>,
pub diffuse: Color<f32>,
pub specular: Color<f32>,
pub attenuation_params: AttenuationParams,
@@ -29,6 +30,7 @@ impl Default for PointLight
fn default() -> Self
{
Self {
+ 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(),