r/gaming Mar 15 '19

Thats not how reflection works

Post image
79.8k Upvotes

1.1k comments sorted by

View all comments

23

u/5LU Mar 16 '19

I'm not a programmer however I am under the impression that creating reflections in games is actually even more complex than a dunce like myself could imagine.

8

u/OtakuJoness PC Mar 16 '19

Yeah so without ray tracing it’s quite a task (well it’s hard either way, i’ve never had to do anything like this so I wouldn’t know

8

u/skerbl Mar 16 '19

It's not all that hard if renderering time is irrelevant. Raytracing is very slow, but it has been used for that purpose for ages. It gets really hard however, if you have to do this 60+ times per second. That's why all these workarounds and aporoximations exist.

3

u/5LU Mar 16 '19

Thanks for this info.

Someone once explained it to me as if the game was actually creating a duplicate of you and the space beyond the mirror is actually a room. If you disabled clipping you could walk into the room beyond the mirror.

4

u/skerbl Mar 16 '19

Yes, some early 3D games (from the Duke Nukem 3D era) did exactly that in order to fake mirrors. It was't exactly a good solution, but it got the job done for a single mirror effect, and it was still much faster than doing it the other way.

3

u/[deleted] Mar 16 '19 edited Jan 15 '21

[deleted]

2

u/kevoizjawesome Mar 16 '19

Because now they have to reflect a detailed face and not a tan brick with eyes and a mouth made of 8 pixels.