Game Development Reference
In-Depth Information
Next, we use
diff
to calculate the ramp texture,
_Ramp
, to get the color result by using the
tex2D()
funcion (
fixed3 ramp = tex2D (_Ramp, float2(diff, diff)).rgb;
).
Then we muliply this value with the difuse color and light color (
fixed3 rampDiffuse =
s.Albedo * _LightColor0.rgb * ramp;
), and we will get a result which is different
from the previous secion, as shown in the following screenshot: