Custom SSAO Render Pass not working as intended

https://playcanvas.com/project/1243773/overview/ssao

In this project I am trying to replicate the look and shading of the Playcanvas Ambient Occlusion demo.
Link:PlayCanvas Examples

I am trying to produce the same result as the example but with the playcanvas editor. Instead of their being a controls component section I want to control all the values through the inspector like so:
image

I am aware that there is an ssao post effect however it does not produce the result I am looking for I have taken the code in the example and integrated it in my test project, however it does not produce accurate result.

Has anyone done this before if so, please reply.

Thanks in advance

Currently the result is as follows:

Here is what it should look like:

I have debugged the issue and it seems that some files that the Ambient Occlusion Demo uses are not present or are private in the playcanvas engine.

So I tried to make my own custom scripts in playcanvas with the code files from the demo however it did not produce the same result as you can see in my previous reply.

So if this is a feature that will be released in some other version of playcanvas please let me know.

Here are the scripts present in the demo

And here are the scripts present in the engine
image

As you can see render-pass-ssao.js and render-pass-depth-aware-blur.js are missing

These are all here: engine/src/extras/render-passes at main · playcanvas/engine · GitHub

They also get correctly exported from the engine in the index.js.

But it’s possibly this is not the case in currently released engine 1.73.x or so … as this work is mainly getting ready for the engine 2.0.x releases. So you might need to get engine from the repo and use a custom build of it.

Thank you for clarifying.

@Agha_Muhammad_Ahmad By the way, there is a post-effect that is very similar (same shader without few small improvements done for the render pass version) that you can easily use in the Editor. Just drag & drop it to the editor and add as a script on the camera:

This is used here:
https://playcanvas.vercel.app/#/graphics/post-effects

I have used that one but it just does not give as high quality of a result as the render pass.

It should. I only did some tweaks to improve controls, and a performance improvement was added, but otherwise it’s the same shader.