Sets float uniform in image shader (stored in floatParams map, uploaded to GPU during rendering).
Takes shader (shader handle), name (uniform variable name in HLSL, string), value (float value, double converted to float).
Returns nothing.
Shaders
Parameters & Returns
Parameters
shaderInt
nameString
valueDouble
Returns
Void
Quick Summary
Sets float uniform in image shader (stored in floatParams map, uploaded to GPU during rendering).
Takes shader (shader handle), name (uniform variable name in HLSL, string), value (float value, double converted to float).
Returns nothing.
Technical Exegesis...
Sets float uniform in image shader (stored in floatParams map, uploaded to GPU during rendering). Takes shader (shader handle), name (uniform variable name in HLSL, string), value (float value, double converted to float). Returns nothing. Stores in shader.floatParams[name] map (CPU-side storage), uploaded to constant buffer during draw (packed into cbuffer, sent to GPU with draw command).
Sets float uniform in image shader (stored in floatParams map, uploaded to GPU during rendering). Takes shader (shader handle), name (uniform variable name in HLSL, string), value (float value, double converted to float). Returns nothing. Stores in shader.floatParams[name] map (CPU-side storage), uploaded to constant buffer during draw (packed into cbuffer, sent to GPU with draw command). Use for shader parameters (intensity, time, speed), animation (update per-frame for animated effects), or configuration (adjustable shader properties). Parameter storage: CPU map (shader.floatParams[name]=value), uploaded on use (when image with this shader drawn, params packed to cbuffer), persistent (remains until changed, survives across frames). Use cases: (1) Glow intensity (b2dSetImageShaderFloat(glowShader,\"intensity\",2.5) brightness), (2) Animation time (b2dSetImageShaderFloat(waveShader,\"time\",elapsed) animated wave), (3) Effect speed (b2dSetImageShaderFloat(shader,\"speed\",0.5) slow motion), (4) Threshold (b2dSetImageShaderFloat(edgeShader,\"threshold\",0.3) edge detection sensitivity). HLSL access: declare uniform (float intensity; in shader), use in shader (color.rgb *= intensity). Performance: cost zero (map insert/update, 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: b2dSetImageShaderInt (int parameters), b2dSetImageShaderFloat2/3/4 (vector parameters), b2dLoadImageShader (creates shader), b2dDrawImageEx (draws with shader).