Image Texture Resize using glsl


I want to know how, using a glsl program, I can rezise a texture. Let say, I have an 1024x768 image that I want to resample to 640x480. (by linear interpolation for example).

I want to proceed the resize of the image with gpu using a glsl program. Assuming I am able to get the corresponding texture of the original image, how and what instructions I have to write in the shader to resize the image the way I want.

Thank you for your help.


I have similar problem. I need to resize RGB texture of size 840x512 to 1400x1050. Any help.


Use the texture on a quad, draw the quad so that its size is 1400x1050, glReadPixels the results, done.

(GLSL is not even needed, by the way)

Feel free to ask for detals if needed.

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