Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iluGammaCorrect #79

Open
malytomas opened this issue Jan 23, 2019 · 0 comments
Open

iluGammaCorrect #79

malytomas opened this issue Jan 23, 2019 · 0 comments

Comments

@malytomas
Copy link

Hi,
I have looked at this code:

ILboolean ILAPIENTRY iluGammaCorrect(ILfloat Gamma)

As I understand it, there are two issues with it.

  1. With bpc (bytes per channel) > 1 the algorithm throws away any higher precision data and outputs just 256 different levels. It should properly compute the power instead of using the precomputed table. (Or precompute higher-precision table depending on the image resolution.)

  2. The algorithm applies to alpha channel too. Since Devil was designed to work well with OpenGL, I would assume that it would behave similar to sRGB textures, which do NOT alter the alpha channel.
    https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glTexImage2D.xhtml
    Or is alpha channel stored separately? I am not that much familiar with Devil internals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant