diff --git a/README.md b/README.md index dbae940..a643211 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ UIEffect contains visual effect components for uGUI element in Unity. [![](https://img.shields.io/github/release-date/mob-sakai/UIEffect.svg)](https://github.com/mob-sakai/UIEffect/releases) ![](https://img.shields.io/badge/unity-5.5%2B-green.svg) [![](https://img.shields.io/github/license/mob-sakai/UIEffect.svg)](https://github.com/mob-sakai/UIEffect/blob/master/LICENSE.txt) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-orange.svg)](http://makeapullrequest.com) @@ -32,10 +33,10 @@ AnimationClip is supported as a matter of course! | Component | Features | Screenshot | |-|-|-| -|**UIEffect**|Combine some visual effects.

**ToneMode:** Grayscale, Sepia, Nega, Pixelation, Hue shift, Cutoff (alpha-based), Mono (alpha-based)
**ColorMode:** Multiply, Fill, Additive, Subtract
**BlurMode:** Fast, Medium, Detail

*NOTE: ToneMode, ColorMode and BlurMode are changeable only in editor.*
*NOTE: Custom Effect feature is deprecated. Please use `UICustomEffect` component instead.*
*NOTE: Shadow feature is deprecated. Please use `UIShadow` component instead.*
*NOTE: Hue is deprecated. Please use UIHsvModifier component instead.*
*NOTE: Cutoff and Mono is deprecated. Please use UITransitionEffect component instead.*|| -|**UICaptured EffectImage**|Capture a screenshot of a specific frame with effect, and display it.
This effect is non-realtime, light-weight, less-camera, but be effective enough.

**ToneMode:** Grayscale, Sepia, Nega, Pixelation
**ColorMode:** Multiply, Fill, Additive, Subtract
**BlurMode:** Fast, Medium, Detail
**QualityMode:** Fast, Medium, Detail, Custom
**Options:** Capture on enable, Blur iterations, Reduction rate, Target texture, Fit size to screen.

NOTE: Use this component in 'ScreenSpace - Camera' or 'ScreenSpace - Overlay' mode.|| -|**UIShiny**|Apply shinning effect to a graphic.
The effect does not require Mask component or normal map.

**Options:** Location, Width, Rotation, Softness, Brightness, Highlight|| -|**UIDissolve**|Apply dissolve effect to a graphic.

**ColorMode:** Overwrite, Additive, Subtract
**Options:** Location, Width, Rotation, Softness, Color|| +|**UIEffect**|Combine some visual effects.

**ToneMode:** Grayscale, Sepia, Nega, Pixelation
**ColorMode:** Multiply, Fill, Additive, Subtract
**BlurMode:** Fast, Medium, Detail
**AdvancedBlur:** Enable more beautiful blurring|| +|**UICaptured EffectImage**|Capture a screenshot of a specific frame with effect, and display it.
This effect is non-realtime, light-weight, less-camera, but be effective enough.

**Tone Mode:** Grayscale, Sepia, Nega, Pixelation
**Color Mode:** Multiply, Fill, Additive, Subtract
**Blur Mode:** Fast, Medium, Detail
**Quality Mode:** Fast, Medium, Detail, Custom
**Capture On Enable:** When the component is enable, capture screen automatically.
**Blur iterations:** Number of blur iterations.
**Reduction/Downsampling Rate:** None, x1, x2, x4, x8
**Fit size to screen:** Fit RectTransform to the screen.|| +|**UIShiny**|Apply shinning effect to a graphic.
The effect does not require Mask component or normal map.

**Parameters:** Location, Width, Rotation, Softness, Brightness, Gloss|| +|**UIDissolve**|Apply dissolve effect to a graphic.

**ColorMode:** Overwrite, Additive, Subtract
**Parameters:** Location, Width, Rotation, Softness, Color|| |**UIHsvModifier**|Modify HSV for graphic.

**Target:** Color, Range
**Adjustment:** Hue, Saturation, Value|| |**UITransition Effect**|Apply transition effect with a single channel texture.

**EffectMode:** Cutoff, Fade|| @@ -44,7 +45,7 @@ AnimationClip is supported as a matter of course! | Component | Features | Screenshot | |-|-|-| -|**UIShadow**|Add shadow/outline to a graphic.
Performance is better than the default Shadow/Outline component.
See also [Development note](#the-issue-of-default-outline-component).

**ShadowStyle:** Shadow, Shadow3, Outline, Outline8
**Additional Shadows** reduce vertices for multiple Shadows or Outlines.
*NOTE: AdditionalShadow is deprecated. Please use multiple `UIShadow` component instead.*|| +|**UIShadow**|Add shadow/outline to a graphic.
The performance is better than the default Shadow/Outline component.

**ShadowStyle:** Shadow, Shadow3, Outline, Outline8|| |**UIGradient**|Change vertex color as gradient with angle and offset.

**Direction:** Horizontal, Vertical, Angle, Diagonal
**Options:** Offset, Color space|| |**UIFlip**|Flip a graphic.

**Direction:** Horizontal, Vertical, Both|| @@ -68,10 +69,10 @@ AnimationClip is supported as a matter of course! ## Usage 1. Download UIEffect.unitypackage from [Releases](https://github.com/mob-sakai/UIEffect/releases). -1. Import the package into your Unity project. Select `Import Package > Custom Package` from the `Assets` menu. -1. In Unity5.6+, enable `TexCoord1` channel of canvas. See also [Development Note](##note-unity-56). -1. Add any effect component to UI element (Image, RawImage, Text, etc...) from `Add Component` in inspector. -1. Enjoy! +2. Import the package into your Unity project. Select `Import Package > Custom Package` from the `Assets` menu. +3. In Unity5.6+, enable `TexCoord1` channel of canvas. See also [Development Note](##note-unity-56). +4. Add any effect component to UI element (Image, RawImage, Text, etc...) from `Add Component` in inspector. +5. Enjoy! ##### Requirement @@ -82,6 +83,24 @@ AnimationClip is supported as a matter of course! +



+## Example of using + +| Title | Description | Screenshot | +|-|-|-| +|Lock/unlock contents|Use UIEffect for grayscale.
Indicate to user that the content is unavailable.|| +|Silhouette|Use UIEffect for filling color.|| +|Soft shadow(outer glow)|Use UIEffect and UIShadow for blurring shadow.
To blur only shadow, set `Blur Factor` to 0.|| +|Colored shadow|Use UIEffect and UIShadow for filling colored shadow.
To fill color only shadow, set `Color Factor` to 0.|| +|Blurred dynamic text|Use UIEffect for blurring.
To blur dynamic font cleanly, enable `Advanced Blur` option.|| +|Text with outline & shadow|Use two UIShadow for outline and shadow.
There is less overdraw than default Outline/Shadow `(Default: 1 x 5 x 2 = 10 draw calls, UIShadow: 4 + 1 = 5 draw calls)`.|| +|Shinning button|Use UIShiny for shinning button.
Shine the button and indicate to user that you can press the button.
Enable `Play On Enable` and `Loop` option to shine it without any AnimationClip.|| +|Blurring the background of a menu|Use UIEffectCapturedImage to blur the background of a menu.
UIEffectCapturedImage applies an effect to the screen of the previous frame, without adding a camera or layer.
It's not a real-time post effect, so it's good performance and works well on mobile.|| +|Screen transition|Use UITransitionEffect to create screen transition.
You can change transition texture (single channel texture).|| + + + +



## Development Note @@ -121,6 +140,12 @@ See also [Demo](#demo). | x(32bit float) | Tone level | *Empty* | Blur level | *Empty* | | y(32bit float) | Red channel | Green channel | Blue channel | Alpha channel | +* In v3.0.0+, UIEffect uploads the parameter value to a shared texture and the shader refers to it. +This approach has the following advantages: + * More parameters for the effect are available. + * The parameter accuracy is improved from 6 bits to 8 bits. + * ModifyMesh is not called when parameter value is changed. + #### Note: Unity 5.6+