Page MenuHome

Fix T84167: Saving half-float EXR might result in NaN pixels
ClosedPublic

Authored by Sergey Sharybin (sergey) on Jan 13 2021, 2:59 PM.

Details

Summary

Clamp value to the HALF_MAX.

Clamp value to the -HALF_MAX .. HALF_MAX.

The non-clamped values were causing NaN and inf values saved to
the file, which was the root cause of glare node giving unexpected
result.

The nan/inf on overflow is something mentioned in the half data
type in OpenEXR header.

Diff Detail

Repository
rB Blender

Event Timeline

Sergey Sharybin (sergey) requested review of this revision.Jan 13 2021, 2:59 PM
Sergey Sharybin (sergey) created this revision.
Brecht Van Lommel (brecht) requested changes to this revision.Jan 13 2021, 3:03 PM

I guess this needs to clamp to -HALF_MAX..HALF_MAX? Large negative numbers are not as likely, but still possible.

This revision now requires changes to proceed.Jan 13 2021, 3:03 PM

Clamp to -HALF_MAX .. HALF_MAX

This revision is now accepted and ready to land.Jan 13 2021, 3:21 PM