Legacy Documentation: Version 5.1
Color Correction Lookup Texture
Contrast Stretch

Contrast Enhance

The Contrast Enhance image effect enhances the impression of contrast for a given camera. It uses the well-known unsharp mask process available in image processing applications.

When blurring is applied to an image, the colors of adjacent pixels are averaged to some extent, resulting in a reduction of sharp edge detail. However, areas of flat color remain relatively unchanged. The idea behind unsharp masking is that an image is compared with a blurred (or “unsharp”) version of itself. The difference in brightness between each pixel in the original and the corresponding pixel in the blurred image is an indication of how much constrast the pixel has against its neighbours. The brightness of that pixel is then changed in proportion to the local contrast. A pixel which is darker after blurring must be brighter than its neighbours, so its brightness is further increased while if the pixel is darker after blurring then it will be darkened even more. The effect of this is to increase contrast selectively in areas of the image where the detail is most noticeable. The parameters of unsharp masking are the pixel radius over which colors are blurred, the degree to which brightness will be altered by the effect and a “threshold” of contrast below which no change of brightness will be made.

As with the other image effects, you must have the Standard Assets Effects package installed before it becomes available.

No Contrast Enhance
No Contrast Enhance
Contrast enhance enabled
Contrast enhance enabled

Properties

Property: Function:
Intensity The intensity of contrast enhancement.
Threshold The constrast threshold below which no enhancement is applied.
Blur Spread The radius over which contrast comparisons are made.

Hardware Support

This effect should run on all hardware that Unity supports.

Color Correction Lookup Texture
Contrast Stretch