|
|
@ -2,6 +2,10 @@ |
|
|
|
#define NEED_TEXCOORD1 |
|
|
|
#define NEED_TEXCOORD1 |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(DISCARD_ALPHA) |
|
|
|
|
|
|
|
uniform float m_AlphaDiscardThreshold; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
uniform vec4 m_Color; |
|
|
|
uniform vec4 m_Color; |
|
|
|
uniform sampler2D m_ColorMap; |
|
|
|
uniform sampler2D m_ColorMap; |
|
|
|
uniform sampler2D m_LightMap; |
|
|
|
uniform sampler2D m_LightMap; |
|
|
@ -15,7 +19,7 @@ void main(){ |
|
|
|
vec4 color = vec4(1.0); |
|
|
|
vec4 color = vec4(1.0); |
|
|
|
|
|
|
|
|
|
|
|
#ifdef HAS_COLORMAP |
|
|
|
#ifdef HAS_COLORMAP |
|
|
|
color *= texture2D(m_ColorMap, texCoord1); |
|
|
|
color *= texture2D(m_ColorMap, texCoord1); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifdef HAS_VERTEXCOLOR |
|
|
|
#ifdef HAS_VERTEXCOLOR |
|
|
@ -34,5 +38,11 @@ void main(){ |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(DISCARD_ALPHA) |
|
|
|
|
|
|
|
if(color.a < m_AlphaDiscardThreshold){ |
|
|
|
|
|
|
|
discard; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
gl_FragColor = color; |
|
|
|
gl_FragColor = color; |
|
|
|
} |
|
|
|
} |