Persistent buffers and Multipass
-
- Halfling
- Posts: 55
- Joined: Fri Feb 16, 2018 9:32 am
- x 8
Persistent buffers and Multipass
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
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
- dark_sylinc
- OGRE Team Member
- Posts: 5299
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1279
- Contact:
Re: Persistent buffers and Multipass
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
See bloom effect from the postprocess sample
-
- Halfling
- Posts: 55
- Joined: Fri Feb 16, 2018 9:32 am
- x 8
Re: Persistent buffers and Multipass
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
In any case thanks again for the help.
Shem
- dark_sylinc
- OGRE Team Member
- Posts: 5299
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1279
- Contact:
Re: Persistent buffers and Multipass
Have you tried RenderDoc?
It's a GPU debugger that can greatly help you understand what's going on in a frame when rendering
It's a GPU debugger that can greatly help you understand what's going on in a frame when rendering
-
- Halfling
- Posts: 55
- Joined: Fri Feb 16, 2018 9:32 am
- x 8
Re: Persistent buffers and Multipass
Looks very interesting. Thanks for tip.