Sign in to follow this  

Setting the near plane in an infinite frustum.

This topic is 4684 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

This topic is 4684 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this