From 883ab43e299500e8894314faa30d8ed734739e6e Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Thu, 1 Jan 2015 03:18:13 +0100 Subject: [PATCH] Assume __VERSION >= 130 everywhere --- data/shaders/billboard.frag | 6 ------ data/shaders/color_levels.frag | 5 ----- data/shaders/coloredquad.frag | 5 ----- data/shaders/colorize.frag | 5 ----- data/shaders/colortexturedquad.frag | 8 -------- data/shaders/detailledobject_pass2.frag | 6 ------ data/shaders/displace.frag | 7 ------- data/shaders/glow.frag | 5 ----- data/shaders/godfade.frag | 5 ----- data/shaders/godray.frag | 5 ----- data/shaders/object_pass1.frag | 5 ----- data/shaders/objectpass_spheremap.frag | 5 ----- data/shaders/objectref_pass1.frag | 6 ------ data/shaders/sky.frag | 5 ----- data/shaders/splatting.frag | 6 ------ data/shaders/texturedquad.frag | 6 ------ data/shaders/uniformcolortexturedquad.frag | 5 ----- data/shaders/untextured_object.frag | 5 ----- data/shaders/white.frag | 5 ----- 19 files changed, 105 deletions(-) diff --git a/data/shaders/billboard.frag b/data/shaders/billboard.frag index 0eb0af806..16b3f742b 100644 --- a/data/shaders/billboard.frag +++ b/data/shaders/billboard.frag @@ -1,13 +1,7 @@ uniform sampler2D tex; -#if __VERSION__ >= 130 in vec2 uv; out vec4 FragColor; -#else -varying vec2 uv; -#define FragColor gl_FragColor -#endif - void main(void) { diff --git a/data/shaders/color_levels.frag b/data/shaders/color_levels.frag index b280bacb7..a707690cd 100644 --- a/data/shaders/color_levels.frag +++ b/data/shaders/color_levels.frag @@ -8,13 +8,8 @@ uniform vec3 inlevel; uniform vec2 outlevel; uniform mat4 invprojm; -#if __VERSION__ >= 130 in vec2 uv; out vec4 FragColor; -#else -varying vec2 uv; -#define FragColor gl_FragColor -#endif #define PI 3.14159265 diff --git a/data/shaders/coloredquad.frag b/data/shaders/coloredquad.frag index 26d01339e..b7f48cc65 100644 --- a/data/shaders/coloredquad.frag +++ b/data/shaders/coloredquad.frag @@ -1,11 +1,6 @@ uniform ivec4 color; -#if __VERSION__ >= 130 out vec4 FragColor; -#else -#define FragColor gl_FragColor -#endif - void main() { diff --git a/data/shaders/colorize.frag b/data/shaders/colorize.frag index 022fe59c0..c0b7613aa 100644 --- a/data/shaders/colorize.frag +++ b/data/shaders/colorize.frag @@ -1,11 +1,6 @@ uniform vec3 col; -#if __VERSION__ >= 130 out vec4 FragColor; -#else -#define FragColor gl_FragColor -#endif - void main() { diff --git a/data/shaders/colortexturedquad.frag b/data/shaders/colortexturedquad.frag index 6c1aa7396..7fbabed16 100644 --- a/data/shaders/colortexturedquad.frag +++ b/data/shaders/colortexturedquad.frag @@ -1,16 +1,8 @@ uniform sampler2D tex; -#if __VERSION__ >= 130 in vec2 uv; in vec4 col; out vec4 FragColor; -#else -varying vec2 uv; -varying vec4 col; -#define FragColor gl_FragColor -#endif - - void main() { diff --git a/data/shaders/detailledobject_pass2.frag b/data/shaders/detailledobject_pass2.frag index 1b8836834..c205e65a2 100644 --- a/data/shaders/detailledobject_pass2.frag +++ b/data/shaders/detailledobject_pass2.frag @@ -8,15 +8,9 @@ uniform sampler2D Detail; uniform sampler2D SpecMap; #endif -#if __VERSION__ >= 130 in vec2 uv; in vec2 uv_bis; out vec4 FragColor; -#else -varying vec2 uv; -varying vec2 uv_bis; -#define FragColor gl_FragColor -#endif vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue); diff --git a/data/shaders/displace.frag b/data/shaders/displace.frag index f1423b840..748909f82 100644 --- a/data/shaders/displace.frag +++ b/data/shaders/displace.frag @@ -5,18 +5,11 @@ uniform sampler2D tex; uniform vec2 dir; uniform vec2 dir2; -#if __VERSION__ >= 130 in vec2 uv; in vec2 uv_bis; in float camdist; out vec4 FragColor; -#else -varying vec2 uv; -varying vec2 uv_bis; -varying float camdist; -#define FragColor gl_FragColor -#endif const float maxlen = 0.02; diff --git a/data/shaders/glow.frag b/data/shaders/glow.frag index 7902bd93b..cda0d3d8b 100644 --- a/data/shaders/glow.frag +++ b/data/shaders/glow.frag @@ -1,12 +1,7 @@ uniform sampler2D tex; -#if __VERSION__ >= 130 in vec2 uv; out vec4 FragColor; -#else -varying vec2 uv; -#define FragColor gl_FragColor -#endif void main() { diff --git a/data/shaders/godfade.frag b/data/shaders/godfade.frag index fb60fe344..7380d6e05 100644 --- a/data/shaders/godfade.frag +++ b/data/shaders/godfade.frag @@ -1,13 +1,8 @@ uniform sampler2D tex; uniform vec3 col; -#if __VERSION__ >= 130 in vec2 uv; out vec4 FragColor; -#else -varying vec2 uv; -#define FragColor gl_FragColor -#endif void main() { diff --git a/data/shaders/godray.frag b/data/shaders/godray.frag index 8880d434d..4a0a9e1c7 100644 --- a/data/shaders/godray.frag +++ b/data/shaders/godray.frag @@ -5,13 +5,8 @@ uniform vec2 sunpos; const float decaystep = 0.88; -#if __VERSION__ >= 130 in vec2 uv; out vec4 FragColor; -#else -varying vec2 uv; -#define FragColor gl_FragColor -#endif void main() { diff --git a/data/shaders/object_pass1.frag b/data/shaders/object_pass1.frag index ffd729187..86cd2189a 100644 --- a/data/shaders/object_pass1.frag +++ b/data/shaders/object_pass1.frag @@ -4,14 +4,9 @@ layout(bindless_sampler) uniform sampler2D tex; uniform sampler2D tex; #endif -#if __VERSION__ >= 130 in vec3 nor; in vec2 uv; out vec3 EncodedNormal; -#else -varying vec3 nor; -#define EncodedNormal gl_FragColor.xy -#endif vec2 EncodeNormal(vec3 n); diff --git a/data/shaders/objectpass_spheremap.frag b/data/shaders/objectpass_spheremap.frag index 99a656d88..1061fdc4b 100644 --- a/data/shaders/objectpass_spheremap.frag +++ b/data/shaders/objectpass_spheremap.frag @@ -6,13 +6,8 @@ layout(bindless_sampler) uniform sampler2D tex; uniform sampler2D tex; #endif -#if __VERSION__ >= 130 in vec3 nor; out vec4 FragColor; -#else -varying vec3 nor; -#define FragColor gl_FragColor -#endif vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix); vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue); diff --git a/data/shaders/objectref_pass1.frag b/data/shaders/objectref_pass1.frag index 6b34e6446..82603db51 100644 --- a/data/shaders/objectref_pass1.frag +++ b/data/shaders/objectref_pass1.frag @@ -6,15 +6,9 @@ uniform sampler2D tex; uniform sampler2D glosstex; #endif -#if __VERSION__ >= 130 in vec3 nor; in vec2 uv; out vec3 EncodedNormal; -#else -varying vec3 nor; -varying vec2 uv; -#define EncodedNormal gl_FragColor.xy -#endif vec2 EncodeNormal(vec3 n); diff --git a/data/shaders/sky.frag b/data/shaders/sky.frag index e43416722..89cb639d5 100644 --- a/data/shaders/sky.frag +++ b/data/shaders/sky.frag @@ -1,11 +1,6 @@ uniform samplerCube tex; -#if __VERSION__ >= 130 out vec4 FragColor; -#else -#define FragColor gl_FragColor -#endif - void main(void) { diff --git a/data/shaders/splatting.frag b/data/shaders/splatting.frag index 7b05654de..3164ce4df 100644 --- a/data/shaders/splatting.frag +++ b/data/shaders/splatting.frag @@ -12,15 +12,9 @@ uniform sampler2D tex_detail2; uniform sampler2D tex_detail3; #endif -#if __VERSION__ >= 130 in vec2 uv; in vec2 uv_bis; out vec4 FragColor; -#else -varying vec2 uv; -varying vec2 uv_bis; -#define FragColor gl_FragColor -#endif vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue); diff --git a/data/shaders/texturedquad.frag b/data/shaders/texturedquad.frag index 995a3c572..904e9d8ab 100644 --- a/data/shaders/texturedquad.frag +++ b/data/shaders/texturedquad.frag @@ -1,13 +1,7 @@ uniform sampler2D tex; -#if __VERSION__ >= 130 in vec2 uv; out vec4 FragColor; -#else -varying vec2 uv; -#define FragColor gl_FragColor -#endif - void main() { diff --git a/data/shaders/uniformcolortexturedquad.frag b/data/shaders/uniformcolortexturedquad.frag index 608da17ec..a407f91fb 100644 --- a/data/shaders/uniformcolortexturedquad.frag +++ b/data/shaders/uniformcolortexturedquad.frag @@ -1,13 +1,8 @@ uniform sampler2D tex; uniform ivec4 color; -#if __VERSION__ >= 130 in vec2 uv; out vec4 FragColor; -#else -varying vec2 uv; -#define FragColor gl_FragColor -#endif void main() { diff --git a/data/shaders/untextured_object.frag b/data/shaders/untextured_object.frag index 05e8b2cd2..e91447172 100644 --- a/data/shaders/untextured_object.frag +++ b/data/shaders/untextured_object.frag @@ -1,11 +1,6 @@ -#if __VERSION__ >= 130 in vec4 color; out vec4 FragColor; -#else -varying vec4 color; -#define FragColor gl_FragColor -#endif vec3 getLightFactor(float specMapValue); diff --git a/data/shaders/white.frag b/data/shaders/white.frag index d48e4e724..fe47595a7 100644 --- a/data/shaders/white.frag +++ b/data/shaders/white.frag @@ -1,9 +1,4 @@ -#if __VERSION__ >= 130 out vec4 FragColor; -#else -#define FragColor gl_FragColor -#endif - void main() {