add GLSL150 compatible Unshaded

experimental
David Bernard 10 years ago
parent 704c3f1a10
commit 568ee09d17
  1. 1
      jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java
  2. 2
      jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.frag
  3. 23
      jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md
  4. 1
      jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.vert
  5. 2
      jme3-core/src/main/resources/Common/ShaderLib/GLSL150Compat.glsllib

@ -1080,6 +1080,7 @@ public class GLRenderer implements Renderer {
if (linearizeSrgbImages) {
stringBuf.append("#define SRGB 1\n");
}
stringBuf.append("#define ").append(source.getType().name().toUpperCase()).append("_SHADER 1\n");
stringBuf.append(source.getDefines());
stringBuf.append(source.getSource());

@ -1,3 +1,5 @@
#import "Common/ShaderLib/GLSL150Compat.glsllib"
#if defined(HAS_GLOWMAP) || defined(HAS_COLORMAP) || (defined(HAS_LIGHTMAP) && !defined(SEPARATE_TEXCOORD))
#define NEED_TEXCOORD1
#endif

@ -54,8 +54,8 @@ MaterialDef Unshaded {
}
Technique {
VertexShader GLSL100: Common/MatDefs/Misc/Unshaded.vert
FragmentShader GLSL100: Common/MatDefs/Misc/Unshaded.frag
VertexShader GLSL150: Common/MatDefs/Misc/Unshaded.vert
FragmentShader GLSL150: Common/MatDefs/Misc/Unshaded.frag
WorldParameters {
WorldViewProjectionMatrix
@ -76,6 +76,25 @@ MaterialDef Unshaded {
}
Technique {
VertexShader GLSL100: Common/MatDefs/Misc/Unshaded.vert
FragmentShader GLSL100: Common/MatDefs/Misc/Unshaded.frag
WorldParameters {
WorldViewProjectionMatrix
ViewProjectionMatrix
ViewMatrix
}
Defines {
INSTANCING : UseInstancing
SEPARATE_TEXCOORD : SeparateTexCoord
HAS_COLORMAP : ColorMap
HAS_LIGHTMAP : LightMap
HAS_VERTEXCOLOR : VertexColor
HAS_COLOR : Color
NUM_BONES : NumberOfBones
DISCARD_ALPHA : AlphaDiscardThreshold
}
}
Technique PreNormalPass {

@ -1,3 +1,4 @@
#import "Common/ShaderLib/GLSL150Compat.glsllib"
#import "Common/ShaderLib/Skinning.glsllib"
#import "Common/ShaderLib/Instancing.glsllib"

@ -1,4 +1,4 @@
#if _VERSION_ >= 150
#if __VERSION__ >= 130
out vec4 outFragColor;
# define texture1D texture
# define texture2D texture

Loading…
Cancel
Save