   Alpha blending without glBlend
    Hi,  When I have 32bit texture RGBA and I would liketo blend alpha over texture ( ordinary black=see throught ),but I don't want to use glBlend. There are some reasonsdo it this way. What texture operations with glTexEnv should I do? When I set GL_TEXTURE_ENV_MODE to GL_MODULATE or toGL_COMBINE_ARB and then GL_MODULATE, what shoud I use for GL_SOURCE0.. GL_SOURCE1 , GL_OPERAND0, GL_OPERAND1.. ?  Thanks   
  Hi,Another way to do alpha is to use alpha test. This is enabled with glEnable(GL_ALPHA_TEST); and you use glAlphaFunc to set which fragments get disgarded due to alpha.msdn linky #1msdn linky #2Regards,ViLiO   ;  maybe - GL_ALPHA_SCALE   ;Quote:Original post by martinhoge  Hi,When I have 32bit texture RGBA and I would liketo blend alpha over texture ( ordinary black=see throught ),but I don't want to use glBlend. There are some reasonsdo it this way. What texture operations with glTexEnv should I do? When I set GL_TEXTURE_ENV_MODE to GL_MODULATE or toGL_COMBINE_ARB and then GL_MODULATE, what shoud I use for GL_SOURCE0.. GL_SOURCE1 , GL_OPERAND0, GL_OPERAND1.. ?  ThanksSo what you want is for the output for that texture unit to be (R*A, G*A, B*A)?  Did I understand you correctly?You should be able to get that with something like this (not tested)...//This will give arg0 * arg1 where//arg0 = texture's RGB//arg1 = texture's AglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_MODULATE);glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB, GL_TEXTURE);glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB, GL_SOURCE_COLOR);glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB, GL_TEXTURE);glTexEnvi(GL_TExTURE_ENV, GL_OPERAND1_RGB, GL_SOURCE_ALPHA);You could also set GL_COMBINE_ALPHA to something (maybe GL_REPLACE with GL_SOURCE0_ALPHA set to GL_PRIMARY_COLOR so that you get the alpha value from glColor* or a color array).Again that isn't tested but I think it should do what you want, or at least what it is I think you want.   