소스 검색

* Require alpha discard define to be set in order to enable the alpha discard feature (for multi pass lighting shader)

shadowislord 11 년 전
부모
커밋
4050b7cbbf
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      jme3-core/src/main/resources/Common/MatDefs/Light/Lighting.frag

+ 5 - 3
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
 
 
     // ***********************