From 4ef71dae79393a977cff878a10ed1511c47031bc Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 24 Jun 2014 09:28:20 -0400 Subject: [PATCH] fix text vertex shader coordinate mapping --- runtime/shaders/text.v.glsl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/shaders/text.v.glsl b/runtime/shaders/text.v.glsl index fe234d0..c0501dc 100644 --- a/runtime/shaders/text.v.glsl +++ b/runtime/shaders/text.v.glsl @@ -8,9 +8,9 @@ varying vec2 texture_coord_v; void main(void) { // Map coordinates such that: - // (-0.5 .. screen_size.x-0.5) => (-1.0 .. 1.0) - gl_Position = vec4(2.0 * (position.x + coords.x + 0.5) / screen_size.x - 1.0, - 2.0 * (position.y + coords.y + 0.5) / screen_size.y - 1.0, + // (0 .. screen_size.x) => (-1.0 .. 1.0) + gl_Position = vec4(2.0 * (position.x + coords.x) / screen_size.x - 1.0, + 2.0 * (position.y + coords.y) / screen_size.y - 1.0, 0, 1); texture_coord_v = coords.zw; }