From 332cfe734c54c4ead0ecf63345d123652749ef5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Piera=20Llodr=C3=A1?= Date: Fri, 14 Oct 2016 12:40:54 +0000 Subject: [PATCH] Fixing a bug with the textures when the rectangle is rotated --- Source/Core/RectangleGeometryLibrary.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Source/Core/RectangleGeometryLibrary.js b/Source/Core/RectangleGeometryLibrary.js index 34ac3cbbb40a..c59d519e8629 100644 --- a/Source/Core/RectangleGeometryLibrary.js +++ b/Source/Core/RectangleGeometryLibrary.js @@ -55,13 +55,10 @@ define([ position.z = kZ / gamma; if (defined(options.vertexFormat) && options.vertexFormat.st) { - st.x = (stLongitude - rectangle.west) * options.lonScalar - 0.5; - st.y = (stLatitude - rectangle.south) * options.latScalar - 0.5; + st.x = (stLongitude - rectangle.west) * options.lonScalar; + st.y = (stLatitude - rectangle.south) * options.latScalar; Matrix2.multiplyByVector(options.textureMatrix, st, st); - - st.x += 0.5; - st.y += 0.5; } };