Skip to content

GradientMesh

Procedural gradient meshes for Gideros, written in Lua.

GradientMesh is a small creative-coding utility for generating clean gradients, radial meshes, polygon-based color interpolation, texture masking, and playful visual experiments for 2D graphics.

Instead of drawing a flat bitmap gradient, the library builds mesh vertices, assigns colors to those vertices, and lets the Gideros renderer interpolate colors across triangles.

Preview

The examples below show two main use cases for Gideros Gradient Mesh: applying procedural gradients over image textures, and generating clean gradient-based background shapes directly from mesh geometry.

Gradient overlays

These examples use a source image as a texture and blend it with a generated gradient mesh. This is useful for hero images, game menus, splash screens, atmospheric backgrounds, and visual experiments where the image should keep its structure while gaining a stronger color mood.

Original landscape imageLandscape image with Big Rainbow gradient overlayLandscape image with soft Big Rainbow Fog gradient overlay

Gradient backgrounds and shapes

These examples focus on pure gradient surfaces generated with mesh vertices and interpolated colors. They are useful for UI cards, menu backgrounds, decorative panels, abstract scenes, and quick visual prototyping inside Gideros.

Royal Blue gradient mesh backgroundFirewatch gradient mesh backgroundMango gradient mesh background

These screenshots are generated examples. For a cleaner portfolio presentation, the visuals are intentionally kept simple: the image carries the gradient result, while names and descriptions live in the documentation instead of being embedded inside the screenshots.

What this documentation covers

Main use cases

GradientMesh is useful for:

  • gradient cards and backgrounds;
  • radial color fields;
  • regular polygons;
  • circles and ellipse-like shapes;
  • textured gradient masks;
  • experimental 2D visual effects.

Repository

Built with VitePress and deployed with GitHub Pages.