Many spotlights, pixel lighting performance

Hello,

I was thinking for a small project to achieve sometihng like the worlds inside pyramids in super mario bros wii.

Something like this:

My first thought was to use spot lights and an ortho camera, and maybe using a cookie to achieve special forms and such. Which actually works very nice, so i’ve been using pixel lighting to achieve any defined form.

The problem arises when I want to use many lights of this type, of course, given the pixel light limit. So I decided to change the number of allowed pixel lights in the quality settings, I was thinking to about 8.

The problem with this is that I am not sure if that is the best idea. How many pixels light would be a good threshold? I am, in fact using only simple quads and texture offseting for animating textures, so at least there is litte effort in drawing vertices. And I don’t think I will be using other special lighting aside from a directional light.

I gues that my limi on the graphics card would to require one that hasat least shader model 2.0 to achieve this, and AFAIK is a low end requeremente, at least on PC.

But maybe there is a better idea to work with? Maybe using projectors? I tried using them but I just could not understand them, usualy they just projected the whole texture and I only wanted a part of it, it was too random to configure and couldn’t figure it out…

Any help, or advice would be appreciated,
thanks,

Italo F. Capasso B:
AKA “Edwood Grant”

Pixel Lighting in general is very time consuming.
In that Mario example I’m sure they used a simple technique similar to this: For each light source a white circle(sprite) is rendered into a black texture. This texture is than layed over the complete scene using multiply mode.

Hmm I see, so using lots of spotlight is a bad idea, even if I don’t use many vertices in the scene.

Can you give any pointers of how can I achieve this in unity?
I made a shader that works like a mask, so I can use a dark texture with an alpha gradient so I can have “spot lights”… but I dont know how tu use it to simulate a dark place, since iI need to make everything dark…

Thanks,
Italo F. Capasso B.