Skip to content

Commit

Permalink
Merge pull request CesiumGS#8455 from AnalyticalGraphicsInc/water-mat…
Browse files Browse the repository at this point in the history
…erial-alpha

Fix water material alpha
  • Loading branch information
IanLilleyT authored Dec 16, 2019
2 parents 59110b8 + 5516d45 commit 2dcbe6c
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 @@ -7,6 +7,7 @@ Change Log
* Fixed Geocoder auto-complete suggestions when hosted inside Web Components. [#8425](https://github.com/AnalyticalGraphicsInc/cesium/pull/8425)
* Fixed terrain tile culling problems when under ellipsoid. [#8397](https://github.com/AnalyticalGraphicsInc/cesium/pull/8397)
* Fixed primitive culling when below the ellipsoid but above terrain. [#8398](https://github.com/AnalyticalGraphicsInc/cesium/pull/8398)
* Improved the translucency calculation for the Water material type. [#8455](https://github.com/AnalyticalGraphicsInc/cesium/pull/8455)

### 1.64.0 - 2019-12-02

Expand Down
2 changes: 1 addition & 1 deletion Source/Shaders/Materials/Water.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);

// fade out water effect as specular map value decreases
material.alpha = specularMapValue;
material.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;

// base color is a blend of the water and non-water color based on the value from the specular map
// may need a uniform blend factor to better control this
Expand Down

0 comments on commit 2dcbe6c

Please sign in to comment.