Sets 3-component vector uniform in text shader (stored as name.x/y/z in floatParams, uploaded to GPU during text rendering).
Takes shader (shader handle), name (uniform base name, string), x (first component, double converted to float), y (second component, double converted to float), z (third component, double converted to float).
Returns nothing.
Shaders
Parameters & Returns
Parameters
shaderInt
nameString
xDouble
yDouble
zDouble
Returns
Void
Quick Summary
Sets 3-component vector uniform in text shader (stored as name.x/y/z in floatParams, uploaded to GPU during text rendering).
Takes shader (shader handle), name (uniform base name, string), x (first component, double converted to float), y (second component, double converted to float), z (third component, double converted to float).
Returns nothing.
Technical Exegesis...
Sets 3-component vector uniform in text shader (stored as name.x/y/z in floatParams, uploaded to GPU during text rendering). Takes shader (shader handle), name (uniform base name, string), x (first component, double converted to float), y (second component, double converted to float), z (third component, double converted to float). Returns nothing. Stores as three separate float entries (shader.floatParams[name+".x"]=x, shader.floatParams[name+".y"]=y, shader.floatParams[name+".
Sets 3-component vector uniform in text shader (stored as name.x/y/z in floatParams, uploaded to GPU during text rendering). Takes shader (shader handle), name (uniform base name, string), x (first component, double converted to float), y (second component, double converted to float), z (third component, double converted to float). Returns nothing. Stores as three separate float entries (shader.floatParams[name+".x"]=x, shader.floatParams[name+".y"]=y, shader.floatParams[name+".z"]=z), uploaded to constant buffer during text draw (packed into cbuffer, sent to GPU with text draw command). Use for RGB colors (text tint without alpha), 3D positions (world space text coordinates), 3D directions (light direction for text lighting), or XYZ parameters (separate control over three axes). Parameter storage: CPU map (three entries name.x, name.y, name.z in floatParams), uploaded on use (when text with this shader drawn, params packed to cbuffer), persistent (remains until changed, survives across frames). Use cases: (1) Text color tint (b2dSetTextShaderFloat3(shader,"tintColor",r,g,b) RGB text tint), (2) Light direction (b2dSetTextShaderFloat3(lightShader,"lightDir",dx,dy,dz) 3D lit text), (3) HSV adjustment (b2dSetTextShaderFloat3(colorShader,"hsvShift",hue,sat,val) text color correction), (4) Gradient stops (b2dSetTextShaderFloat3(gradShader,"midColor",r,g,b) three-color gradient). HLSL access: declare uniform (float3 tintColor; in shader OR separate float tintColor_x; float tintColor_y; float tintColor_z;), use in shader (color.rgb *= tintColor; OR color.r *= tintColor_x; color.g *= tintColor_y; color.b *= tintColor_z;), component access (tintColor.x/y/z if using float3). Storage format: decomposed to components (single float3 parameter stored as three separate float entries name.x, name.y, name.z), shader receives as components (HLSL must access as separate floats or reconstruct float3). Performance: cost zero (three map inserts/updates, no GPU operation until draw), batched upload (all parameters uploaded together during text draw ~0.001ms). Validation: ignores if shader<=0, ignores if name null, silently ignored if not found in shader (HLSL doesn't need to use all set parameters). Related: b2dSetTextShaderFloat (single float), b2dSetTextShaderFloat2/4 (2/4-component vectors), b2dSetTextShaderInt (integer parameters), b2dLoadTextShader (creates shader), b2dText (draws text with shader).