[HN Gopher] Ball Pit
___________________________________________________________________
Ball Pit
Author : memalign
Score : 107 points
Date : 2026-03-25 19:08 UTC (3 hours ago)
(HTM) web link (codepen.io)
(TXT) w3m dump (codepen.io)
| newobj wrote:
| path tracer?
| newobj wrote:
| nevermind i see the ssgi/traa code. looks great!
| simlevesque wrote:
| Beware: this might totally freeze your computer like it did for
| me.
| ninju wrote:
| definitely needs a lot of computing power
| wildrhythms wrote:
| Runs smoothly and without crashes on my Pixel phone
| amelius wrote:
| Works fine on my phone, Firefox+GrapheneOS.
| ivanjermakov wrote:
| WebGPU moment (have same issue on Firefox/Linux).
| daemonologist wrote:
| Had to break out Chromium for this one - Firefox+Linux does
| _not_ like webgpu (my whole DE started flickering).
| mentalgear wrote:
| I was amazed that it run smoothly on Firefox mac without
| WebGPU.
| p1necone wrote:
| This runs pretty smoothly on my middling laptop CPU while looking
| like a typical raytracing demo. I assume there's _some_ smoke and
| mirrors involved?
| h4ch1 wrote:
| No, it's using the newish SSGI and TRAA webgpu nodes. The three
| team has been making great progress with SSGI and webgpu in
| general and i'd recommend checking it out if you're interested.
|
| There's also a denoise node in three (not used in this
| example), but SSGI still looks kinda blurry.
|
| Work though is still going on:
| https://github.com/mrdoob/three.js/issues/31892
| Sharlin wrote:
| Jesus Christ, trying to figure out what TRAA is (presumably
| an anti-aliasing algorithm) and how it works and it's
| entirely impossible to google.
| menno-dot-ai wrote:
| Temporal reprojection anti aliasing :)
|
| https://www.threejs-blocks.com/docs/traaHD
| Sharlin wrote:
| The only thing even remotely related to graphics I found
| was references to "TrAA" in forum posts from 2006 (yeah)
| where I believe they referred to NVIDIA "Transparency AA"
| or something like that. "TRAA", "TRAA meaning", "TRAA
| graphics", "TRAA 3D" all gave fully irrelevant results :D
| jldugger wrote:
| If you make the assumption that "AA" is some form of
| antialiasing, it's not too bad: first scholar[1] hit
| expands the acronym to Temporal Reprojection Anti-
| Aliasing [1]: https://scholar.google.co
| m/scholar?hl=en&as_sdt=0%2C5&q=traa+anti+aliasing&btnG=
| h4ch1 wrote:
| TRAA basically works by using a history buffer, for example
| using the last couple of frames, all jittered a little bit
| to compute the pixel. There's still ghosting and smearing
| that can happen though because of this technique, so you
| have methods to counteract like subpixel correction where u
| increase temporal alpha when velocity is subpixel, but that
| can introduce some artifacts as well.
|
| There's also SMAA T2x which the pmndrs team is planning on
| integrating into their postprocessing package[0]. This
| cryengine3 slideshow gives a nice overview of antialiasing
| methods if you're interested:
| http://iryoku.com/aacourse/downloads/13-Anti-Aliasing-
| Method...
|
| [0] https://github.com/pmndrs/postprocessing
|
| This paper also provides a decent overview of TRAA: https:/
| /fileadmin.cs.lth.se/cs/Education/EDAN35/projects/17C...
| jessepasley wrote:
| Is this marketing for the Shape Store? It's cool but I still
| don't know when my area is getting a Shape Store.
| adzm wrote:
| I tried to be helpful and explain what the shape store was, but
| found myself with a lack of words. Instead here is the know
| your meme page: https://knowyourmeme.com/memes/the-shape-store-
| ai-video
|
| tldr it is an ai video, subtle analog horror / backrooms style
| Rendello wrote:
| Beautiful, this must have been an excellent learning experience
| to make.
|
| I've done some very basic rendering code in C from a rendering
| internals course, and at the same time I'm learning about
| perspective from the drawing/art side. I wonder how much learning
| one would help the other, in a practical way.
| akie wrote:
| The author is a world renowned expert in 3D graphics.
| verytrivial wrote:
| For some context, I think this is by mr.doob of three.js fame.
| hermitcrab wrote:
| I'm a C++ programmer and only passingly familiar with web/JS
| stuff. What libraries/technologies is this using, apart from
| Javascript and three.js?
| kurishutofu wrote:
| it's the three.js library using the webgpu browser api, you can
| open view and edit the source directly on the codepen page:)
| CodeWriter23 wrote:
| I was able to get all the balls stuck on the 'ceiling'. Bug or
| feature?
| RankingMember wrote:
| > The babies look unhappy
|
| > Add more balls
|
| Fun simulation. The novelty of stuff like this still hasn't worn
| off for me in this era where we've got ray tracing in-browser.
| TacticalCoder wrote:
| I have fond memories of visiting a university in the early 90s on
| a demo day and there was a (physical) sphere in a Cornell box:
|
| https://en.wikipedia.org/wiki/Cornell_box
|
| And next to it was a super beefy computer doing a 3D rendering of
| a similar scene.
|
| 35 years+ later I've got "many spheres in a Cornell box"
| rendering in my browser, love it : )
| rbosinger wrote:
| I opened that on a Pixel 9a and was impressed on how well it
| worked. There's something neat about this.
| artursapek wrote:
| that's amazing. it runs so smoothly on my M4 Pro
| petermcneeley wrote:
| Nice! I raise https://www.shadertoy.com/view/3tcGD2
___________________________________________________________________
(page generated 2026-03-25 23:00 UTC)