I have a question about starting a new ray after reflection.
Right now, in the first run, I will save the coordinates of the hit points and pass the hit points back to CPU program through “params”. After some calculations to get the directions after reflection, then I will use the hit points as new origins and launch the second run.
My question is, in this case, the hit points are exactly on the surface. Is it possible this will cause numerical error, so the ray will be started under the surface instead of on top of the surface?
How should I handle the reflection correctly?