Galactic background: more eye candy...
Last changed on
The usual chain of one thing leading to another happened; but I'm happy to show one of the main outcomes of the migration from WebGL/WebGL2 to WebGPU.
A brief timeline:
- Working on procedural surfaces
- That led to volumetric clouds
- Raymarching is expensive
- Compute shaders look nice and could certainly help
- Compute shaders and WebGL = big nono
- Need WebGPU, which BabylonJS happily supports
- Go back to the 3d explorer and start migrating to WebGPU
- A few hurdles
- But this…
This is the "Galactic background" as you can see it now on the 3d explorer:
This had been built using a PointCloudSystem; it was working well but I had never been fully satisfied with its visual appearance. It's fair to say… yeah, I can understand why.
As it turns out, PointCloudSystem does not seem to work too well with WebGPU when you want variable-size particles. So I had to find another solution.
This solution came in the form of billboarded thin instances, so in more ways than one, extremely similar to a PCS. However, this enabled:
- more direct control over particle size, falloff, colour, opacity and distance behaviour, rather than relying on the more constrained PCS path
- custom shaders
Judge for yourselves :)
That version still isn't behaving a way that 100% satisfies me, notably at the performance level -- even though it is already faster and lighter than the PCS one. But first of all it is immensely better looking!
This took me a few extra evenings but is currently worth it! And no, this is not a skybox, this is dynamically generated from a low-resolution galactic density map.


Please signin to add your comment.