Opengl透视投影中,NearPlane距离可以通过FOV计算出来吗?

问题描述 投票:0回答:0

当 FOV 和距离一定时,FarPlane 的半径可以通过 tan 计算出来。众所周知最终的cramped值在-1到1之间,所以根据radius/1 = far_distance/near_distance,near_distance很容易得到。不 。我们甚至可以通过 1/tan 直接得到它。 那么为什么有必要在 glm::perspective 中提供近平面距离呢?如果输入的近平面距离小于或大于计算的技术距离怎么办?

c++ math opengl glm-math perspectivecamera
© www.soinside.com 2019 - 2024. All rights reserved.