Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

SSDO

Discussion in 'Shaders' started by bugsbun, Aug 22, 2017.

  1. bugsbun

    bugsbun

    Joined:
    Jun 26, 2017
    Posts:
    27
    I was trying to understand SSDO .So far I know that the method is independent of the number of lights in the scene, but how does the method take into account the direction of lights in the scene currently being viewed? How is this possible in unity post process shader?

    In which texture does unity store the direction of light ? If it does...

    Thanks!
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,238
    I don't know of any implementations of SSDO for Unity that handle anything more than the ambient occlusion and color bleeding aspects. Plausibly the main directional light's direction could be used, but in the paper it really only helped when also using the dual rendering which I don't think anyone has bothered to do in Unity.

    Some games have used something like SSDO to calculate bent normals in real time, and use those when doing light calculations. UE4 just added that in a recent update, but Crytek was doing this for Crysis 2.

    Is there a particular implementation of SSDO for Unity you're looking at, or are you just reading the original paper and trying to think of how to implement it in Unity?
     
  3. bugsbun

    bugsbun

    Joined:
    Jun 26, 2017
    Posts:
    27
    I have not seen any implementation of SSDO in unity. I was reading the paper and trying to figure out a way to do it in Unity . Can you point me to one ?
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,238
    There are YouTube videos of it, and I know of a few people who have attempted to do it, but none have released publicly that I know of. Some of the ideas from SSDO show up in other AO assets as color bleed features.
     
  5. bugsbun

    bugsbun

    Joined:
    Jun 26, 2017
    Posts:
    27
    Dual rendering ?
     
  6. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,238
    I believe it's referred to as multi-view in the original paper.


    I've seen some people implement something similar with just two views as an optimization in academic papers, but still essentially unusable for real games. Plausibly this could be used for VR ...
     
  7. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,238
    So the big thing with SSDO has always been that light bleeding, and that doesn't need any knowledge of the lighting direction. All that needs is the post lit buffer in addition surface normals / depth most other SSAO techniques use. If you can implement SSAO, you'd use the occlusion sample locations to also sample from the lit buffer and use that as the occlusion "color" instead of just black.
     
  8. bugsbun

    bugsbun

    Joined:
    Jun 26, 2017
    Posts:
    27
    Yes but thIS paper takes into account only the image space data, that is why the overhead is very small as compared to SSAO