Original Post
Hi all,
I am currently trying to build my own implementation of a ray tracer; so far, I have implemented a very simple lighting model, but I am stuck on the idea of how reflection will work. Here is why:
Every intersection, I perform another trace to see what is 'reflecting' on this object; my problem is, will the secondary intersection be lit? How can it be - I am still performing the lighting?
Essentially, I have no idea of the lighting at the location of the reflection intersection. How do I get this, as the location itself has not even done initial tests yet? Do you render once for diffuse lighting, then the whole scene again for reflections, etc. and simply add them?
Cheers for reading,
Adrian G.
I am currently trying to build my own implementation of a ray tracer; so far, I have implemented a very simple lighting model, but I am stuck on the idea of how reflection will work. Here is why:
Every intersection, I perform another trace to see what is 'reflecting' on this object; my problem is, will the secondary intersection be lit? How can it be - I am still performing the lighting?
Essentially, I have no idea of the lighting at the location of the reflection intersection. How do I get this, as the location itself has not even done initial tests yet? Do you render once for diffuse lighting, then the whole scene again for reflections, etc. and simply add them?
Cheers for reading,
Adrian G.