Hi,
I’m working on a renderer using exclusively a premultiplied alpha blending function GL_ONE:GL_ONE_MINUS_SRC_ALPHA. I need to support programmable as well as fixed-func hardware.
My current problem is that I need to scale the color vectors of a vertex array given a floating point number between in the range [0.0:1.0]. That number defines the opacity of the set of primitives to be rasterized. The formula used is the standard premultiplied alpha one: [R’,G’,B’,A’] = [Ra,Ga,Ba,a]. The thing is that I’d like to avoid processing my vertices using the CPU.
When vertex shaders are supported I can write a simple vertex shader to do that. The question is do you know a way to accomplish that task using the GPU with fixed-func hardware?