Advertisement Jump to content
matt77hias

ACES and Uncharted Inverse Tone Mapping

This topic is 444 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Before AA, I apply tone mapping and after AA, I apply inverse tone mapping.

For the Reinhard operator this is trivial, but what about the Uncharted and ACES operators?

float3 ToneMap_ACESFilmic(float3 hdr) {
    static const float a = 2.51f;
    static const float b = 0.03f;
    static const float c = 2.43f;
    static const float d = 0.59f;
    static const float e = 0.14f;

    return (hdr * (a * hdr + b)) 
         / (hdr * (c * hdr + d) + e);
}

float3 ToneMap_Uncharted(float3 hdr) {
    static const float a = 0.22f;
    static const float b = 0.30f;
    static const float c = 0.10f;
    static const float d = 0.20f;
    static const float e = 0.01f;
    static const float f = 0.30f;

    return ((hdr * (a * hdr + b * c) + d * e)
          / (hdr * (a * hdr + b) + d * f)) - e / f;
}

They claim to be efficient in the number of FLOPs, but the inverse is the opposite and not uniquely defined (you have two choices due to the squares)?

Share this post


Link to post
Share on other sites
Advertisement

You cheat:

  1. Apply a trivial reversible tonemap operator before AA
  2. Resolve AA
  3. Apply the reverse of the tonemap operator in step 1
  4. Now apply the tonemap you wanted (Uncharted, ACES, whatever).

Share this post


Link to post
Share on other sites
34 minutes ago, Matias Goldberg said:

You cheat:

  1. Apply a trivial reversible tonemap operator before AA
  2. Resolve AA
  3. Apply the reverse of the tonemap operator in step 1
  4. Now apply the tonemap you wanted (Uncharted, ACES, whatever).

Does one also skip the eye adaption (e.g. average luminance) in step 1 and 3?

 

 

Krzysztof Narkowicz gave me the following link for the resolve only:

https://gpuopen.com/optimized-reversible-tonemapper-for-resolve/

Edited by matt77hias

Share this post


Link to post
Share on other sites

Eye adaptation happens after step 3.

Steps 1-3 is not about tonemap correctness, it's about correct AA. After step 3, you have antialiased colour data you can tonemap and eye adapt as you like.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!