diff --git a/jme3-core/src/main/resources/Common/MatDefs/Light/PBRLighting.j3md b/jme3-core/src/main/resources/Common/MatDefs/Light/PBRLighting.j3md index 197c654936..5773696a62 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Light/PBRLighting.j3md +++ b/jme3-core/src/main/resources/Common/MatDefs/Light/PBRLighting.j3md @@ -245,6 +245,7 @@ MaterialDef PBR Lighting { } Defines { + BASECOLORMAP_ALPHA : BaseColorMap NUM_BONES : NumberOfBones INSTANCING : UseInstancing NUM_MORPH_TARGETS: NumberOfMorphTargets diff --git a/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md b/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md index 07f72d771c..4617b4b354 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md +++ b/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md @@ -104,6 +104,7 @@ MaterialDef Unshaded { } Defines { + COLORMAP_ALPHA : ColorMap NUM_BONES : NumberOfBones INSTANCING : UseInstancing NUM_MORPH_TARGETS: NumberOfMorphTargets diff --git a/jme3-effects/src/main/resources/Common/MatDefs/SSAO/normal.frag b/jme3-effects/src/main/resources/Common/MatDefs/SSAO/normal.frag index d21e605cf9..0b91b97787 100644 --- a/jme3-effects/src/main/resources/Common/MatDefs/SSAO/normal.frag +++ b/jme3-effects/src/main/resources/Common/MatDefs/SSAO/normal.frag @@ -5,6 +5,17 @@ varying vec2 texCoord; #ifdef DIFFUSEMAP_ALPHA uniform sampler2D m_DiffuseMap; +#endif + +#ifdef COLORMAP_ALPHA + uniform sampler2D m_ColorMap; +#endif + +#ifdef BASECOLORMAP_ALPHA + uniform sampler2D m_BaseColorMap; +#endif + +#if defined DIFFUSEMAP_ALPHA || defined COLORMAP_ALPHA || defined BASECOLORMAP_ALPHA uniform float m_AlphaDiscardThreshold; #endif @@ -16,6 +27,16 @@ void main(void) discard; } #endif + #ifdef COLORMAP_ALPHA + if(texture2D(m_ColorMap,texCoord).a