From 44ec9b4f98ea308b37f5d43d0974818e5ac8fdb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Pe=C3=B1aranda?= Date: Mon, 19 Aug 2013 14:26:36 -0300 Subject: [PATCH] very minor --- openglcanvas.cpp | 1 - shaders/vertex_shader.vert | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/openglcanvas.cpp b/openglcanvas.cpp index 0b4ce7e..16097fa 100644 --- a/openglcanvas.cpp +++ b/openglcanvas.cpp @@ -505,7 +505,6 @@ void OpenGLCanvas::vertex_transformation(float *positions, int m, int n, float c positions[3*(j+i*n)+2] = z; } - // perspective if (visualization=="Zorin-Barr"){ // perspective u = x/(-z); diff --git a/shaders/vertex_shader.vert b/shaders/vertex_shader.vert index 26a58d7..964f1c3 100644 --- a/shaders/vertex_shader.vert +++ b/shaders/vertex_shader.vert @@ -71,8 +71,8 @@ void main(void){ else if (vis_mode==3.0) // Equi-Rectangular gl_Position = vec4(lambda,phi,z,1.0); else if (vis_mode==4.0) { // Stereographic - u = 2.f*x/(-z+1); - v = 2.f*y/(-z+1); + u = 2.0*x/(-z+1.0); + v = 2.0*y/(-z+1.0); gl_Position = vec4(u/extent,v/extent,z,1.0); } else if (vis_mode==5.0) { // Mercator -- GitLab