Making maps brighter.

This is probably not the right way to do it, but oh well!
This commit is contained in:
Joshua Yanovski 2020-04-02 03:17:49 +02:00
parent 32b2c99109
commit 5a089863be
2 changed files with 8 additions and 2 deletions

View File

@ -273,6 +273,12 @@ fn main() {
if win.is_key_down(minifb::Key::L) {
if is_camera {
// TODO: implement removing horizon mapping.
horizons = if horizons.is_some() {
None
} else {
refresh_horizons(lgain, is_basement, is_water)
};
samples_changed = true;
} else {
is_shaded ^= true;
samples_changed = true;

View File

@ -626,7 +626,7 @@ impl<'a> MapConfig<'a> {
1.0
}
})
.unwrap_or(alt as f64);
.unwrap_or(1.0);
let rgb = if is_shaded {
// Phong reflection model with shadows:
@ -643,7 +643,7 @@ impl<'a> MapConfig<'a> {
//
// for each light m,
// i_m,d = (RGB) intensity of diffuse component of light source m
let i_m_d = Rgb::new(0.45, 0.45, 0.45);
let i_m_d = Rgb::new(1.0, 1.0, 1.0);
// i_m,s = (RGB) intensity of specular component of light source m
let i_m_s = Rgb::new(0.45, 0.45, 0.45);
// let i_m_s = Rgb::new(0.45, 0.45, 0.45);