PDA

View Full Version : edges of blended textures visible



dodgyposse
03-16-2001, 04:46 AM
I am having problems with blending ( again).

Basically, I used NeHes particle engine code
to make explosions for my game ( website www.dodgyposse.com (http://www.dodgyposse.com) ), and when a lot of particles overlap each other, I can see an outline of the edges of the texture.
i.e you can see the edges of the polygon
onto which the blended texture is drawn.

The edges are only visible, when I overlay the particle texture....when they overlay
onto other textures, they blend fine!

I can email the source code if anyone wishes to assist!

dd

kieranatwork
03-23-2001, 02:17 AM
I think you're problem is that you're using GL_REPEAT on your textures instead of GL_CLAMP. When using GL_REPEAT, a single polygon using the texture will have the top or right edge mapped to the bottom or left edge, if you see what I mean.
The solution is to bind to the appropriate texture, and do the following:-

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);