diff options
Diffstat (limited to 'world')
-rw-r--r-- | world/src/mesh.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/world/src/mesh.rs b/world/src/mesh.rs index 7352583..a38980e 100644 --- a/world/src/mesh.rs +++ b/world/src/mesh.rs @@ -282,7 +282,8 @@ pub fn import_mesh( let g_attenuation = p.material().volume().map(|v| { let ref_dist = v.attenuation_distance(); Vec3A::from_array(v.attenuation_color().map( - |factor| factor * ref_dist, // TODO figure out how that is converted + // manually derived from attenuation coefficient formula. i hope this is correct. + |factor| -(factor.powf(1. / ref_dist)).ln(), )) }); let g_refractive_index = p.material().ior(); |