Backface Rendering

Hello,

I write a Volume Renderer and want to implement Empty Space Leaping for a better performance. I have seperate my volume in several minivolumes where my visible parts are. Now I have many cubes and want to render the backfaces of the scene and in a second part I want to render the frontface of the scene.

For rendering the frontface you have to render it like a normal scene. (DepthFunc Lequal, DepthValue 1.0, Cullface Back)

My problem is when i try to render the backface, i don't get the result I want to see. My idea is to turn all the setting for frontface rendering (DepthFunc, DepthValue 0.0, Cullface Front). Is there any failure in my renderpipeline? Maybe a false order of the functions? Or is my idea for backface rendering false?

What I don't understand is that when I change the DepthFunc I have no change in de result of the image. At the moment I have no pictures to demonstrate the problem, but maybe somebody can help me. I try to get some screenshots.

I assume you are trying to do object order empty space skipping for multi pass ray casting. If that is the case, for the front face texture, you can just cull back faces of all cubes and render the scene. For the back face texture, you cull the front faces and render all of the cubes.

Have a look at this set of tutorials and the book realtime volume graphics which has a chapter on this.

Thank you for the help. I have the book Real Time Volume Graphics.
I've found the problem and my code is correct. During the initialization of FBO I have set the wrong DepthComponentent.

Know everything works well.

But there ist another problem. When I render the scene an look for example in positive x direction everthing renders with a good performance, but if I look in negative x direction the performance become very slow.
Is this a problem with the caching of the 3D texture? Or what could this problem be. I didn't found any explanation about this error in my literature.