Skip to content

Commit

Permalink
Merge pull request #7924 from AnalyticalGraphicsInc/gamma-correct-fix
Browse files Browse the repository at this point in the history
Gamma correction fix for polylines
  • Loading branch information
Hannah authored Jun 10, 2019
2 parents 3828ad4 + 9c45a85 commit 0c0307a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Change Log
##### Fixes :wrench:
* Fixed a bug that caused missing segments for ground polylines with coplanar points over large distances and problems with polylines containing duplicate points. [#7885](https://github.com/AnalyticalGraphicsInc/cesium//pull/7885)
* Fixed a bug where billboards were not pickable when zoomed out completely in 2D View. [#7908](https://github.com/AnalyticalGraphicsInc/cesium/pull/7908)
* Fixed polyline colors when `scene.highDynamicRange` is enabled. [#7924](https://github.com/AnalyticalGraphicsInc/cesium/pull/7924)
* Fixed a bug in the inspector where the min/max height values of a picked tile were undefined. [#7904](https://github.com/AnalyticalGraphicsInc/cesium/pull/7904)

### 1.58.1 - 2018-06-03
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ varying vec4 v_color;

void main()
{
gl_FragColor = v_color;
gl_FragColor = czm_gammaCorrect(v_color);
}
2 changes: 1 addition & 1 deletion Source/Shaders/PolylineShadowVolumeFS.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void main(void)
distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);

#ifdef PER_INSTANCE_COLOR
gl_FragColor = v_color;
gl_FragColor = czm_gammaCorrect(v_color);
#else // PER_INSTANCE_COLOR
// Clamp - distance to aligned planes may be negative due to mitering,
// so fragment texture coordinate might be out-of-bounds.
Expand Down
2 changes: 1 addition & 1 deletion Source/Shaders/PolylineShadowVolumeMorphFS.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void main(void)
eyeCoordinate /= eyeCoordinate.w;

#ifdef PER_INSTANCE_COLOR
gl_FragColor = v_color;
gl_FragColor = czm_gammaCorrect(v_color);
#else // PER_INSTANCE_COLOR
// Use distances for planes aligned with segment to prevent skew in dashing
float distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);
Expand Down

0 comments on commit 0c0307a

Please sign in to comment.