Jump to content
  • Advertisement
Sign in to follow this  

OpenGL Depth Peeling

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

Hi, I'm looking for a way to do voxelization using depth peeling in OpenGL, which basically uses two depth buffers, the steps are : 1. Render to depth buffer I (GL_LEQUAL) 2. Collect the depth data from depth buffer I on each pixel(that's z coordinate of the voxel). 3. Depth Buffer I is used for read only. Render again, but this time to Depth Buffer II (which is cleared beforehand), the passed pixels are the ones which depth values are greater than the corresponding pixels on Depth Buffer I and at the same time uses GL_LEQUAL comparison on the Depth Buffer II. 4. If there are new updates : 4a. Collect the depth data from depth buffer II from each pixel. 4b. Switch the role of Depth Buffer I and Depth Buffer II, returns to Step 3. else stops I'm thinking of using FBO, but it seems that I can only have one depth buffer at one time... Thanks.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!