Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c151117

Browse files
author
Omar Shehata
committedNov 2, 2019
Fix double globe when lighting is enabled
In #8318 we added a multiplication by czm_pixelRatio in metersPerPixel.glsl. This caused a second globe to render at half the size when globe lighting was enabled. This fixes it by dividing back by that value.
1 parent dceac54 commit c151117

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎Source/Shaders/GlobeFS.glsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ void main()
376376
}
377377

378378
#if defined(PER_FRAGMENT_GROUND_ATMOSPHERE) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))
379-
float mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0));
379+
float mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0)) / czm_pixelRatio;
380380
vec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);
381381
xy *= czm_viewport.zw * mpp * 0.5;
382382

0 commit comments

Comments
 (0)
Please sign in to comment.