AvatarShader

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.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun vertexCode(plans: String): String

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.