Added shadows, another ray is just traced from the original hit towards the “sun”, and if it passes close to objects or hits objects, the colour is multiplied by some kind of factor. It was a great pain stopping the shadow ray intersecting the shape that was hit instantly, making everything look dark, as the start position must be moved out of the shape, but that can cause artifacts. This was fixed with a “bias” variable, which determines how steep the intersection was, and moves the position out of the shape accordingly.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.