Search Unity

Horizon Based Ambient Occlusion - HBAO image effect

Discussion in 'Assets and Asset Store' started by jimmikaelkael, Feb 21, 2016.

  1. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    I'm sorry dude but I had to give HBAO the review that i thought it deserved.

    5 Stars :D

    First one I've ever given, so thanks so much for the work you're doing and the support you've been giving for your product. People notice and they do appreciate it.
     
    turboscalpeur and jimmikaelkael like this.
  2. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    Many thanks for your review @DivergenceOnline, this is much appreciated! ;)

    I will upload update 1.4.3 tonight or tomorrow, and even though it's not widely used this update will allow to keep a correct AO when using orthographic camera. I know at least one studio who is already using it on production game on steam and I'm sure other customers may appreciate this functionality.

    Deinterleaved texturing (also called cache aware HBAO) will may appear after that, but from what I've tested I have to say it will not perform as fast as I tought it could.
    Basically you will trade higher drawcalls count vs GPU cache efficiency, but it seems it's detrimental for lower resolutions speaking of performances. True benefit using this technique will be noticeable with higher res from 1080p to 4K.
     
    Last edited: Jun 12, 2016
    turboscalpeur and Noisecrime like this.
  3. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,018
    Hey @jimmikaelkael. I am really digging the HBAO asset a lot especially on scenes that make highly detail geometry really pop. Now that we fixed the Alloy Skin Shader issue, I have come up on another strange issue... and this time it involves the use of Alloy's Forward Transmission shader...

    When I turn off HBAO, the transmission shader behaves as such...
    No-HBAO.png

    With HBAO on you can see the shoji screens right into the house... could it be something else? It looks fine in the scene view...

    Depth-Problem.png
     
  4. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    Do you continue to see AO thought it if you turn back per pixel normals to GBuffer ?
    If this fixes the shoji see-throught problem I might have to find another fix for the skin shader.
     
  5. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,018
    The Per Pixel Normals is set to camera... with GBuffer, it affects both the skin shader and the transmission shaders.
     
  6. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    I will investigate these issues with Alloy on this weekend, and get back to you.
     
  7. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,018
    These seem to only affect the forward variants...
     
  8. Derek_Knochel

    Derek_Knochel

    Joined:
    Jun 1, 2016
    Posts:
    8
    Has anyone tried this asset in VR with single pass stereo? Unity's own ssao solutions don't work reliably.
     
  9. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,363
    Has this been tested in VR with the SteamVR SDK? In 5.3.5 and 5.4, with or without The Lab renderer
     
  10. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    I know some people are using it with VR, but I'm really not sure about SteamVR SDK. Sorry...
     
  11. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    HBAO v1.4.3 has been submited for review.

    Changelog:
    • Improved overall performances
    • Added support for orthographic camera projection

    And there's more to come, stay tuned!
     
  12. AlteredPlanet

    AlteredPlanet

    Joined:
    Aug 12, 2013
    Posts:
    455
    Hello I just had a issue where the HBAO does not show in editor nor in the game
     
  13. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    I've just replied to your private message ;)
     
  14. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    For those interested, I added a link to a watermarked trial package on the 1st post :)
    I'm pasting it here as well: HBAO trial package
     
    ZJP likes this.
  15. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    HBAO v1.5 has been released.

    Changelog:
    • Added deinterleaving which gives performances gain for large radiuses and HD/UltraHD resolutions
    • Fixed luminance influence not handled correctly in debug views
     
  16. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    Here's what coming up for the next update :)

    litHBAO.png

    Fully PBR lit AO. This functionality will require Unity >= 5.2 and Deferred rendering.

    In fact I'm adding rendering pipeline integration (Command Buffers) with an option to choose the stage at which it is integrated:
    • Before Reflections (Deferred, PBR lit AO, reserved to Unity >= 5.2)
    • After Lighting (Deferred)
    • Before Image Effect Opaque (Deferred and Forward, normal Post FX mode)
    Stay tuned!
     
    turboscalpeur, KRGraphics and gurayg like this.
  17. layola

    layola

    Joined:
    Aug 6, 2013
    Posts:
    94
    Is this greate plugin support mobile devices? android/ios?
     
  18. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    While I know it works on mobile, honestly HBAO as most SSAO targets mid to high-end hardware. The perf cost can be huge on mobile.
     
  19. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,018
    This is
    This is LOVELY... I am hoping this fixes my current issue that I have been dealing with lately... about to play with this
     
    jimmikaelkael likes this.
  20. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,018
    Also, the new update seems to conflict with Scion... I got an error when I installed the latest update...

    Assets/Horizon Based Ambient Occlusion/Demo/Scripts/HBAOControl.cs(10,26): error CS1061: Type `HBAO' does not contain a definition for `showType' and no extension method `showType' of type `HBAO' could be found (are you missing a using directive or an assembly reference?)
     
  21. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    The HBAOControl.cs has been updated to match the new code.
    As it often happens, the update process breaks things. I suggest you to first delete the HBAO folder completely then reimport the latest version.

    If it is installed correctly, I doubt it will conflict with Scion ;).
     
  22. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    nxrighthere likes this.
  23. v16Studios

    v16Studios

    Joined:
    Mar 1, 2013
    Posts:
    9
    Hi!

    For those of you who have been asking if this solution works in VR, I can happily say it does, and looks great! :) However, you will need to make a small tweak to the vertex shaders to get it working properly in Unity 5.4's single-pass stereo rendering mode; you will need to add these two lines below the Sampler2D _MainTex and _HBAOTex declarations located in the HBAO.shader file:

    Code (csharp):
    1. float4 _MainTex_ST;
    2. float4 _HBAOTex_ST;
    And also modify the three vertex shaders (vert, vert_mesh and vert_atlas) as follows, change:

    Code (csharp):
    1. o.uv = v.texcoord.xy;
    2. o.uv2 = v.texcoord.xy;
    to:

    Code (csharp):
    1. o.uv = TRANSFORM_TEX(v.texcoord, _MainTex).xy;
    2. o.uv2 = TRANSFORM_TEX(v.texcoord, _HBAOTex).xy;
    (but omitting the .xy on the end in the vert_mesh shader).

    Finally, we found that for the best results you need to make sure the Per Pixel Normals are set to Reconstruct.

    Hope that helps :)
     
    buttmatrix and jimmikaelkael like this.
  24. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    I've sent 1.7 update for review, with the following changelog:
    • Added downsampled blur setting
    • Added quarter resolution setting
    • Improved samples distribution (Mersenne Twister)
    • Fixed black line artifacts in half resolution AO using reconstructed normals
    • Fixed SV_Target semantics to the proper case
    • Fixed ambiguous lerp in HBAO fragment
    Stay tuned!
     
    ksam2 likes this.
  25. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,059
    Cool. thanks.
     
  26. pragmascript

    pragmascript

    Joined:
    Dec 31, 2010
    Posts:
    90
    Hello,

    we were doing some performance tests using the version 1.7 of HBAO+ and we got numbers that were not quite consistent with other numbers reported in this thread, and we are trying to figure out why.

    Our windows test system is running with a resolution of 1920*1080 on a GTX 660 with the following HBAO settings:
    settings_hbao.png

    we get about 7ms on the GPU:

    profiler_hbao.png
    This seems extremely high considering other numbers reported here. We tested both on 5.3 and 5.4.
     
    Last edited: Jul 27, 2016
  27. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    Hi,

    Well you can't compare the numbers directly... This is only useful when comparing one SSAO solution to another one with the same hardware and the same resolution.
    The timings are depending on screen resolution, hardware, etc...

    The first thing I can notice on your screenshots is that you are running the highest quality which is the heavier setting + a extra wide blur which is a non sense with highest quality, and on top of that you are using color bleeding which require additional sampling.

    To sum up, with your current configuration you are in the worst case scenario concerning performances.

    The "low quality" preset already yields very good visual results.

    I can suggest the following:
    - disable the color bleeding
    - try medium or low quality preset
    - try 2x deinterleaving if you're using a res of 1080p
     
  28. pragmascript

    pragmascript

    Joined:
    Dec 31, 2010
    Posts:
    90
    Thanks we will try that.
     
  29. benrubey

    benrubey

    Joined:
    Jul 27, 2016
    Posts:
    1
    Hello,

    I am using your HBAO on an iPad Air 2 and getting fantastic frames and resulting AO. My problem is stemming from the fact that when I try to use 2 cameras, with the topmost camera set to 'Depth Only' on clear flags, my second camera does not render. This results in an exposed depth buffer. Does HBAO only support a single camera? I see that you have added support for orthographic camera projection, though I am not sure this is what I am looking for. My end goal is to be able to have a static image behind my changing scene. I am able to get the desired effect in the editor, but when deploying to iOS, the effect fails and the depth buffer is exposed.
    Screen Shot 2016-07-27 at 3.20.31 PM.png Screen Shot 2016-07-27 at 3.15.40 PM.png
    Green background is editor, black is iOS device.
     
  30. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    I'm really not sure it's HBAO fault there, however I think I may have a workaround. I'm switching to private conversation.
     
  31. MintX

    MintX

    Joined:
    Jun 12, 2014
    Posts:
    2
    Hello,

    I have same problem with my custom shader (based on unity's surface shader.) for character rendering.

    What was the problem? and how to fix it?

    Is there some instruction for a custom shader working together?

    I have only in defered rendering mode. Forward rendering does not cause that problem.

    Waiting for reply. Thanks!
     
  32. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    Sure, the above problem is fixed using the following script, that needs to be attached to the camera with lower depth.
     

    Attached Files:

  33. MintX

    MintX

    Joined:
    Jun 12, 2014
    Posts:
    2
    I'm sorry. This script makes Game Window black.
     
  34. kakakak

    kakakak

    Joined:
    Dec 18, 2014
    Posts:
    4
    Im receiving this error message and dont know what to do?

    HBAO shader is not supported on this platform.
    UnityEngine.Debug:LogWarning(Object)
    HBAO:OnEnable() (at Assets/Plugins/Horizon Based Ambient Occlusion/Scripts/HBAO.cs:390)
    UnityEditor.DockArea:OnGUI()
     
  35. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    Which platform are you on ?

    If you go in the "Horizon Based Ambient Occlusion/Shaders" folder and select HBAO.shader are there error in the inspector ?
     
  36. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    460
    This HBAO is cool but I'm not happy with performance. it reduce my frames rate from 60 to 50, also I have to mention there isn't any frames drop when I play game on editor but after building the game I lose 10 frames.
     
  37. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    Hi, there's no reason you can't find a sweet spot for performances, you get one of the fastest SSAO solution available!

    Well HBAO is a screen space image effect, meaning that performance is dependent on screen resolution, not scene complexity. You need to do your tests in the editor at the same target resolution you use in the build.
    In the build, HBAO is generally faster than in the editor.

    I can suggest that you try 2x deinterleaving (if you build for PC platform), or lower quality preset and see the difference. If you are in Deferred use GBuffer per pixel normals (avoid Reconstruct when you can as it is heavier).
    You can check your radius, higher radii cost more if you're not using deinterleaving, and Color Bleeding feature costs additional scene sampling.
     
  38. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Probably a noob question, but is there any way to have this effect not apply to certain layers/objects? We use cloth objects and this is causing some interesting looking effects on them.
     
  39. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    As this is a screen space effect it's not aware of your objects and materials, so there's no easy way to do this.
    One trick is to play with your materials render queue, but depending on your object complexity this can be a lot of hassle...
     
  40. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    That was my concern. The killer is on skinned meshes. Even with tessellation and other tricks it ends up putting these huge AO shadows on the mesh that we can't seem to mitigate. I was hoping for some way to cut them down a bit as it really makes the cloth and skinned meshes that are in motion look blocky.
     
  41. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,096
    Well, Web Player is being deprecated, so it may not be an issue for very long.
     
    jimmikaelkael likes this.
  42. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,096
    @jimmikaelkael I just downloaded the trial version and stuck it into a terain sandbox project in Unity 5.4. That is just about as easy to install and set up as a package can possibly be! I was concerned about whether this would work well on my hardware targets -- thanks for providing the trial so I can pretest that before buying.

    One quick question: If I want to allow the user some runtime control options in their preferences, simply to enable or disable HBAO on their hardware, is my task really just a matter of enabling or disabling the HBAO component on the main camera from C#? (For now, I'm not anticipating a need for more specific user control than just on/off depending on the speed of their system and whether they value visual fidelity or performance more.)

    By the way, thanks for keeping the directory tree nice and clean. This makes me much more comfortable trying the trial in a real project next, because I know I can remove it if I buy the full version or decide not to use it.
     
  43. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,096
    @jimmikaelkael I imported the trial into my materials and lighting test scene, and tested various settings on the Standard Assets FPS camera rig.

    Overall, the results were excellent, and I'm buying the asset right after I finish this post. I did find a small bug (?), but I also found an easy workaround and so it hasn't changed my decision. :)

    Here is my more detailed feedback based on the trial package. My setup is Unity 5.4.0f3 on a Macbook Pro Retina. The materials in my scene use a combination of Standard Shader (from Unity) and UBER Shader (purchased asset), and the textures in this scene are mostly created procedurally from Substance Designer 5.5 and use metallic setup. My scene is an interior with forward rendering and mixed lighting (although the objects in my linked images are all realtime rather than baked lighting).
    • There was, as expected, a slight FPS drop if I set HBAO on its highest quality levels. But going to half resolution and from "highest" to "high" resolution levels brought my FPS measurement so close to the original as to be statistically insignificant. I would expect an outdoor scene with trees and grass -- a lot more edges to process -- would probably hit my FPS harder, but that's not an issue for this project.
    • I found one fairly significant visual issue if I used G Buffer for Per Pixel Normals:
      Screen Shot 2016-09-08 at 16.55.35 .png
      That wall should be opaque. It's built in ProBuilder and uses the Unity Standard Shader in Opaque mode. I believe there is no normal map applied. The workaround is simply to change the Per Pixel Normals setting to Camera, and it works fine:
      Screen Shot 2016-09-08 at 16.56.16 .png
      I did not observe this problem with any surfaces other than the ones from ProBuilder's built-in prototype texture, and I am guessing the issue has to do with that texture's lack of any normal map (it's flat and doesn't need one). As a bonus, for whatever reason Camera mode seems to be slightly faster in my scene.
    • I observed no problems whatsoever with my Substance materials nor with UBER shaders. In fact, there was one really cool bonus from UBER. I have a ventilation grille that is made with a Substance material that emits an extrusion map in addition to the other maps, and I'm using an UBER shader that supports parallax occlusion mapping (POM) and extrusion. I was pleased to see that HBAO is aware of the extruded depth, and generated ambient occlusion near it:
      Screen Shot 2016-09-08 at 17.16.12 .png

      Please don't laugh at the imperfection of the object itself -- this is an early prototype and very much a WIP. Also, I haven't applied anti-aliasing at all here. But I think it's seriously cool that HBAO detects the extruded pixels and generates AO around them. My Substance material ends at the mechanical boundary of the grille, and without SSAO I would have had to make Substance emit an alpha-cut texture larger than the object so I could extend its AO map outward.
    • After further testing, I found that an ordinary height mapped object such as an electrical receptacle plate also triggers a very nice AO aura in HBAO. I couldn't get that to work in the Unity Standard Shader (though admittedly I didn't spend a lot of time on it), but it works great with the UBER core shader in Cutout rendering mode (using the albedo alpha channel to bound the object).
    • I found that it's really, really easy to overdo the intensity setting in an interior, but that I always needed to max out the radius settings. I found in my scene that an intensity of around 0.5 to 0.7 and radius maxed at 2.0 looked the most visually convincing, no matter what I did with the other settings. Interior corners of painted walls with a "paint roller" microtexture look amazing with HBAO. But, for what it's worth, I really would have liked to see the max radius allow something like 3.0 or maybe even 4.0 as its max limit. If nobody really uses extreme intensity levels, it might be worth lowering the max value of that slider to make adjustment easier at the low end without having to type the value.
    • I found that I can get away with lower "quality" settings if I add some blur, but it's a bit of a tossup whether I get better FPS with lower quality and blur on, or higher quality and blur off. Either option looks good, though.
    • The color bleed feature is subtle (which is good) and really interesting. I can't decide if I like it in my project or not, because it somewhat competes with the AO at the places where walls meet floor (my room is brightly lit). But even if I decide not to use it, I'm glad the feature is there and is available as a choice.
    The visualization modes (split screen) are very useful.

    I'm very pleased with what I'm seeing in my interior scene. With only a few minutes of effort, my visuals really popped to a whole new level. Considering I am mostly a programmer by background, not a graphic artist or rendering wizard, that's a pretty good commentary on HBAO's utility. Nice work...SOLD!
     
    Last edited: Sep 8, 2016
  44. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    Hi syscrusher,
    Well glad you found it useful, that's the goal of this trial package :)

    Yes, disabling the HBAO component is exactly the way to go.
    You could too plan to let user choose the HBAO quality:
    Code (csharp):
    1.  
    2. m_HBAO.ApplyPreset(HBAO.Preset.FastPerformance);
    3.  
    And if you want to customize the presets it's just a matter of marking the ApplyPreset method as virtual and overriding it in your own script that extend HBAO class. Full source code come with the package so you can see how ApplyPreset method work but overall its really easy.

    Thank you, I tried my best to keep it well organized.
     
    Last edited: Sep 9, 2016
    syscrusher likes this.
  45. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    Sure if there's more edges in the depth buffer the HBAO will spend a bit more time on calculation, but overall the performances of any SSAO solution are tied to screen resolution rather than scene geometry complexity.

    That's a common bug with forward rendered materials... Are you sure the ProBuilder material shader is Standard Opaque ?
    The next release I'm planning (integration into the rendering pipeline) will prevent such annoyance but I'm awaiting Unity fixes a bug on their side preventing command buffer to work properly with scene colors (https://issuetracker.unity3d.com/is...ncies-with-commandbuffer-in-forward-rendering and a vote on the issue is welcome :))

    Yes, as soon as depth buffer is aware of the geometry HBAO will be too as every SSAO solution relies on depth buffer.

    That's a common mistake to overdo SSAO... This post effect is meant to be subtle and should never be overdone.
    If you need to increase the HBAO radius bounds you can modify line 137 of the HBAO.cs script to:
    Code (csharp):
    1.  
    2. [Space(6), Range(0, 4)]
    3.  
    However, you should be aware that it can have a huge impact on your performances unless you are using deinterleaving. With deinterleaving enabled in the general AO settings the radius has no longer any impact on performances, but you will trade some drawcalls against performances. Deinterleaving is great to handle HD resolutions.
    On smaller resolutions, the deinterlaving has no benefit and can have a bad impact on performances. I can suggest 2x deinterleaving up to 1600x900 and 4x deinterleaving from 1080p and up.

    Yeah, the effect is very versatile, you will better notice a difference between qualities with high frequency details textures.

    Color bleeding can have a huge impact on performances as it requires to sample the scene colors. It's up to you to choose ;)
     
    syscrusher likes this.
  46. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    382
    Hey Michael,

    It seems that I can't run it on GTX 980 Maxwell Architecture. I am running Standalone, deferred rendering with the Demo scene, but getting "HBAO shader is not supported on this platform" when I try to enable the script on the camera during the Play mode. Doesn't work for me in Forward either. Running the editor in Windows10 x64, So the monobehavior is not turning on and throws this warning when I try to enable it (the "enabled" tick never appears). :(
    It also doesn't run when I switch the build settings for IOS.

    Tried changing the dragon's shader from Standard to Diffuse, but no luck

    Any way around it?
     

    Attached Files:

    Last edited: Sep 9, 2016
  47. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    382
    Tried to disable in PlayerSettings Auto Graphics API for Windows, and dragged "Direct3D9" above "Direct3D11" (With build settings targeted at windows standalone), but didn't fix the issue for me. Tried running unity.exe-force-opengl, but still not working.
    When starting unity, it fires up a few messages. Also when I re-size or click in the Game window, it throws "Invalid Pass" errors. Maybe there is an extention in shader code which Maxwell can't handle?
     

    Attached Files:

    Last edited: Sep 9, 2016
  48. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,096
    Thanks for the reply. I'm finding that in my project I need customized settings, as none of the presets yield as good a result as what I can get by hand-tuning. That's okay...I don't mind. :)

    If extending your class is the best way to provide runtime custom settings options to the player, perhaps it's worth making that method virtual in your next release so others can override it? I don't mind extending classes, and do it all the time (that's what OO is for...), but I really hate patching the upstream code for an actively-maintained asset.
     
  49. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,096
    The edges was what I meant...I can't imaging anything with more edges than a field of grass and trees. :)

    Definitely. It defaults to that, and I checked it in my scene. As I said, no big deal as I've got a simple workaround for now. :)

    For the sake of brevity, I've refrained from quoting the rest of your reply, but rest assured I read it carefully and appreciated the level of detail. I will definitely refer back to that as I get further into tuning my graphics. Thanks!
     
  50. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    664
    Nope, it just can't find all of the cginc files, you have 2 solutions to fix the problem:
    - go to the 'Horizon Based Ambient Occlusion/Shaders' folder select every .cginc file, right click, reimport.
    - delete completly 'Horizon Based Ambient Occlusion' and reimport the full package.

    Most of the times this happens when the user moves the folders, Unity can't keep track on .cginc files unless you reimport it. Sorry for the annoyance.
     
unityunity