commit 1cbf410318290ac83e1b24e9537e6103480a8fcd
Author: leszek <leszek@koltunski.pl>
Date:   Wed Mar 29 13:55:38 2017 +0100

    Simplify shaders.

diff --git a/src/main/res/raw/blit_fragment_shader.glsl b/src/main/res/raw/blit_fragment_shader.glsl
index 37124cc..5dec392 100644
--- a/src/main/res/raw/blit_fragment_shader.glsl
+++ b/src/main/res/raw/blit_fragment_shader.glsl
@@ -20,12 +20,14 @@
 precision lowp float;
 
 #if __VERSION__ != 100
-#define TEXTURE texture
 out vec4 fragColor;           // The output color
 in vec2 v_TexCoordinate;      // Interpolated texture coordinate per fragment.
+#define TEXTURE texture
+#define FRAG_COLOR fragColor
 #else
-#define TEXTURE texture2D
 varying vec2 v_TexCoordinate; // Interpolated texture coordinate per fragment.
+#define TEXTURE texture2D
+#define FRAG_COLOR gl_FragColor
 #endif
 
 uniform sampler2D u_Texture;  // The input texture.
@@ -34,11 +36,5 @@ uniform sampler2D u_Texture;  // The input texture.
 
 void main()                    		
   {
-#if __VERSION__ != 100
-  fragColor    =
-#else
-  gl_FragColor =
-#endif
-
-  TEXTURE(u_Texture,v_TexCoordinate);
+  FRAG_COLOR = TEXTURE(u_Texture,v_TexCoordinate);
   }
\ No newline at end of file
diff --git a/src/main/res/raw/blur1_fragment_shader.glsl b/src/main/res/raw/blur1_fragment_shader.glsl
index 742225e..15b88c1 100644
--- a/src/main/res/raw/blur1_fragment_shader.glsl
+++ b/src/main/res/raw/blur1_fragment_shader.glsl
@@ -20,12 +20,14 @@
 precision lowp float;
 
 #if __VERSION__ != 100
-#define TEXTURE texture
 in vec2 v_TexCoordinate;
 out vec4 fragColor;
+#define TEXTURE texture
+#define FRAG_COLOR fragColor
 #else
-#define TEXTURE texture2D
 varying vec2 v_TexCoordinate;
+#define TEXTURE texture2D
+#define FRAG_COLOR gl_FragColor
 #endif
 
 uniform sampler2D u_ColorTexture;
@@ -45,11 +47,5 @@ void main()
                TEXTURE(u_ColorTexture,vec2(v_TexCoordinate.x-u_Offsets[i],v_TexCoordinate.y)) ) * u_Weights[i];
     }
 
-#if __VERSION__ != 100
-  fragColor    =
-#else
-  gl_FragColor =
-#endif
-
-  pixel;
+  FRAG_COLOR = pixel;
   }
\ No newline at end of file
diff --git a/src/main/res/raw/blur2_fragment_shader.glsl b/src/main/res/raw/blur2_fragment_shader.glsl
index 35678df..515f405 100644
--- a/src/main/res/raw/blur2_fragment_shader.glsl
+++ b/src/main/res/raw/blur2_fragment_shader.glsl
@@ -20,12 +20,14 @@
 precision lowp float;
 
 #if __VERSION__ != 100
-#define TEXTURE texture
 in vec2 v_TexCoordinate;
 out vec4 fragColor;
+#define TEXTURE texture
+#define FRAG_COLOR fragColor
 #else
-#define TEXTURE texture2D
 varying vec2 v_TexCoordinate;
+#define TEXTURE texture2D
+#define FRAG_COLOR gl_FragColor
 #endif
 
 uniform sampler2D u_ColorTexture;
@@ -48,11 +50,5 @@ void main()
                TEXTURE(u_ColorTexture,vec2(v_TexCoordinate.x-u_Offsets[i],v_TexCoordinate.y)) ) * u_Weights[i];
     }
 
-#if __VERSION__ != 100
-  fragColor    =
-#else
-  gl_FragColor =
-#endif
-
-  pixel;
+  FRAG_COLOR = pixel;
   }
\ No newline at end of file
diff --git a/src/main/res/raw/main_fragment_shader.glsl b/src/main/res/raw/main_fragment_shader.glsl
index 8a69569..1ffb4cc 100644
--- a/src/main/res/raw/main_fragment_shader.glsl
+++ b/src/main/res/raw/main_fragment_shader.glsl
@@ -20,16 +20,18 @@
 precision lowp float;
 
 #if __VERSION__ != 100
-#define TEXTURE texture
 in vec3 v_Position;                     // Interpolated position for this fragment.
 in vec3 v_Normal;                       // Interpolated normal for this fragment.
 in vec2 v_TexCoordinate;                // Interpolated texture coordinate per fragment.
 out vec4 fragColor;                     // The output color
+#define TEXTURE texture
+#define FRAG_COLOR fragColor
 #else
-#define TEXTURE texture2D
 varying vec3 v_Position;                // Interpolated position for this fragment.
 varying vec3 v_Normal;                  // Interpolated normal for this fragment.
 varying vec2 v_TexCoordinate;           // Interpolated texture coordinate per fragment.
+#define TEXTURE texture2D
+#define FRAG_COLOR gl_FragColor
 #endif
 
 uniform sampler2D u_Texture;            // The input texture.
@@ -149,11 +151,5 @@ void main()
     }
 #endif
 
-#if __VERSION__ != 100
-  fragColor    =
-#else
-  gl_FragColor =
-#endif
-
-  vec4(pixel.rgb * (1.0 + 7.0*v_Normal.z) * 0.125, pixel.a);
+  FRAG_COLOR = vec4(pixel.rgb * (1.0 + 7.0*v_Normal.z) * 0.125, pixel.a);
   }
\ No newline at end of file
diff --git a/src/main/res/raw/test_fragment_shader.glsl b/src/main/res/raw/test_fragment_shader.glsl
index b0b0af1..f2fb503 100644
--- a/src/main/res/raw/test_fragment_shader.glsl
+++ b/src/main/res/raw/test_fragment_shader.glsl
@@ -21,17 +21,14 @@ precision lowp float;
 
 #if __VERSION__ != 100
 out vec4 fragColor;
+#define FRAG_COLOR fragColor
+#else
+#define FRAG_COLOR gl_FragColor
 #endif
 
 //////////////////////////////////////////////////////////////////////////////////////////////
 
 void main()
   {
-#if __VERSION__ != 100
-  fragColor    =
-#else
-  gl_FragColor =
-#endif
-
-  vec4(1.0,0.0,0.0,0.2);
+  FRAG_COLOR = vec4(1.0,0.0,0.0,0.2);
   }
\ No newline at end of file
