I'm making a fast text rendering for an UI system based on OpenGL wich uses subpixel rendering, White text over black background works well with "normal" blending, but black text over white background does not, because the color fringes of the subpixel rendering are multiplied by 0 (because is black), and the subpixel aliasing is lost.
I know this isn't the "correct" way (because i would need to blend each R, G and B subpixel channels separately) but its very fast and looks good almost every situation.
In order to do this, i need to invert the texture color "before" the blending is done, for example:
normal blending is: SourceColor * SourceAlpha + DestColor * (1 - SourceAlpha)
I want this: ((1,1,1) - SourceColor) * SourceAlpha + DestColor * (1 - SourceAlpha)
Is there a way to do this without shaders?? I think that the key is to do two passes with different blending settings but i just can't get it working
I know i could have two textures, one normal and one inverted, but i don't want to waste video memory (because each font requieres an already big texture)