Hi
Mybe this is supported allready I don't know.
But it would be nice if MRTs Multiple Render Targets Was supported in Ogre..
Is it. any plans, when, if we would have to add it is it do able or impossible?
Regards
Lee04
Multiple render targets (MRTs)
- Lee04
- Minaton
- Posts: 945
- Joined: Mon Jul 05, 2004 4:06 pm
- Location: Sweden
- x 1
- monster
- OGRE Community Helper
- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
- Contact:
- tuan kuranes
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
- Contact:
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
Yep, MRT is a different feature, it's very handy for things like DOF, since you can render the colour to one texture (say, R8G8B8) and the depth to another (say R32F), all in the same render. I've had it on my personal list for a while, however since I don't have a card that can do it (the FX series can't) I haven't been able to develop it. This might be a Dagon feature if I get a new gfx card The Radeon 9800 was the first card to do it. More info here : http://msdn.microsoft.com/library/defau ... target.asp
It's not terribly practical to rely on this feature yet though because:
1) high entry requirements (GeForce 6x00 or 9800 Pro/Xx00)
2) highly variable implementations (see the number of 'some implementations ... ' statements in the DX9 docs!)
3) I'm not sure if GL has an equivalent yet
It's another one of those 'nice for demos, not so useful for real products yet unless you want to spend a shitload of time writing vendor-specific codepaths' things.
It's not terribly practical to rely on this feature yet though because:
1) high entry requirements (GeForce 6x00 or 9800 Pro/Xx00)
2) highly variable implementations (see the number of 'some implementations ... ' statements in the DX9 docs!)
3) I'm not sure if GL has an equivalent yet
It's another one of those 'nice for demos, not so useful for real products yet unless you want to spend a shitload of time writing vendor-specific codepaths' things.
- :wumpus:
- OGRE Retired Team Member
- Posts: 3067
- Joined: Tue Feb 10, 2004 12:53 pm
- Location: The Netherlands
- x 1
Ah, that one. My 9600xt supports it as well
http://oss.sgi.com/projects/ogl-sample/ ... uffers.txt
That's the GL extension. I can't easily see how this would fit into the Ogre design though. Subrendertargets?
http://oss.sgi.com/projects/ogl-sample/ ... uffers.txt
That's the GL extension. I can't easily see how this would fit into the Ogre design though. Subrendertargets?
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
I thought the best way was to be able to add the same viewport to more than one target, and each target can be created independently (but in practice there are limitations such as them needing to be the same resolution). This will translate down to RenderSystem::setRenderTarget taking an optional index (defaulting to 0) indicating which target 'slot' is in use. Of course, we'll have to remember to reset the targets to nothing when MRT is not going on!
- :wumpus:
- OGRE Retired Team Member
- Posts: 3067
- Joined: Tue Feb 10, 2004 12:53 pm
- Location: The Netherlands
- x 1
Yeah, we'd have to do some experimentation to see in how far this is possible, I don't know exactly what the limitations on the GL and D3D extensions are.
I suppose you can bind with _wglBindTexImageARB a texture to each of the AUXx buffers, then use the DrawBuffersARB to map these buffers to indices in the shader program. But I'm not sure, as GL is picky with contexts,
I'm not sure what happens if you have a FLOAT32 context and bind a RGBA8 texture to it. Maybe this is another thing we have to wait with until GL_EXT_framebuffer_object is implemented (should be any moment anyway). At least that gets rid of having to implement this for *each OS* seperatly like the other pbuffer stuff.
I suppose you can bind with _wglBindTexImageARB a texture to each of the AUXx buffers, then use the DrawBuffersARB to map these buffers to indices in the shader program. But I'm not sure, as GL is picky with contexts,
I'm not sure what happens if you have a FLOAT32 context and bind a RGBA8 texture to it. Maybe this is another thing we have to wait with until GL_EXT_framebuffer_object is implemented (should be any moment anyway). At least that gets rid of having to implement this for *each OS* seperatly like the other pbuffer stuff.
- Lee04
- Minaton
- Posts: 945
- Joined: Mon Jul 05, 2004 4:06 pm
- Location: Sweden
- x 1
MRTs and geometry instancing
Hi
As I figure is that if you want to render a lot of different looking objects
at once then geometry instancing is a cool feature....
But if the objects should have different shaders on different subparts then you need a texture look up for where which sub shader goes (using uber shader).
As a result of all this you would probablty end up using MRT's to fit it into one ubershader or am I wrong about this relationship between
the new geometry instancing function and MRTs???
Regards
Lee04
As I figure is that if you want to render a lot of different looking objects
at once then geometry instancing is a cool feature....
But if the objects should have different shaders on different subparts then you need a texture look up for where which sub shader goes (using uber shader).
As a result of all this you would probablty end up using MRT's to fit it into one ubershader or am I wrong about this relationship between
the new geometry instancing function and MRTs???
Regards
Lee04
- tuan kuranes
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
- Contact:
Finally found a real useful MRT shader sample that would help "multiple fast stencil shadows using MRT":
http://www.ndawinteractive.com/shaderst ... sample.htm
(you'll need the freeware ShaderStudio MAX )
http://www.ndawinteractive.com/shaderst ... sample.htm
(you'll need the freeware ShaderStudio MAX )