Skip to content

Commit f387d5b

Browse files
authored
Merge pull request #533 from EarthyScience/jp/shader-fix
quickfix for sphere blocks
2 parents 73a1391 + 317be99 commit f387d5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/textures/shaders/sphereBlocksVert.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void main() {
7777
vec2 lonlat = giveLonLat(instanceUV);
7878
vec3 spherePosition = givePosition(lonlat);
7979
float latitudeFactor = cos(lonlat.y); // Maps -1..1 to proper latitude
80-
float widthFactor = abs(lonBounds.y-lonBounds.x)/PI;
80+
float widthFactor = abs(lonBounds.y-lonBounds.x)/(2.0*PI);
8181
float heightFactor = (dispStrength - displaceZero) * displacement;
8282
vec3 scaledPosition = position;
8383
scaledPosition.x *= latitudeFactor * widthFactor;

0 commit comments

Comments
 (0)