Blending in OpenGL

Started by
2 comments, last by psyjax 20 years, 3 months ago
Hey folks, I was wondering how much of a speed hit is blending in OpenGL? I ask this because my SDL/OpenGL 2D engine, uses lots of it to get nice smoothly anti-aliased sprites. The way I do it is to simply load everything as sexy alpha-masked .png files :D Works great so far, but then again I have a GeForce Ti4200, and I want my game to run fine on everything down to a GeForce II. So my question is simple, does alpha masking thrugh hardware blending, cause a significant speed hit? Thanks
Advertisement
Blending over a large portion of a high res screen will cause signifigant speed hits to fillrate. I would recomend useing the alpha test if you don''t require semi transparency.

"I seek knowledge and to help those who also seek it"
"I seek knowledge and to help those who also seek it"
That''s simply not true anymore.

Blending used to require a full read from framebuffer, some math, and then a write. However, these days, blending sits in the memory controller, and is very efficient. While it''ll do a bit of a hit to fillrate, compared to non-blended, I wouldn''t be surprised if it''s on the order of 15% in a heavily fillrate bound application, and nothing at all in an application that''s bottlenecked somewhere else (CPU, transform, etc).

If you want to worry about the low end, worry about i845 "Extreme" graphics, which is still being sold. The GeForce II is much faster than those cards, and won''t be a problem for you if you run well on a 4200.
enum Bool { True, False, FileNotFound };
Hey,

Thanks for the replys!

I''m targetting at least GeForceII and MX cards. And I do use Alpha_test. Tho alot of my graphics have alpha masks. So I guess I''m just gonna stick to it then

Thanks a bunch!

This topic is closed to new replies.

Advertisement