From c498e795117917467a72af08ab09defc627c9e2e Mon Sep 17 00:00:00 2001 From: "Sha..rd" Date: Sat, 30 Jun 2012 18:00:53 +0000 Subject: [PATCH] * Gui shader now supports vertex color on GL1 git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9532 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core-data/Common/MatDefs/Gui/Gui.frag | 4 ++-- engine/src/core-data/Common/MatDefs/Gui/Gui.j3md | 6 +++--- engine/src/core-data/Common/MatDefs/Gui/Gui.vert | 8 +++----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/engine/src/core-data/Common/MatDefs/Gui/Gui.frag b/engine/src/core-data/Common/MatDefs/Gui/Gui.frag index caa666c1b..619682ce0 100644 --- a/engine/src/core-data/Common/MatDefs/Gui/Gui.frag +++ b/engine/src/core-data/Common/MatDefs/Gui/Gui.frag @@ -1,6 +1,6 @@ #ifdef TEXTURE -uniform sampler2D m_Texture; -varying vec2 texCoord; + uniform sampler2D m_Texture; + varying vec2 texCoord; #endif varying vec4 color; diff --git a/engine/src/core-data/Common/MatDefs/Gui/Gui.j3md b/engine/src/core-data/Common/MatDefs/Gui/Gui.j3md index ea871b507..f37f6c979 100644 --- a/engine/src/core-data/Common/MatDefs/Gui/Gui.j3md +++ b/engine/src/core-data/Common/MatDefs/Gui/Gui.j3md @@ -2,8 +2,8 @@ MaterialDef Default GUI { MaterialParameters { Texture2D Texture - Color Color ( Color ) - Boolean VertexColor + Color Color (Color) + Boolean VertexColor (UseVertexColor) } Technique { @@ -20,7 +20,7 @@ MaterialDef Default GUI { } } - Technique FixedFunc { + Technique { } } \ No newline at end of file diff --git a/engine/src/core-data/Common/MatDefs/Gui/Gui.vert b/engine/src/core-data/Common/MatDefs/Gui/Gui.vert index 0591c5e89..7640573dc 100644 --- a/engine/src/core-data/Common/MatDefs/Gui/Gui.vert +++ b/engine/src/core-data/Common/MatDefs/Gui/Gui.vert @@ -4,19 +4,17 @@ uniform vec4 m_Color; attribute vec3 inPosition; #ifdef VERTEX_COLOR -attribute vec4 inColor; + attribute vec4 inColor; #endif #ifdef TEXTURE -attribute vec2 inTexCoord; -varying vec2 texCoord; + attribute vec2 inTexCoord; + varying vec2 texCoord; #endif varying vec4 color; void main() { - //vec2 pos = (g_WorldViewProjectionMatrix * inPosition).xy; - //gl_Position = vec4(pos, 0.0, 1.0); gl_Position = g_WorldViewProjectionMatrix * vec4(inPosition, 1.0); #ifdef TEXTURE texCoord = inTexCoord;