Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Horizon Based Ambient Occlusion - HBAO image effect

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

  1. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791

    ✔ Supports Unity 2023.x
    ✔ Supports Unity 2022.x

    ✔ Supports Unity 2021.x

    ✔ Supports Unity 2020.3+

    ✔ Supports URP and HDRP 10.3.2+
    ✔ Supports orthographic cameras
    ✔ Supports VR


    Horizon Based Ambient Occlusion
    (HBAO) is a post processing image effect to use in order to add realism to your scenes. It helps accentuating small surface details and reproduce light attenuation due to occlusion.

    HBAO delivers more accurate AO compared to the other SSAO solutions available on the asset store, and this without any compromise on performances.
    This algorithm is highly optimized to use minimal GPU time and offers the best quality to performance ratio. Asset contains color bleeding and temporal filtering features. Gaia extension ready.

    Compatibility:
    • Standard render pipeline, forward and deferred
    • Universal Render Pipeline 10.3.2+
    • High Definition Render Pipeline 10.3.2+

    The effect is scalable in order to achieve the proper performances. Source code included in the package.


    HBAO settings:




    Changelog

    3.5.5:

    • Fix for Unity 2023.3 (URP & HDRP, no RenderGraph support yet)

    3.5.4:
    • Fixed broken LitAO (URP)

    3.5.3:
    • Fixed right eye issue with Quest (Builtin)
    • Fixed editor warning (URP)

    3.5.2:
    • Fixed compatibility with Unity 2023.2 (all pipelines)

    3.5.1:

    • Fixed dynamic resolution artefacts (URP and Builtin)
    • Fixed blur uv delta incorrect in some cases
    • Fixed warnings

    3.5:

    • Standard pipeline: added VR SPI support
    • Standard pipeline: fix compile error when built-in VR module is disabled
    • Reduced number of shader variants (all pipelines)
    • URP/HDRP: fixed VR SPI projection issue
    • HDRP: fixed issue with R16G16B16A16 and R32G32B32A32 buffer formats

    3.4.12:
    • Standard pipeline: fixed composite bug with MSAA and transparent objects
    • HDRP: fix doubled properties in 2022.2

    3.4.11:

    • Fixed bleeding occlusion on screen edges

    3.4.10:

    • Fixed bug with orthographic projection
    • Reduced number of shader variants
    • URP: fixed wrong camera view normals on URP versions 10 and 11

    3.4.9:

    • HDRP: fixed AO shifting issue

    3.4.8:

    • HDRP: fixed VR SPI
    • URP: prevent color bleeding to be used along with LitAO mode
    • URP: warn about 2021.2+ required for motion vectors (temporal filter)

    3.4.7:
    • Fixed temporal filter issues on URP (use BufferedRTHandleSystem)
    • Fixed obsolete hasAdvancedMode field on HDRP
    • Added min/max range for multibounce setting on HDRP

    3.4.6:

    • Fixed temporal filtering ghosting issue on URP

    3.4.5:

    • Added rendering path option in URP to fix issues with LitAO+Deferred
    • Fixed scene rendered black in URP12 with LitAO and opaque texture enabled

    3.4.4:

    • Fixed temporal filtering issue when using camera normals on URP

    3.4.3:

    • Fixed wrong camera view normals on URP

    3.4.2:

    • Enable temporal filtering on URP (URP12+, Unity 2021.2+)

    3.4.1:

    • Fixed Deinterleaving per frame GC allocation on URP

    3.4:
    • Added LitAO on URP (requires URP 10.0.0 or newer)

    3.3.4:
    • Fixed VR Single Pass on URP

    3.3.3:

    • Fixed VR on Standard Render Pipeline

    3.3.2:

    • Added support for URP 12.0.0

    3.3.1:

    • Added support for upcoming URP 10.0.0 (support view normals)

    3.3:

    • Added VR support to Standard Render Pipeline HBAO

    3.2.1:

    • Added assembly definitions for editor scripts

    3.2:

    • Fixed colorbleeding white color bleed beyond max distance
    • Switched HBAO for URP to Post Process VolumeComponent

    3.1:

    • Added HDRP support
    • Added more settings helper methods
    • Added namespaces for each render pipelines variants
    • Use 16bit floating point texture format for noise when platform supports it
    • Fixed wrong albedoMultipier setter method

    3.0:

    • Rewritten scripts/shaders code for Unity 2019.1+
    • Added scene view effect
    • Added temporal filtering
    • Added interleaved gradient and spatial distribution noises
    • Added possibility to stack AO components (both Standard and Universal Render Pipeline)
    • Added UI for Universal Render Pipeline AO setting assets
    • Fixed wrong RenderTextureFormat for color bleeding
    • Fixed memory leaks
    • Improved number of compiled shader variants

    2.9:

    • Fixed URP version shader keywords problem resulting in blackscreen in builds
    • Fixed URP support on OpenGLES2 graphic API
    • Fixed PS4 compilation error
    • Fixed orthographic camera support on OpenGL, OpenGLES2 and OpenGLES3 graphic APIs
    • Fixed AO consistency on various resolutions (render scale, dynamic resolution)
    • Fixed incorrect view normals sampling at half resolution
    • Allowed use of local shader keywords instead of global keywords
    • Removed obsolete random noise, downsampled blur and quarter AO resolution

    2.8:

    • Added URP support 7.1.8+ (Unity 2019.3+)

    2.7.2:

    • Fixed deprecated editor API

    2.7.1:
    • Fixed obsolete scripting API
    • Added view normals debug display

    2.7:

    • Added multibounce approximation feature to replace older luminance influence setting
    • Improved AO intensity response
    • Improved blur
    • Fixed RGB colormask on composite passes

    2.6:

    • Fixed emission not cancelling AO in deferred occlusion
    • Added color bleeding emissive masking
    • Fixed VR Single Pass support in Unity 2017.2

    2.5:

    • Added offscreen samples contribution setting
    • Improved color bleeding performance

    2.4:

    • Added support for Single Pass Stereo Rendering

    2.3:

    • Fixed Camera.hdr obsolete warning in Unity 5.6
    • Fixed inconsistent line endings warning in HBAO.shader

    2.2:

    • HBAO_Integrated: adjusted to avoid any per frame GC allocation
    • Increased Max Radius Pixels limits to be compliant with 4K resolution
    • Prefixed radius Slider control variable type with namespace to avoid potential ambiguity

    2.1:

    • Fixed orthographic camera support with Deinterleaving in Unity 5.5+

    2.0:

    • Added a rendering pipeline integrated HBAO component (HBAO_Integrated.cs)
    • Fixed orthographic camera support in Unity 5.5+

    1.8:

    • Fixed bad rendering path detection in builds
    • Explicitely declared _NoiseTex as shader property

    1.7:
    • 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

    1.6:

    • Added Reconstruct as a per pixel normals option
    • Simplified a few lerps in HBAO shader
    • Removed sliders for max distance and falloff distance so as to remove bounds

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

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

    1.4.2:

    • Added per pixel normals setting (GBuffer or Camera)
    • Added Max Distance and Distance Falloff settings
    • Fixed AO step size, allowing to get more interesting contact occlusion
    • Moved initialization to OnEnable instead of Start
    • Avoid to modify GUI.Label style directly as to not mess up the stats window
    • Renamed "Show Type" setting to "Display Mode"

    1.4.1:
    • Fixed editor error while applying a preset in play mode

    1.4:
    • Added new user friendly UI & some presets
    • Fixed luminance influence not showing in AO only views
    • Fixed vanishing AO bug in while in editor

    1.3.4:

    • Integrate with Gaia as an extension

    1.3.3:
    • Added AO base color setting
    • Fixed leaked noise texture
    • Fixed demo scene

    1.3.2:
    • Fixed bad rendering path detection in unity editor with camera on "Use Player Settings"
    • Limit the maximum radius in pixels to address the close-up objects performance issue
    • Added an albedo contribution and multiplier for the color bleeding feature in deferred shading
    • Increased intensity upper bound (useful for dark environment)

    1.3.1:
    • Improved color bleeding performances
    • Fix NPE when adding the HBAO component to a camera for the 1st time

    1.3:
    • Improved performances
    • Improved compatibility (compiles on every platforms, targetting shader model 3.0)
    • Improved settings (there are less settings, but they are more user-friendly)

    1.2:
    • Added Color Beeding feature
    • Fixed artifacts on cutout materials in forward rendering

    1.1:
    • Optimized blur (packed ao and depth into 1 texture to reduce the number of textures to fetch, and outer half of the kernel doing in-between sampling)
    • Fixed blur sharpness
    • Added another noise type
     
    Last edited: Feb 19, 2024
  2. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    1.1 update is in pending review

    Changelog:
    - Optimized blur (packed ao and depth into 1 texture to reduce the number of textures to fetch, and outer half of the kernel doing in-between sampling)
    - Fixed blur sharpness
    - Added another noise type
     
  3. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    This looks very impressive! It looks like in your screenshots at the top, the performance cost for your HBAO as configured is actually less expensive than the Unity SSAO you configured while still being more accurate.

    Have you compared your solution against SESSAO and SSAO Pro, by chance? I know those are more optimized SSAO implementations vs stock Unity, so I'd be interested in seeing the performance vs quality comparison against your HBAO with either of those assets.
     
  4. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Thank you!
    It all depends how you set it up... As you can see on HBAO settings you can push up sample directions and steps: pushing these to the max will give very accurate AO but there's a lot of chance you're ruining your performances in this case.

    But yeah, with proper settings, you get better AO than with Unity SSAO with slightly less perfs hit.

    I do not own SESSAO so I can't tell for this one, however I own SSAO Pro and I'd say it's faster than HBAO although I didn't have compared accuracy like I've done with Unity's SSAO. I'll try to post a screenshot of such comparison soon.
     
  5. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    Great, thank you in advance! I have SSAO Pro as well. If your HBAO can be configured to achieve better results without too much of an additional performance hit, I'm definitely interested in including it as a graphics option for those who want that extra bit of polish vs SSAO. I've earmarked this asset for purchase when I have some spare dollars to throw at the asset store. :)
     
  6. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    First comparison, targetting low performance hit:


    HBAO


    SSAO Pro
    Second comparison, targetting quality:


    HBAO


    SSAO Pro
    In the second comparison, SSAO Pro is at max quality, HBAO can get even higher quality.
    As you can see, It's matter of choice of higher perfs vs higher quality.
     
    chiapet1021 likes this.
  7. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    Thank you for the comparison shots! Very informative from my perspective.

    Would you mind sharing what GPU you're using to test? Thanks again.
     
  8. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    I have a pretty good GPU: MSI GTX 760 twin frozr OC
     
    chiapet1021 likes this.
  9. G9ad7tr_356

    G9ad7tr_356

    Joined:
    Mar 4, 2016
    Posts:
    1
    Can you please add a webdemo to see it in action? :)
     
  10. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Color bleeding feature is planned for 1.2, which should be ready in a few days.


    No AO


    HBAO only


    Color Bleeding only


    HBAO with Color Bleeding
    When set properly, performance is on par with Unity's SSAO.
     
  11. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    I'm sorry but I do not currently have a complex scene already available for this but I'll try to provide one.
     
  12. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    Does it work with SpeedTree in Forward? Both Unity and SSAO Pro give awful artifacts there.
     
  13. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Unfortunately no, there's some sort of transparency... I will investigate this.

    Do you know if SESSAO have the problem too ?
     
  14. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    Pity, have to use deffered just for that. I don't own SESAO, but I remember they discussed some solution to make it work about half a year ago.

    And when I asked Speedtree guys, they said it is Unity problem, not their.
     
  15. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Well, after more tests, they work correctly with HBAO's low quality mode. The reason is that this mode doesn't use the camera normals texture.

    From what I can see, it's Unity bug, not SpeedTree... There's a possible workaround which is to reconstruct normals from depth buffer.

    I'll let you know once I get the problem solved.
     
    montyfi likes this.
  16. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    I have the workaround ready, it will be included in 1.2 update which should be submitted for review tomorrow.

    ForwardAOonly.png ForwardAO.png

    This workaround should solve artifacts with every cutout materials in forward rendering mode until Unity can get a fix for this.
     
    montyfi likes this.
  17. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    Wow, that's incredible! My wallet is ready :)
     
  18. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    1.2 update has been submitted for review :).

    Now, next update will focus on improving performances. We'll be using 4x4 interleaving with separable AO which means better texture cache utilization.

    From the papers I've read it should give a really good performance increase.
     
    montyfi likes this.
  19. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    I have 2x2 interleaving already in place and from editor's profiler there's already 1.5x performance increase without any compromise on the quality. And interleaving is even more efficient at higher resolutions :)

    Actually, I don't use texture arrays to reinterleave the AO (as unity doesn't support them below 5.4), so once Unity 5.4 is out I'll use them and we'll get even better cache utilization!

    I have 4x4 interleaving almost ready too, but for this one I prefer to wait unity 5.4 as reinterleaving it may be overkill without texture arrays as in this case it works with 16 layers while 2x2 interleaving works with 4 layers.
     
  20. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Very interested but would like to see a webplayer with a white untextured scene and with these controls:

    - framerate
    - on/off
    - quality / radius sliders

    Thanks!
     
  21. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    I like very much the idea of a web player demo, however I've been told that with this kind of asset it's quite easy to rip them off the demo in 5 minutes...
     
  22. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    That´s new to me.
    (The source of that information would be interesting...)

    What about a WebGL-Demo or a downloadable Executable then?

    By the way:
    What is different in your allgorithm to the SSAO pro / SESSAO ones and where does the name "Horizon Based....." come from?
     
    Last edited: Mar 9, 2016
  23. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Yeah I learned this just a few days ago, after a guy new to the forums and with a hacker's style pseudo asked me for a web player demo (just a few posts above). I suspected something strange, then doing a quick search on the forums:
    http://forum.unity3d.com/threads/a-warning-to-those-who-develop-with-the-web-player.127405/

    I will not enter into details, but basically if you host the demo somewhere it's easy for them to get the unity package. From there they use a tool available on github to extract all build files from the package, then they use .NET Reflector to export the sources.

    The final step is to recreate the project in Unity with the desired structure, re-create the scripts and
    paste the code exported by .NET Reflector and finally import asset files.

    For an asset like post processing image effect which just involves scripts and shaders I think it's a matter of a few minutes...

    I'll check if it have obvious flaws ;)

    I can't tell which algorithm SSAO Pro or SESSAO are using. However I'm almost sure they don't use this approach, I'm not saying mine is better but since the algorithm is different you can expect different results.

    "Horizon Based Ambient Occlusion" is simply another form of SSAO but has been called HBAO. As the name implies it's horizon based approach, and it was explained in a few papers and examples from nvidia. The authors of the first whitepaper are Louis Bavoil, Miguel Sainz and Rouslan Dimitrov.

    Basically this is approximating AO by determining the angle of free horizon around the hemisphere aligned with the tangent plane of the point being looked at, this involves a bit of raymarching the depth buffer. This is why it can be quite expensive depending on the settings and why I'm trying to balance performances with advanced techniques like interleaved sampling and separable AO kernel for the 1.3 update.

    Look at this interesting document with nice pictures to illustrate it, paragraph named 2.1: Horizon-based AO with Ray Marching
    http://frederikaalund.com/a-comparative-study-of-screen-space-ambient-occlusion-methods/

    There's another approach derived from and used in UE4 engine (explained in the document above) which I'll may include in later update.
     
    Arkade and montyfi like this.
  24. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Thanks a lot!
    Concerning the Webplayer thats horrible news! Any statement from Unity-guys?
     
  25. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Sincerely, I doubt Unity can do anything against that... Reverse engineering always existed.
    As soon as you distribute some executables it can be ripped off.

    On another note: 1.2 update is alive

    Changelog:
    • Added Color Beeding feature
    • Fixed artifacts on cutout materials in forward rendering
     
    Last edited: Mar 10, 2016
    montyfi likes this.
  26. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Sadly, Texture arrays feature (and more generally Unity 5.4) has been delayed... We need to wait June 2016. :(
     
  27. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Well, 1.3 update will be submittted for review on this week-end.

    The goodies:
    • Improved performances (now on par with SSAO Pro but with better quality)
    • Improved compatibility (now compiles on every platforms, targetting shader model 3.0)
    • Improved settings (there are less settings, but they are more user-friendly)

    For 1.4 update, I'm planning optional integration into Unity rendering pipeline: this will allow to only affect ambient lighting which will give even more realistic results.

    Texture deinterleaving has been delayed until Unity allow to use it properly with RenderTexture arrays, but once functionnal we should get even more performances.
     
  28. Olafson

    Olafson

    Joined:
    Aug 7, 2012
    Posts:
    255
    That sounds awesome. Thank you soooo much.
     
    jimmikaelkael likes this.
  29. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    1.3 is now pending review.

    Here's a screenshot:
    HBAO_1.3_800.png


    Performances comparison with SSAO Pro on low settings:
    hbao_low.PNG ssaopro_low.PNG

    Performances comparison with SSAO Pro in ultra settings:
    hbao_high.PNG ssaopro_ultra.PNG
     
  30. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    chiapet1021 likes this.
  31. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    @jimmikaelkael I tried out the new version, looks fantastic great work ;)
     
    jimmikaelkael likes this.
  32. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Thank you mate! :)

    I'm already preparing 1.3.1 with improved color bleeding performances as it's currently a bit slow. Should pop in the next week.
     
    punk likes this.
  33. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    1.3.1 update has been submitted for review.

    Changelog:
    • Improved color bleeding performances
    • Fix NPE when adding the HBAO component to a camera for the 1st time
     
  34. Howard-Day

    Howard-Day

    Joined:
    Oct 25, 2013
    Posts:
    137
    Hey, I love this - is there a possibility of separating out just the color bleeding effect from everything else? The reason I ask is that when tweaked properly, it's absolutely wonderful at casting light from emissive surfaces into the scene. I'd really love to use this package on a project I'm working on (I have already bought it) but unfortunately, whenever I walk up to a wall, the frame rate plummets. Is there any chance that's a easily fixable bug?
    Thanks!
     
  35. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    If you set the Intensity of the effect to 0 but leave your color bleed saturation you'll only get color bleeding.

    I see, this is a known limitation with every SSAO solution: as the objects are closer from the camera the radius increases and the calculation is heavier.
    I'll try to see if I can limit this radius to prevent it going throught the roof.

    EDIT: Forgot to add that 1.3.1 will certainly increase your performances with color bleeding.
    I'll be glad to send it to you before it's approved if you PM me your invoice number :)
     
  36. Howard-Day

    Howard-Day

    Joined:
    Oct 25, 2013
    Posts:
    137
    Cool. When the intensity is 0, does the AO still calculate in the shader/script? Or is it truly disabled?
    Also, allowing separate scaling of the bleed and AO effects would be good - right now they're tied 1-1 but in my games case, I want a large AO width, but a small Bleed/Lighting cast, to help cut down on the graininess. Also, I hacked in on my end a separated system for the Bleed Saturation and Intensity...Saturation alone wasn't cutting it. :D I love the asset, and I'd really like to be able to use it in game. If we can address the close up performance, (Possibly user-tweakable?), then I think we might be able to.
    One final question - Is it possible to have an option to hook into the Unity Cinematic Image Effects package - in that it reuses the passes that that system are already generating? If so, that'd be a lot faster for anyone using that effects stack.
    Thanks!
     
  37. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    No in this case it's not really disabled, but what is heavier is not calculating the AO term but collecting the surrounding samples. Color bleeding will anyway need those samples so there's very little to no benefit (in term of performances) to truly disable AO calculation.

    This is possible yeah, but in this case it will eat more performances. I've made the deliberate choice that color bleeding reuse samples used by AO to prevent the need for more sampling.

    This is something I can add as a optional feature in a future version, why not.

    I'm currently refining the rendering pipeline integration for 1.4 (will be a separate script called "HBAO_Deferred", I'll explain it in another following post), but once this is ready I'll look into this issue ;)

    That will be really hard to get a benefit from this. To be really beneficial we would need to avoid sampling again and this means doing a lot of work in the same shader pass, in the case of AO what can be reused is depth and normal samples however you can't guarantee that another effect will need the same sampling pattern...

    It's not impossible, but to be really efficient it would be better that I develop a full effect stack myself (and I have to admit I'm already putting all my efforts on improving HBAO first :)).
     
  38. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Well @Howard Day has been extremely helpful to solve some problems and improve overall things.
    Thank you Howard!

    I'm still waiting for 1.3.1 approval, but 1.3.2 will get the following changelog:
    • Limit the maximum radius in pixels to address the close-up objects performance issue
    • Added an albedo contribution and multiplier for the color bleeding feature in deferred shading
    • Increased intensity upper bound (useful for dark environment)
     
    Howard-Day likes this.
  39. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    "HBAO Shader is not supported on this platform"

    What the heck?

    Shader error in 'Hidden/HBAO': failed to open source file: 'HBAO_MediumQuality.cginc' at line 101 (on d3d11)

    Compiling Vertex program with COLOR_BLEEDING_OFF RECONSTRUCT_EYESPACE_FACE_NORMALS_ON
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_TEXTURE_ALPHASPLIT_ALLOWED

    DX11 Linear Deferred Unity 5.3.3
     
  40. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Have you recently updated the asset ?

    It fails to find an include file so most likely you need to delete the "Horizon Based Ambient Occlusion" folder completely then reimport the package. To do this it's better to first open a new scene.

    You'll may need to readjust the quality in the HBAO component after that.

    Let me know.
     
  41. Howard-Day

    Howard-Day

    Joined:
    Oct 25, 2013
    Posts:
    137
    This happened once to me, after doing some script file re-imports. I just deleted my library folder and reloaded. Everything was peachy after that!
     
  42. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Yeah, my bad I renamed some files in an update and unity package manager really doesn't like that...
    Normally just deleting/reimporting the asset should work.
     
  43. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Update 1.3.2 has been submitted, expect a few working days for it to be approved :)

    Changelog:
    • Limit the maximum radius in pixels to address the close-up objects performance issue
    • Added an albedo contribution and multiplier for the color bleeding feature in deferred shading
    • Increased intensity upper bound (useful for dark environment)
     
    Howard-Day likes this.
  44. plcuist

    plcuist

    Joined:
    Aug 29, 2013
    Posts:
    15
    Very nice ! Did you had a chance to test it on PS4 ?
     
  45. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Unfortunately no... However I think it should work fine.

    In any case I'm quite active at support if required, and I'm not against refunds if necessary.
     
    Howard-Day likes this.
  46. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Well, you can expect update 1.4 with "Deferred HBAO" to be filed for review on this week :), unless I discover a showstopper bug.

    For those who are wondering, this will be coming as a separate effect (you'll have to choose one of the two). As its name implies, it's strictly reserved for those using deferred shading in HDR and integrates into the rendering pipeline. This means you will get ambient only AO (fully lit surfaces will not receive occlusion) with PBR accurate result.

    The first shot will support deferred AO only, but in another update I'll inject color bleeding into lighting.

    I'm forced to separate implementations and provide this feature only for Unity >= 5.2.
     
    montyfi likes this.
  47. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    Hell yes! Great work, mon!
     
  48. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    Unfortunately HBAO is still turning itself completely off in the built client that we push to players. We're on 5.3.4
     
  49. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Which platform are you building for ?
    Unity 5.3.4f1 or is it a specific patch version ?

    Could you provide the output.log in a PM please ?

    EDIT: just tried a Windows PC build 64bits, Unity 5.3.4f1 and it still there in the build, I exagerated it:


    I'm awaiting more informations from you ;)
     
    Last edited: Apr 21, 2016
    Kronnect and montyfi like this.
  50. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    791
    Forgot to ask about your HBAO version...
    I think you'd better to update with the 1.3.2 from the asset store as I remember I've given you a 1.3.2beta (For this you need to delete it from your asset folder first).