Skip to content

lczyk/pixel-goo

Repository files navigation

pixel-goo

Goo-like particle system simulation running on the GPU.

Work in progress, hence isn't actually doing the thing it's supposed to yet. The GPU computing works though and it compiles fine (at least on a Mac).

The idea is to make something similar to Sebastian Lague's Ant and Slime Simulations - particles following one another's trails, but without looking at the code.

Install

Via Homebrew (macOS and Linuxbrew):

brew install lczyk/pixel-goo/goo

This installs the goo binary (plus goo-macwp, the desktop-wallpaper variant, on macOS).

If Homebrew refuses to load the tap with a trust error, it's the third-party tap gate (HOMEBREW_REQUIRE_TAP_TRUST). Trust it once and retry:

brew trust --tap lczyk/pixel-goo

Build from source

./nob.c          # show usage (default target)
./nob.c build    # compile
./nob.c run      # build and run
./nob.c clean    # remove the build dir

Autoformat

for C:

find *.c | xargs -L1 clang-format -style="{BasedOnStyle: llvm, IndentWidth: 4, ColumnLimit: 0}" -i
find *.h | xargs -L1 clang-format -style="{BasedOnStyle: llvm, IndentWidth: 4, ColumnLimit: 0}" -i

ToDo's

  • automagically include shader files at compile time
  • fullscreen mode is still a bit janky
  • no acceleration and velocity shaders
  • no velocity double buffer
  • fix segfault buggs
  • ? add frame rendering
  • trail buffer colormap sampling
  • screen rendering shader could blend between density and trail colormap
  • ? better lerp in screen rendering shader

About

Goo-like particle system simulation running on the GPU

Resources

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors