Add support for multiple light sources
R366Y opened this issue · 1 comments
R366Y commented
Change World struct
mutable struct World{T<:GeometricObject}
objects::Array{T,1}
light::Array{PointLight,1}
Change function shade_hit(..)
for light in world.lights
shadowed = is_shadowed(world, comps.over_point)
surface = lighting(
comps.gobject.material,
comps.gobject,
world.light,
comps.over_point,
comps.eyev,
comps.normalv,
shadowed,
)
end