Description
We can use InitializeScalarParameterAndGetIndex instead of SetScalaraParamaterByInfo
(similar replacement for vector paramaters) when initializing the uniforms on Unreal materials, this lets us save the uniform indices. Later, when updating the uniforms, we can use SetScalarParamaterByIndex
which will be faster than updating by name. Doing so might avoid a temporary string allocation (I think) and definitely avoids an internal string lookup within Unreal.
Currently we only update uniforms for raster overlays that are changed / updated. Soon we will be updating a "dither fade percentage" uniform value regularly for dithered LOD transitions. This is not the biggest performance bottleneck, but it is a small thing worth improving when we get a chance.