„Számítógépes grafika házi feladat tutorial” változatai közötti eltérés
aNincs szerkesztési összefoglaló |
|||
| 939. sor: | 939. sor: | ||
case Light::Directional: { | case Light::Directional: { | ||
// Lőjjünk egy sugarat a fényforrás irányába | // Lőjjünk egy sugarat a fényforrás irányába | ||
Ray shadow_checker = {inter.pos | Ray shadow_checker = {inter.pos + 1e-3*light.dir, light.dir}; // Az irányfény iránya nálam a forrás felé futat. | ||
Intersection shadow_checker_int = scene.getClosestIntersection(shadow_checker); | Intersection shadow_checker_int = scene.getClosestIntersection(shadow_checker); | ||
if(shadow_checker_int.is_valid) { | if(shadow_checker_int.is_valid) { | ||