Codevember 2026 / 15 / Mirage
25K followers
12,141 views #threejs
28 Comments
Comments from the original post on X (Twitter)

@Urganak
No meshes, no Three.js renderer (just THREE.Color): a 60fps raw WebGPU/WGSL analytic ray tracer with portal doors, grazing mirage, quadtree-DDA analytical dunes, 16-plane rocks, baked sky/shadows & stream-compacted compute AA.
9 likes

@akella
yes! just a small correction: its a Whitted ray tracer, it has a name back from 80s
1 like

@HKSHAO
It looked very interesting, so I tried it too
4 likes

@mlperego
Cool 😍 My guess, the trick lies in rendering the same scene but from a different position(s) or angle(s), and using that as a texture for the mirrors in the main scene I can see that some things in the mirrors don’t line up, but the most ingenious part is the very minimalist composition of the scene, which helps create the illusion It’s definitely not SSR because there are details that don’t exist in screenspace, and rendering a scene for every mirror would have made my phone overheat But maybe I’m completely wrong and I’m missing something 🫠
3 likes

@jcponcemath
Wow! Superb!!! :)
2 likes

@artscoder
My guess: the mirrors aren't true planar reflections. One environment capture, and each panel samples it along its own normal, so twenty mirrors cost about the same as one. Close?
2 likes

@akella
good idea, but not quite whats used! those are true reflections btw!
3 likes

@keaukraine
@artscoder Ohhhhh so you really render scene anew for every reflection? I see the "baked" option in controls so I assume you've pre-rendered it into cubemaps...

@akella
@artscoder i was worried about performance and baked part of calculations for ground
4 likes

@akella
@artscoder to sum it up, the keyword is Whitted-style ray tracing in webgpu, threejs was just some helpers in this example, but i imagine we could merge such techniques
3 likes

@artscoder
@keaukraine Thanks for closing the loop. Whitted-style fits mirrors well: one sharp bounce per hit, nothing to denoise. When you baked the ground, did that win back most of the frame time, or is bounce depth the knob you actually tune?

@akella
@keaukraine bake freed 3-4ms of gpu, which was 15fps on 4.4Mp render,second biggest win was short object lists for reflected rays, another 2ms, i also made resolution adaptive so it targets 60fps
1 like

@artscoder
@keaukraine Thanks, this is gold. So the bake was the big one, and the adaptive resolution keeps the frame rate pinned instead of the quality. Going to try short per-ray object lists in my own renderer.
1 like

@yibaili530
So beautiful!!! The reflections make this feel like a dream 😭
2 likes

@KokoroXCA
17 min changing all the sliders on that... incredible. TY
2 likes

@DerekNyeX
this is cool!
1 like

@aqua_ne0n
stunning
1 like

@keaukraine
A good one! However I see some kind of "mirage" here :P Win11, latest Chrome, RTX 4080.
1 like

@shifatmasud
A 1980s technique running at 60fps in a browser tab. The mirrors are true reflections, and you can feel it. Faking them would have cost less and given the trick away.

@leo_kostetskyi
wow…I have no words ❤️




