I am using the SSAO2 Pipeline but I can’t set properties liek samples and strength on it in my code.
I copied my setup code into this playground: Babylon.js Playground
In the playground this code works. The samples and strengths are set to the correct values.
But in my environment (with a more complex surrounding setup) when I set the samples and strength nothing changes in the effect (also no value change in the inspector).
I am quite at a loss how to even start debugging that.
Any clues?
Would you be able to share the project? Some more information on the way it is built? This could be related to side effects not loaded, but then I would expect some form of a console error, which you are saying are not present.
Sadly no.
It’s quite a big project with a bigg-ish build & content pipeline attached.
It’s one of those “Let’s just activate SSAO at the end” type of scenarios
I have actually seen similar behaviour like you describe once in a project of my own , it was user error on my side , creating the ssao more than once I think. then adding it doesnt actually add , as it has one already. Then the changes to your code do nothing ( and dont update the inspector either ) because its not actually pointing to the ssao currently in use in the scene
I went home yesterday, today I started the project up again and the values are set correctly. That smells a little bit like some race condition somewhere… I am not doing something fancy with threading or something (at least not to my knowledge). Makes it even harder to find. But thanks so far!
Yes, we are using the vignette feature. But I guess that was not the problem since the SSAO was applied (just very ugly because of too little samples :D)