Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ascreator

Pages: [1]
1
Support / Re: Dynamic batching broken for flipped objects in Unity 5
« on: March 10, 2015, 09:41:00 am »
Ok, I did.
But I hoped you maybe could find the reason why it works for the Unity 2d sprites and then reproduce this behavior for the 2d Toolkit spirtes.

2
Support / Dynamic batching broken for flipped objects in Unity 5
« on: March 09, 2015, 05:55:34 pm »
Hi,

with Unity 5 the dynamic batching of flipped objects (Scale.X = -1) does not work anymore except for their own 2d Sprites. So whenever some objects, e.g., 2dToolkit Sprites, have a scale below 0, they are completely ignored for batching. This seems to be a bug in Unity itself, since 3d objects have the same problem, but as the dynamic batching works for the Unity 2d Sprites, I hoped that maybe you could fix it for your sprites, too.
Without this bug being fixed, we cannot upgrade to Unity 5 and use its nice new features.  :(

3
Thanks for the fast answer. I will try it out and report here.
And also thanks for the hint to the shader editor!

4
Hey and sorry for reviving this old thread, but I need exactly the same and your solution sounds great.

I was just wondering if this solution would also work well with mipmapping, as the mipmaps cannot interpolate between 254 and 255 and so the resulting pixel would be completely tinted or completely untinted.

Imo a possible solution for mipmapping would be: alpha colors 245 to 255 represent tinted pixels with 255 meaning fully tinted and 245 meaning almost no tint. Then the shader would have to use alpha 255 for all alphas 244 to 255 internally and calculate the tinting based on the alpha: tintfactor = (alpha - 244) / 11f;
With this solution everything should work execpt of tinted parts being on alpha blended areas (edges of the sprite). Right?
Would that be possible and performant on a mobile device? Would it be faster than drawing every tinted unit twice, once for the basic sprite and once for the team colored parts, as we are doing it now?

Pages: [1]