PDA

View Full Version : a quetion about alpha blending



dora
05-09-2005, 11:08 PM
there are two RGB images with size of 128*128.
i want to put the second image on the right of the first image, and there is a oeverlap section between them. the width of the overlap is 32.

because i can't get alpha value from the image, i don't know how to use alpha blending in the overlap section.
and how to let the images' border more smooth?

thanks

CWiC
05-11-2005, 07:32 AM
What is the reason of not being able to get alpha value from the image? Anyway, it is possible to add alpha chanel with desired gradient values by hand and then just blen two textures.

dorbie
05-11-2005, 07:37 PM
Place the image in a texture and draw a textured white quadrilateral, apply alpa to the image using vertex alpha on the smoothshaded polygons that make up the quad, you can apply this blend to the edge 32 pixels of the quad by positioning vertices at the appropriate location.