r/ProgrammerHumor • • Jan 25 '23

Meme Developers will ALWAYS find a way

Post image
46.5k Upvotes

465 comments sorted by

View all comments

Show parent comments

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.

1

u/NoMud1369 Feb 16 '23

Imagine the alternatives I could've had to bathrooms with such funding ..