Jump to content
  • Advertisement
Sign in to follow this  

Setting the near plane in an infinite frustum.

This topic is 4845 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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!