From 4050b7cbbf6df96b38bb5c77f887b33a96bdcea4 Mon Sep 17 00:00:00 2001 From: shadowislord Date: Tue, 4 Nov 2014 16:52:17 -0500 Subject: [PATCH] * Require alpha discard define to be set in order to enable the alpha discard feature (for multi pass lighting shader) --- .../src/main/resources/Common/MatDefs/Light/Lighting.frag | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jme3-core/src/main/resources/Common/MatDefs/Light/Lighting.frag b/jme3-core/src/main/resources/Common/MatDefs/Light/Lighting.frag index 370c62bc9..a1f58b898 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Light/Lighting.frag +++ b/jme3-core/src/main/resources/Common/MatDefs/Light/Lighting.frag @@ -106,9 +106,11 @@ void main(){ #ifdef ALPHAMAP alpha = alpha * texture2D(m_AlphaMap, newTexCoord).r; #endif - if(alpha < m_AlphaDiscardThreshold){ - discard; - } + #ifdef DISCARD_ALPHA + if(alpha < m_AlphaDiscardThreshold){ + discard; + } + #endif // ***********************