I need my alpha to show only where it is not lit.

Hi all!

I’m struggling on this one! I have a map with an alpha channel, I display it thru an Transparent shader, but I need it to be fully transparent everywhere the light hit the object. This way, I’ll see my map, with it’s transparence, but only on the shadowy side of my object.

I believe I must substract the lighting value in the alpha, but I can’t achieve it!
Any help guys?..

PJ

Yeah, thanks. I just solved it an hour ago with:

1 - dot (s.Normal, lightDir);

But it didnt helped me much, and I discovered a bug. I have an alpha’d shader on a second object over a first one, and if the second object is a plane, I cant see thru the opaque areas, while if is a sphere, I can. It makes no sense, I may bug report that.

Anyway, thx Siaran for the kind answer.
PJ