Skip to content

Commit

Permalink
Merge pull request #3904 from AnalyticalGraphicsInc/exaggerated-normals
Browse files Browse the repository at this point in the history
Fix exaggerated terrain normals.
  • Loading branch information
kring committed May 10, 2016
2 parents c976592 + e0b8800 commit 3d9aefb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Change Log
* Improved KML NetworkLink compatibility by supporting the `Url` tag. [#3895](https://github.com/AnalyticalGraphicsInc/cesium/pull/3895).
* Fixed exaggerated terrain tiles disappearing. [#3676](https://github.com/AnalyticalGraphicsInc/cesium/issues/3676)
* Fixed infinite horizontal 2D scrolling in IE/Edge. [#3893](https://github.com/AnalyticalGraphicsInc/cesium/issues/3893)
* Fixed a bug that could cause incorrect normals to be computed for exaggerated terrain, especially for low-detail tiles. [#3904](https://github.com/AnalyticalGraphicsInc/cesium/pull/3904)

### 1.21 - 2016-05-02

Expand Down
2 changes: 1 addition & 1 deletion Source/Workers/createVerticesFromQuantizedTerrainMesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ define([

if (exaggeration !== 1.0) {
var normal = AttributeCompression.octDecode(toPack.x, toPack.y, scratchNormal);
var fromENUNormal = Transforms.eastNorthUpToFixedFrame(cartesian3Scratch, ellipsoid, scratchFromENU);
var fromENUNormal = Transforms.eastNorthUpToFixedFrame(positions[j], ellipsoid, scratchFromENU);
var toENUNormal = Matrix4.inverseTransformation(fromENUNormal, scratchToENU);

Matrix4.multiplyByPointAsVector(toENUNormal, normal, normal);
Expand Down

0 comments on commit 3d9aefb

Please sign in to comment.