Fixed shader compilation failure when using glow map and unshaded material
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7539 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
5491f0b749
commit
29a4e7e01c
@ -1,4 +1,10 @@
|
||||
varying vec2 texCoord;
|
||||
|
||||
#if defined(NEED_TEXCOORD1)
|
||||
varying vec2 texCoord1;
|
||||
#else
|
||||
varying vec2 texCoord;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAS_GLOWMAP
|
||||
uniform sampler2D m_GlowMap;
|
||||
@ -12,7 +18,11 @@ varying vec2 texCoord;
|
||||
void main(){
|
||||
|
||||
#ifdef HAS_GLOWMAP
|
||||
gl_FragColor = texture2D(m_GlowMap, texCoord);
|
||||
#if defined(NEED_TEXCOORD1)
|
||||
gl_FragColor = texture2D(m_GlowMap, texCoord1);
|
||||
#else
|
||||
gl_FragColor = texture2D(m_GlowMap, texCoord);
|
||||
#endif
|
||||
#else
|
||||
#ifdef HAS_GLOWCOLOR
|
||||
gl_FragColor = m_GlowColor;
|
||||
|
@ -1,6 +1,6 @@
|
||||
uniform vec4 m_Color;
|
||||
|
||||
#if defined(HAS_COLORMAP) || (defined(HAS_LIGHTMAP) && !defined(SEPERATE_TEXCOORD))
|
||||
#if defined(HAS_GLOWMAP) || defined(HAS_COLORMAP) || (defined(HAS_LIGHTMAP) && !defined(SEPERATE_TEXCOORD))
|
||||
#define NEED_TEXCOORD1
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user