Re-introduced alphaDiscardThreshold in lighting frag

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9768 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
rem..om 2012-09-24 16:40:03 +00:00
parent d329e243fa
commit d980519674

View File

@ -55,6 +55,8 @@ varying vec3 SpecularSum;
uniform sampler2D m_ColorRamp; uniform sampler2D m_ColorRamp;
#endif #endif
uniform float m_AlphaDiscardThreshold;
#ifndef VERTEX_LIGHTING #ifndef VERTEX_LIGHTING
uniform float m_Shininess; uniform float m_Shininess;
@ -170,6 +172,9 @@ void main(){
#ifdef ALPHAMAP #ifdef ALPHAMAP
alpha = alpha * texture2D(m_AlphaMap, newTexCoord).r; alpha = alpha * texture2D(m_AlphaMap, newTexCoord).r;
#endif #endif
if(alpha < m_AlphaDiscardThreshold){
discard;
}
#ifndef VERTEX_LIGHTING #ifndef VERTEX_LIGHTING
float spotFallOff = 1.0; float spotFallOff = 1.0;