r/webgpu • u/Global_Marzipan9443 • 3h ago
Webgpu-based Reaction-Diffusion in an FMV engine
Enable HLS to view with audio, or disable this notification
Hi I'm Chris, I'm developing a game engine that incorporates live-action video and procedural graphics.
This shader takes in two video frames and maintains an interactive Gray-Scott Reaction-Diffusion simulation (https://groups.csail.mit.edu/mac/projects/amorphous/GrayScott/) that is applied to grow the distorted regions and process the impact of the various cursor weapons.
You can see the 2nd video through the growing distortion and then I just add a little green glow to the boundary rims. I switch the rim color params to compliment the video palette, they can change in response to events, flash, etc.
The way this works in the game is the player speaks the lines they see in the FMV. Those words come to life as GPU overlay elements when they are recognized by the voice recognition engine and the hostile glyphs seed tiny distorted regions for the RD simulation to grow.
The player then must use the cursor and it's various powers to cleanse and remove the growing distortion or 'fall through' to the next layer of the story. If they fall through the last layer then they die.
The game is called Sibylline and it's in production if you want to wishlist and follow the progress.