⚠ Preview docs — built from the develop branch and may be unstable. Go to the stable docs.

Renderer.SetGlobalBuffer

static void SetGlobalBuffer(int bufferRegister, Object buffer)

This attaches a buffer resource globally across all shaders. StereoKit uses this to attach the stereokit rendering constants. It can be used for things like shadowmaps, wind data, etc.

   
int bufferRegister Valid values are 3-16. This is the register id that this data will be bound to. In HLSL, you’ll see the slot id for ‘3’ indicated like this : register(b3)
Object buffer The data buffer you would like to bind, or null to unbind.




Found an issue with these docs, or have some additional questions? Create an Issue on Github!