I have a material instance with a parameter, which should be updated during the game each frame.
To do so, i have to pass the name of the shader parameter (a string) to “SetShaderParameter”. Therefore update this parameter in the material.
isn’t that very costly? why there is not a function to pass simply the “parameter id”? as these parameters have specific IDs usually when shaders are compiled.
is it possible to have that, that would be i think a lot faster than passing the name of the parameter (string).
I think one of you would suggest to use animation, i cannot do that, since the values are actually coming from different library, i can only update the material parameter each frame.
I would be very glad to get a reply from you.