* Allow MultiSample.glsllib to be used on GLSL shaders versions 1.00 - 1.40 (otherwise a syntax error occurs)

experimental
shadowislord 11 years ago
parent 939a0b03ca
commit 97ff9c2949
  1. 23
      jme3-core/src/main/resources/Common/ShaderLib/MultiSample.glsllib

@ -43,7 +43,8 @@ vec4 getColorSingle(in sampler2DMS tex, in vec2 texC){
vec4 getDepth(in sampler2DMS tex,in vec2 texC){ vec4 getDepth(in sampler2DMS tex,in vec2 texC){
return textureFetch(tex,texC,m_NumSamplesDepth); return textureFetch(tex,texC,m_NumSamplesDepth);
} }
#endif
#elif __VERSION__ >= 150
vec4 fetchTextureSample(in sampler2D tex,in vec2 texC,in int sample){ vec4 fetchTextureSample(in sampler2D tex,in vec2 texC,in int sample){
return texture(tex,texC); return texture(tex,texC);
@ -60,3 +61,23 @@ vec4 getColorSingle(in sampler2D tex, in vec2 texC){
vec4 getDepth(in sampler2D tex,in vec2 texC){ vec4 getDepth(in sampler2D tex,in vec2 texC){
return texture(tex,texC); return texture(tex,texC);
} }
#else
vec4 fetchTextureSample(in sampler2D tex,in vec2 texC,in int sample){
return texture2D(tex,texC);
}
vec4 getColor(in sampler2D tex, in vec2 texC){
return texture2D(tex,texC);
}
vec4 getColorSingle(in sampler2D tex, in vec2 texC){
return texture2D(tex, texC);
}
vec4 getDepth(in sampler2D tex,in vec2 texC){
return texture2D(tex,texC);
}
#endif
Loading…
Cancel
Save