Skip to content

Commit 0c0307a

Browse files
author
Hannah
authored
Merge pull request #7924 from AnalyticalGraphicsInc/gamma-correct-fix
Gamma correction fix for polylines
2 parents 3828ad4 + 9c45a85 commit 0c0307a

4 files changed

+4
-3
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Change Log
66
##### Fixes :wrench:
77
* 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)
88
* Fixed a bug where billboards were not pickable when zoomed out completely in 2D View. [#7908](https://github.com/AnalyticalGraphicsInc/cesium/pull/7908)
9+
* Fixed polyline colors when `scene.highDynamicRange` is enabled. [#7924](https://github.com/AnalyticalGraphicsInc/cesium/pull/7924)
910
* 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)
1011

1112
### 1.58.1 - 2018-06-03

Source/Shaders/Appearances/PerInstanceFlatColorAppearanceFS.glsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ varying vec4 v_color;
22

33
void main()
44
{
5-
gl_FragColor = v_color;
5+
gl_FragColor = czm_gammaCorrect(v_color);
66
}

Source/Shaders/PolylineShadowVolumeFS.glsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void main(void)
6565
distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);
6666

6767
#ifdef PER_INSTANCE_COLOR
68-
gl_FragColor = v_color;
68+
gl_FragColor = czm_gammaCorrect(v_color);
6969
#else // PER_INSTANCE_COLOR
7070
// Clamp - distance to aligned planes may be negative due to mitering,
7171
// so fragment texture coordinate might be out-of-bounds.

Source/Shaders/PolylineShadowVolumeMorphFS.glsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void main(void)
2020
eyeCoordinate /= eyeCoordinate.w;
2121

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

0 commit comments

Comments
 (0)