From 2b1932b32572d3f4451cb2a3936e03e6f8a66452 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 19 Feb 2013 07:32:24 +0000 Subject: [PATCH] =?UTF-8?q?build:=20avoid=20M=5FPI=5F2,=20the=20PS3=20does?= =?UTF-8?q?n=E2=80=99t=20have=20it.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/easymesh/easymesh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/easymesh/easymesh.cpp b/src/easymesh/easymesh.cpp index 88c29d13..4ee5bf8c 100644 --- a/src/easymesh/easymesh.cpp +++ b/src/easymesh/easymesh.cpp @@ -1452,7 +1452,7 @@ void EasyMesh::AppendCapsule(int ndivisions, float h, float d) uv[k].x = (lol::atan2(p[k].z, p[k].x) + (float)M_PI) / ((float)M_PI * 2.f); if (abs(p[k].y) >= 1.0f) uv[k].x = -1.f; - uv[k].y = (lol::atan2(p[k].y, dot(p[k], normalize(p[k] * vec3(1.f,0.f,1.f)))) + (float)M_PI_2) / (float)M_PI; + uv[k].y = lol::atan2(p[k].y, dot(p[k], normalize(p[k] * vec3(1.f,0.f,1.f)))) / (float)M_PI + 0.5f; if (h) { if (uv[k].y > .5f)