Material
Client
Server
Methods
boolean HasProperty(string name)
Vec3 GetPropertyVec3(string name)
nil SetPropertyVec3(string name, Vec3 vec)
Vec4 GetPropertyVec4(string name)
nil SetPropertyVec4(string name, Vec4 vec)
nil SetProperty(string name, Vec3|Vec4 vec)
Feeds a live Vec3/Vec4 value into a shader uniform without rebuilding or reloading shaders — the practical way to drive a "maker-settable" uniform (e.g. from a UI slider). Notes:
- The named field must already exist in a UBO the material actually uses; a brand-new UBO at an unused binding won't get filled. Pack scalars into a
Vec4. - The value applies on the next frame; no
Client:ReloadShadersneeded for the value itself. - An unset UBO field reads as garbage — call
SetPropertyonce at load to initialize it, and clamp to sane ranges in the shader. - Get the shared material the renderer actually draws with
Scene:CreateMaterial("name")(returns the cached instance, not a copy).
See also the typed SetPropertyVec3 / SetPropertyVec4.