Persistent buffers and Multipass

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
Shem
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

Persistent buffers and Multipass

Post by Shem »

Ogre Version: 1.12.9
Operating System: Win10
Render System: OGL3+
Quadro RTX 4000

Hi,

I have a texture I need to recolor then blur. I can do both independently in the fragment shader but I'm not sure how to do the blur on the recolored texture.
I've tried to use multipass iterations but they both use the same original texture so the output is just a blurred original texture.
I think I should be using persistent buffers so the blurring is done on the output from the 1st iteration but I can't seem to find how this is done.

Thanks in advance
Shem
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: Persistent buffers and Multipass

Post by dark_sylinc »

You need to do a ping pong (A->B then B->A and repeat) because GPUs don't support writing and reading to the same texture at the same time (except mobile GPUs with specific restraints)

See bloom effect from the postprocess sample
Shem
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

Re: Persistent buffers and Multipass

Post by Shem »

Thanks for the replay dark_sylinc. I have seen your bloom compositor which might be a good way to do this but what I ended up doing was recolor into an RTT then do the blur in the main material. I know it's probably me but other than proving that certain things are possible in Ogre, I find myself completely lost when I try to understand what you guys did in that sample app. But then again, I'm very short on time so that could also be a factor.

In any case thanks again for the help.
Shem
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: Persistent buffers and Multipass

Post by dark_sylinc »

Have you tried RenderDoc?

It's a GPU debugger that can greatly help you understand what's going on in a frame when rendering
Shem
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

Re: Persistent buffers and Multipass

Post by Shem »

Looks very interesting. Thanks for tip.
Post Reply