• Advertisement
Sign in to follow this  

Setting the near plane in an infinite frustum.

This topic is 4752 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How can I move the near plane closer in an infinite frustum? I use these equations, but if I change the znear value, the FOV also changes, and however 1 is too far for near plane in my scene, cause things get close to the camera. fov:=45*pi/180; aspect:= 1.333; znear := 1; zfar := -1; top:=znear*tan(fov/2); bottom:=-top; left:=aspect*bottom; right:=aspect*top; proj[0,0]:=2*znear/(right-left); proj[1,1]:=2*znear/(top-bottom); proj[2,0]:=(right+left)/(right-left); proj[2,1]:=(top+bottom)/(top-bottom); proj[2,2]:=-(zfar+znear)/(zfar-znear); proj[2,3]:=-(2*zfar*znear)/(zfar-znear); proj[3,2]:=zfar;//ZFAR glMultMatrixf(@proj); Thanks!

Share this post


Link to post
Share on other sites
Advertisement
u cant have an infinite frustum u need valid near/far distances, see the faq at www.opengl.org

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement