|
|
|
@ -150,6 +150,7 @@ varying vec2 texCoord; |
|
|
|
|
|
|
|
|
|
vec4 calculateDiffuseBlend(in vec2 texCoord) { |
|
|
|
|
vec4 alphaBlend = texture2D( m_AlphaMap, texCoord.xy ); |
|
|
|
|
vec4 diffuseColor = vec4(1.0); |
|
|
|
|
|
|
|
|
|
#ifdef ALPHAMAP_1 |
|
|
|
|
vec4 alphaBlend1 = texture2D( m_AlphaMap_1, texCoord.xy ); |
|
|
|
@ -157,9 +158,10 @@ varying vec2 texCoord; |
|
|
|
|
#ifdef ALPHAMAP_2 |
|
|
|
|
vec4 alphaBlend2 = texture2D( m_AlphaMap_2, texCoord.xy ); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
vec4 diffuseColor = texture2D(m_DiffuseMap, texCoord * m_DiffuseMap_0_scale); |
|
|
|
|
#ifdef DIFFUSEMAP |
|
|
|
|
diffuseColor = texture2D(m_DiffuseMap, texCoord * m_DiffuseMap_0_scale); |
|
|
|
|
diffuseColor *= alphaBlend.r; |
|
|
|
|
#endif |
|
|
|
|
#ifdef DIFFUSEMAP_1 |
|
|
|
|
vec4 diffuseColor1 = texture2D(m_DiffuseMap_1, texCoord * m_DiffuseMap_1_scale); |
|
|
|
|
diffuseColor = mix( diffuseColor, diffuseColor1, alphaBlend.g ); |
|
|
|
|