Method of interpolating colors between textures

Hi! I came across a problem and I have no idea of how to solve it.

I have two textures drawn on 2 rectangles with some space between them. What I’m trying to do is fill the space between the two textures with colors interpolated from the two matching points form the textures, in a GLSL manner.

The problem presented in a simpler manner: consider a cube with one face white and the opposite face black. I have to fill the points inside the cube with gray shades ranging from white (near the white face) to black (near the black face).

Can you suggest me a method of doing this? I have no point from where to start, so any help would be greatly appreciated. I have to use GLSL as there is a lot of parallel computing going on there.
Tnx

le: something like in this image, but I need the white and black sides to be textures, and also to compute the colors of the points inside the cube too.

I’m thinking sphere/cylinder mapping with a gadient texture of some sort. Not 100% clear on what you’re after, but there’s not much you can’t do with the right texcoords and texture.

I have the two textures that will be the white face and the black face of the cube.
How do I compute the color of every pixel between the two faces as an interpolation of coresponding pixels color from the two faces?

I would specify 3 texture coordinates for each point. The first two would be the same, and the third would be 0 for the black side, and 1 for the white side. Look up the colors from both textures, and weight them according to the third texture coordinate.

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