The idea was to change the transparency instead of the brightness of the illuminated surface. By using the Culling Mask, you can make the material illuminated only by selected light sources.
half4 LightingGhost (SurfaceOutputStandard s, UnityGI gi)
{
half4 c;
half t;
c.a = dot(s.Normal, gi.light.dir);
if(c.a < 0) c.a = 0;
c.a *= s.Alpha;
c.rbg = (s.Albedo + gi.light.color) * c.a;
t = c.b;
c.b = c.g;
c.g = t;
return c;
}
0 comments