Can someone please explain what is ment by "Render to Texture" in graphics, and how I could benefit from using it?
Thanks,
GUE
Render to Texture?
Moderator: Coders of Rage
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
-
- Respected Programmer
- Posts: 387
- Joined: Fri Dec 19, 2008 3:33 pm
- Location: Dallas
- Contact:
Re: Render to Texture?
Means rendering to something other than the default back buffer, like say...a texture for example :] (Some API's and extensions do make the distinction between a "renderable texture" and a "render target"...there IS a difference).
Their uses are far too many to even mention here. Most renderers now are completely deferred in that most all of the lighting and effects are all done in image space, where render to texture is a component and the forward geometry passes don't account for too much. The benefit here is that the calculations can be done in constant time instead of growing in complexity w/ geometry.
Their uses are far too many to even mention here. Most renderers now are completely deferred in that most all of the lighting and effects are all done in image space, where render to texture is a component and the forward geometry passes don't account for too much. The benefit here is that the calculations can be done in constant time instead of growing in complexity w/ geometry.
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: Render to Texture?
Render to texture is when you render the scene (or a portion of it) to a texture rather than the frame buffer. This is used most often with post processing special effects. Have a look at this radial blurring screenshot on a sega Dreamcast (On my iPad now, Ill post later!)
The ps2 actually uses it in a bunch of games to perform post processing effects that it's shitty GPU couldn't do in hardware. Bump mapping, hdr lighting, radial blurring, etc. Shadow of the Colossus has a field day with this stuff...
The ps2 actually uses it in a bunch of games to perform post processing effects that it's shitty GPU couldn't do in hardware. Bump mapping, hdr lighting, radial blurring, etc. Shadow of the Colossus has a field day with this stuff...
- Milch
- Chaos Rift Junior
- Posts: 241
- Joined: Sat Jul 11, 2009 5:55 am
- Programming Language of Choice: C++
- Location: Austria, Vienna
Re: Render to Texture?
Is this also used for monitors and stuff?
Like in hl2? Or is this a 'render target'?
Like in hl2? Or is this a 'render target'?
Follow me on twitter!
- RyanPridgeon
- Chaos Rift Maniac
- Posts: 447
- Joined: Sun Sep 21, 2008 1:34 pm
- Current Project: "Triangle"
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/C++
- Location: UK
- Contact:
Re: Render to Texture?
Yes, that's why in Garry's Mod it's called the RT CameraMilch wrote:Is this also used for monitors and stuff?
Like in hl2? Or is this a 'render target'?
- Bakkon
- Chaos Rift Junior
- Posts: 384
- Joined: Wed May 20, 2009 2:38 pm
- Programming Language of Choice: C++
- Location: Indiana
Re: Render to Texture?
Also consider split screen multiplayer. You can have what player 1 sees rendered to a texture, then what player 2 sees rendered to another texture. Then both are slapped onto the back buffer to result in two different views of the same scene.
Re: Render to Texture?
This is normally done with viewports.Bakkon wrote:Also consider split screen multiplayer. You can have what player 1 sees rendered to a texture, then what player 2 sees rendered to another texture. Then both are slapped onto the back buffer to result in two different views of the same scene.
-
- Respected Programmer
- Posts: 387
- Joined: Fri Dec 19, 2008 3:33 pm
- Location: Dallas
- Contact:
Re: Render to Texture?
Exactly.
The more practical application here is to store data that isn't an "image". Anything like split screens, portals, and things of that nature don't require RTT. Bump mapping as well does not require RTT, as a matter of fact this would be a nasty waste of memory and bandwidth.
More commonly you'd store things such as motion vectors for motion blur. Luminosity sums for HDR. Things not easily represented by an integer format (although you CAN do this ;] ), such as oversaturated light values for HDR. Surface normals for lighting and a whole slew of other things. Swap chains for certain blurs such as gaussian blurs. Edge filters for faked antialiasing.
This is where the true power of RTT lies. You won't normally see it being used for things that could just as easily be done on the backbuffer (rendering to the backbuffer is very fast and is an already allocated resource). It's important that you see an image not so much as "a pretty picture", but as data. RT's serve as arrays of output data from shaders is about what this boils down to. You're leveraging the sheer power of the GPU to perform scalar ops on data and you're storing the data in an array (texture) to be read back at some other time (a shader, or on the CPU) for data that is NOT linear in nature (eg: NOT a color).
The more practical application here is to store data that isn't an "image". Anything like split screens, portals, and things of that nature don't require RTT. Bump mapping as well does not require RTT, as a matter of fact this would be a nasty waste of memory and bandwidth.
More commonly you'd store things such as motion vectors for motion blur. Luminosity sums for HDR. Things not easily represented by an integer format (although you CAN do this ;] ), such as oversaturated light values for HDR. Surface normals for lighting and a whole slew of other things. Swap chains for certain blurs such as gaussian blurs. Edge filters for faked antialiasing.
This is where the true power of RTT lies. You won't normally see it being used for things that could just as easily be done on the backbuffer (rendering to the backbuffer is very fast and is an already allocated resource). It's important that you see an image not so much as "a pretty picture", but as data. RT's serve as arrays of output data from shaders is about what this boils down to. You're leveraging the sheer power of the GPU to perform scalar ops on data and you're storing the data in an array (texture) to be read back at some other time (a shader, or on the CPU) for data that is NOT linear in nature (eg: NOT a color).
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: Render to Texture?
Thanks yall, this is a sweet technique that I want to use!
So render to texture seems like an optimization in some cases, cool!GyroVorbis wrote:The ps2 actually uses it in a bunch of games to perform post processing effects that it's shitty GPU couldn't do in hardware. Bump mapping, hdr lighting, radial blurring, etc. Shadow of the Colossus has a field day with this stuff...
This makes perfect sense now that I think about itRyanPridgeon wrote:Yes, that's why in Garry's Mod it's called the RT Camera
K-Bal wrote:This is normally done with viewports.Bakkon wrote:Also consider split screen multiplayer. You can have what player 1 sees rendered to a texture, then what player 2 sees rendered to another texture. Then both are slapped onto the back buffer to result in two different views of the same scene.
I too agree, I would definitely use viewports for something like this. Thanks for the inputqpHalcy0n wrote:Exactly.
The more practical application here is to store data that isn't an "image". Anything like split screens, portals, and things of that nature don't require RTT. Bump mapping as well does not require RTT, as a matter of fact this would be a nasty waste of memory and bandwidth.