|
|
|
|
|
|
texCoord.uv = texCoordDS.xy; |
|
|
|
#if _NORMALMAP |
|
|
|
surfaceData.normalWS.xyz = mul((float3x3)_DecalToWorldR, SAMPLE_UVMAPPING_NORMALMAP(_NormalMap, sampler_NormalMap, texCoord, 1)) * 0.5f + 0.5f; |
|
|
|
surfaceData.normalWS.w = totalBlend; |
|
|
|
surfaceData.normalWS.w = surfaceData.baseColor.w; |
|
|
|
surfaceData.mask = SAMPLE_TEXTURE2D(_MaskMap, sampler_MaskMap, texCoordDS.xy); |
|
|
|
surfaceData.mask.z = totalBlend; |
|
|
|
surfaceData.mask = 2*(SAMPLE_TEXTURE2D(_MaskMap, sampler_MaskMap, texCoordDS.xy)); |
|
|
|
surfaceData.mask.z = surfaceData.baseColor.w; |
|
|
|
#endif |
|
|
|
|
|
|
|
} |