Expose SetGlobalFloat, SetGlobalVector, etc. functions for shaders in Udon
available in future release
Raell
Currently this isn't exposed, and it would be very beneficial to performance when you have a scene that has many different materials that have the same shader and you want to do some uniform changes to all of them.
Log In
This post was marked as
available in future release
Dustuu
complete
This is done and available via VRCShader: https://creators.vrchat.com/worlds/vrc-graphics/#vrcshadersetglobal
Kilerbomb
I was pretty surprised to see these weren't exposed when I started working with Udon recently, would be very nice to have. There are a couple ways I know to do "global shader variables" without these functions, but neither is ideal. You can either pipe in a rendertexture to each applicable shader, or manually update shader properties with a script. Both can have a significant performance impact if done with enough materials, though.