diff shaders/default.f.glsl @ 1658:fa9ae059e4d3

Added support for GLES in addition to desktop GL
author Mike Pavone <pavone@retrodev.com>
date Sun, 30 Dec 2018 21:10:44 -0800
parents 957325c990d5
children f3cca4b3f17a
line wrap: on
line diff
--- a/shaders/default.f.glsl	Sun Dec 30 19:40:32 2018 -0800
+++ b/shaders/default.f.glsl	Sun Dec 30 21:10:44 2018 -0800
@@ -1,13 +1,12 @@
-#version 110
 
 uniform sampler2D textures[2];
 
-varying vec2 texcoord;
+varying mediump vec2 texcoord;
 
 void main()
 {
-	vec2 modifiedCoord0 = vec2(texcoord.x, (floor(texcoord.y * 512.0 + 0.25) + 0.5)/512.0);
-	vec2 modifiedCoord1 = vec2(texcoord.x, (floor(texcoord.y * 512.0 - 0.25) + 0.5)/512.0);
+	mediump vec2 modifiedCoord0 = vec2(texcoord.x, (floor(texcoord.y * 512.0 + 0.25) + 0.5)/512.0);
+	mediump vec2 modifiedCoord1 = vec2(texcoord.x, (floor(texcoord.y * 512.0 - 0.25) + 0.5)/512.0);
 	gl_FragColor = mix(
 		texture2D(textures[1], modifiedCoord1),
 		texture2D(textures[0], modifiedCoord0),