Depth Cube Maps horribly slow (ATI prob)

Started by
4 comments, last by RPTD 14 years, 6 months ago
So far I used depth encoded into a color cube map for point light shadow casting. In OGL 3.0 though you can use now samplerCubeShadow hence I want to step things up to depth cube maps in the hope of getting perhaps some HW PCF for free. Anyways when I render to depth cube maps the speed is horribly slow. For comparison: Depth encoded into color cube map: 109 fps Depth with depth cube map: 11 fps The card is an ATI Radeon HD 4750 and therefore supports depth cube maps. Are depth cube maps that slow or is something else wrong? Has somebody depth cube maps working with reasonable speed? Any ideas in this case what could cause troubles? [Edited by - RPTD on October 17, 2009 11:25:06 AM]

Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine

Advertisement
A little update to the problem. I tried the same code on an ATI and an nVidia machine. Looks like the ATI machine drops down to 10-20% of the speed if using a depth cube map while the nVidia machine seems to stick with the same speed. Is there something special you have to do to get ATI to not crumble in speed when using depth cube maps? Or is this just a driver problem you have no way of solving except using the depth-to-color hack?

It's just that with a color cube I don't know how to make soft shadows since you can not use PCF ( you can but the result is lackluster at best ) nor bilinear filtering in any way.

Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine

Quote:Original post by RPTD
A little update to the problem. I tried the same code on an ATI and an nVidia machine. Looks like the ATI machine drops down to 10-20% of the speed if using a depth cube map while the nVidia machine seems to stick with the same speed. Is there something special you have to do to get ATI to not crumble in speed when using depth cube maps? Or is this just a driver problem you have no way of solving except using the depth-to-color hack?
At < 20% speed, it sounds like you have triggered a software fallback. Have you made sure that the exact depth texture format you are using is supported natively?

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Not sure. I'll post the results my engine finds maybe somebody figures out a problem.

I do first in my engine a test run in which I try to create all sorts of cube maps testing which work and which fail. These are the results:
Quote:OpenGL > dm_capabilities fboTexCube_found
Found FBO Cube-Texture formats:
( various color formats... )
- GL_DEPTH_COMPONENT
- GL_DEPTH_COMPONENT16
- GL_DEPTH_COMPONENT24
- GL_DEPTH_COMPONENT32
- GL_DEPTH_STENCIL_EXT
- GL_DEPTH24_STENCIL8_EXT


From this list I pick the one I think is best. This would be like that:
Quote:OpenGL > dm_capabilities fboTexCube_use
Used FBO Cube-Texture formats:
( various color formats... )
- Depth: GL_DEPTH_COMPONENT
- Packed Depth/Stencil: GL_DEPTH_STENCIL_EXT


Hence my engine uses GL_DEPTH_COMPONENT on the ATI machine and also the nVidia machine. Should I use an explicit format instead?

Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine

Incidentally the 3.2 spec's a tad vague on whether you'll actually get PCF, depending on your sample filter...

The other question would be how to get soft shadows on a depth cube map ( or a depth-to-color cube map ) otherwise. I'm using already a sort of PCF hack in that I calculate two rotation matrices and using this as sort of u-step and v-step but this produces blocky shadows since the samples are not weighted. Since there's no pixel match on a cube map as with texture maps it would be a problem to make a shader based PCF version.

Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine

This topic is closed to new replies.

Advertisement