I have two textures
Texture 1 : 8 bit luminance
Texture 2 : 16 bit (R5 G5 B5 A1)
and i want to combine ( merge ) these, treating a particular color ( RGB ) in texture 2 as transparent.
What is the fastest way of doing this ?
I am using XP with Nvidia Quadro Fx 1300 chip.
Alpha blending is not very much helpful here. Please have a look at my actual problem :
My actual problem is : I have an image ( texture 1 ) and I have meory DC on which I draw some graphics using Windows GDI calls. I can’t set the alpha values of the pixels on which GDI graphics is drawn because it is not supported in GDI. So i have restricted the RGB(0,0,0) as transparent color and it fill the DC with RGB(0,0,0) before drawing any graphics. Now I want to put this memory DC into texture 2 and merge with texture 1 so that i get an image with GDI graphics drawn on it.
I want to know what is the fastest way of doing it ? Shader program ?
I heard that chroma keying and shader programs can be helpful here but i dont have much idea abt them.
If both the texture are of same format ( 16 bit) will it make any improvement in performance ?
Thanks in advance,