Open mittorn opened 5 years ago
Yes, the alpha/blend issue is because the texture gain an alpha channel where it should not, thus changing the blend equation. All this should be fixed with gl4es now, especially with GLES2 backend. You this have some issues?
Or do you mean I should force the alpha channel to 255 when internalformat is asked as GL_RGB but storing internally as GL_RGBA?
Yes. Issue in xash3d was because texture was loaded wirh internalformat=GL_RGB, but it was forced to GL_RGBA keeping alpha channel. It seems that gl4es now converts texture, so it will be udeful only with LIBGL_AVOID24BITS option. I cannot check if it still exist because of buggy amdgpu-pro driver which crashes on gles2
Not sure if actual now, but it should be faster than converting texture to RGB when application requests GL_RGB as internal format: https://github.com/FWGS/nanogl/blob/master/nanoWrap.cpp#L1278 This will fix blend errors for LIBGL_AVOID24BITS if still exist