Skip to content

Commit 64e17d3

Browse files
author
Jeshurun Hembd
committed
Fix latitude intersection for ellipsoid voxels
1 parent 25a085d commit 64e17d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/engine/Source/Shaders/Voxels/IntersectEllipsoid.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ float getLatitudeConeShift(in float sinLatitude) {
155155
// Find prime vertical radius of curvature:
156156
// the distance along the ellipsoid normal to the intersection with the z-axis
157157
float x2 = u_eccentricitySquared * sinLatitude * sinLatitude;
158-
float primeVerticalRadius = inversesqrt(1.0 - x2);
158+
float primeVerticalRadius = u_ellipsoidRadii.x * inversesqrt(1.0 - x2);
159159

160160
// Compute a shift from the origin to the intersection of the cone with the z-axis
161161
return primeVerticalRadius * u_eccentricitySquared * sinLatitude;

0 commit comments

Comments
 (0)