b2dSetShaderFloat4

Category: Shaders

Syntax:

b2dSetShaderFloat4:Void(shader:Int, name:String, x:Double, y:Double, z:Double, w:Double)


Parameters

Returns

Void



Summary

Sets four floating-point parameters at once - an RGBA colour or a rectangle, say.

Takes shader, name (the slot number of the FIRST value, as a string) and x, y, z, w.

Returns nothing.

The values fill CONSECUTIVE slots - naming slot "4" writes slots 4 through 7. name is a parameter SLOT NUMBER given as a string - "0" through "63". It is read with the equivalent of atoi(), so a descriptive name such as "intensity" is not looked up: it parses as 0 and lands in slot 0. In the shader the slots are params[0..63], also available as param0 through param63.

View detailed documentation online



Example
b2dSetShaderFloat4(crt, "12", 1.0, 1.0, 1.0, 0.8)  ; params[12..15]

BambooBasic © 2026 Michael Denathorn