2D Toolkit Forum

2D Toolkit => Support => Topic started by: Neeko on January 06, 2016, 04:22:14 pm

Title: Vertex lighting
Post by: Neeko on January 06, 2016, 04:22:14 pm
My tk2dSprites are using the provided LitBlendVertexColor shader. When I place a point light in my scene that's using vertex lighting (rendering mode set to Not Important), I often get these hard lines (notice on the window)

(http://chattypics.com/files/vertexLightingPNG_9ewiajrccj.png)

I was just curious if there was anything that could be done about this, besides switching to per-pixel lighting?

Edit: Probably worth nothing those hard lines are were the tile map is partitioned. The light affects only one of the partitioned chunks.

(http://chattypics.com/files/vertexLightingPNG_qr1og8mre2.png)
Title: Re: Vertex lighting
Post by: unikronsoftware on January 07, 2016, 11:42:10 pm
You've probably got too many lights affecting that chunk. Unity only allows a fixed number of lights per object and it looks like one chunk is getting a light the other isn't.
Title: Re: Vertex lighting
Post by: Neeko on January 08, 2016, 02:03:21 pm
Yep, that seems to be it. I'm guessing there's no way to increase the number of lights that can affect a chunk?