• 3D
  • Turning off 'Force Vertex Shading.mobile' resulted in severe frame drops

I'm working on a mobile game. The world is 3D and the characters are 3D animated sprites (which are 2D really). I have an OmniLight node that shines on one of the character sprites. When 'Force Vertex Shading.mobile' (project setting parameter) is turned on the game runs smoothly, however, the character sprite doesn't cast any shadows. When I turned 'Force Vertex Shading.mobile' off, the character sprite started casting shadows but the performance dropped significantly.

How can I fix this? The shadows can be low quality (I have no problem with that) but I need them to be there.

I've found shadows too be too intensive for mobile. However, you can fake them and probably get better performance. For example, just cast a black circle under the character, many mobile games do something similar.

@cybereality said: I've found shadows too be too intensive for mobile. However, you can fake them and probably get better performance. For example, just cast a black circle under the character, many mobile games do something similar.

I want to avoid fake shadows since they're not dynamic. The thing that puzzles me is that the description of the Force Vertex Shading parameter says: 'If true, forces vertex shading for all rendering. This can increase performance a lot, but also reduces quality immensely'. For me it doesn't just 'reduce the quality', it disables shadows altogether.

Well maybe think of something clever without using shadows. I remember on an old Flash game I made, I did shadows on 2D sprites by creating a copy of the sprite (in code) and then flipping the Y axis and scaling it a bit and tinting it solid gray. I would have both copies update animation at the same time, and honestly it looked decent.

@cybereality said: Well maybe think of something clever without using shadows. I remember on an old Flash game I made, I did shadows on 2D sprites by creating a copy of the sprite (in code) and then flipping the Y axis and scaling it a bit and tinting it solid gray.

This. A bit of transform magic can go a long way.