-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Cristina Sturm
committed
Nov 29, 2013
1 parent
e86b30d
commit 0027f20
Showing
151 changed files
with
6,356 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,32 @@ | ||
[Ll]ibrary/ | ||
[Tt]emp/ | ||
[Oo]bj/ | ||
**NGUI/Examples/.**/.* | ||
|
||
# Autogenerated VS/MD solution and project files | ||
# Unity generated # | ||
# =============== # | ||
Temp/ | ||
Obj/ | ||
UnityGenerated/ | ||
Library/ | ||
|
||
# ===================================== # | ||
# Visual Studio / MonoDevelop generated # | ||
# ===================================== # | ||
ExportedObj/ | ||
*.svd | ||
*.userprefs | ||
*.csproj | ||
*.unityproj | ||
*.pidb | ||
*.suo | ||
*.sln | ||
*.userprefs | ||
*.user | ||
*.unityproj | ||
*.booproj | ||
|
||
# ============ # | ||
# OS generated # | ||
# ============ # | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
Icon? | ||
ehthumbs.db | ||
Thumbs.db |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
193 changes: 193 additions & 0 deletions
193
Assets/NGUI/Examples/Atlases/Fantasy/Fantasy Font - Normal.txt
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+14.7 KB
Assets/NGUI/Examples/Atlases/Refractive/Refractive Font - Header.prefab
Binary file not shown.
603 changes: 603 additions & 0 deletions
603
Assets/NGUI/Examples/Atlases/Refractive/Refractive Font - Header.txt
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+15.4 KB
Assets/NGUI/Examples/Atlases/Refractive/Refractive Font - Normal.prefab
Binary file not shown.
432 changes: 432 additions & 0 deletions
432
Assets/NGUI/Examples/Atlases/Refractive/Refractive Font - Normal.txt
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
603 changes: 603 additions & 0 deletions
603
Assets/NGUI/Examples/Atlases/SciFi/SciFi Font - Header.txt
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
432 changes: 432 additions & 0 deletions
432
Assets/NGUI/Examples/Atlases/SciFi/SciFi Font - Normal.txt
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
Shader "NGUI/Examples/Orc Armor" | ||
{ | ||
Properties | ||
{ | ||
_Color ("Main Color", Color) = (1,1,1,1) | ||
_SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) | ||
_Shininess ("Shininess", Range (0.01, 1)) = 0.078125 | ||
_MainTex ("Diffuse (RGB), Color Mask (A)", 2D) = "white" {} | ||
_BumpMap ("Normalmap", 2D) = "bump" {} | ||
_MaskTex ("Specular (R), Reflection (G)", 2D) = "black" {} | ||
} | ||
|
||
// Good quality settings | ||
SubShader | ||
{ | ||
Tags { "RenderType"="Opaque" } | ||
LOD 300 | ||
|
||
CGPROGRAM | ||
#pragma surface surf PPL | ||
|
||
sampler2D _MainTex; | ||
sampler2D _BumpMap; | ||
sampler2D _MaskTex; | ||
fixed4 _Color; | ||
float _Shininess; | ||
|
||
struct Input | ||
{ | ||
float2 uv_MainTex; | ||
}; | ||
|
||
// Forward lighting | ||
half4 LightingPPL (SurfaceOutput s, half3 lightDir, half3 viewDir, half atten) | ||
{ | ||
half3 nNormal = normalize(s.Normal); | ||
half shininess = s.Gloss * 250.0 + 4.0; | ||
|
||
#ifndef USING_DIRECTIONAL_LIGHT | ||
lightDir = normalize(lightDir); | ||
#endif | ||
|
||
// Phong shading model | ||
//half reflectiveFactor = max(0.0, dot(-viewDir, reflect(lightDir, nNormal))); | ||
|
||
// Blinn-Phong shading model | ||
half reflectiveFactor = max(0.0, dot(nNormal, normalize(lightDir + viewDir))); | ||
|
||
half diffuseFactor = max(0.0, dot(nNormal, lightDir)); | ||
half specularFactor = pow(reflectiveFactor, shininess) * s.Specular; | ||
|
||
half4 c; | ||
c.rgb = (s.Albedo * diffuseFactor + _SpecColor.rgb * specularFactor) * _LightColor0.rgb; | ||
c.rgb *= (atten * 2.0); | ||
c.a = s.Alpha; | ||
return c; | ||
} | ||
|
||
void surf (Input IN, inout SurfaceOutput o) | ||
{ | ||
half4 tex = tex2D(_MainTex, IN.uv_MainTex); | ||
half4 maps = tex2D(_MaskTex, IN.uv_MainTex); | ||
|
||
o.Albedo = lerp(tex.rgb, tex.rgb * _Color.rgb, tex.a); | ||
o.Alpha = _Color.a; | ||
o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_MainTex)); | ||
o.Specular = maps.r; | ||
o.Gloss = _Shininess; | ||
} | ||
ENDCG | ||
} | ||
|
||
// Simple quality settings -- drop the bump map | ||
SubShader | ||
{ | ||
Tags { "RenderType"="Opaque" } | ||
LOD 200 | ||
|
||
CGPROGRAM | ||
#pragma surface surf Lambert | ||
|
||
sampler2D _MainTex; | ||
fixed4 _Color; | ||
|
||
struct Input | ||
{ | ||
float2 uv_MainTex; | ||
}; | ||
|
||
void surf (Input IN, inout SurfaceOutput o) | ||
{ | ||
half4 tex = tex2D(_MainTex, IN.uv_MainTex); | ||
o.Albedo = lerp(tex.rgb, tex.rgb * _Color.rgb, tex.a); | ||
o.Alpha = _Color.a; | ||
} | ||
ENDCG | ||
} | ||
Fallback "Diffuse" | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
Shader "NGUI/Examples/Orc Skin" | ||
{ | ||
Properties | ||
{ | ||
_Color ("Main Color", Color) = (1,1,1,1) | ||
_SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) | ||
_Shininess ("Shininess", Range (0.01, 1)) = 0.078125 | ||
_MainTex ("Diffuse (RGB), Specular (A)", 2D) = "white" {} | ||
_BumpMap ("Normalmap", 2D) = "bump" {} | ||
} | ||
|
||
// Good quality or above | ||
SubShader | ||
{ | ||
Tags { "RenderType"="Opaque" } | ||
LOD 300 | ||
|
||
CGPROGRAM | ||
#pragma surface surf PPL | ||
|
||
sampler2D _MainTex; | ||
sampler2D _BumpMap; | ||
fixed4 _Color; | ||
float _Shininess; | ||
|
||
struct Input | ||
{ | ||
float2 uv_MainTex; | ||
}; | ||
|
||
// Forward lighting | ||
half4 LightingPPL (SurfaceOutput s, half3 lightDir, half3 viewDir, half atten) | ||
{ | ||
half3 nNormal = normalize(s.Normal); | ||
half shininess = s.Gloss * 250.0 + 4.0; | ||
|
||
#ifndef USING_DIRECTIONAL_LIGHT | ||
lightDir = normalize(lightDir); | ||
#endif | ||
|
||
// Phong shading model | ||
//half reflectiveFactor = max(0.0, dot(-viewDir, reflect(lightDir, nNormal))); | ||
|
||
// Blinn-Phong shading model | ||
half reflectiveFactor = max(0.0, dot(nNormal, normalize(lightDir + viewDir))); | ||
|
||
half diffuseFactor = max(0.0, dot(nNormal, lightDir)); | ||
half specularFactor = pow(reflectiveFactor, shininess) * s.Specular; | ||
|
||
half4 c; | ||
c.rgb = (s.Albedo * diffuseFactor + _SpecColor.rgb * specularFactor) * _LightColor0.rgb; | ||
c.rgb *= (atten * 2.0); | ||
c.a = s.Alpha; | ||
return c; | ||
} | ||
|
||
void surf (Input IN, inout SurfaceOutput o) | ||
{ | ||
half4 tex = tex2D(_MainTex, IN.uv_MainTex) * _Color; | ||
o.Albedo = tex.rgb; | ||
o.Alpha = _Color.a; | ||
o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_MainTex)); | ||
o.Specular = tex.a; | ||
o.Gloss = _Shininess; | ||
} | ||
ENDCG | ||
} | ||
|
||
// Simple quality -- drop the normal map | ||
SubShader | ||
{ | ||
Tags { "RenderType"="Opaque" } | ||
LOD 200 | ||
|
||
CGPROGRAM | ||
#pragma surface surf PPL | ||
|
||
sampler2D _MainTex; | ||
fixed4 _Color; | ||
float _Shininess; | ||
|
||
struct Input | ||
{ | ||
float2 uv_MainTex; | ||
}; | ||
|
||
// Forward lighting | ||
half4 LightingPPL (SurfaceOutput s, half3 lightDir, half3 viewDir, half atten) | ||
{ | ||
half3 nNormal = normalize(s.Normal); | ||
half shininess = s.Gloss * 250.0 + 4.0; | ||
|
||
#ifndef USING_DIRECTIONAL_LIGHT | ||
lightDir = normalize(lightDir); | ||
#endif | ||
|
||
// Phong shading model | ||
half reflectiveFactor = max(0.0, dot(-viewDir, reflect(lightDir, nNormal))); | ||
|
||
// Blinn-Phong shading model | ||
//half reflectiveFactor = max(0.0, dot(nNormal, normalize(lightDir + viewDir))); | ||
|
||
half diffuseFactor = max(0.0, dot(nNormal, lightDir)); | ||
half specularFactor = pow(reflectiveFactor, shininess) * s.Specular; | ||
|
||
half4 c; | ||
c.rgb = (s.Albedo * diffuseFactor + _SpecColor.rgb * specularFactor) * _LightColor0.rgb; | ||
c.rgb *= (atten * 2.0); | ||
c.a = s.Alpha; | ||
return c; | ||
} | ||
|
||
void surf (Input IN, inout SurfaceOutput o) | ||
{ | ||
half4 tex = tex2D(_MainTex, IN.uv_MainTex) * _Color; | ||
o.Albedo = tex.rgb; | ||
o.Alpha = _Color.a; | ||
o.Specular = tex.a; | ||
o.Gloss = _Shininess; | ||
} | ||
ENDCG | ||
} | ||
Fallback "Diffuse" | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Flag = Flag-US | ||
Language = English | ||
English = English | ||
French = Français | ||
Info = Localization example | ||
Sound = Sound | ||
Music = Music | ||
Desc = English localization | ||
Paragraph = This example shows how to implement localization using NGUI. In order to localize a widget, simply attach [000000]UILocalize[-] script to it. The script will localize the sprite if it's a [000000]UISprite[-], or the text if it's a [000000]UILabel[-]. If you want to localize something else, just implement the [000000]OnLocalize[-] function. Either way, the actual data is defined via text assets specified on the [000000]Localization[-] script which must be present in the scene. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Flag = Flag-FR | ||
Language = Français | ||
English = English | ||
French = Français | ||
Info = Par exemple la localisation | ||
Sound = Son | ||
Music = Musique | ||
Desc = La localisation française | ||
Paragraph = Cet exemple montre comment implémenter la localisation en utilisant NGUI. Pour localiser un widget, il suffit d'y attacher le script [000000]UILocalize[-]. Ce script localisera le sprite si c'est un [000000]UISprite[-], ou le texte si c'est un [000000]UILabel[-]. Si vous voulez localiser autre chose, il suffit d'implémenter la fonction [000000]OnLocalize[-]. Dans tous les cas, les données sont définies par l'intermédiaire de documents texte spécifiés dans le script [000000]Localization[-] qui doit être présent dans la scène. |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.