View Full Version : Interpolating textures?

01-26-2007, 01:58 PM
I'm working on terrain for a project. I want to be able to have several layers of textures on the terrain at different locations.

( Eventually I want these locations to be edited in a map editor, but thats off topic for now )

The locations are decided based on the height of each polygon. Low polygon = sand; High Polygon = grass; I first lay out the entire terrain mesh and then split it into 2 display lists based on the layers. And apply different textures to them when they are drawn.


As you can see this leaves very noticeable borders.

How could I interpolate these textures as I can per-vertex colors. I see it done in games all the time.


I don't mind rewriting everything I have so far :)

01-26-2007, 02:39 PM
For the general approach :
But beware, the extensions used in this tutorial/demo are really outdated.

They are replaced by much more generic GLSL stuff present in Opengl 2.0 :