www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/24/07:19:28

From: "Jado" <Jado AT removethis DOT jado DOT org>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Texture Mapping.
Date: 24 Aug 1998 11:01:15 GMT
Organization: Jado.org
Message-ID: <01bdcf4e$9cb44320$6f8666a1@exe1717.abz.xeu.bp.com>
References: <35dd0714 DOT 9052353 AT news DOT ix DOT net DOT au>
NNTP-Posting-Host: 161.102.134.111
Lines: 26
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019