Jump to content
  • Advertisement
Sign in to follow this  
Dragon_Strike

alphas function on luminance

This topic is 4032 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!