world: don't normalize light brightness by quantity of lights.
That's not how they work in real life.
This commit is contained in:
parent
41f3b63ad0
commit
ee8ef4e2c5
@ -6,7 +6,7 @@ use crate::{
|
|||||||
rays::Ray,
|
rays::Ray,
|
||||||
shapes::{intersect, Shape},
|
shapes::{intersect, Shape},
|
||||||
tuples::{Color, Tuple},
|
tuples::{Color, Tuple},
|
||||||
Float, BLACK, WHITE,
|
BLACK, WHITE,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// World holds all drawable objects and the light(s) that illuminate them.
|
/// World holds all drawable objects and the light(s) that illuminate them.
|
||||||
@ -145,7 +145,7 @@ impl World {
|
|||||||
shadowed,
|
shadowed,
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
c / self.lights.len() as Float
|
c
|
||||||
}
|
}
|
||||||
/// Compute color for given ray fired at the world.
|
/// Compute color for given ray fired at the world.
|
||||||
///
|
///
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user