Renderer.SetGlobalTexture

static void SetGlobalTexture(int textureRegister, Tex tex)

This attaches a texture resource globally across all shaders. StereoKit uses this to attach the sky cubemap for use in reflections across all materials (register 11). It can be used for things like shadowmaps, wind data, etc. Prefer a higher registers (11+) to prevent conflicting with normal Material textures.

   
int textureRegister The texture resource register the texture will bind to. SK uses register 11 already, so values above that should be fine.
Tex tex The texture to assign globally. Setting null here will clear any texture that is currently bound.




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