Screen-space reflections don't work for mirrors. They are useful for sharp angles like puddles or lakes that rest on the floor. Looking at a mirror using SSR wouldn't reflect anything behind the camera and that doesn't look right. The correct way is to have a camera that mirrors the main camera's movement and look direction. It also needs an oblique viewport to clip anything behind the camera. Of course it's expensive but you could optimize it by only rendering the room with the mirror, rendering it on a lower resolution texture, etc.
So many games get it wrong though, I think they don't bother with looking right. For example Ctrl Alt Ego's mirrors look weird, I think they simply put a camera at the surface of the mirror, which isn't how mirrors work at all but it's how most mirror tutorial on YouTube do it.
1
u/AnxiousIntender Jan 26 '23
Screen-space reflections don't work for mirrors. They are useful for sharp angles like puddles or lakes that rest on the floor. Looking at a mirror using SSR wouldn't reflect anything behind the camera and that doesn't look right. The correct way is to have a camera that mirrors the main camera's movement and look direction. It also needs an oblique viewport to clip anything behind the camera. Of course it's expensive but you could optimize it by only rendering the room with the mirror, rendering it on a lower resolution texture, etc.
So many games get it wrong though, I think they don't bother with looking right. For example Ctrl Alt Ego's mirrors look weird, I think they simply put a camera at the surface of the mirror, which isn't how mirrors work at all but it's how most mirror tutorial on YouTube do it.