envmap: cargo fmt.
This commit is contained in:
parent
e59029a94a
commit
f846da18ad
@ -19,7 +19,7 @@ impl EnvMap {
|
||||
}
|
||||
pub fn color(&self, ray: Vec3) -> Vec3 {
|
||||
let zero = Vec3::new(0., 0., 0.);
|
||||
let u = ray.x.atan2(ray.z) / f32::consts::PI /2.0 + 0.5;
|
||||
let u = ray.x.atan2(ray.z) / f32::consts::PI / 2.0 + 0.5;
|
||||
let v = ray.y / 2.0 + 0.5;
|
||||
self.img_tex.value(u, v, zero)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user