Do i need Alpha channels for transparency to work in OpenGL? can i use glBlendFunc or anything else to make somehow the Black or White color transparent/not visible? if yes, how to do it?
No, you don't need an alpha channel in your textures. Call discard
in your fragment shader for all fragments that match your transparency rule.
Yes, you need alpha channels to use transparency. You can emulate the behaviour of color keying using shaders, or processing the image and replacing the color key with pixels with alpha = 0.0.
Notice that GPUs always allocate RGBA textures, even if you want a RGB texture. The alpha channel is still present in hardware.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With