I’m new in Shader graph and I like it so much!
so I would like to know how to optimize to improve performance as much as possible,
for Now I just changed a Precision to Half in Graph Setting, and the Shader seem to be
low quality a bit, I hope it should be high performance in mobile,
But another way to optimize I don’t know.
anyone has any suggestion?
This is not always true on mobile, it’s more about balancing usage of samplers and math.
Another advice is to avoid functions like acos, tan, pow when possible as those are more expansive than adding or multiplication.
Personally I can’t see anything that can be heavily optimized, perhaps speed X and Y could be vector2, but I doubt that makes any sagnificant difference. The only thing that could be changed (but not sure if possible for you) to replace voronoi with texture sampling (assuming you target mobile), and that power node after voronoi, but it’s up to you if you manage to get good look with plain multiplication.
huh? how these two things related? Preview node is for debug purposes, it will be removed in compilation any ways also any calculation that not connected final block will be not performed and removed on compilation.
To be precise it will be “removed” not because it’s for debugging, but it literally does nothing.
@Rachan Looks like you are doing premature optimization. Did you try to measure performence? Any tests?
Or you are just trying to “optimize” just for sake of optimization?