• @Pipoca
    link
    7
    edit-2
    1 year ago

    Basically, a scene in a game has a bunch of objects in it.

    It’s not to hard to just light them, but it doesn’t look that good. Most games want to have shadows, reflections, that sort of thing.

    The traditional approach is to use a bunch of extra manual work by pre-calculating a bunch of stuff.

    Ray tracing works by simulating how physical photons bounce around in real life. It’s existed for a long time; they’ve used it in animated movies for decades.

    The issue with games is that we haven’t had hardware capable of doing it in real time until quite recently.

    Edit:

    That is to say, if you want to animate water or a mirror with ray tracing, you know where the camera is in the scene, and you know where the water/mirror is, so you know the angle the reflection would have come from. So you bounce the photon back that way til you get to the light source.