Browse Source

opengl3: add GLSLCompat into Gui.j3md

David Bernard 9 years ago
parent
commit
2938acec51

+ 2 - 0
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;

+ 13 - 2
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
+        }
     }
 
 }

+ 2 - 0
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;