Skip to content

Commit 1f001d8

Browse files
committed
VIX-3830 Restore projection depth logic
VIX-3830 Restore projection depth logic
1 parent afba8ab commit 1f001d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Vixen.Application/SetupDisplay/OpenGL/OpenGLSetupPreviewDrawingEngine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,7 @@ private Vector3 Unproject(float screenX, float screenY, float depth, Matrix4 vie
12821282

12831283
// 2. Map Depth (0 to 1) to NDC (-1 to 1)
12841284
// This is the missing piece in your second method!
1285-
float ndcZ = depth; //(depth * 2.0f) - 1.0f;
1285+
float ndcZ = (depth * 2.0f) - 1.0f;
12861286

12871287
// 3. Transform by Inverse View-Projection
12881288
Matrix4 invVP = Matrix4.Invert(view * proj);

0 commit comments

Comments
 (0)