Skip to content

shader_header

The configuration header for all bonsai shaders. It maps GLSL types to their Odin equivalents in the bonsai:core/gmath package and handles standard imports for the sokol-shdc compiler.


@header import sg "bonsai:libs/sokol/gfx"

Imports the Sokol GFX bindings for the generated Odin code.


@header import "bonsai:core/gmath"

Imports the bonsai:core/gmath package.


@ctype mat4 gmath.Matrix4

Maps GLSL mat4 to Odin gmath.Matrix4.


@ctype vec4 gmath.Vector4

Maps GLSL vec4 to Odin gmath.Vector4.