Hello everyone, recently Ive been having an issue that youll see below. Yes I have GL_BLEND enabled, GL_ALPHA_TEST enabled, GL11.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA), GL11.glAlphaFunc(GL11.GL_GREATER, 0), GL11.glEnable(GL11.GL_DEPTH_TEST);
(https://i.stack.imgur.com/F20HN.png)
As you can see the white appears where opaque pixels should be. Thanks in advanced for your help with this
Premultiplied alpha (https://tomforsyth1000.github.io/blog.wiki.html#%5B%5BPremultiplied%20alpha%5D%5D). "Use it, love it, pass it on."
Quote from: spasi on December 10, 2018, 23:00:50
Premultiplied alpha (https://tomforsyth1000.github.io/blog.wiki.html#%5B%5BPremultiplied%20alpha%5D%5D). "Use it, love it, pass it on."
But how would this be implemented in OpenGL?
You multiply the RGB channels of all your RGBA textures by the ALPHA channel, then use:
glBlendFunc(GL_ONE,GL_ONE_MINUS_SRC_ALPHA);
instead of
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);