Shader Output?

2470ed5fce7176bb80512d2fcfd9bc53
0
phrogger 101 Jun 01, 2004 at 04:12

I assume there is no way for a pixel shader to write to a texture despite the ability to read from multiple textures. So, what’s the easiest way to get any type of output? I envision having to render to texture or a pbuffer and accessing the resultant texture/pbuffer as an array of data.

Any other ideas?

6 Replies

Please log in or register to post a reply.

F7a4a748ecf664f189bb704a660b3573
0
anubis 101 Jun 01, 2004 at 07:02

as soon as the new render target extension is in the drivers of ati and nvidia things get easier but right now using a pbuffer for a render to texture is the only choice you have. anyway, why do you need to do this ?

E74d63fbaf27a7bc3608d4c0938c7ed8
0
DANNER 101 Jun 04, 2004 at 16:37

You can use the classic method of rendering with your pixel shader to the back buffer and use copyTexSubImage to copy the backbuffer contents to a texture. This is probably easier than rendering using a pbuffer and copying it contents to the texture. The only time using the backbuffer will not work is if it’s dimensions are less than the texture.

If you’re going the pbuffer route, you may as well use the WGL_ARB_render_texture extension.

Hopefully the ARB super buffer extension will be resolved soon (and in a way that works well of course.)

F7a4a748ecf664f189bb704a660b3573
0
anubis 101 Jun 04, 2004 at 17:02

well, WGL_ extensions bind you to windows…

F7a4a748ecf664f189bb704a660b3573
0
anubis 101 Jun 04, 2004 at 17:23
E74d63fbaf27a7bc3608d4c0938c7ed8
0
DANNER 101 Jun 04, 2004 at 21:55

@anubis

i’d wait for this… http://www.opengl.org/resources/features/G…nder_target.txt

Yes…that one of many proposals that are being considered by the ARB super buffers working groups. This particular one had some problems with it and others are being considered now.

F7a4a748ecf664f189bb704a660b3573
0
anubis 101 Jun 05, 2004 at 01:58

url ?
i’m kind of behind those things due to my lack of motivation :)