Sets 3-component vector uniform in image shader (stored as name.x/y/z in floatParams, uploaded to GPU during 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 image shader (stored as name.x/y/z in floatParams, uploaded to GPU during 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 image shader (stored as name.x/y/z in floatParams, uploaded to GPU during 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 image shader (stored as name.x/y/z in floatParams, uploaded to GPU during 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 draw (packed into cbuffer, sent to GPU with draw command). Use for RGB colors (effect color without alpha), 3D positions (world space coordinates), 3D directions (light direction, camera forward), 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 image with this shader drawn, params packed to cbuffer), persistent (remains until changed, survives across frames). Use cases: (1) Color tint (b2dSetImageShaderFloat3(shader,"tintColor",r,g,b) RGB tint without alpha), (2) Light direction (b2dSetImageShaderFloat3(lightShader,"lightDir",dx,dy,dz) 3D lighting for 2D), (3) HSV adjustment (b2dSetImageShaderFloat3(colorShader,"hsvShift",hue,sat,val) color correction), (4) Position offset (b2dSetImageShaderFloat3(shader,"offset",x,y,z) 3D translation). 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 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: b2dSetImageShaderFloat (single float), b2dSetImageShaderFloat2/4 (2/4-component vectors), b2dSetImageShaderInt (integer parameters), b2dLoadImageShader (creates shader), b2dDrawImageEx (draws with shader).