INCENDIUM
2025-04-02
INCENDIUM is a demoscene 4kb intro, meaning all code that generates the visuals and music fits into 4096 bytes. Participated to 4kb intro category at Revision 2025 demoscene party and placed 3rd.
The entry is packaged as Windows PowerShell script which plays the compressed intro in web browser. The visuals and music are both generated using WebGPU.
If you have a powerful GPU, you can run the intro in your browser. Best viewed with 16:9 aspect ratio. Your browser must suppord WebGPU (Chrome, Edge, etc.): https://bercon.github.io/incendium/
You can also checkout a recording at https://youtu.be/U8FXJpO9Vck
The intro is based on heavily optimized and stripped down version of Roquefort, an in browser fluid simlator tech demo that runs even on less powerful hardware, especially if you drop the grid size smaller. Developing the Roquefort first allowed much easier debuging of the fluid simulation code. You can play around with the simulation here: https://bercon.github.io/roquefort/
You can find the source code at https://github.com/Bercon/incendium.
Highlights include:
- Fluid simulation, rendering and music is all done with WebGPU compute shaders
- 3D fluid simulator with multigrid solver that uses red-black Gauss-Seidel iteration to run faster and to read/write same buffer
- Box blur computed using accumulation to get any kernel size at fixed 4 lookups per pixel. Gaussian blur is approximated by running box blur twice
- Volumetric shadows, restricted to primary axis light directions
- Baking lighting makes it possible to do only single vec4 lookup each raymarching step
- 324 byte PowerShell bootstrapper for Brotli compressed webpage (40 bytes less than on used in Felid), might be possible to compress it even more?