gamefan Posted May 30, 2016 Share Posted May 30, 2016 Hi, Not able to dispose SSAO render pipeline, using dispose method. The renderer stops and the screen goes blank, with an error at setTexturesFromPostProcess. I am using preview release. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 30, 2016 Share Posted May 30, 2016 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. 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. gamefan and GameMonetize 2 Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted May 31, 2016 Share Posted May 31, 2016 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 ! Wingnut and gamefan 2 Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted May 31, 2016 Share Posted May 31, 2016 @Wingnut really cool your PG to help us debugging rendering issues, you should keep it =D Quote Link to comment Share on other sites More sharing options...
gamefan Posted May 31, 2016 Author Share Posted May 31, 2016 Hi, 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? Wingnut 1 Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted May 31, 2016 Share Posted May 31, 2016 @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 Quote Link to comment Share on other sites More sharing options...
gamefan Posted June 1, 2016 Author Share Posted June 1, 2016 @Luaacro I did exactly that and the results were a bit different because earlier I had those blur properties configured. I think I will have to play with setting other properties. Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted June 1, 2016 Share Posted June 1, 2016 @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 gamefan 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.