PDA

View Full Version : Blending



mkardesci
04-19-2003, 02:12 PM
Hello,

I am trying to create a glowing star. For this purpose, I loaded a texture from a bitmap file and mapped that texture on to a square quad. And then I called glBlendFunc(GL_SRC_ALPHA, GL_ONE). For the most of the stars (when they overlap) there is a great transparancy that I wanted. But sometimes, for some reason, the square of quad suddenly appears. But this is not always happening. How can I prevent the square apperance.

Thanks

JD
04-19-2003, 04:08 PM
Try alpha testing + blending.

jwatte
04-19-2003, 04:09 PM
Perhaps this is clamping and filtering with the border color. Try the texture wrapping mode GL_CLAMP_TO_EDGE.

Jan
04-20-2003, 02:12 AM
Try glDepthMask (false).

When you have depth-testing enabled the depth-values will still be calculated and compared, but new ones won´t be written to the depth-buffer anymore. When drawing something like particles (blended but not sorted by depth), this can avoid some problems.

Jan.