javier.serrano Posted June 12, 2018 Share Posted June 12, 2018 Hi, we have some cool effects such as Outline, Highlight, Border Detection... in post shaders that require auxiliary buffer. We now need combining these effects at the same time but we only have one auxiliary texture so we tried to set alpha channel like a kind of mask for each effect/object combination (like viewport mask). Shaders will check alpha channel of auxiliary buffer and if it does match their 'mask', they will make the effect using auxiliary RGB channels. When 'masks' fit the effect works fine, but when they do not, some artifacts can be seen. After investigating we realized that TAA is been applied on Auxiliary buffer and, consecuently, blending alpha channel with old auxiliary that is what makes this artifacts. Is there any way to make TAA not being applied on Auxiliary buffer? Is there any way to check old/current auxiliary buffer before applying TAA? Maybe any other tip to achieve this 'mask' behaviour? Thanks in advance, Javier [Mask not matching and TAA active. Orange is Outline effect and Green is Highlight effect] [Mask matching and TAA active] Link to comment
silent Posted June 13, 2018 Share Posted June 13, 2018 Hi Javier, Is there a possibility to check a small test scene with this behavior? Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Greg.Mildenhall Posted June 14, 2018 Share Posted June 14, 2018 Unfortunately TAA is a global setting (at least as late as where I'm checking in 2.6.1) based on the console setting render_antialising but perhaps you can temporarily disable it with Render::addCallback() at the CALLBACK_BEGIN_AUXILIARY_BUFFER and CALLBACK_END_AUXILIARY_BUFFER stages? Link to comment
javier.serrano Posted June 14, 2018 Author Share Posted June 14, 2018 (edited) Hi, I'll try this as soon as I can. When looking at 2.7 USC documentation, I couldn't find engine.render.addCallback(), engine.render.removeCallback() and engine.render.clearCallbacks(). Are callbacks only accesible from C++ API ? Thanks for your help, Javier Edited June 14, 2018 by javier.serrano Link to comment
fox Posted June 14, 2018 Share Posted June 14, 2018 Hi Javier, Unfortunately render callbacks are currently accessible from C++ API only. Thanks! Link to comment
unclebob Posted June 14, 2018 Share Posted June 14, 2018 Hi Javier, There's one trick you can try in order to disable TAA for auxiliary buffer. It's a hacky workaround but still might work in your case. The idea is add two callbacks: CALLBACK_BEGIN_AUXILIARY_BUFFER where you disable TAA by calling Render::get()->setTAA(0) and CALLBACK_END_AUXILIARY_BUFFER where you enable it back. Link to comment
Recommended Posts