Sign in to follow this  
Dragon_Strike

alphas function on luminance

Recommended Posts

is there any glBlend function that works on luminance instead of alpha values? i want to do some blending based on the lumincance ( r+g+b)... i dont want to use the alpha values since im using this for storing other stuff... id also like ti to the blending in the values beetween 0.0-0.4 where 0.0 is transparent and 0.4 is nontransparent..

Share this post


Link to post
Share on other sites
If you want different behaviour for alpha [0,0.4] and (0.4, 1] then you could draw twice and use alpha testing to discard a different half each time.

However for the rest of it I think you're going to have to write your own fragment shader (probably using GLSL). With a shader you could do both operations in a single draw call, but you'd raise your hardware requirements a bit (GF FX and up).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this