|
|
|
|
|
|
half3 lightColor = lightInput.color.rgb * lightAtten; |
|
|
|
half3 diffuse = diffuseColor * lightColor * NdotL; |
|
|
|
|
|
|
|
#if defined(_SHARED_SPECULAR_DIFFUSE) || defined(_SPECGLOSSMAP) || defined(_SPECULAR_COLOR) |
|
|
|
#if defined(_SPECGLOSSMAP_BASE_ALPHA) || defined(_SPECGLOSSMAP) || defined(_SPECULAR_COLOR) |
|
|
|
half3 specular = specularGloss.rgb * lightColor * pow(NdotH, _Shininess * 128.0) * specularGloss.a; |
|
|
|
return diffuse + specular; |
|
|
|
#else |
|
|
|