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.
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. |
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.