r/rust_p

1 Million Particles Rendering at 120 FPS
▲ 28 r/rust_p+6 crossposts

1 Million Particles Rendering at 120 FPS

https://reddit.com/link/1v4m9dw/video/gbips9icv0fh1/player

I've been hacking away on my own game engine for a while. Decided to benchmark it today, and the results were better than I expected. The engine is sitting around 8.1–8.9 ms per frame in the steady-state tests, which comes out to roughly 110–122 FPS. That's while keeping frame times pretty stable.

Right now it's simulating 1 million particles with 4 XPBD iterations. The physics pass itself finishes in about 4.8–5.0 ms on the GPU, so there is still some room left in the frame.

https://preview.redd.it/pfcsqjf7v0fh1.png?width=1600&format=png&auto=webp&s=4e8678614e691f0ec318daf1dd1ff96b8e9fc5a0

https://preview.redd.it/5vonhq49v0fh1.png?width=1600&format=png&auto=webp&s=0f931f0a3c8ed66a14d0aacce5977cafa8459b8a

https://preview.redd.it/kq0amr49v0fh1.png?width=1600&format=png&auto=webp&s=5de78d1ab60a28cfb861a4119c9d4766ab7601b1

The initial upload moves around 68 MB of particle data into VRAM. That takes about 91 ms over PCIe. Since it's only a startup cost, I'm not too worried about it.

One thing I kept an eye on was the telemetry. It never reported the frame going over budget. The [PERF_OK] Frame within budget message stayed consistent for the whole run, and I didn't see any frame-time spikes.

Still a lot of things I want to optimize, but I'm pretty happy with where it's at right now.

reddit.com
u/IamRustyRust — 2 days ago