• Shaders

Hey

Thanks for the check about the shaders on Android. You told me in the forum, that I should use vertex lightning. You mean the other Lightning Mode on the Shader settings? I changed it, and it doesnt work.

Do I have to change something in the quality settings too?

Thank you!

Related Discussions
...

Hey,

I'm not sure if its the problem you're having but yeah so mobile platforms tend to run slower than pc obvs and one of the ways by default Unity likes to optomise things is by reducing the number of pixel lights or disabling them altogether - you can change then number of pixel lights used at each quality level in the Quality settings - its prob worth playing around with them to find a balance between performance and visual niceness on your target phones.
I made andriod only use the 'Fantastic' quality setting as a test and all the shaders then looked good for me. Like I say you might have another problem though.

In general though Unity seem to want people to use Vertex Lit shaders on mobile, its faster (done in one pass) - to do this just select 'VertexLit" from the Lighting Mode drop down at the top of the material editor on a material using any of my Sprite Shaders

Hi

Okay this part with the performance I understand. But why does this worked with earlier Unity? Did they made changes in this? On the other hand, with VertexLit it also not displayed. And if i put the material on a 3d shape (cube) it will be display correctly, on mobile. So this what you talking about is only on SpriteRenderer? I'm a bit confused, because this should be standard things for mobile and it worked in earlier versions :S

Well that sounds like another issue all together then. It might be worth talking to the Esoteric guys as don't think its anythings to do with my shaders - have you tried using other shaders and see if they are displayed - try the Unity standard shader.
Might be something up with the SpriteRenderer class.

Esoteric poeple hasn't something to do with it, because its not Spine. For your information, if i use your shaders on Spine instantiated objects, it works fine! It's only on SpriteRenderer. So I guess, there is a chance in Unity with new SpriteRenderers. Maybe I have to contact Unity. But before I'll do some more checks.

Ah sorry! You meant Unity's Sprite Renderer.

Hmm I'm a bit confused as to what that does behind the scenes (I've just been using TexturePacker for my non Spine spirtes) but it could be because the Unity's Sprite Renderer expects shaders that have [PerRendererData] for textures.
As an experiment can you try using the standard shader on your SpriteRenderer and see if that works?

I'll try and give you feedback. Im also using TexturePacker and set then to this atlas the sprite. On the spriterenderer i choose the cropped image and the material. So i think we do the same 😉 But you dont use SpriteRenderer right?

Standard shader is working. I'm a little insecure, if this worked already how i told you. Maybe i tested exactly this case never on Android before (with SpriteRenderer). It could be that it never worked.

I debuged on Android (logcat) and didn't see any warning or error. I also changed the quality settings, no effect.

Other people have the same problem i think:
http://answers.unity3d.com/questions/1266042/sprite-renderer-shader-not-working-on-android-depl.html