Back to API Reference
Class
EffectPacking
static
Utility methods for packing effect layer parameters into vertex UV channels.
Remarks
Used by effect modifiers to encode per-glyph layer parameters (color, offsets) into float UV values that are unpacked in the shader.
public static Vector2 PackColor()Packs a Color32 into two floats safe for hardware interpolation: x = R*256 + G, y = B*256 + A. The two floats are stored in UV2.y and UV2.z of every effect-quad vertex and decoded in the shader by UnpackEffectColor (or UniTextUnpackEffectColor in custom shaders that include UniText_Custom.cginc).
