Small fixes

This commit is contained in:
Joshua Barretto 2021-03-03 22:12:08 +00:00
parent f537f82b17
commit 1d16f14dd5
4 changed files with 11 additions and 7 deletions

View File

@ -139,6 +139,10 @@ float lights_at(vec3 wpos, vec3 wnorm, vec3 /*cam_to_frag*/view_dir, vec3 mu, ve
vec3 difference = light_pos - wpos;
float distance_2 = dot(difference, difference);
if (distance_2 > 10000.0) {
continue;
}
// float strength = attenuation_strength(difference);// pow(attenuation_strength(difference), 0.6);
// NOTE: This normalizes strength to 0.25 at the center of the point source.
float strength = 1.0 / (4 + distance_2);

View File

@ -1,8 +1,8 @@
/*pub use ::vek::{
pub use ::vek::{
bezier::repr_simd::*, geom::repr_simd::*, mat::repr_simd::column_major::Mat4, ops::*,
quaternion::repr_simd::*, transform::repr_simd::*, transition::*, vec::repr_simd::*,
}; */
pub use ::vek::{
};
/* pub use ::vek::{
bezier::repr_c::*, geom::repr_c::*, mat::repr_c::column_major::Mat4, ops::*,
quaternion::repr_c::*, transform::repr_c::*, transition::*, vec::repr_c::*,
};
}; */

View File

@ -1,8 +1,8 @@
use core::{iter, mem};
use hashbrown::HashMap;
use num::traits::Float;
// pub use vek::{geom::repr_simd::*, mat::repr_simd::column_major::Mat4, ops::*, vec::repr_simd::*};
pub use vek::{geom::repr_c::*, mat::repr_c::column_major::Mat4, ops::*, vec::repr_c::*};
pub use vek::{geom::repr_simd::*, mat::repr_simd::column_major::Mat4, ops::*, vec::repr_simd::*};
//pub use vek::{geom::repr_c::*, mat::repr_c::column_major::Mat4, ops::*, vec::repr_c::*};
pub fn aabb_to_points<T: Float>(bounds: Aabb<T>) -> [Vec3<T>; 8] {
[

View File

@ -139,7 +139,7 @@ impl Structure for House {
// });
// }
let roof_lip = 3;
let roof_lip = 2;
let roof_height = (self.bounds.min - self.bounds.max)
.map(|e| e.abs())
.reduce_min()