|
|
|
|
|
|
half4 specGloss; |
|
|
|
|
|
|
|
#ifdef _METALLICSPECGLOSSMAP |
|
|
|
specGloss = specGloss = SAMPLE_METALLICSPECULAR(uv); |
|
|
|
#ifdef _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A |
|
|
|
specGloss.a = albedoAlpha * _GlossMapScale; |
|
|
|
#else |
|
|
|
specGloss.a *= _GlossMapScale; |
|
|
|
#endif |
|
|
|
|
|
|
|
specGloss = SAMPLE_METALLICSPECULAR(uv); |
|
|
|
#ifdef _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A |
|
|
|
specGloss.a = albedoAlpha * _GlossMapScale; |
|
|
|
#else |
|
|
|
specGloss.a *= _GlossMapScale; |
|
|
|
#endif |
|
|
|
#if _SPECULAR_SETUP |
|
|
|
specGloss.rgb = _SpecColor.rgb; |
|
|
|
#else |
|
|
|
specGloss.rgb = _Metallic.rrr; |
|
|
|
#endif |
|
|
|
#if _SPECULAR_SETUP |
|
|
|
specGloss.rgb = _SpecColor.rgb; |
|
|
|
#else |
|
|
|
specGloss.rgb = _Metallic.rrr; |
|
|
|
#endif |
|
|
|
#ifdef _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A |
|
|
|
specGloss.a = albedoAlpha * _GlossMapScale; |
|
|
|
#else |
|
|
|
specGloss.a = _Glossiness; |
|
|
|
#endif |
|
|
|
#ifdef _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A |
|
|
|
specGloss.a = albedoAlpha * _GlossMapScale; |
|
|
|
#else |
|
|
|
specGloss.a = _Glossiness; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
return specGloss; |
|
|
|