Post processing shader plus texture combiners

So, I’ve got a legacy program which uses texture combiners of all kinds. I’m adding a post-procesing filter over the entire image. How might I grab the post-combined textures color to manipulate it with my filter? Do legacy texture combiners not work in conjunction with shaders?
thanks.

So, I’ve got a legacy program which uses texture combiners of all kinds

What do you mean by “texture combiners”? Are you talking about the glTexEnv functionality, NVIDIA’s old register combiners, or NVIDIA’s old texture shaders?

Technically all of them have the same answer: they are all replaced by shaders. So they don’t work together.

As you say really. Create a shader to post-process the image produced by the combiner stage. What you need to do is use glCopyTexSubImage2D to copy the window backbuffer to a texture, or use FrameBufferObject and use the colour attachment as the source texture for your post process effect.

Alfonse, yes, I was referring to the glTexEnv functionality.

Bionic, thanks for the tip. I will try glCopyTexSubImage2D.

Makes sense why they wouldn’t work together.

Oh, could I then use a shader on the copied image? I’m just thinking how to put the work of the filter on the graphics hardware, not on the cpu.

Correct.
Use the copied image (texture) and draw a full screen quad with your effect shader bound.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.