Hi everyone,
Up to this point, I was rather posting short articles on reddit, but for some reason, it seems my account there is just not working anymore (I'm getting a "server error" everytime I try to check my own profile and I can't post/comment anything anymore...), so now, time to give this dev.to network a try 😄!
Anyway, I've been working for a while now on a custom 3D engine I'm building on my own with webGPU, with support for both native compilation (as I'm using the google Dawn library) and WASM compilation with emscripten. I provided a few different tech demo releases already, but today, I just wanted to share the work I did on the latest version, where I'm introducing support for the Atmosphere rendering on my terrain engine.
If your browser supports WebGPU, you can give this demo a try at: https://nervtech.org/terrainview7
And if you want a quick overview on the new features/changes I introduced in this release, you can check the companion video:
- Additionally, I also lately recording a simple flythough recording on the terrain, as I think this is starting to look interesting now, and I simply enjoy navigating around ;-):
The atmosphere rendering was implemented from scratches in WebGPU/WGSL, but it is completed based on the implementation provided by Eric Bruneton paper on "Precomputed Atmospheric Scattering" (cf. https://ebruneton.github.io/precomputed_atmospheric_scattering/ ) (plus some optimization in the structure of the code since I can use compute shaders on my side instead of geometry+fragment shaders in the original code).
For the terrain rendering part itself I also use an implementation based on the Proland terrain rendering framework ( https://proland.inria.fr/ ), but with more significant changes (replaced completely the scheduler/tasks concepts, producing gpu tiles in batches with compute shaders, large refactoring of elevation/ortho producers, using texture 2D array atlas for storage, etc...)
If you have any question on this project, please let me know of course ;-)!
Thanks!