Avatar Shader
Opt-in skin portrait snippets for the existing text shaders (GLSL 150/330).
Insert declarations before main, fragmentCode at the start of fragment main, and vertexCode at the end of vertex main. The host supplies Sampler0, Position/Color/UV0, ProjMat/ModelViewMat, ColorModulator and vertex GameTime. No shader templates, registries or additional samplers are installed here.
Functions
Link copied to clipboard
plans contains only switch(plan) cases, assigning xerrAvatarSize (pixel width = ceil(height * .75), height <= 256), xerrAvatarAnchor (normalized), xerrAvatarAnchored, xerrAvatarY (positive upwards), xerrAvatarView (radians), xerrAvatarSpeed (amplitude multiplier), and xerrAvatarKnown = true. Plan IDs are 1..4095; the default branch never enables a portrait.