Page 1 of 1

Deferred rendering buffer visualization helper widget

Posted: 30 Mar 2016, 16:08
by Beherith
Draws a selected buffer on the right half of the screen.

Deferred Buffer visualizer: cycle through buffers with /luaui prevbuffer|nextbuffer, show alpha in red with /luaui alphabuffer

Hope it helps someone else too!

http://imolarpg.dyndns.org/trac/balates ... alizer.lua
Image

Re: Deferred rendering buffer visualization helper widget

Posted: 30 Mar 2016, 16:26
by gajop
Didn't try yet, but very cool

Re: Deferred rendering buffer visualization helper widget

Posted: 30 Mar 2016, 16:56
by hokomoko
what did you do with it?

Re: Deferred rendering buffer visualization helper widget

Posted: 30 Mar 2016, 19:06
by Beherith
hokomoko wrote:what did you do with it?
Sorry, I dont understand the question.
Its just gl.TexRect over half the screen. One can watch all map and model buffers too.

Re: Deferred rendering buffer visualization helper widget

Posted: 30 Mar 2016, 20:14
by hokomoko
Hope it helps someone else too!
I'll rephrase: What did you use it for?
How was it helpful for you?

Re: Deferred rendering buffer visualization helper widget

Posted: 30 Mar 2016, 23:54
by Beherith
I used it to debug why model buffer bloom was way stonger and lighter than screencopy bloom.
It really helped tweak some other things in forward vs deferred, made sure the correct normals were passed.

There is also an ongoing issue where units under construction also drawn onto the diffuse buffer, but not with customunitshaders (so I had no control over it), and white/very light teamcolors cause heavy bloom on units under construction.

E.G.:
Image
On this image, the building under construction is show along with the emittex.
The issue is as follows. I use the green channel of the emittex as a stencil buffer, and write it to 1 in the fragment shader for CUS. This is visible on the right.
The bloom uses the diffusetex, and emittex as sources, and the diffusetex is premultiplied with the green channel of emittex before looking for illumination thresholds for bloom. So logically, stuff that doesnt have the emittex green as 1 shouldnt contribute to bloom. Yet it does.

Edit: ok, as expected, it was my fault :)