i'm hoping make unlit area of 3d textured object change specific colour.
hopefully pic can explain little better. 
so far i've found shader turn unlit area transparent, cool not right. i'm sure wouldn't big stretch make turn specific colour instead of transparent, have pointers or suggestions effect? or if know shader amazing!
(this shader makes transparent way)
http://answers.unity3d.com/questions/283985/a-shader-with-transparent-lit-area.html
thanks in advance!
sounds want 'lerp' between "unlitcolor" , "litcolor" using dot(normal, lightdirection) lerp factor.
something like:
float ndotl = saturate(dot(surfacenormal, vectortolight)); float3 unlitcolor = float3(0, 0, 0.5); // or whatever color float3 litcolor = colorfromthetexture; float3 finalcolor = lerp(unlitcolor, litcolor, ndotl);
Comments
Post a Comment