Spot lights not rendering on itouch/iphone

Hi guys

i have a question : Does iPhone/itouch support the spotlights available in unity?

as currently i have tried adding spot lights in my scene but they were not getting rendered on itouch/iphone. is there any way to solve this

thanx any help will be useful.

Spotlights typically need pixel shaders, which are not available. If your geometry is tessellated highly enough, you can get something approximating a spotlight using normal vertex lights, although you want to be careful about increasing polygon counts too much, of course.

–Eric

Hi Eric5h5

OK so itouch/iphone does not support lights (spotlights) that are available in unity right also if they do not support is there any other way to make the scene illuminated ?

Wat im trying to do is create a art gallery with spotlights on the images that a displayed a character moving in it.

thanx…

Unity iPhone supports all 3 light types (spot, point, and directional), but the iPhone hardware does not support pixel lighting… it only supports vertex lighting:

As Eric said you need to either tesselate the geometry to get finer detail in the lighting or use a projector:

Here’s an additive projector shader from the Wiki:

http://www.unifycommunity.com/wiki/index.php?title=ProjectorAdditive

Ok’s

will check that out thanx.

I use a spotlight in FuguMaze on the iPhone - I use the standard plane gameobject for each wall tile and was unwilling to simplify it (e.g. Eric has a much better performing iPhone maze) because I wanted to keep the spotlight, but I give up frame rate. Here’s a screenshot:

168944--6085--$img_0001_118.png

Looks a bit like you didn’t force it to vertex light, which will double the drawcalls for all objects in range (if the geometry is simple enough this potentially works)

Hmm, I don’t remember if I set Force Vertex - that’s a good tip, thanks, I’ll check it next week (sort of on vacation right now). I need to retest all apps on the new OS and Unity iPhone, anyway!

That’s definitely vertex lighting in that screenshot. Besides, even if you forget to force vertex lighting in Unity the final build is going to use it anyway since the iPhone doesn’t support pixel lights.

I was under the impression that if you left auto enabled, that it uses some kind of multi pass as the lighting on the surface of my test objects definitely wasn’t the same with auto and vertex enforced.
Did my eyes play tricks with me? Or does the auto handle the params slightly different than vertex enforced?

I’m very well aware that you can’t have pixel lights on the iphone
But I also know that Unity’s fallback isn’t as stupid and bad as the ones from other technologies

Hi All
what’s the best way to create spotlights? for iPhone/ itouch