Hi ,

I have done a simple raytracing engine in Delphi,
works well, until I have more than one light and set reflections
on. I think I have problem in steps order...

There is just for Each Pixel shot a ray
for x 0 to 640 do
for y 0 to 480 do
raytrace ( ray , aColor )
end
end

in Raytrace procedure is

for i 0 to LightsCount do begin
1. define shadow ray and shadow value (to variable called "shd")
2. diffuse shading (simply draw a pixel in intersection point of aColor * shd)
3. phong shading
end

4. reflection ( I find reflection vector and call recursively Raytrace procedure )

Is it right order ? find shadow / diffuse / phong / reflection / refractions etc.
When I have two lights, without reflection set ON, it's ok,
but when I have two lights, with reflections, reflections are not seen...

Is here anybody that has some experience with raytracing ?

thanks a lot.
ivan