From 97ff9c2949f9a34c4db33979a32e140dca1cf1ae Mon Sep 17 00:00:00 2001 From: shadowislord Date: Fri, 30 May 2014 23:32:02 -0400 Subject: [PATCH] * Allow MultiSample.glsllib to be used on GLSL shaders versions 1.00 - 1.40 (otherwise a syntax error occurs) --- .../Common/ShaderLib/MultiSample.glsllib | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/jme3-core/src/main/resources/Common/ShaderLib/MultiSample.glsllib b/jme3-core/src/main/resources/Common/ShaderLib/MultiSample.glsllib index 47b4753f7..bea736f9d 100644 --- a/jme3-core/src/main/resources/Common/ShaderLib/MultiSample.glsllib +++ b/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){ return textureFetch(tex,texC,m_NumSamplesDepth); } -#endif + +#elif __VERSION__ >= 150 vec4 fetchTextureSample(in sampler2D tex,in vec2 texC,in int sample){ return texture(tex,texC); @@ -59,4 +60,24 @@ vec4 getColorSingle(in sampler2D tex, in vec2 texC){ vec4 getDepth(in sampler2D tex,in vec2 texC){ return texture(tex,texC); -} \ No newline at end of file +} + +#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 \ No newline at end of file