Common.MatDefs.Shadow.PreShadow.frag Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jme3-core Show documentation
Show all versions of jme3-core Show documentation
jMonkeyEngine is a 3-D game engine for adventurous Java developers
#import "Common/ShaderLib/GLSLCompat.glsllib"
varying vec2 texCoord;
#ifdef DISCARD_ALPHA
#ifdef COLOR_MAP
uniform sampler2D m_ColorMap;
#else
uniform sampler2D m_DiffuseMap;
#endif
uniform float m_AlphaDiscardThreshold;
#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
gl_FragColor = vec4(1.0);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy