From 2938acec5127680b77f4ff6b0358d9f19ee8a54e Mon Sep 17 00:00:00 2001 From: David Bernard Date: Mon, 9 Nov 2015 21:19:59 +0100 Subject: [PATCH] opengl3: add GLSLCompat into Gui.j3md --- .../main/resources/Common/MatDefs/Gui/Gui.frag | 2 ++ .../main/resources/Common/MatDefs/Gui/Gui.j3md | 15 +++++++++++++-- .../main/resources/Common/MatDefs/Gui/Gui.vert | 2 ++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/jme3-core/src/main/resources/Common/MatDefs/Gui/Gui.frag b/jme3-core/src/main/resources/Common/MatDefs/Gui/Gui.frag index 619682ce0..4a4b433de 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Gui/Gui.frag +++ b/jme3-core/src/main/resources/Common/MatDefs/Gui/Gui.frag @@ -1,3 +1,5 @@ +#import "Common/ShaderLib/GLSLCompat.glsllib" + #ifdef TEXTURE uniform sampler2D m_Texture; varying vec2 texCoord; diff --git a/jme3-core/src/main/resources/Common/MatDefs/Gui/Gui.j3md b/jme3-core/src/main/resources/Common/MatDefs/Gui/Gui.j3md index f37f6c979..23fbff826 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Gui/Gui.j3md +++ b/jme3-core/src/main/resources/Common/MatDefs/Gui/Gui.j3md @@ -7,8 +7,8 @@ MaterialDef Default GUI { } Technique { - VertexShader GLSL100: Common/MatDefs/Gui/Gui.vert - FragmentShader GLSL100: Common/MatDefs/Gui/Gui.frag + VertexShader GLSL150: Common/MatDefs/Gui/Gui.vert + FragmentShader GLSL150: Common/MatDefs/Gui/Gui.frag WorldParameters { WorldViewProjectionMatrix @@ -21,6 +21,17 @@ MaterialDef Default GUI { } Technique { + VertexShader GLSL100: Common/MatDefs/Gui/Gui.vert + FragmentShader GLSL100: Common/MatDefs/Gui/Gui.frag + + WorldParameters { + WorldViewProjectionMatrix + } + + Defines { + TEXTURE : Texture + VERTEX_COLOR : VertexColor + } } } \ No newline at end of file diff --git a/jme3-core/src/main/resources/Common/MatDefs/Gui/Gui.vert b/jme3-core/src/main/resources/Common/MatDefs/Gui/Gui.vert index 7640573dc..f0c50f5be 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Gui/Gui.vert +++ b/jme3-core/src/main/resources/Common/MatDefs/Gui/Gui.vert @@ -1,3 +1,5 @@ +#import "Common/ShaderLib/GLSLCompat.glsllib" + uniform mat4 g_WorldViewProjectionMatrix; uniform vec4 m_Color;