Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

benjamin bunny

P-buffers and shadow mapping with FSAA

This topic is 5281 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''m using an ATi 9700 Pro to do shadow mapping. I''ve done this before, but never with FSAA enabled. The problem is with reading the depth depth buffer to use as the shadow map. To start with I tried using glCopyTexSubImage to read the values from the depth buffer. With FSAA enabled in the application, the frame rate dropped from 400 to 7 frames per second, without FSAA, the performance decrease was pretty minimal. This is presumably because the z buffer is setup for multisampling and needs to be converted before copying. The only solution, short of disabling FSAA, seems to be to use a p-buffer and glCopyTexSubImage (ATi doesn''t support NV_render_to_depth_texture). To do this, I''m sharing the textures between the pbuffer and main window contexts with wglShareLists. This seems to work fine for the colour buffer, but when I try to read the depth values, even though the pbuffer isn''t multisampled, I again take a huge performance hit. Also, if I use anything other than a 32 bit z buffer for the p-buffer, the depth buffer for the pbuffer seems to be nonexistant. It''s all very strange. Has anyone ever done this before, and if so, what was the best solution? I''m also a bit confused about the behaviour of wglShareLists. It seems to have been extended beyond the original spec. The MSDN docs say it''s used only to share display lists, whereas I''m using it to share VBOs and textures as well, and it seems to be working (this is inline with a nVIDIA paper I read). The docs do warn that the pixel format has to be same for both RCs, so maybe this is my problem, one has FSAA, whereas the other doesn''t.

Share this post


Link to post
Share on other sites
Advertisement
Actually, it looks like my p-buffer depth buffer isn''t working at all. I wasn''t getting a 32-bit z buffered p-buffer at all, it was just using the back buffer.

Share this post


Link to post
Share on other sites

  • 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!