Skip to content

Conversation

@pavly-gerges
Copy link
Contributor

@pavly-gerges pavly-gerges commented Nov 19, 2021

A color filter used to adjust the color contrast and brightness based on a simple tone map operator function and adjust scales on the final result at the final pass before rendering.

Supports and tested on both OGL and OGLES (android).

Discussion : https://hub.jmonkeyengine.org/t/gammacorrectionfilter/45076/33

@pavly-gerges
Copy link
Contributor Author

Targeting both : #781 #809

@stephengold
Copy link
Member

Thanks for working to resolve these issues.

@stephengold
Copy link
Member

Let us know when this is ready for review.

@pavly-gerges
Copy link
Contributor Author

pavly-gerges commented Nov 19, 2021

Let us know when this is ready for review.

I have changed the default exp value to 2.2, and documented some default values.

It's now ready for review.

@Ali-RS
Copy link
Member

Ali-RS commented Nov 20, 2021

I did a quick look through and noticed fields scale_r,exp_r,... and getters getScale_r, getExp_r,... I think to follow JME (and generally Java conventions) it is better to name them like rScale, rExp,... and getRScale, getRExp,.... that's how the rest of the JME code is following.

@pavly-gerges
Copy link
Contributor Author

Alright, I will change them, please continue reviewing.

Copy link
Member

@stephengold stephengold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a partial review. Many of my comments are about issues that arise throughout ContrastAdjustmentFilter.java: the choice of defaults, the use of underscores in variable names, the terminology used to discuss colors, etcetera. Please apply my requested changes throughout the PR. I'd like to review this PR again after my requested changes are made.

@pavly-gerges
Copy link
Contributor Author

@stephengold @Ali-RS Hello there, i have made the requested changes, i hope everything is clear now, please review it again.
Thanks.

@stephengold stephengold marked this pull request as ready for review December 6, 2021 20:51
@stephengold
Copy link
Member

Unless there's further discussion, I plan to integrate this PR in about 24 hours.

@stephengold
Copy link
Member

Additional work will be required to resolve #809.

@stephengold stephengold merged commit 645b1bb into jMonkeyEngine:master Dec 8, 2021
@pavly-gerges
Copy link
Contributor Author

pavly-gerges commented Dec 9, 2021

Additional work will be required to resolve #809.

Like what ? Predefining the filter in the harness activity for sRGB exponent if the srgbFrame is true ?

@stephengold
Copy link
Member

Something like that, yes. #809 specifically refers to the harness.

@pavly-gerges pavly-gerges changed the title ColorAdjustmentFilter ContrastAdjustmentFilter: A filter to adjust the colors of a rendered scene Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GammaCorrectionFilter is deprecated in 3.2

4 participants