Settings and Macros/SoftClip Description

From VFXPedia

Jump to: navigation, search

Whenever a float image is converted to an integer format, overbright pixels should be compressed gently instead of clipping them. This macro uses an inverse function akin to -1/x to modify values above a given threshold so that no colour channel will ever exceed 1.

Pictures speak more than words:

Image:softclip_graph.png

The exact function is:

 if c > threshold
   c = (-1 / ((c - threshold) / (1 - threshold) + 1) + 1) * (1 - threshold) + threshold

You can also sandwich the node between two invert nodes to clip the blacks.