3 ms·
> one tricky thing to code is where you as the player look into a mirror, the trick usually is to create another exact replica of the room you're in and your pl
by bhouston 9y ago
> one tricky thing to code is where you as the player look into a mirror, the trick usually is to create another exact replica of the room you're in and your player and use that like a skybox.
Actually mirrors can be easily implemented as a pre-render step, you just re-render the system from the right perspective, a virtual camera, and then paste that on the polygons that are acting as the mirror.
- jlebrech 9y agoframe rates will drop as you look in the mirror no?
- bhouston 9y agoIt should sort of even out. Because in the area of the mirror there is very little first order scene - because it is just a simple polygon, there is just the second order scene. This is how mirrors have been done in video games for the two decades. Example in Three.JS: https://threejs.org/examples/?q=mirror#webgl_mirror https://threejs.org/examples/?q=mirror#webgl_mirror