Fix stupid bug with sphere lights introduced in the traversal rewrite.

This commit is contained in:
Nathan Vegdahl 2019-07-23 08:52:53 +09:00
parent 88e7365bc4
commit e3179d5b2e

View File

@ -224,7 +224,7 @@ impl<'a> Surface for SphereLight<'a> {
let radius = lerp_slice(self.radii, time); // Radius of the sphere
// Get the ray origin and direction in local space
let orig = rays.orig(ray_idx).into_vector();
let orig = rays.orig_local(ray_idx).into_vector();
let dir = rays.dir(ray_idx) * xform;
// Code adapted to Rust from https://github.com/Tecla/Rayito