Sign in to follow this  

Texture transparancy - problem with non-transparant edge

This topic is 2040 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 am using a texture with an alpha layer as a road. The texture is tiled along the length of the road.
I have problems with the edges, as it seems, that the alpha-values are not properly covering the extreme edges, where they are supposed to.

How do I get around this problem?

Edit: Just for information: I am using Directx 9 and shader 3.0.


[img]http://www.qnan-games.com/texture_edge.jpg[/img] Edited by QNAN

Share this post


Link to post
Share on other sites
Texture filtering shenanigans: the texture wraps and thereby it does filtering with the pixels at the other side of the texture.

Quick fix if you want to get this done: edit the texture so if there are transparent pixels at a border, it's also transparent in those same pixels at the other border. One pixel of thickness will do, but beware of mipmaps (since the same rule will need to apply to those, so you may need to add more transparent pixels, depending on how many mipmaps you use). Edited by Sik_the_hedgehog

Share this post


Link to post
Share on other sites
You can also enable border color and make sure it has 0 alpha, which I would consider an easier and possibly more robust solution...

...with the caveat that tiling a texture (as you seem to be doing) becomes nigh-impossible. You can get around this by manually specifying wrap points in the mesh, but it's still a bit on the hacky side.

Share this post


Link to post
Share on other sites

This topic is 2040 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this