Colour mask with fractional values

Sorry if this is posted in the wrong place, I’m rather new here

I would like to have a colour mask using the value 0.5 for one of the colour channels, however glColorMask(); requires a boolean value, can I achieve a similar effect without glColorMask();?

I want to see half of the blue channel whilst seeing all of the others. (as if glColor3f(1.0f,1,0f,1.0f) was actually glColor3f(1.0f,1.0f,0.5f))

“I want to <b>see</b>” - glColorMask does not change what you see. It masks what you modify.

See the documentation for glBlendFunc().

For example you can multiply the source fragment color with a constant color (1.0, 1.0, 0.5, 1.0) before writing it to the framebuffer.

OK, thanks guys, it works now :slight_smile: