Magma is a polygon for graphics test projects using Vulkan API.
This example demonstrates a skeletal animation. Model of a fish and accompanying skinned data is loaded from a gltf file. This data later gets passed to the vertex shader to compute a final skin matrix.
Boids sample demonstrates boids simulation using many fishes that moves in a school-like behaivour. The rules for simulating scools of fish were taken from Craig Reynolds boids paper. Beside these rules boids also avoid collision with virtual tank borders via sphere tracing technique in order to find the most unobstructed direction.
This sample implements a 2d fluid simulation by solving Navier-Stokes PDEs.
Instead of keeping track of each fluid particle individually(Lagrangian viewpoint) the problem domain is discretized by using 2d grid of cells, where each cell has certain fluid characteristics like velocity or pressure.
We then look at this fixed cells and and observe how fluid quantities change over time (a.k.a Eulerian viepoint).
At each time step we update these vector fields by solving aforementioned PDEs untill the fluid becomes divergent free.
References:




