Sign in to follow this  

culling meshes across mulitple layers

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

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