Explorar o código

scale perspective top calc for near culing plane (#1309)

seanpringle %!s(int64=5) %!d(string=hai) anos
pai
achega
a9d676a5fd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/core.c

+ 1 - 1
src/core.c

@@ -1443,7 +1443,7 @@ void BeginMode3D(Camera3D camera)
     if (camera.type == CAMERA_PERSPECTIVE)
     {
         // Setup perspective projection
-        double top = 0.01*tan(camera.fovy*0.5*DEG2RAD);
+        double top = RL_CULL_DISTANCE_NEAR*tan(camera.fovy*0.5*DEG2RAD);
         double right = top*aspect;
 
         rlFrustum(-right, right, -top, top, RL_CULL_DISTANCE_NEAR, RL_CULL_DISTANCE_FAR);