Skip to content

Gamma correction fix for polylines #7924

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Jun 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
@@ -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.
2 changes: 1 addition & 1 deletion Source/Shaders/PolylineShadowVolumeMorphFS.glsl
Original file line number Diff line number Diff line change
@@ -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);