Skip to content

Commit

Permalink
release v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Sakai committed Apr 9, 2018
2 parents 2a31dd8 + 3236be7 commit e377e7f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
11 changes: 10 additions & 1 deletion Assets/ShinyEffectForUGUI/UI-Effect-Shiny.shader
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ Shader "UI/Hidden/UI-Effect-Shiny"
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
float4 worldPosition : TEXCOORD1;
UNITY_VERTEX_OUTPUT_STEREO

half4 effectFactor : TEXCOORD1;
half4 effectFactor : TEXCOORD2;
};

fixed4 _Color;
Expand Down Expand Up @@ -107,6 +108,8 @@ Shader "UI/Hidden/UI-Effect-Shiny"
v2f OUT;
UNITY_SETUP_INSTANCE_ID(IN);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
OUT.worldPosition = IN.vertex;

OUT.vertex = UnityObjectToClipPos(IN.vertex);

OUT.texcoord = IN.texcoord;
Expand All @@ -122,6 +125,12 @@ Shader "UI/Hidden/UI-Effect-Shiny"
{
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;

color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);

#ifdef UNITY_UI_ALPHACLIP
clip (color.a - 0.001);
#endif

fixed lowLevel = IN.effectFactor.y - IN.effectFactor.z;
fixed highLevel = IN.effectFactor.y + IN.effectFactor.z;
fixed shinePower = smoothstep(IN.effectFactor.z, 0, abs(abs(clamp(IN.effectFactor.x, lowLevel, highLevel) - IN.effectFactor.y)));
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [v0.2.0](https://github.com/mob-sakai/ShinyEffectForUGUI/tree/v0.2.0) (2018-04-09)

[Full Changelog](https://github.com/mob-sakai/ShinyEffectForUGUI/compare/v0.1.0...v0.2.0)

**Fixed bugs:**

- Bug: Clipping is disabled. [\#5](https://github.com/mob-sakai/ShinyEffectForUGUI/issues/5)

## [v0.1.0](https://github.com/mob-sakai/ShinyEffectForUGUI/tree/v0.1.0) (2018-04-09)

[Full Changelog](https://github.com/mob-sakai/ShinyEffectForUGUI/compare/3aa9ebbad004f7a812c93133f90336b06ffd034f...v0.1.0)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ShinyEffectForUGUI
===

ShinyEffectForUGUI
### NOTE: This project *will* be merged to [UIEffect](https://github.com/mob-sakai/UIEffect).

Shiny effect without Mask commponent.
Since useless draw calls are suppressed, performance is good!

![4 -06-2018 16-14-09](https://user-images.githubusercontent.com/12690315/38418624-2d210df8-39d8-11e8-9b92-493a4ada60f8.gif)
![4 -09-2018 22-45-47](https://user-images.githubusercontent.com/12690315/38501362-c56e3768-3c47-11e8-9ec1-50343d8b83ad.gif)

[![](https://img.shields.io/github/release/mob-sakai/ShinyEffectForUGUI.svg?label=latest%20version)](https://github.com/mob-sakai/ShinyEffectForUGUI/release)
[![](https://img.shields.io/github/release-date/mob-sakai/ShinyEffectForUGUI.svg)](https://github.com/mob-sakai/ShinyEffectForUGUI/releases)
Expand All @@ -17,7 +17,7 @@ Since useless draw calls are suppressed, performance is good!
[![](https://img.shields.io/github/commits-since/mob-sakai/ShinyEffectForUGUI/latest.svg)](https://github.com/mob-sakai/ShinyEffectForUGUI/compare/master...develop)


<< [Description](#Description) | [WebGL Demo](#demo) | [Download](https://github.com/mob-sakai/ShinyEffectForUGUI/releases) | [Usage](#usage) | [Development Note](#development-note) | [Change log](https://github.com/mob-sakai/ShinyEffectForUGUI/blob/develop/CHANGELOG.md) >>
<< [Description](#Description) | [Demo](#demo) | [Download](https://github.com/mob-sakai/ShinyEffectForUGUI/releases) | [Usage](#usage) | [Development Note](#development-note) | [Change log](https://github.com/mob-sakai/ShinyEffectForUGUI/blob/develop/CHANGELOG.md) >>



Expand Down Expand Up @@ -48,7 +48,7 @@ This will suppress extra draw calls and improve performance.
<br><br><br><br>
## Demo

[WebGL Demo](https://)
![4 -09-2018 23-15-12](https://user-images.githubusercontent.com/12690315/38503024-f1055fd8-3c4b-11e8-9065-841c75728498.gif)



Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ShinyEffectForUGUI",
"version": "0.1.0",
"version": "0.2.0",
"repository": {
"type": "git",
"url": "git+https://github.com/mob-sakai/ShinyEffectForUGUI.git"
Expand Down

0 comments on commit e377e7f

Please sign in to comment.