hybrid wrote:This is not correct, though. The value 0 should give the best alpha shading, giving every alpha value except for 0 will lead to a blended pixel. For larger values (ranging from 0 to 1) the low alpha values are simply discarded. This results in faster rendering, but also stronger border artifacts. Don't know what is actually wrong here.
Also, I found out that using 1.0f resulted in OpenGL not drawing anything at all. I had to switch it to use 0.99f. The higher the value, the less it blended the transparent pixels into the image.
Basically, I used an 8-bit PNG. The color gray was set to be the transparent color. I turned on bilinear filtering. As I used values closer to 0, the sprite had a more pronounced gray outline as it blended more of the gray into the image. As I used values closer to 1, the halo disappeared as it used more of the non-transparent pixel.
If I use 0 exactly, DirectX 9 ignored all transparency while OpenGL seemed to use a value like FLT_MIN.
If I use 1 exactly, DirectX 9 had no gray in the image at all while OpenGL didn't draw the whole entire image.
Since I didn't want any of the gray in the image, I was able to use 0.99f and both DX and OpenGL gave similar results.