[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg
Subject: Re: 4 corner gradient
From: Allen Akin <akin () pobox ! com>
Date: 2007-06-28 17:46:29
Message-ID: 20070628174629.GZ26575 () arden ! org
[Download RAW message or body]
On Thu, Jun 28, 2007 at 11:29:04AM +0100, Keith Whitwell wrote:
| Glynn Clements wrote:
| > Tom De Man wrote:
| >
| >> Using the i915 I try to create a 4 corner gradient rectangle using 2 3D
| >> primitive triangles. I get a visible diagonal line between the two
| >> triangles ...
| >
| > Gouraud shading uses linear interpolation. Essentially, each of the
| > two triangles will be mapped to a planar (flat) triangle in RGB space.
| > As the 4 vertices (red, green, blue, white) aren't co-planar, there
| > will be a discontinuity (corner) along the diagonal where the two
| > triangles meet.
| >
| > OTOH, bilinear interpolation between the vertices will produce a
| > continuous surface (specifically, a ruled surface) with no
| > discontinuities.
| >
| > AFAIK, you cannot achieve bilinear interpolation using OpenGL
| > primitives...
I have a vague recollection that you can do this in old-style OpenGL
using texture mapping, but I can't find sample code at the moment.
| You could do it pretty simply with a pixel shader.
Yep, that would be the way to go with current hardware.
Allen
_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic