Re: color interpolation discrepancies
- From: "jbwest" <jbwest@xxxxxxxxxxx>
- Date: Thu, 22 Sep 2005 07:17:06 -0700
<scott.d.anderson@xxxxxxxxx> wrote in message
news:1127358822.788331.277600@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> What I expected to see was all of these squares looking the same. (More
> specifically, I expected them to look like the last square, which at
> least looked smooth. But that's beside the point.) Mathematically, it
> doesn't matter whether you divide a square along one diagonal or the
> other: the parametric coordinates and therefore the color of the
> center is the same in either calculation. So, while I really do
> appreciate the practical advice to always use triangles for the most
> consistent results, it's amazing to me that I should have to even
> consider this. In fact, it's hard for me to imagine an implementation
> that would screw up interpolation -- the math is pretty easy.
>
> Scott
>
> PS: sorry to everyone for mispelling the URL. I see that most people
> figured out that I just mispelled "interpolation."
>
No, I'm sorry, but you are wrong. For a textured quad you are correct, as
all 4 corners
contribute to the color in the center, but for a per-vertex-color quad split
into a pair of triangles, the color just off of center is not affected at
all by the "other" corner in the other triangle.
Consider a quad that has colors red,red,red, blue corners. The red,red,red
triangle will
be red, all the way across, as the blue corner is not considered. As I said,
that's why
texturing is such a big deal these days and per-vertex coloring is
essentially obsolete --
a textured quad will consider the blue corner, using an interpolator of your
choosing.
It's not bilinear, it's triangle linear -- bilinear is a *lot* more
expensive, and triangle rasterizers
just won't do it -- the silicon doesn't exist.
.
- Follow-Ups:
- Re: color interpolation discrepancies
- From: scott.d.anderson@xxxxxxxxx
- Re: color interpolation discrepancies
- From: fungus
- Re: color interpolation discrepancies
- References:
- color interpolation discrepancies
- From: scott.d.anderson@xxxxxxxxx
- Re: color interpolation discrepancies
- From: scott.d.anderson@xxxxxxxxx
- color interpolation discrepancies
- Prev by Date: Re: color interpolation discrepancies
- Next by Date: Re: color interpolation discrepancies
- Previous by thread: Re: color interpolation discrepancies
- Next by thread: Re: color interpolation discrepancies
- Index(es):
Relevant Pages
|
Loading