View Full Version : post processing shader plus texture combiners
04-05-2011, 05:17 PM
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?
04-05-2011, 05:20 PM
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.
04-06-2011, 03:11 AM
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.
04-06-2011, 08:37 AM
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.
04-06-2011, 08:48 AM
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.
04-07-2011, 03:38 AM
Oh, could I then use a shader on the copied image?
Use the copied image (texture) and draw a full screen quad with your effect shader bound.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.