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: SSAO edge cases, how to handle them?

  1. #1
    Intern Contributor
    Join Date
    Jun 2007
    Location
    Pittsburgh, Pa. USA
    Posts
    67

    SSAO edge cases, how to handle them?

    I have what I think is a pretty decent SSAO system setup, but I get some odd artifacts near the edges where the random samples are off of the pre-rendered depth/normal buffer. In this screen shot I merely reject those samples, but you can see that at times they are all of the samples available given that there are a limited number of samples being taken. Anyway, you can see that the occlusion goes away toward the screen edges.

    I was wondering if anyone had a better way of handling this? I also have tried clamping the samples and also if the screen x or y is negative, just negating it. All have had some rather unfortunate artifacts.

    Keith Z. Leonard
    Sword and Spirit, LLC.
    Schell Games, LLC.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Sep 2004
    Location
    Prombaatu
    Posts
    1,401

    Re: SSAO edge cases, how to handle them?

    Do you have a link to the technique you're using handy?

    Sight unseen I'd probably just render a slightly larger view of the scene then crop it to the viewport. Otherwise, looks like good old fashioned variance to me - if you're random sampling, that's to be expected.

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    748

    Re: SSAO edge cases, how to handle them?

    Have you tried using repeating or mirroring texture sampling.

  4. #4
    Junior Member Regular Contributor
    Join Date
    Jan 2004
    Location
    Czech Republic, EU
    Posts
    190

    Re: SSAO edge cases, how to handle them?

    What about rendering to a little larger texture and omitting the margins according to your kernel size?
    (usually just hobbyist) OpenGL driver developer

Posting Permissions

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