[WIP] stripe-pattern is now ok.

This commit is contained in:
NADAL Jean-Baptiste
2024-02-29 18:39:45 +01:00
parent 5e540a995b
commit 0576ccaccb
19 changed files with 192 additions and 56 deletions

View File

@@ -77,10 +77,10 @@ int shadow_sphere(uint8_t a_canvas_pixels, double a_wall_size, uint8_t a_wall_z)
if (the_intersec.is_defined())
{
Tuple the_point = the_ray.position(the_intersec.distance_t());
Tuple the_normal = the_intersec.object().normal_at(the_point);
Tuple the_normal = the_intersec.object()->normal_at(the_point);
Tuple the_eye = -the_ray.direction();
Color the_color =
the_intersec.object().material().lighting(the_light, the_point, the_eye, the_normal, false);
Color the_color = the_intersec.object()->material().lighting(nullptr, the_light, the_point, the_eye,
the_normal, false);
the_canvas.write_pixel(x, y, the_color);
}
}