• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1varying vec3 normal;
2varying vec2 texCoord;
3
4
5#ifdef DIFFUSEMAP_ALPHA
6    uniform sampler2D m_DiffuseMap;
7    uniform float m_AlphaDiscardThreshold;
8#endif
9
10void main(void)
11{
12
13    #ifdef DIFFUSEMAP_ALPHA
14        if(texture2D(m_DiffuseMap,texCoord).a<m_AlphaDiscardThreshold){
15            discard;
16        }
17    #endif
18    gl_FragColor = vec4(normal.xy* 0.5 + 0.5,-normal.z* 0.5 + 0.5, 1.0);
19
20}
21
22