Jump to content

Disabling SSAO


Recommended Posts

Hi gamefan, and welcome.  Umm... could you please modify http://www.babylonjs-playground.com/#1TDTWF#5

...adjust it and save it  (or something even simpler)... to show us the problem?  Lines 72-77 looks like a good place to show us your direct-dispose ideas.  (press '4' to run your dispose code)  I was too scared to try a ssao.dispose() in there.  I'll let you put it in... I don't want to lose a finger.  :D

I don't know much about post-processes.... but do you see the way that the other keypresses use the pipelineManager to "look up" SSAO effects, and enable/disable them... each specifically?  Maybe that is the more-correct way.  Let the manager call .dispose... not you.  But I could be completely wrong. 

Anyway, you know how it goes around here.  Make us a playground that shows the problem, and the solutions arrive at light-speed.  :)

Link to comment
Share on other sites

Hey @gamefan:)

Are you using at least this PR ? https://github.com/BabylonJS/Babylon.js/commit/b7b05d78ee5a11dc311a7f151e04f49c6f150afd

I changed the dispose method in the latest commit, so I think now it should work if you update your preview release version. If not, can you share me the error(s) you have ?

Thanks !

Link to comment
Share on other sites


Apologies for being late.

@Wingnut Thank you. :)  I knew I would loose all my fingers typing the ssao.dispose() . It was becoming increasingly apparent to me as the page loaded and as I approached the empty space you lovingly left for me at line 74, that this has to work. :)

And obviously it does. I looked at no one else since.

@Luaacro I got the latest PR and it works like magic. BABYLON is no less than magic. Sometimes (when my fingers are alright), I casually look inside BABYLON.max.js and wonder - How is all of this even possible?

Another thing, Now that blur post process do not exist. How to achieve the same results that came early. Manually adding these Processes?


Link to comment
Share on other sites

@gamefan cool if it works !! :)

For the blur post-processes, they are automatically included but they are not configurable anymore : getBlurHPostProcess and getBlurVPostProcess functions return null but they still exist just for backward compatibility

I opted for a bilateral blur instead of a standard blur post-process as the bilateral blur post-process removes more efficiently the "textile effect"

So you can remove/comment all your blur configurations and see the result :)

Link to comment
Share on other sites

@gamefan oups, I understand :(

Something cool is that now the rendering pipeline is more respectful of "what is SSAO", so you can focus on SSAO configuration (I think it will be better for you than before) and not blurring which was difficult to configure (in order to remove the textile effect)

I updated the playground example so you can take a look :)

Soon, the Babylon.js Editor will be updated with the latest version of Bjs. So you'll be able to configure SSAO using the user interface and get the best result

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...