Re: stop texture from interpolating
From: Michel Walsh (vanderghast_at_VirusAreFunnierThanSpam)
Date: 07/08/04
- Next message: Michel Walsh: "Re: can open internet explorer in full screen directx app?"
- Previous message: ZMan: "Re: Vector3.Unproject - Incorrect return value"
- In reply to: Jakob NIelsen: "stop texture from interpolating"
- Next in thread: Jakob NIelsen: "Re: stop texture from interpolating"
- Reply: Jakob NIelsen: "Re: stop texture from interpolating"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 8 Jul 2004 16:38:18 -0400
Hi,
Try
device.RenderState.ShadeMode = ShadeMode.Flat;
A better solution could be to define two vertices (same X, Y, Z, but
different (u,v) or different color) if you don't want continuity. As
example, pointA (x=10, y=20, z=30) in Blue for a face all in Blue, and the
same point, in Red, for another face all in Red. In other words, let the
interpolation takes place where it makes sense, and create the color
discontinuity (but geometry continuity) where it is required. You end up
with more data, but for a close look, that may worth it...
Hoping it may help,
Vanderghast, Access MVP
"Jakob NIelsen" <a@b.c> wrote in message
news:ehfMXeNZEHA.3688@TK2MSFTNGP12.phx.gbl...
> I am rendering a "terrain" with a large number of triangles. The triangles
> are drawn as indexed primitives, with one vertex for each grid position in
> the landscape.
> They are also given a texture coorinate based on some force value at each
> grid position.
> The problem is that if an edge in a triangle connects two vertices with
> difrent texture coordinates, then the edge is painted with a texture value
> which is between the two real values.
>
> imagine that a force of 1 is blue. 5 is yellow and 10 is green
> An edge connects force 1 and 10. The edge is now drawn mostly yellow.
> When even more colors exist between the two real ones, they are all drawn
> along the line.
>
> How do I get one color all the way? No interpolation. If the first vertex
in
> the triangle is blue, then all of the triangle is blue.
> This interpolation gives a very false image, which cant really be used to
> much.
>
> An example is shown here. www.greenleaf.dk/texture.jpg
> The colors should be dark and light green - certainly not yellow, white
and
> blue.
>
>
- Next message: Michel Walsh: "Re: can open internet explorer in full screen directx app?"
- Previous message: ZMan: "Re: Vector3.Unproject - Incorrect return value"
- In reply to: Jakob NIelsen: "stop texture from interpolating"
- Next in thread: Jakob NIelsen: "Re: stop texture from interpolating"
- Reply: Jakob NIelsen: "Re: stop texture from interpolating"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|