I need a fresh perspective or ideas to help make solving this problem a little easier. Without going into overwhelming detail, basically I have 6 large textures, one for each side of a cube (let's say each is 2048 x 2048 pixels). I want to build a utility which modifies the edges of the textures so that they're seamless, similar to how Gimp or any other image processor application would create a seamless tiling texture.
This would be easy if I were just matching up the edges of two textures at a time, but the fact that this is a CUBE means that the corners make things tricky, since each edge needs to be matched up to two different textures, which also have their own bordering edges that need to be made seamless. Another complication is determining the correct pixels on each texture to read and modify. Due to the different ways the coordinates are oriented on each texture, it's not as easy as it sounds. I could probably throw lots of code at the problem and "hard code" things for each edge/corner, but I'm hoping to find a less work intensive and error prone solution.
Attachment is an effort to help visualize how the textures border one another. The (x, y) in the corners contain texture pixel coordinates, mx is the maximum value (ex. index 2047). The i & j can be read as x and y respectively (I also use i & j coordinates which range from -1 to 1 for some unrelated stuff, but we can ignore that bit here). Red lines are just pointing out what sides are adjacent.
[attachment=36186:Cube_map.png]
Is there some simple way to approach this problem that I'm failing to recognize?
Not sure if this is the best place to drop this one, so if a mod wants to move it somewhere better, go for it.