Jump to content
  • Advertisement
Sign in to follow this  
Deliverance

Blending and filtering

This topic is 3906 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'm programming a beakout clone these days and i have some porblems. I'm making full use of drawing images with transpaerncy, more specific images that have an alpha value of 0.0f or 1.0f. The thing is i get some artefacts near the contour of the image and don't really understand why. When i'm rendering textured polygons and turn alhpa blending on like this glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); i think the artefacts occur because of the filtering of the texture. But the thing i don't understand is why do i get artefacts near the contour of the image when i'm sending pixels with glDrawPixels to the pipeline. Here is a screenshot from the game: http://img233.imageshack.us/img233/9919/imaginezj1.png Notice that the little "spikes" from the bottom are surrounded by black pixels. Those spikes are rendered with glDrawPixels. Why are there black pixels on the contour?

Share this post


Link to post
Share on other sites
Advertisement
donot use mipmaps
use GL_NEAREST filtering

the problems should go away

u will need to recheck your textures in gimp/photoshop

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!