Mail Archives: djgpp/1998/08/24/07:19:28
The easiest method of texture mapping I can think of is to work out the
gradient along the edges of the polygon (between the texture coords for
each vertex) storing the values into edgelists for the left and right sides
of the poly, then interpolate again between the left and right edges (for
each y) by the texture coordinates. it ends up looking quite ugly if you do
it like this unfortunately and there are much nicer ways to do it, I've got
a really old and cheesy demo I wrote a while back that uses this effect up
somewhere (http://www.fortunecity.com/skyscraper/parallax/194/newdemo.zip
if I remember right), it's really ugly and runs in 256 colors, but it shows
what you can do with a little work, from textured, to bilinear filtered
depth cued environment mapped, with very little extra maths.
Like I say, it's a really old demo and I don't know if the codes in there
or not, if it isn't and you'd like some help with this, mail me and let me
know and I'll see what I can do.
-------
Jado.
[www.jado.org]
> So if any of you brilliant programmers out there have a working C
> example of texture mapping, that is fairly basic in nature, could you
> please send it to me along with the *.pcx file that the example uses.
> I don't care even if it is really basic, anthing will do at this point
> my sanity is slowly wearing thin.
- Raw text -