Skip to content

Commit

Permalink
compress
Browse files Browse the repository at this point in the history
  • Loading branch information
MEEPofFaith committed Nov 21, 2024
1 parent 25a1bd4 commit e9d7e4d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/progressed/graphics/draw3d/Perspective.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,7 @@ public static Vec3 scaleToViewport(float x, float y, float z){
y -= cy;
float zz = cameraZ - z;

float vx = x / zz * viewportOffset, //Position scaled to near plane.
vy = y / zz * viewportOffset;
float vz = viewportZ();

return scalingPos.set(vx, vy, vz);
return scalingPos.set(x / zz * viewportOffset, y / zz * viewportOffset, viewportZ());
}

public static float dstToViewport(float x, float y, float z){
Expand Down

0 comments on commit e9d7e4d

Please sign in to comment.