Mirrors in games?

How do they make mirrors work in games?
They are rare, and I’ve never seen them affect gameplay, they are cool though.

Like, set up a new camera and push it to a dynamic texture or something?

Yes, they either render the scene from the point of view of the camera mirrored through the mirror (supported in Babylon with the mirror texture) or with Screen Space Reflection (Screen Space Reflections (SSR) Rendering Pipeline in Babylon).

Nowadays, some games also use ray tracing, but it’s not available to the web platform (at least not hardware accelerated ray tracing).

1 Like

Cool thanks I’ll have to figure out the cheapest one and go from there, it looks so good.

Appearing / Disappearing mirror objects

CudeTutorial | Babylon.js Playground (babylonjs.com)

1 Like

This is not a mirror, but mirror like effect

stencil

1 Like

Portal
Babylon.js Playground (babylonjs.com)

and if you can code GLSL stuff…

GLSL Sandbox

1 Like