OpenGL - SSAO (screen space ambient occlusion)

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ต.ค. 2024
  • Code samples derived from work by Joey de Vries, @joeydevries, author of learnopengl.com/
    All code samples, unless explicitly stated otherwise, are licensed under the terms of the CC BY-NC 4.0 license as published by Creative Commons, either version 4 of the License, or (at your option) any later version.

ความคิดเห็น • 27

  • @Vagelis_Prokopiou
    @Vagelis_Prokopiou 5 ปีที่แล้ว +3

    Thanks Brian. Excellent 👌

  • @ja100o
    @ja100o 3 ปีที่แล้ว +18

    9:03 I´m currently replaying Far Cry 3 and I noticed that outline around characters and objects. Now I know why it´s there. Thank you very much!

    • @chofthch
      @chofthch ปีที่แล้ว +1

      im late but use hbao or hdao

    • @ja100o
      @ja100o ปีที่แล้ว

      @@chofthch thanks, I'll remember it for my next playthrough:D🫡

    • @chofthch
      @chofthch ปีที่แล้ว

      @@ja100o you are welcome

  • @SaintP0int
    @SaintP0int 5 ปีที่แล้ว +1

    Thanks! I came here only looking for general idea of SSAO, and diagram helped me a lot!

  • @LochNessHamster
    @LochNessHamster 2 ปีที่แล้ว +2

    Ambient occlusion is like the drop shadow of 3D lighting.

  • @JstaChillGuy
    @JstaChillGuy 5 ปีที่แล้ว +16

    I'm glad I could find a video explaining what exactly SSAO is and what it does and what the difference in with and without it is/looks like.
    (I had to know for in-game graphics settings if I need/want it)
    Thumbs up.
    PS: Nice voice btw.

  • @lisyarus
    @lisyarus 4 ปีที่แล้ว +2

    Your way of generating a random vector inside a hemisphere doesn't produce a uniform distribution, since the probability around the four "corners" (±1, ±1, 1) is higher than in other areas. A better way would be to use rejection sampling: instead of normalizing the vector & making a random length, just check if it is inside the hemisphere, otherwise generate a new vector, and so on. This way, the distribution would be uniform.

    • @abyssaldision5134
      @abyssaldision5134 ปีที่แล้ว

      He's using accelerated lerp, so the majority of the samples end up around the origin (i.e., 0, 0, 0 not 1, 1, 1), thats what you want you don't want them evenly distributed inside the hemisphere.

  • @angieouchakova9107
    @angieouchakova9107 4 ปีที่แล้ว +3

    great explanation, thanks!

  • @walidyider7766
    @walidyider7766 5 หลายเดือนก่อน

    THANKK YOUUU SO MUUUCH

  • @jeroen3648
    @jeroen3648 3 ปีที่แล้ว +1

    Thank you for this clear explaination :>

  • @xr.spedtech
    @xr.spedtech 11 หลายเดือนก่อน

    You have a nice voice ...
    I put the "OOP is bad" video on speaker ...
    Best one for kicker speakers ....

  • @AssassinGrudge
    @AssassinGrudge 5 ปีที่แล้ว +1

    wait ao is the number of samples that are occluded from point of view ?

  • @CodeParticles
    @CodeParticles 2 ปีที่แล้ว

    @Brian Will, I apologize for commenting 3 years so late, but is it possible to do a follow up on the improved SSAO called HBAO+? (Horizontal Based Ambient Occlusion? I read this on Nvidia papers, and they confirmed its better than SSAO in every way and even 3x more efficient?

  • @staticminds2715
    @staticminds2715 4 ปีที่แล้ว

    hey can you make some reshade filters ????? that do this

  • @raghul1208
    @raghul1208 2 ปีที่แล้ว

    nice playlist

  • @dmitrykolesnikovich
    @dmitrykolesnikovich 4 ปีที่แล้ว

    Thank you so much for this video

  • @pelecyphora1
    @pelecyphora1 4 ปีที่แล้ว

    A g8t explanation

  • @187onaPigeon
    @187onaPigeon 4 ปีที่แล้ว

    I am trying some OpenGL for the firsf time and 2 days ago 95% of this code would have been very confusing. I will try this later for sure. Thanks!

  • @veggiet2009
    @veggiet2009 2 ปีที่แล้ว

    Ambient occlusion is a good approximation for situations where direct illumination is not present. But then in the real world nothing really distinguishes an "emitted" light ray from a "reflected" light ray. But where a strong light is not present and where textures are less reflective, the lights get bounced in multiple directions the more light that gets sent in multiple directions either through diffuse reflection, or refraction, the more that light will appear like what we think of as "ambient" lighting

    • @syntaxed2
      @syntaxed2 7 หลายเดือนก่อน +1

      There are no light "rays" in nature...just photons.
      Photons are particles, and particles are quantum objects - a quanta of a vibration in the electromagnetic field.
      They have wave-duality, meaning they are both particles and waves at the same time.
      They may also be entangled to other stuff.
      They dont bounce but rather get entangled to matter particles in varying degrees.
      We cant simulate any of this.

  • @dmitry6123
    @dmitry6123 5 ปีที่แล้ว +1

    Just two words: CACHE EFFICIENCY. Not a good idea to use whole gbuffer for random texture reads. Use 16bit depth buffer (reduced at least in half ) and restore position in any space you want. It would have much better performance. Just saying.

  • @robloxfan4271
    @robloxfan4271 ปีที่แล้ว

    Looks hardy any diffrent

  • @dmitrykolesnikovich
    @dmitrykolesnikovich 4 ปีที่แล้ว

    Are two pictures on right real? I mean last ten seconds of video