* Gui shader now supports vertex color on GL1

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9532 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 13 years ago
parent 37f74cdb07
commit c498e79511
  1. 4
      engine/src/core-data/Common/MatDefs/Gui/Gui.frag
  2. 6
      engine/src/core-data/Common/MatDefs/Gui/Gui.j3md
  3. 8
      engine/src/core-data/Common/MatDefs/Gui/Gui.vert

@ -1,6 +1,6 @@
#ifdef TEXTURE #ifdef TEXTURE
uniform sampler2D m_Texture; uniform sampler2D m_Texture;
varying vec2 texCoord; varying vec2 texCoord;
#endif #endif
varying vec4 color; varying vec4 color;

@ -2,8 +2,8 @@ MaterialDef Default GUI {
MaterialParameters { MaterialParameters {
Texture2D Texture Texture2D Texture
Color Color ( Color ) Color Color (Color)
Boolean VertexColor Boolean VertexColor (UseVertexColor)
} }
Technique { Technique {
@ -20,7 +20,7 @@ MaterialDef Default GUI {
} }
} }
Technique FixedFunc { Technique {
} }
} }

@ -4,19 +4,17 @@ uniform vec4 m_Color;
attribute vec3 inPosition; attribute vec3 inPosition;
#ifdef VERTEX_COLOR #ifdef VERTEX_COLOR
attribute vec4 inColor; attribute vec4 inColor;
#endif #endif
#ifdef TEXTURE #ifdef TEXTURE
attribute vec2 inTexCoord; attribute vec2 inTexCoord;
varying vec2 texCoord; varying vec2 texCoord;
#endif #endif
varying vec4 color; varying vec4 color;
void main() { void main() {
//vec2 pos = (g_WorldViewProjectionMatrix * inPosition).xy;
//gl_Position = vec4(pos, 0.0, 1.0);
gl_Position = g_WorldViewProjectionMatrix * vec4(inPosition, 1.0); gl_Position = g_WorldViewProjectionMatrix * vec4(inPosition, 1.0);
#ifdef TEXTURE #ifdef TEXTURE
texCoord = inTexCoord; texCoord = inTexCoord;

Loading…
Cancel
Save