Added missed imports. (#691)

Used GLSL compat on the post shadow filter
fix-456
Alexandr Brui 7 years ago committed by Rémy Bouquet
parent 10bc250db7
commit 3058c218c5
  1. 1
      jme3-core/src/main/resources/Common/MatDefs/Hdr/LogLum.frag
  2. 1
      jme3-core/src/main/resources/Common/MatDefs/Hdr/ToneMap.frag
  3. 1
      jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadow.frag
  4. 1
      jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadowFilter.frag
  5. 2
      jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadowFilter.j3md
  6. 2
      jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadowFilter.vert
  7. 14
      jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadowFilter15.frag
  8. 10
      jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadowFilter15.vert

@ -1,3 +1,4 @@
#import "Common/ShaderLib/GLSLCompat.glsllib"
#import "Common/ShaderLib/Hdr.glsllib"
uniform sampler2D m_Texture;

@ -1,3 +1,4 @@
#import "Common/ShaderLib/GLSLCompat.glsllib"
#import "Common/ShaderLib/Hdr.glsllib"
varying vec2 texCoord;

@ -1,6 +1,5 @@
#import "Common/ShaderLib/GLSLCompat.glsllib"
#import "Common/ShaderLib/Shadows.glsllib"
#if defined(PSSM) || defined(FADE)
varying float shadowPosition;
#endif

@ -1,3 +1,4 @@
#import "Common/ShaderLib/GLSLCompat.glsllib"
#import "Common/ShaderLib/Shadows.glsllib"
uniform sampler2D m_Texture;

@ -42,7 +42,7 @@ MaterialDef Post Shadow {
}
Technique {
VertexShader GLSL150: Common/MatDefs/Shadow/PostShadowFilter15.vert
VertexShader GLSL150: Common/MatDefs/Shadow/PostShadowFilter.vert
FragmentShader GLSL150: Common/MatDefs/Shadow/PostShadowFilter15.frag
WorldParameters {

@ -1,3 +1,5 @@
#import "Common/ShaderLib/GLSLCompat.glsllib"
attribute vec4 inPosition;
attribute vec2 inTexCoord;
varying vec2 texCoord;

@ -1,14 +1,13 @@
#import "Common/ShaderLib/GLSLCompat.glsllib"
#import "Common/ShaderLib/MultiSample.glsllib"
#import "Common/ShaderLib/Shadows.glsllib"
uniform COLORTEXTURE m_Texture;
uniform DEPTHTEXTURE m_DepthTexture;
uniform mat4 m_ViewProjectionMatrixInverse;
uniform vec4 m_ViewProjectionMatrixRow2;
in vec2 texCoord;
out vec4 outFragColor;
varying vec2 texCoord;
const mat4 biasMat = mat4(0.5, 0.0, 0.0, 0.0,
0.0, 0.5, 0.0, 0.0,
@ -134,18 +133,17 @@ vec4 main_multiSample(in int numSample){
return color * vec4(shadow, shadow, shadow, 1.0);
}
void main(){
void main() {
#ifdef RESOLVE_MS
vec4 color = vec4(0.0);
for (int i = 0; i < m_NumSamples; i++){
color += main_multiSample(i);
}
outFragColor = color / m_NumSamples;
gl_FragColor = color / m_NumSamples;
#else
outFragColor = main_multiSample(0);
#endif
gl_FragColor = main_multiSample(0);
#endif
}

@ -1,10 +0,0 @@
in vec4 inPosition;
in vec2 inTexCoord;
out vec2 texCoord;
void main() {
vec2 pos = inPosition.xy * 2.0 - 1.0;
gl_Position = vec4(pos, 0.0, 1.0);
texCoord = inTexCoord;
}
Loading…
Cancel
Save