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

DanteeChaosDanteeChaos Posts: 4Member
edited January 11 in 3D

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.

Comments

  • cyberealitycybereality Posts: 1,086Moderator

    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.

  • DanteeChaosDanteeChaos Posts: 4Member
    edited January 11

    @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.

  • cyberealitycybereality Posts: 1,086Moderator

    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.

  • MegalomaniakMegalomaniak Posts: 3,001Admin

    @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.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file