ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Announcements and Showcase
forum topic indicator SSAO - in progress
person icon
guest_Robbo
Guest
Quote
2026-07-11 15:02:05

I decided to add SSAO into CC source code as its a very popular shader.

Im not there yet but have made good progress with an OpenGL version to start with.

The good thing about it is I now have access to the depth buffer and can use that for aother more advanced shaders like a proper pixel shader spotlight amongst others later on.

So far my little friend Claude AI has been helping me although he makes lots of mistakes, we are slowly getting there...its only been like 3 days work so far and over 50 chats to date.....might just get there eventually...lets see....

person icon
Monks
Guest
Quote
2026-07-12 08:24:10

That's amazing,SSAO is highly on demand, it would be wonderful if it finally works out

person icon
guest_Sam
Guest
Quote
2026-07-13 01:34:02

That would be a nice feature to add.
Yeah quite a few cool effects can be done with access to zbuffer/depth buffer.
Possibly a better shadow system.



Sam

person icon
guest_Robbo
Guest
Quote
2026-07-16 06:11:17

I finally after much effort in correcting both Claude AI and chatGPT - finally got a working SSAO with a correct depth buffer texture working.

Not just SSAO but I added IMO something much better to that - which is the shading from the depth buffer itself. It adds a lot of realistic shading to the distant objects and I think you will like this very much. Only done for openGL atm - now have to get it working for DX9 also...

person icon
studiorewired
Registered User
Quote
2026-07-17 18:43:24

guest_Robbo wrote:
I finally after much effort in correcting both Claude AI and chatGPT - finally got a working SSAO with a correct depth buffer texture working.

Not just SSAO but I added IMO something much better to that - which is the shading from the depth buffer itself. It adds a lot of realistic shading to the distant objects and I think you will like this very much. Only done for openGL atm - now have to get it working for DX9 also...


If you can get this working, would you mind sharing the C++ source code modifications you made? I just re-wrote the realtime shadow code here https://studiorewired.itch.io/co... and would love to add SSAO (or something similar) for DirectX targets.

person icon
Monks
Guest
Quote
2026-07-18 12:42:58

That's great to hear, Robbo, can't wait emoji icon_smile

person icon
guest_Robbo
Guest
Quote
2026-08-04 13:24:52

The updated a new shader called Cavity Depth and is working now and also just did a new one with Depth of Field (DOF) and looks pretty good IMO - will have that on itchio in a day or so...

SSAO will have to wait for now as didnt work out as expected.

See a video for the latest (not including DOF):
https://youtu.be/AYgXDDjYO9E

Get from Itchio: https://robo25.itch.io/coppercube-apis-version-2

person icon
guest_Robbo
Guest
Quote
2026-08-04 14:30:34

I fixed the CavityDepth shader to exclude all terrain plants and trees etc plus anything tranparent so runs pretty well and can see depth shading behind transparent objects.

Depth of Field is uploaded now also and working good for now until I can can refine it.

person icon
Monks
Guest
Quote
2026-08-04 17:36:01

Hi robbo, i re-downloaded the CC Upgrades, but cant find DOF, maybe you uploaded the wrong folder, can you kindly re check

person icon
guest_Robbo
Guest
Quote
2026-08-05 02:05:54

Sorry - was a rushed upload to the wrong spot - DOH!

See version 2 - its in there now.

I just improved grass/leaves blur also and reduced the tree leaves very slight blur when close up. Its better now anyway.

person icon
gazzauk
Registered User
Quote
2026-08-05 07:23:21

wrote:
guest_Robbo wrote:
I finally after much effort in correcting both Claude AI and chatGPT - finally got a working SSAO with a correct depth buffer texture working.

Not just SSAO but I added IMO something much better to that - which is the shading from the depth buffer itself. It adds a lot of realistic shading to the distant objects and I think you will like this very much. Only done for openGL atm - now have to get it working for DX9 also...


If you can get this working, would you mind sharing the C++ source code modifications you made? I just re-wrote the realtime shadow code here https://studiorewired.itch.io/co... and would love to add SSAO (or something similar) for DirectX targets.

Hey studiowired, just tried out your improved shadows V3 and works great! much nicer than the defult shadows and appear to run quite smoothly.

If Robo is allowed to share his code updates on github then that would improve the engine even further. I have full source code of the engine and would like to implement them in my custom binary also.

person icon
guest_Sam
Guest
Quote
2026-08-05 22:30:23

Hey Robbo.

In the video you were talking about the (encoded buffer)
I think thats linearized depth/z buffer. Probably what coppercube uses to z test/ fail?

Anyway the cavity shading looks good.

Ill try it out later.


Sam.

person icon
guest_Robbo
Guest
Quote
Today

Happy to report that I finally got a decent looking SSAO working.

After lot of failed attemps with Claude AI, even ChatGPT couldnt quite get there either, and had to be sorted finally with Google Gemini.

I tried an SSAO effect from XEffects but had major issues getting the same things to work as expected so Google Gemini suggested something different that actually worked. I was surprised as normally it fails at anything complex I had given it earlier.

Anyway, SSAO coming soon - just need to smooth the shading some more before release. Its not going to be as good as baked lighting/shading but not bad for what it is.

A few days away or something...


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |