diff options
Diffstat (limited to 'shaders')
-rw-r--r-- | shaders/default.f.glsl | 7 | ||||
-rw-r--r-- | shaders/default.v.glsl | 7 |
2 files changed, 6 insertions, 8 deletions
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), diff --git a/shaders/default.v.glsl b/shaders/default.v.glsl index 197fdbe..82a2439 100644 --- a/shaders/default.v.glsl +++ b/shaders/default.v.glsl @@ -1,11 +1,10 @@ -#version 110 attribute vec2 pos; -varying vec2 texcoord; -uniform float width, height; +varying mediump vec2 texcoord; +uniform mediump float width, height; void main() { gl_Position = vec4(pos, 0.0, 1.0); - texcoord = sign(pos) * vec2(width/1024.0, height/-1024.0) + vec2(width/1024.0, height/1024.0); + texcoord = sign(pos) * vec2(width / 1024.0, height / -1024.0) + vec2(width / 1024.0, height / 1024.0); } |