A few updates in my GPU-driven webgpu game engine: There is now a player inventory, items, item drops and an item HUD. The cave ambient noise is evaluated using sound ray tracing, and monsters now do scary groal sounds! :)
A first demonstration of Cellular Automata GI in 3D. The different injection phases are shown in the video. Sunlight and Skylight are propagated and injected with pure CA too!
Hunting time! Since this is a GPU-driven game engine, it was somewhat tricky to implement entities. They are implemented in ~11 fully indirect GPU compute passes! For path finding I'll stick to flow fields as they are essentially just basic flood fill, so very GPU friendly :)
Ray tracing sound on the GPU (Work in progress). Since the whole game is running on the GPU, I found it convenient to do the sound management and the ray tracing on the GPU as well. Each frame the CPU receives a sound queue from the GPU to process, and applies effects like reverb
Prototyping a 2D simulation engine, where every pixel is simulated and the lighting is path traced in real-time. The world size in this video is 16384x16384
#pixelart
#webgpu
Work in progress cascaded GPU particle volumes. The particles can interact with both the world and also with each other (inspired by Noita's falling sand simulation). Each cascade size is 128^3 and takes about 0.3ms per update :)
Single light bounce vs. infinite light bounces. The infinite light bounces are literally for free by resampling the world radiance cache.
#voxel
#webgpu
First showcase of GPU-driven entity rendering. It uses Voxel Splatting to project the entity boundings on screen, and then traverses the model nodes with a mix of analytic OBB+SDF intersection and voxel DDA ray casting (to give the pixelated look). Limit is at about 500k entities
Aside ray traced sound for both reverb and occlusion, there is now also high quality real-time pitch shifting using granular analysis!
#gamedev
#webgpu
You can now try the browser demo of my pixel engine:
Controls:
- Left mouse: Draw pixel
- Right mouse: Translate camera
- Mouse wheel: Zoom camera
- Keys 0-9: Switch cell material
Notes:
- Only works in latest Chrome
- Might freeze while loading
Using flow fields on the GPU for entity path finding: Blue tint is the flow field itself and the Green tint is the flow field gradient that each entity calculates to get a walking direction. Tight corners and stairs were tricky but are mostly working now too! :)
Prototyping a game where you have to manage air and water to surive in the deep sea. There is a realistic multi-type fluid mass simulation running behind the scenes
#pixelart
#webgpu
@AdaBarx
The GPU does the sound management (e.g. when an entity plays a footstep) and then evaluates the environment for the sound with ray tracing for effects like reverberation and cutoff/muffing. The CPU then receives the queue every frame and applies the effects :)
@leonard_coder
The CPU is actually quite busy too, it processes the ray traced sound queue from the GPU and applies effects like reverb. Reverberation is very expensive to calculate unfortunately as it requires convolution
@notch
@imdanstellar
Definitely checkout WebGPU, it's already shipped in Chrome and with compute shaders you have a lot more control over threads. WebGPU also supports storage buffers and scatter writes, which WebGL unfortunately completely lacks
@gadirom_
The shadow map of the fog is relatively low resolution, but I found that increasing the jittering of the sampling ray based on its distance is really effective in reducing the artifacts. The resulting noise is then smoothed out by the TAA and a simple blur filter :)
@luelly
The particles are stored inside multiple volumes that are centered around the player. Each volume doubles in scale of the world it covers. So particles far away are less precise in their behaviour, but since they're small on screen, it's not very noticable. It's like LOD :)
@TemperGame
For block collisions I use AABB sweeps and for inter entity collisions I plan other either using a grid+atomic counter based vector field or a spatial structure.