Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoguzhu committed Jul 5, 2018
1 parent ef20c39 commit e0612f7
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'

Shader "FairyGUI/Text Brighter"
{
Properties
Expand Down Expand Up @@ -122,11 +124,11 @@ Shader "FairyGUI/Text Brighter"
o.texcoord = texcoord;

#ifdef CLIPPED
o.clipPos = mul(_Object2World, v.vertex).xy * _ClipBox.zw + _ClipBox.xy;
o.clipPos = mul(unity_ObjectToWorld, v.vertex).xy * _ClipBox.zw + _ClipBox.xy;
#endif

#ifdef SOFT_CLIPPED
o.clipPos = mul(_Object2World, v.vertex).xy * _ClipBox.zw + _ClipBox.xy;
o.clipPos = mul(unity_ObjectToWorld, v.vertex).xy * _ClipBox.zw + _ClipBox.xy;
#endif

return o;
Expand All @@ -138,13 +140,8 @@ Shader "FairyGUI/Text Brighter"
col.a *= tex2D(_MainTex, i.texcoord).a * i.flags.x;

#ifdef GRAYED
if(i.flags.y==1)
{
fixed grey = dot(col.rgb, fixed3(0.299, 0.587, 0.114));
col.rgb = fixed3(grey, grey, grey);
}
else
col.rgb = fixed3(0.8, 0.8, 0.8);
fixed grey = dot(col.rgb, fixed3(0.299, 0.587, 0.114));
col.rgb = fixed3(grey, grey, grey);
#endif

#ifdef SOFT_CLIPPED
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'

Shader "FairyGUI/Text"
{
Properties
Expand Down Expand Up @@ -116,11 +118,11 @@ Shader "FairyGUI/Text"
#endif

#ifdef CLIPPED
o.clipPos = mul(_Object2World, v.vertex).xy * _ClipBox.zw + _ClipBox.xy;
o.clipPos = mul(unity_ObjectToWorld, v.vertex).xy * _ClipBox.zw + _ClipBox.xy;
#endif

#ifdef SOFT_CLIPPED
o.clipPos = mul(_Object2World, v.vertex).xy * _ClipBox.zw + _ClipBox.xy;
o.clipPos = mul(unity_ObjectToWorld, v.vertex).xy * _ClipBox.zw + _ClipBox.xy;
#endif

return o;
Expand All @@ -132,13 +134,8 @@ Shader "FairyGUI/Text"
col.a *= tex2D(_MainTex, i.texcoord).a;

#ifdef GRAYED
if(i.flag==1)
{
fixed grey = dot(col.rgb, fixed3(0.299, 0.587, 0.114));
col.rgb = fixed3(grey, grey, grey);
}
else
col.rgb = fixed3(0.8, 0.8, 0.8);
fixed grey = dot(col.rgb, fixed3(0.299, 0.587, 0.114));
col.rgb = fixed3(grey, grey, grey);
#endif

#ifdef SOFT_CLIPPED
Expand Down
Binary file modified Examples.Unity5/Assets/Plugins/Editor/FairyGUI.Editor.dll
Binary file not shown.
Binary file modified Examples.Unity5/Assets/Plugins/Editor/FairyGUI.Editor.dll.mdb
Binary file not shown.
Binary file modified Examples.Unity5/Assets/Plugins/Editor/FairyGUI.Editor.pdb
Binary file not shown.
Binary file modified Examples.Unity5/Assets/Plugins/FairyGUI.dll
Binary file not shown.
Binary file modified Examples.Unity5/Assets/Plugins/FairyGUI.dll.mdb
Binary file not shown.
Binary file modified Examples.Unity5/Assets/Plugins/FairyGUI.pdb
Binary file not shown.

0 comments on commit e0612f7

Please sign in to comment.