Skip to content

Commit

Permalink
Merge pull request #4430 from jorpiell/master
Browse files Browse the repository at this point in the history
Fixing a bug with the textures when the rectangle is rotated
  • Loading branch information
bagnell authored Oct 18, 2016
2 parents 65f9fc3 + 332cfe7 commit 5278cdf
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Source/Core/RectangleGeometryLibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};

Expand Down

0 comments on commit 5278cdf

Please sign in to comment.