Answer the question
In order to leave comments, you need to log in
Unity shader. To transfer each variable, or one global?
Hello comrades, the question is to those who know, who studied this issue, gained experience.
Question for mobile devices.
Let's say there are 2-3 shaders, let's say they work depending on the weather in the game. Good / bad.
What is the best way to pass the SetInt weather value to everyone? Or pass the global value through Shader.SetGlobalInt(...) ?
So the question is, how much worse is Shader.SetGlobalInt? Or no difference in load at all?
Answer the question
In order to leave comments, you need to log in
https://docs.unity3d.com/ScriptReference/Material....
https://docs.unity3d.com/ScriptReference/Shader.Se...
I would prefer a global variable
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question