Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Image order volume rendering

Hybrid View

  1. #1
    Intern Newbie
    Join Date
    Jan 2004
    Location
    UK
    Posts
    46

    Image order volume rendering

    Hi,

    I've implemented several volume rendering algorithms and am currently trying to implement Kruger and Westermanns multiple pass approach on the GPU.

    I'm having trouble getting the early z test to work on GeForce 6 series.

    Is it possible to use the easrly z test with EXT_framebuffer_object with a shared depth buffer amonst several textures?

    //First pass
    Render front face of bounding box into a 2D texture (depth test Greater, clear 0)

    // second pass
    Render back face of bounding box into a 2D texture (depth test less, clear 1)
    (this pass calculates ray direction and length using the first rendering target)

    The result of rendering pass two is used in the rest of the algorithm which i have working apart from the early Z test. There is a main pass and an intermediate pass applied several times (to compute ray steps) the depth function is set before these passes to be Greater and 0

    This i have to work, however im wandering if rendering the same geometry and altering the depth test is somehow disabling early Z ?

    In the paper it suggests that depth function is always set to Greater.

    If this does disable the depth test, how can I alter the bounding box geometry to render the back faces instead of the front faces?

    Any help would be greatly appreciated!

  2. #2
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,609

    Re: Image order volume rendering

    This i have to work, however im wandering if rendering the same geometry and altering the depth test is somehow disabling early Z ?
    yes
    see the gpu_performance_guide.pdf section 3.6

    3.6.2.
    Double-Speed Z-Only and Stencil Rendering
    The GeForce FX, GeForce 6 Series, and GeForce 7 Series GPUs render at double speed when rendering only depth or stencil values. To enable this special rendering mode, you must follow the following rules:
    􀂉 Color writes are disabled
    􀂉 The active depth-stencil surface is not multisampled
    􀂉 Texkill has not been applied to any fragments
    􀂉 Depth replace (oDepth, texm3x2depth, texdepth) has not been applied to any fragments
    􀂉 Alpha test is disabled
    􀂉 No color key is used in any of the active textures
    􀂉 No user clip planes are enabled

    3.6.2.
    Early-Z Optimization
    Early-z optimization (sometimes called “z-cull”) improves performance by avoiding the rendering of occluded surfaces. If the occluded surfaces have
    expensive shaders applied to them, z-cull can save a large amount of computation time. To take advantage of z-cull, follow these guidelines:
    􀂉 Don’t create triangles with holes in them (that is, avoid alpha test or texkill)
    􀂉 Don’t modify depth (that is, allow the GPU to use the interpolated depth value)
    Violating these rules can invalidate the data the GPU uses for early optimization, and can disable z-cull until the depth buffer is cleared again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •