Texture interpolate question, cracks on composite texture

Texture interpolate question, cracks on composite texture

Post by Jack Hoxle » Thu, 16 Sep 2004 20:23:58


you are right - it's using wrap-around addressing, so the texel next to
u=1.0 is u=0.0 ...

I don't have exact code to hand, but basically you want to set the texture
stage state for D3DTS_ADDRESSU to D3DTA_CLAMP - or something fairly similiar
to that (for 'v' as well).

You can still get some artifacts this way - but they're often difficult to
spot, and definitely nowhere near as bad as what you currently have.



Texture interpolate question, cracks on composite texture

Post by boil » Fri, 17 Sep 2004 01:38:42

> Im working on a terrain engine. I split a big terrain texture into 4

du you mean the yellow ones or the straight dark line uphill ?

for me the dark one seem to have something to to with tex-coords as you
assumed. looks like a border color which gets mixed in if the tex coord is
closer to the texture border as half the size of a texel and
anyway, if the tex coords component gets between 0 and 1/dim/2 or 1 and
1-1/dim/2 values not
related to this position get mixed in. either from border color or other
texture coords or simply copied
from the last texel in case of CLAMP or so. I suggest to change the coords
from 0..1 to 1/dim/2..1-1/dim/2.

for me the yellow lines seem to be something different. maybe you're drawing
yellow lines there ;)
if not, is it the background color ? are the verts of adjacent polys at the
exact same spacial position for the common edge ?