Hello Guest

Author Topic: Lightning on android devices  (Read 4247 times)

8BitGuy

  • Newbie
  • *
  • Posts: 9
    • View Profile
Lightning on android devices
« on: February 25, 2014, 12:57:15 pm »
Hello unikron, I've finally made an alpha that I published for my testers in google play and there is a problem I can't solve.

In my project I use lightning and on my android device it works very well, without problem but two persons that tested the alpha said that they couldn't see anything unless they quit the lightning settings.

I'm afraid that they GPU can't stand forward lightning and they use vertex lit, and with vertex lit you can't see my sprites (I don't know why but I imagine that it is because it is a sprite and non a geommetry or something like that).

So my question is if I can do something to that android devices could see the ligthnings or if it is impossible.

Here are some screenshots of how it should be (and is on my android):



Thanks a lot.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Lightning on android devices
« Reply #1 on: February 25, 2014, 05:07:44 pm »
If you need it to work with vertex lighting you will need to split up the geometry some more.. You can do this by dicing, but you probably don't really want to do that as it will be slower on all platforms as a result.

You could also build your own lighting system but that would be a fair bit of work too.

8BitGuy

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Lightning on android devices
« Reply #2 on: February 25, 2014, 05:19:07 pm »
Mmmhh thanks for your answer, it isn't possible to make dicing only if the device can't stand forward lightning ,it is?

And can you give me a little beginning guide to build my own lightning system?

Thanks.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Lightning on android devices
« Reply #3 on: February 25, 2014, 06:56:19 pm »
One way of having it work is to write the light values into target alpha or a second render texture. The lights can be just simple sprites anyway, all of this is happening in 2d. This needs to happen before the next phase -
Your normal sprites can then read from this value, or blend correctly into the target alpha.

It is a fair bit of work though, but if you do get it working you can use that across the board and have the same results everywhere. It should also be quite a bit more efficient for multiple lights.