Shadows/SSAO and transparency : Removed the AlphaDiscardThreshold attribute from the lighting material. Transparency discarding is now handled by the AlphaFallOff render state (as it should be).
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9330 75d07b2b-3a1a-0410-a2c5-0572b91ccdca3.0
parent
8de8bf2d3e
commit
22edb7beb0
@ -1,27 +1,24 @@ |
||||
varying vec2 texCoord; |
||||
|
||||
#ifdef DISCARD_ALPHA |
||||
#ifdef COLOR_MAP |
||||
uniform sampler2D m_ColorMap; |
||||
#else |
||||
uniform sampler2D m_DiffuseMap; |
||||
#endif |
||||
uniform float m_AlphaDiscardThreshold; |
||||
|
||||
#ifdef COLOR_MAP |
||||
uniform sampler2D m_ColorMap; |
||||
#endif |
||||
#ifdef DIFFUSEMAP |
||||
uniform sampler2D m_DiffuseMap; |
||||
#endif |
||||
|
||||
|
||||
|
||||
void main(){ |
||||
#ifdef DISCARD_ALPHA |
||||
#ifdef COLOR_MAP |
||||
if (texture2D(m_ColorMap, texCoord).a <= m_AlphaDiscardThreshold){ |
||||
discard; |
||||
} |
||||
#else |
||||
if (texture2D(m_DiffuseMap, texCoord).a <= m_AlphaDiscardThreshold){ |
||||
discard; |
||||
} |
||||
#endif |
||||
#endif |
||||
float a = 1.0; |
||||
|
||||
#ifdef COLOR_MAP |
||||
a = texture2D(m_ColorMap, texCoord).a; |
||||
#endif |
||||
#ifdef DIFFUSEMAP |
||||
a = texture2D(m_DiffuseMap, texCoord).a; |
||||
#endif |
||||
|
||||
gl_FragColor = vec4(1.0); |
||||
gl_FragColor = vec4(a); |
||||
} |
Loading…
Reference in new issue