scale perspective top calc for near culing plane (#1309)
This commit is contained in:
parent
bf429a0058
commit
a9d676a5fd
1 changed files with 1 additions and 1 deletions
|
@ -1443,7 +1443,7 @@ void BeginMode3D(Camera3D camera)
|
||||||
if (camera.type == CAMERA_PERSPECTIVE)
|
if (camera.type == CAMERA_PERSPECTIVE)
|
||||||
{
|
{
|
||||||
// Setup perspective projection
|
// 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;
|
double right = top*aspect;
|
||||||
|
|
||||||
rlFrustum(-right, right, -top, top, RL_CULL_DISTANCE_NEAR, RL_CULL_DISTANCE_FAR);
|
rlFrustum(-right, right, -top, top, RL_CULL_DISTANCE_NEAR, RL_CULL_DISTANCE_FAR);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue