From bef22a39e5abd914eb0fa08b994186a588ee94ce Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Sun, 30 Dec 2018 21:10:44 -0800 Subject: Added support for GLES in addition to desktop GL --- shaders/default.f.glsl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'shaders/default.f.glsl') diff --git a/shaders/default.f.glsl b/shaders/default.f.glsl index 3427e09..4aecdae 100644 --- a/shaders/default.f.glsl +++ b/shaders/default.f.glsl @@ -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), -- cgit v1.2.3