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 4 of 4

Thread: Some queries about... occlusion queries!

  1. #1
    Junior Member Regular Contributor
    Join Date
    Dec 2009
    Posts
    105

    Some queries about... occlusion queries!

    Most of the examples I can find of occlusion queries check the occlusion of each object each frame and then act on that the next to prevent stalling the pipeline (I can understand this; if you ask for the number of pixels you have to wait for the number to be generated) but when they are occluded, the object is replaced by its bounding box (with the colour and depth masks preventing rendering) and if any of that is visible the object is rendered.

    This, to me, presents a problem; if the object becomes occluded, but its bounding box (by nature, filling more volume) is not, does this not mean that it will become visible and invisible every frame as it is made visible, occluded, invisible, bounding box not occluded, made visible, occluded, invisible, bounding box not occluded, and so on, which would lead to an uneven and unstable framerate?

  2. #2
    Member Regular Contributor DmitryM's Avatar
    Join Date
    Mar 2009
    Location
    Toronto
    Posts
    436

    Re: Some queries about... occlusion queries!

    I see your point. Yes, as far as I see, it can lead to *a bit* unstable framerate.

    How many objects in a scene would go in this 'unstable' group? No need to panic if the number is small (5-10%).

  3. #3
    Junior Member Regular Contributor
    Join Date
    Dec 2009
    Posts
    105

    Re: Some queries about... occlusion queries!

    So the issue is real and there's no solution to it? 5-10% IS quite a lot, especially if you don't have spare fillrate, and it would create a jerk on every second frame that would create the impression of a lower overall framerate.

  4. #4
    Senior Member OpenGL Pro Ilian Dinev's Avatar
    Join Date
    Jan 2008
    Location
    Watford, UK
    Posts
    1,262

    Re: Some queries about... occlusion queries!

    vsync or bust.
    5-10% is not a lot, when users disable vsync. Low-end users are used to spikes between 10 and 80fps, highend users are used to spikes between 80 and 300 fps.

    It's absolutely impossible to make each frame render exactly as quickly as the others, when the camera moves. Camera looks up: 10 objects, camera looks forward: 4000 objects.
    Even if you're coding for a set-in-stone platform (console), you plan the headroom, and via a play-through performance test check whether parts of the scene need to be simplified to meet the vsync.

Posting Permissions

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