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

Renderer: Level/Gamma Support #456

Open
Charltsing opened this issue Apr 17, 2024 · 4 comments
Open

Renderer: Level/Gamma Support #456

Charltsing opened this issue Apr 17, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@Charltsing
Copy link

Charltsing commented Apr 17, 2024

Black--gamma--White

like photoshop--Level:
level

Black (0 min , 127 max)
The default value for gamma is 2.2, (range 1.0 min 5.0 max)
White(128 min , 255 max)

@SuRGeoNix
Copy link
Owner

Hi @Charltsing, not sure how I should properly include this in the pixel shader, here:-

https://github.com/SuRGeoNix/Flyleaf/blob/master/FlyleafLib/MediaFramework/MediaRenderer/ShaderCompiler.cs#L366

I tried this color.rgb = pow(color.rgb, gamma); and not even sure for the right allowed values it should have. Give it a try and let me know or create a PR so I can include this.

@SuRGeoNix SuRGeoNix added the enhancement New feature or request label May 5, 2024
@Charltsing
Copy link
Author

Charltsing commented May 5, 2024

it is a level code:
https://github.com/ImageMagick/ImageMagick/blob/bacef9eb7565b34b1c4c9a8fa5ceccbc4fc5b6b2/MagickCore/enhance.c#L2913

MagickExport MagickBooleanType LevelImage(Image *image,const double black_point,
const double white_point,const double gamma,ExceptionInfo *exception)

@SuRGeoNix SuRGeoNix changed the title Add Level in video setting Renderer: Level/Gamma Support May 6, 2024
@SuRGeoNix
Copy link
Owner

@Charltsing This should be implemented with the pixel shader in GPU and no in RAM for performance. It will require more research and I'm afraid I will not be adding any new features in v3 as I'm trying to focus in the new major v4.

@Charltsing
Copy link
Author

Thanks for your reply.

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

No branches or pull requests

2 participants