Triakis Gem
A raymarched octahedron gem with faceted ridges, a green-to-amber gradient, and dark edge lines. The shape rotates slowly with a gentle bob, and light sweeps across the faces.
Parameters
| Parameter | Label | Default | Range | Description |
|---|---|---|---|---|
offsetX |
Offset X | 0.0 | -1.0–1.0 | Horizontal shift of the gem in view space. |
offsetY |
Offset Y | 0.0 | -1.0–1.0 | Vertical shift of the gem in view space. |
size |
Size | 0.85 | 0.2–1.5 | Scale of the gem. |
ridgeHeight |
Ridge Height | 0.9 | 0.3–1.5 | How far the ridge points protrude from each face. |
edgeWidth |
Edge Width | 0.5 | 0.0–1.0 | Thickness of the dark edge lines between faces. |
lightIntensity |
Light Intensity | 0.75 | 0.0–1.5 | Brightness of the directional light. |
lightAngle |
Light Angle | 180° | 0–360° | Direction of the directional light. |
Downloads
- triakis-gem.frag — VS2 version
- triakis-gem.fs — ISF version
License
The shader source code is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). You can share and adapt the code for non-commercial purposes, as long as you credit the author and distribute contributions under the same license. Commercial redistribution of the source code requires permission.
Using the Output
The visual output produced by running these shaders is yours to use. VJ at a party, use it in a music video, project it at a festival — go for it. If you're making money from it, consider supporting my music at Mirlo, Subvert or Bandcamp.