Invisible wrote:
> Vincent Le Chevalier wrote:
>
>> if (++depth>5) {if (erand48(Xi)<p) f=f*(1/p); else return obj.e;}
>
> Ouch. This isn't going to be pretty...
What do you mean?
> Clearly it flips a coin to decide whether to process further [all of the
> code paths beyond this point involve sending out a new ray] or just stop
> here. However, "f" is the object colour, and I have absolutely no idea
> why it's being scaled by the reciprocol of the brightest component...
I think that it's the part that makes the method unbiased. You have to
scale the rays that you keep in order to account for the fact that you
don't keep them all, or something like that.
--
Vincent
Post a reply to this message
|