View Full Version : Particle texture that has alpha in rgb channels

07-06-2015, 09:15 AM
I'm trying to use particles with the alpha as the rgb channels in my program. Ranging from black (0,0,0) for transparent, to white (1,1,1) for opaque. Can I do this with a blend function or do I need to use a shader?

Dark Photon
07-06-2015, 07:00 PM
See glBlendFunc (https://www.opengl.org/sdk/docs/man/html/glBlendFunc.xhtml). Specifically, the SRC_COLOR blend functions. You can play with this here:

* http://www.andersriggelsen.dk/glblendfunc.php

That said you could also write a shader, populate alpha and then use that to do your blending.