gl4es icon indicating copy to clipboard operation
gl4es copied to clipboard

Replacement for alpha/blend hacks used for xash3d

Open mittorn opened this issue 5 years ago • 3 comments

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

mittorn avatar Feb 18 '19 16:02 mittorn

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?

ptitSeb avatar Feb 18 '19 16:02 ptitSeb

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?

ptitSeb avatar Feb 18 '19 16:02 ptitSeb

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

mittorn avatar Feb 19 '19 05:02 mittorn