Account for tile pixel start offset and size difference when calculating height on globe.

This commit is contained in:
kalbl
2016-10-18 17:21:05 +02:00
parent 7f62bd7206
commit 8e972ff7d6
5 changed files with 56 additions and 8 deletions
@@ -305,7 +305,12 @@ namespace globebrowsing {
if (tile.status != Tile::Status::OK) {
return 0;
}
glm::vec2 transformedUv = uvTransform.uvOffset + uvTransform.uvScale * patchUV;
//glm::vec2 transformedUv = uvTransform.uvOffset + uvTransform.uvScale * patchUV;
glm::vec2 transformedUv = Tile::TileUvToTextureSamplePosition(
uvTransform,
patchUV,
glm::uvec2(tile.texture->dimensions()));
// Sample and do linear interpolation
// (could possibly be moved as a function in ghoul texture)