|
|
|
|
|
|
float3 detailNormalTS = float3(0.0, 0.0, 0.0); |
|
|
|
float detailMask = 0.0; |
|
|
|
#ifdef _DETAIL_MAP |
|
|
|
detailMask = SAMPLE_LAYER_TEXTURE2D(ADD_IDX(_DetailMask), ADD_ZERO_IDX(sampler_DetailMask), ADD_IDX(layerTexCoord.base)).b; |
|
|
|
detailMask = SAMPLE_LAYER_TEXTURE2D(ADD_IDX(_DetailMask), ADD_ZERO_IDX(sampler_DetailMask), ADD_IDX(layerTexCoord.base)).g; |
|
|
|
float2 detailAlbedoAndSmoothness = SAMPLE_LAYER_TEXTURE2D(ADD_IDX(_DetailMap), ADD_ZERO_IDX(sampler_DetailMap), ADD_IDX(layerTexCoord.details)).rb; |
|
|
|
float detailAlbedo = detailAlbedoAndSmoothness.r; |
|
|
|
float detailSmoothness = detailAlbedoAndSmoothness.g; |
|
|
|
|
|
|
// TODO: Is there anything todo regarding flip normal but for the tangent ? |
|
|
|
|
|
|
|
#ifdef _ANISOTROPYMAP |
|
|
|
surfaceData.anisotropy = SAMPLE_LAYER_TEXTURE2D(ADD_IDX(_AnisotropyMap), ADD_ZERO_IDX(sampler_AnisotropyMap), ADD_IDX(layerTexCoord.base)).g; |
|
|
|
surfaceData.anisotropy = SAMPLE_LAYER_TEXTURE2D(ADD_IDX(_AnisotropyMap), ADD_ZERO_IDX(sampler_AnisotropyMap), ADD_IDX(layerTexCoord.base)).b; |
|
|
|
#else |
|
|
|
surfaceData.anisotropy = 1.0; |
|
|
|
#endif |
|
|
|