Jump to content
  • Advertisement
Sign in to follow this  

culling meshes across mulitple layers

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

I am implementing foveated rendering. My FBO is divided into 2 layers which are concentric. First layer covers 1/3 of Framebuffer whereas second one covers rest of the screen. Now I want to avoid to render meshes in outer layer which are already in inner layer. I have implemented following culling algorithm which is only concerned with culling between the layers:

  1. I create a rectangles with min and max corner from the radius of 2 layers. Now these coordinates are in NDC.
  2. I have min and max corner of each mesh in local coordinate system. so I transform them into NDC using:

    vec4 min=mvp * vec4(min_corner,1.0); min=min.xyzw/min.w;

  3. I create bounding box using min and max corners.

  4. Check whether 2 rectangles overlap or not.

Now, when I transform into clip space, the x or y coordinates of min are sometimes greater than max corner. Same issue occurs when I divide them by w. Whats going wrong here?

Share this post

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

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!