Bilinearly interpolate a texture to a quad

I could use a little help working out a piece of code.

Basically what I need to do is to interpolate a 2D texture into a flat 2D quad bi-linearly. Now, I tried simply drawing the quad and setting each corner of the quad to each corner of the texture. My brain soon forgot that OpenGL breaks the quads into tris and this is what I got

Now what I want to do, is to smoothly interpolate the texels between all four corners, like this

(did this with the GIMP, btw)

I’m assuming I could fix the texture coordinates inside the shader, but I can’t wrap my head on how to do it. Any other ideas are very welcome

Please continue on…6940#Post286940
It is exactly the same situation.

Thanks. I searched the forums first to see if I found something similar, but I guess I didn’t use the same keywords.

This helps a lot. Thank you! :slight_smile: