feat(shaders): added Neupow - #614
Open
XgarhontX wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
Ok, the log2/exp2 optimization has drawbacks, like really high "probably not going to be used" values causes banding. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Neupow
Neutwo, but instead of "two", the power is a parameter.
Less optimized for more flexibility.
(x * peak) / pow(pow(x, power) + pow(peak, power), rcp(power))https://www.desmos.com/calculator/693lgrzm2v
Why?
I'm not a colorist so idk the curve's value regarding that.
I stumbled into by trying to luminance compress HDR color input into SDR LUT.
Being able to flexibly blend between Neutwo and Reinhard greatly help shape HDR upgrade coming out!
Also, as a final HDR tonemapper, it's nice to hook up one white clip parameter and let user tune to their heart's content since the power morphs so it much within just 1 - 4.
No gray in/out versions?
The morph makes everything arbitrary anyways.
Optimization
I let AI optimize with log2/exp2.
I've been using the current version for some newer stuff, and it seems good!
Invert
I didn't do it yet, and idk if it's worth.