Metaballs
This 2D metaball implementation uses point sprites. It maps density and time to uv coordinates of a texture, which allows for neat effects and animations.
Implementation (C++/OpenGL)
For the first pass, the metaballs are drawn as point sprites using additive blending. The texture for the point sprite generated using the formula 1/r^2, where r is the distance from the center of the texture. The second pass uses the values from the first pass and the current time as UV coordinates to sample a texture. This creates a mapping from density to color that can optionally be varied based on time. The textures are generated procedurally.
Media
Recent Posts
Implementing Search on a Static Site August 04, 2019
Keeping Water Out of a Boat July 07, 2017
Fixing metadata.wsdl July 05, 2016
Salesforce: Globals and Breaking Changes, Part 2 May 10, 2016
Salesforce: Globals and Breaking Changes, Part 1 April 27, 2016
Tags
Salesforce (3)
JavaScript (1)
Unity3D (1)
Welcome (1)