Skip to main content

Variable: textEffectsInstanceDataSegment

const textEffectsInstanceDataSegment: InstanceDataSegment

Defined in: text/rendering/text-effects-instance-data-segment.ts:130

The instance data segment for the MSDF text vertex shader's (msdf.vert) outline/shadow parameters.

Binds InstanceComponents.textEffects (set by pushTextRenderCommands for every glyph instance) and wires it up to the a_instanceOutlineColor, a_instanceOutlineWidth, a_instanceShadowColor, a_instanceShadowOffset, and a_instanceShadowSoftness attributes - all uniform across a whole TextEcsComponent, so every glyph instance of the same text entity binds the same values.

Combine this with spriteInstanceDataSegment via combineInstanceDataSegments to build the MSDF text Renderable's instance data layout (see createTextRenderable) - per-instance, rather than a material uniform, so that text entities sharing the same FontAtlas but different outline/shadow settings still batch into a single draw call.