Advertisement

Texture tears

Started by August 17, 2001 02:20 PM
13 comments, last by Frank Henry 23 years, 6 months ago
hi again, next problem ;-) when i move about my masked texture seams to tear around the edges, i.e. my mask showing on the edge. any ideas? thanks again
Um, if this isn''t what you''re talking about, ignore me.

I''m assuming you have some sort of picture with an alpha channel it in, and using alpha testing, you''re ignoring certain fragments of the picture.

If you have a valid pixel (i.e., high enough alpha value to display it) on the edge of the polygon it''s texturing, a "glow" from that image will appear on the other side of the polygon, essentially wrapping it around.

If (Big If) that''s what you''re talking about, then the solution is to make a one-pixel transparent border around the entire image so as to avoid that.

I hope I came even close to what you''re talking about...

~ Dragonus
If F = ma, and Work = Fd, does that mean that Work = mad?
Advertisement
hmm, don''t think so.
i''m not using alpha channels.
would a screenshot help?
or rather the code?
i''m using a bitmap with multiple images that i, depending on what is used either the first (mask) or n-section (colored image).
Screenshots = good...

~ Dragonus
can i append it to a post?
or send ti directly to you?
thanks
texture tearing it''s usually depending on Z-buffer, try to use a 32bit z-buffer and if you have a line like the following:

gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,perspective,distance);

make sure that the distance parameter is quite big.

glHorizon_Project



www.web-discovery.net


Advertisement
how do i set a 32bit z-buffer?
my code is mostly like nehe''s.

thanks
It defaults to 32bit, if you have a card that supports it. Almost all cards do it, but if you have a voodoo1/2/3, then that might be your problem, these boards only support 16bit.
got a voodoo3/3k.
wierd thin is that on my other project with mutiple (100) masked textures this problem did not show up.
might ther be a problem since i''m using multiple textures from one bitmap?

thanks for the help.
sound like ure textures are space fighting. If u can ,apply the textures is order i.e. furthest one away first.




~prevail by daring to fail~

This topic is closed to new replies.

Advertisement