- Home /
Question by
Kissta · Jul 23, 2018 at 03:39 AM ·
spritescolor changedistortion
Changing color of 2D sprite distorts sprite shape also
In my 2D game, my circle shape for example, appears round, but when I change the color then it turns into a low poly circle with ~16 points, more like a potato. Is there any way around this?
myColor = new Color32 ((byte)colorR1, (byte)colorG2, (byte)colorB3, visibility);
Color32 negativecolor = new Color32 ((byte)colorR1, (byte)colorG2, (byte)colorB3, (byte)(255-visibility));
MaterialPropertyBlock props = new MaterialPropertyBlock ();
props.SetColor ("_Color", myColor);
rend.SetPropertyBlock (props);
props.SetColor ("_Color", negativecolor);
backchildrend.SetPropertyBlock (props);
Comment