Question about draw2D Image in post processing
-
The_Glitch
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Question about draw2D Image in post processing
I've taken a look at some examples around Irrlicht and I've seen people taking a RTT texture and using draw2D on some of them. My question is, is this Irrlichts method of taking a rendered result of a screenquad and drawing it back into a render target?? If so this may be my issue as I have some shaders that need to use the new result on a image of the previous screenquad and I wasn't sure how to make a rendered screenquad effect back into a usable texture again.
-
The_Glitch
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Question about draw2D Image in post processing
Many sad faces LOL
Re: Question about draw2D Image in post processing
It is difficult to understand what you mean. With Irrlicht's implementation, you can render to a RT and then, when you detach it, you can use it as an ordinary texture. So you can use it in draw2DImage. If you render such a texture into a screen quad, and you've set a render target, then you have a texture which is the result of the render. This is Irrlicht's *implementation* of render targets, but it is not Irrlicht's *method*, since the engine itself doesn't use render targets.
Anyway, a render target becomes a usable texture as soon as it is detached.
Anyway, a render target becomes a usable texture as soon as it is detached.
-
The_Glitch
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Question about draw2D Image in post processing
Okay I see.
Thanks
Let's say I have a render target now
I pass that to a full screenquad and it's blurred. My question is from there how can I put that result back into rt or even a new rt if that's not possible to reuse the old one. So I can pass it to a bloom shader which uses it as a texture register slot 1.
Thanks
Let's say I have a render target
Code: Select all
video::ITexture* rt = 0; Code: Select all
rt = driver->addRenderTargetTexture(core::dimension2d<u32>(512,512), "RTT1", video::ECF_A8R8G8B8);I pass that to a full screenquad and it's blurred. My question is from there how can I put that result back into rt or even a new rt if that's not possible to reuse the old one. So I can pass it to a bloom shader which uses it as a texture register slot 1.
Re: Question about draw2D Image in post processing
Create another RT rt2. Render a screen quad into rt2 using rt. You now have two textures which you can apply to different purposes. Or you can just create rt2 in the same way you created rt.
Re: Question about draw2D Image in post processing
You need two rendertargets. While you render to one, you use the other, and viceversa, this allows to chain effects.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
-
The_Glitch
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Question about draw2D Image in post processing
LOL, Thanks but I figured out most or all the problems I was having.