I don't understand the
lerp example in this code :
if(dot(WorldNormalVector(IN, o.Normal), _SnowDirection.xyz)>=lerp(1,-1,_Snow)) o.Albedo = _SnowColor.rgb; else
(Snow is in the range 0..1)
The article says :
We then compare the dot value with a lerp - if our Snow level is 0 (no snow) this returns 1 and if the Snow level is 1 it will return -1 (the entire rock is covered). It's quite normal to only vary the snow level between 0..0.5 when we use this shader so that we only have snow on surfaces that actually face the snow direction.
Why does it return 1 (with Snow at 0) and -1 (with Snow at 1) ?
(source: http://unitygems.com/noobs-guide-shaders-2/ )