Legacy Documentation: Version 4.6.2
Language: English
Color Correction Lookup Texture
Contrast Stretch

Contrast Enhance

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

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, this effect is only available in Unity Pro and you must have the Pro Standard Assets 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.
Threshhold The constrast threshold below which no enhancement is applied.
Blur Spread The radius over which contrast comparisons are made.

Hardware Support

This effect requires a graphics card that supports Shader Model 2. See the Graphics Hardware Capabilities and Emulation page for further details and a list of compliant hardware.

Color Correction Lookup Texture
Contrast Stretch