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

Calculate frame luminance using histogram for HDR #587

Open
mrDIMAS opened this issue Jan 17, 2024 · 3 comments
Open

Calculate frame luminance using histogram for HDR #587

mrDIMAS opened this issue Jan 17, 2024 · 3 comments
Labels
good first issue Good for newcomers graphics anything graphics- and rendering-related

Comments

@mrDIMAS
Copy link
Member

mrDIMAS commented Jan 17, 2024

Currently, frame luminance is calculated using downsampling with bilinear filtration, that basically calculates average frame luminance. Average luminance works quite bad in HDR, because a single bright pixel could easily ruin the luminance values. It could be done either on CPU or using a compute shader (this must be gated by checking if compute shaders are actually available).

@mrDIMAS mrDIMAS added good first issue Good for newcomers graphics anything graphics- and rendering-related labels Jan 17, 2024
@The-Ladle
Copy link

I want to try and take this issue, but I have no idea where frame luminance is calculated in the engine. If you could let me know, I'd be happy to start and try to fix this.

@mrDIMAS
Copy link
Member Author

mrDIMAS commented Apr 30, 2024

It is in HighDynamicRangeRenderer::calculate_avg_frame_luminance and I already did some basic version of histogram-based luminance calculation, but it requires tweaking and probably contains bugs in its implementation.

@The-Ladle
Copy link

I have been unable to figure this one out, which means I've effectively given up on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers graphics anything graphics- and rendering-related
Projects
None yet
Development

No branches or pull requests

2 participants