A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by jimmikaelkael, Feb 21, 2016.
You need to use HBAO_Integrated component, not the obsolete HBAO one.
Does it work with HDRP ? The demo seams not work in this mode
Hello, I have a warning Assets\Horizon Based Ambient Occlusion\Scripts\Editor\HBAO_Core_Editor.cs(157,29): warning CS0618: 'PlayerSettings.virtualRealitySupported' is obsolete: 'This API is obsolete, and should no longer be used. Please use XRManagerSettings in the XR Management package instead.' I hope it can be solved, thank you!
This is not supported yet, I'm sorry.
Sure, send me a support request in PM with your invoice number.
On Unity v2018.4.1f1, Oculus Utilities v1.43.0, OVRPlugin v1.43.0, SDK v1.44.0, HBAO 2.7.1.
VR Single pass, building to an Android apk for Quest. (OpenGLES3 graphics API)
I get 8 errors when I try to build the project, which makes the build process fail:
@jimmikaelkael tells me that
"sampler_CameraDepthTexture" is normally defined by Unity, any SSAO effect require it to access depth buffer.
It's either Unity fault either the platform you build for doesn't support rendering depth texture.
I'm sorry, nothing I can do...
Does anyone have any idea what the problem might be and how to solve it? Has anyone used HBAO on a Quest build?
Something worth to be tried:
- open HBAO.shader file, change line 36 to be UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture); and please report what happens after this change.
Thanks @jimmikaelkael Your prompt replies and emails are very much appreciated.
So I'm guessing you meant change line 38? sampler2D_float _CameraDepthTexture; ? (Changing 36 breaks everything)
That got rid of the previous errors, but introduces a new one:
Shader error in 'Hidden/HBAO': undeclared identifier 'sampler_DepthTex' at Assets/Horizon Based Ambient Occlusion/Shaders/HBAO_frag.cginc(54) (on gles3)
Compiling Vertex program with STEREO_MULTIVIEW_ON OFFSCREEN_SAMPLES_CONTRIB
Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER SHADER_API_MOBILE UNITY_LIGHTMAP_DLDR_ENCODING
In your last email, you mentioned "maybe your targeted platform doesn't support rendering depth buffer (have you checked that ?)"
It's unclear what you mean by targeted platform. It's Android 5.0 'Lollipop' (API Level 21). What other platform settings would you need to know about?
Also, can you explain how I would check if rendering the depth buffer is supported? Isn't it always?
Yep that was a typo, you got it.
It should be in your case, I checked it. And that's why I investigated further...
So please try to change both line 38, and 43:
sampler2D_float _CameraDepthTexture; -> UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture);
sampler2D_float _DepthTex; -> UNITY_DECLARE_DEPTH_TEXTURE(_DepthTex);
Waiting for your feedback.
Just to let you know, to let people know, my wife passed away on 3rd november 2019 after living 20 years together and children. I've hold her until the end and she died in my arms, really hard moment for me...
yay, that builds with no errors, but sadly no AO. On the Quest I'm getting just triangles rendered to each eye:
Works fine in Editor (on PC)
So very sorry to hear your sad news. Ignore my posts - you shouldn't be working at a time like this, and I certainly don't expect any support when you have other far more important things on your mind. Take all the time you need.
Are you using the newer HBAO_Integrated component ? you should, just to make sure.
Also, what happens if you disable Single Pass, does it work ?
EDIT: and deinterleaving mode isn't supported in Single Pass disable this too if enabled.
Yes, using HBAO_Integrated.
Multipass works (though it tanks my framerate )
Now take time off. Wishing you all the very best at this difficult time.
I see now it's depth not being sampled correctly. I'd like to do another test, I'll send you a couple modified files in email.
Thank you. I'm happy to help debug
Hello. Does this work in Oculus Quest?
@Karan90 See my posts above. Quest currently only works if you disable Single Pass. It works fine for normal PC VR but once you switch platform to Android (and build) you get the screenshot I posted.
@jimmikaelkael has been super helpful offline with debugging, and is working on a solution (although he's currently dealing with a bit of a life crisis so I think it's only polite to be patient)
@jeromeWork - Thank you so much
Any ETA yet? No pressure, but we love HBAO and would love to use it in HDRP enabled project as well.
I was interested in using this in an upcoming patch to a PS4 game but it doesn't do anything on the PS4. Is this a known issue? I'm testing with the trial package and both HBAO & HBAO Integrated both failed to do anything on the PS4 although they work fine on the PC side. The trial package also generates an error "MissingMethodException: Method not found: 'UnityEngine.Texture2D.LoadImage'" on the PC side so I don't know if this is related. I'm using 2017.4.29f1.
Hi, I've tried attaching the Integrated and default version of the component to my main camera in the first slot and am seeing nothing in 2019.3 - even playing with the Display Mode does nothing in the editor view. Default preset is applied, and I've played with all the sliders. Am I missing something?
Yep, it works in 2019.3.
HBAO v2.8 has been submitted for review, changelog is the following:
Added URP support 7.1.8+ (Unity 2019.3+)
Now doing HDRP support which should be ready in the next few days. After that I'll fix Single Pass issues.
Hi, I'm using HBAO v2.8 in VR project with URP 7.2.1. I encountered some issues regarding VR camera output. When I'm using Multi Pass I get right eye black, Single pass divides each eye into two images. Attached screenshot should describe it better. Am I missing something or is it known issue? In my pipeline feature there are no other postprocess components
Yes I'm not surprised, VR fixes are on the todo list but you'll have to wait a few weeks. Sorry for the inconvenience...
@jimmikaelkael thanks so much for URP support! You’re a legend. Yours is the only professional AO on the market for URP.
Thank you but don't rush there's actually a downside: URP actually doesn't generate view normals so the hbao is running exclusively in reconstruct per pixel normals mode, which has a perf cost of course. Once they add view normals I'll re-activate camera view normals mode in HBAO for URP.
Performance seems perfectly fine for me for now but looking forward to improvements down the track when Unity gets their act together.
The URP version of the effect is not working on builds. Everything goes black. Works fine in editor. Does it happen to somebody else?
I'm using 2019.3 with URP 7.1.8.
Works fine here, please check player log.
@xDavidLeon I found a problem with Color Bleeding enabled in builds leading to black screen, it will be fixed soon.
I just created an empty URP project and added the plugin. If you enable Color Bleeding, everything is black in build. Disabling color bleeding makes it work fine. It should be easy enough to reproduce, but if you are not able to reproduce the issue I can share a project on Monday.
Yes, as I said above I have been able to reproduce and fix it. This is a shader keywords problem, an update will be available soon.
Sorry! I hadn't read your last message. Thank you for the quick replies and support
Is there possibility for trial version of your plugin which supports URP?
Maybe with watermark or something?
There is so many things not compatible with URP / Newest Unity that my life's "trust" parameter went to the bottom.
You will have to live with it... HBAO is the same in URP than in Standard pipeline.
Why would I lie ?
This is deliberate that the demo lag behind releases because a trial is the best way to leak the asset.
I not mean that you lie, I am sure it's all working when you test it, but lately I encountered so many issues some stuff is working ok on some people machines and on some not.
Thanks, I will check it with trial on standard rp then.
Version 2.9 is pending review:
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
Bought it today for URP and demo-scene does not seem to work. At least nothing happens at all when checking boxes/moving slider.
Also have no clue how to set it up, docs seem quite complicated, just a simple step-by-step implementation with some images would be awesome.
Open the PDF documentation, on page 2 you have a table of content with links, just click to Universal Render Pipeline section... then you will have step by step screenshots of what's needed to do.
Is that really hard ?
Zzz I looked at the readme, my bad, Ill give this a try!
If you end up w a white screen Change Display mode
The upcoming 2.9 update will solve a few problems in URP.
I'm using a tool that reports all shader keywords used. HBAO seems to spam thousands of lines of shader keywords using a Shader Keyword reporting tool.
Also noticed some strong color banding when enabling color bleeding.
HBAO shader has thousands of variants so that is expected, actually I'm fully rewriting both Standard and URP pipeline shader and scripts for cleaner and more efficient code and it will come with a bit less variants (You will still have 2.1K variants). Note that keywords being used are local shader keywords.
Yes, I used a wrong RenderTextureFormat for colorbleeding which introduces this problem, actually I'd say in 2.9 colorbleeding is not usable.
HBAO v3.0 (will be compatible with 2019.1+) is coming really soon, and as I mentioned earlier this is a full rewrite. You will have scene view effect in Standard Pipeline, stackable AO component, temporal filter, less local keywords and shader variants (2.1K variants, the strict minimum for all offered features), fixed color bleeding and other good stuff.
When I'm close to object (a human face for example) it looks good but if I get just 1 meter distance from the model it loose intensity
Does your scene has correct scaling ?