Jump to content
  • Advertisement
Sign in to follow this  
88er

what wrong about my transparent texture??

This topic is 4790 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I use some transparent tree textures(TGA) in my scene,but they have a strange border,looks transparent completely. snap1 snap2 the texture here:0tree.tga how to avoid it,fix the texture or chang the code???

Share this post


Link to post
Share on other sites
Advertisement
You've left depth testing on - switch it off while rendering those trees, and render sorted from back to front.

Or, if you don't want to be sorting them you can just use alpha testing and render them like any other solid object..

Share this post


Link to post
Share on other sites
thank you Tang.
some other pictures here
snap1
snap2
I use the crossed-tree instead of billboard,so i can't sort the two ploys in one tree.btw,the same scene viewed in another machine with TNT2 hasn't this
bug(but replaced with a black border).this computer is Gforce5600.

I'd rather look the black border.

Share this post


Link to post
Share on other sites
Couldn't this be caused by interpolation of the alpha component, due to stretching of the texture? If so, my solution would be to use GL_NEAREST and GL_NEAREST as your minification and magnification filters (OpenGL solution). I don't know the equivalents in DirectX though...

Share this post


Link to post
Share on other sites
Quote:
Original post by 88er
thank you Tang.
some other pictures here
snap1
snap2
I use the crossed-tree instead of billboard,so i can't sort the two ploys in one tree.btw,the same scene viewed in another machine with TNT2 hasn't this
bug(but replaced with a black border).this computer is Gforce5600.

I'd rather look the black border.

Then split it into 4 polys so they can be sorted, transparent geometry has to be rendered with the depth test off and back to front order. The only way around that is to not have them transparent (hence the alpha test workaround).

Share this post


Link to post
Share on other sites
The same kind trees in the pop games looks good,i want to know what method
they use,is there any other way except for sorting the alpha poly.

if i splite all the trees to 4 poly,it will get too many polys,and low performance.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!