pull/5/head
Arneth 4 years ago
parent f98eb96584
commit 2816ca2aff

@ -19,7 +19,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Temp\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;UNITY_STANDALONE_OSX;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_MONO;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_GENERICS;ENABLE_SUBSTANCE;INCLUDE_WP8SUPPORT;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;INCLUDE_METROSUPPORT;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_2D_PHYSICS;ENABLE_GAMECENTER;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_NAVMESH_CARVING;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_3_1;UNITY_4_3;DEVELOPMENT_BUILD;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE</DefineConstants>
<DefineConstants>DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_MONO;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_GENERICS;ENABLE_SUBSTANCE;INCLUDE_WP8SUPPORT;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;INCLUDE_METROSUPPORT;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_2D_PHYSICS;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_NAVMESH_CARVING;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_3_1;UNITY_4_3;DEVELOPMENT_BUILD;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn>
@ -84,6 +84,7 @@
<Compile Include="Assets\Scripts\Assembly-CSharp\ChannelTexture.cs" />
<Compile Include="Assets\Scripts\Assembly-CSharp\CharObject.cs" />
<Compile Include="Assets\Scripts\Assembly-CSharp\CreateSprite.cs" />
<Compile Include="Assets\Scripts\Assembly-CSharp\CreditsWindow.cs" />
<Compile Include="Assets\Scripts\Assembly-CSharp\CursorData.cs" />
<Compile Include="Assets\Scripts\Assembly-CSharp\DEBUG_ID.cs" />
<Compile Include="Assets\Scripts\Assembly-CSharp\DebugDef.cs" />

File diff suppressed because it is too large Load Diff

Binary file not shown.

@ -1,93 +1,81 @@
Shader "QO/Effect/Mosaic" {
Properties {
_tex0 ("_tex0 : Original Image (RGBA)", 2D) = "white" {}
_tex1 ("_tex1 : Transform Image (RGBA)", 2D) = "white" {}
_X ("x pixels", Float) = 0
_Y ("y pixels", Float) = 0
_MX ("min x pixels", Float) = 16
_MY ("min y pixels", Float) = 9
_time ("time rate", Range(0,1)) = 0
}
SubShader {
LOD 200
Tags { "QUEUE"="Transparent" "RenderType"="Transparent" }
Pass {
Tags { "QUEUE"="Transparent" "RenderType"="Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
Program "vp" {
SubProgram "gles " {
"!!GLES
#ifdef VERTEX
varying mediump vec4 xlv_TEXCOORD0;
varying lowp vec4 xlv_COLOR0;
uniform highp mat4 glstate_matrix_mvp;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesVertex;
void main ()
Shader "QO/Effect/Mosaic"
{
gl_Position = (glstate_matrix_mvp * _glesVertex);
xlv_COLOR0 = vec4(1.0, 1.0, 1.0, 1.0);
xlv_TEXCOORD0 = _glesMultiTexCoord0;
}
Properties
{
_tex0("_tex0 : Original Image (RGBA)", 2D) = "white" {}
_tex1("_tex1 : Transform Image (RGBA)", 2D) = "white" {}
_X("x pixels", Float) = 0
_Y("y pixels", Float) = 0
_MX("min x pixels", Float) = 16
_MY("min y pixels", Float) = 9
_time("time rate", Range(0,1)) = 0
}
SubShader
{
LOD 200
Tags { "QUEUE" = "Transparent" "RenderType" = "Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
Lighting Off
Pass
{
ZTest Always ZWrite Off
Fog { Mode off }
#endif
#ifdef FRAGMENT
varying mediump vec4 xlv_TEXCOORD0;
uniform mediump float _time;
uniform mediump float _MY;
uniform mediump float _MX;
uniform mediump float _Y;
uniform mediump float _X;
uniform sampler2D _tex1;
uniform sampler2D _tex0;
void main ()
{
mediump float tmpvar_1;
tmpvar_1 = (1.0 - sin((_time * 3.14)));
mediump float tmpvar_2;
tmpvar_2 = ((tmpvar_1 * _X) + _MX);
mediump float tmpvar_3;
tmpvar_3 = ((tmpvar_1 * _Y) + _MY);
mediump vec2 tmpvar_4;
tmpvar_4.x = max (0.0, min (1.0, (floor((xlv_TEXCOORD0.x * tmpvar_2)) / tmpvar_2)));
tmpvar_4.y = max (0.0, min (1.0, (floor((xlv_TEXCOORD0.y * tmpvar_3)) / tmpvar_3)));
lowp vec4 tmpvar_5;
tmpvar_5 = texture2D (_tex0, tmpvar_4);
mediump float tmpvar_6;
mediump float t_7;
t_7 = max (min ((((1.0 - _time) - 0.45) / 0.11), 1.0), 0.0);
tmpvar_6 = (t_7 * (t_7 * (3.0 - (2.0 * t_7))));
mediump vec4 tmpvar_8;
tmpvar_8.xyz = tmpvar_5.xyz;
tmpvar_8.w = tmpvar_6;
lowp vec4 tmpvar_9;
tmpvar_9 = texture2D (_tex1, tmpvar_4);
mediump vec4 tmpvar_10;
tmpvar_10.xyz = tmpvar_9.xyz;
tmpvar_10.w = (1.0 - tmpvar_6);
mediump vec4 tmpvar_11;
tmpvar_11.xyz = ((tmpvar_8.xyz * tmpvar_6) + (tmpvar_10.xyz * tmpvar_10.w));
tmpvar_11.w = (tmpvar_6 + tmpvar_10.w);
gl_FragData[0] = tmpvar_11;
}
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
uniform sampler2D _tex0;
uniform sampler2D _tex1;
uniform float _X;
uniform float _Y;
uniform float _MX;
uniform float _MY;
uniform float _time;
#endif"
}
}
Program "fp" {
SubProgram "gles " {
"!!GLES"
}
}
}
}
Fallback "VertexLit"
fixed4 frag(v2f_img i) :COLOR
{
//Setup for UV
float tmpvar_1 = (1.0 - sin(mul(_time,3.14)));
float tmpvar_2 = mul(tmpvar_1, _X) + _MX;
float tmpvar_3 = mul(tmpvar_1, _Y) + _MY;
float tmpvar_4_x = float(max(0.0, min(1.0, floor(mul(i.uv.x, tmpvar_2)) / tmpvar_2)));
float tmpvar_4_y = float(max(0.0, min(1.0, floor(mul(i.uv.y, tmpvar_3)) / tmpvar_3)));
float2 tmpvar_4 = float2(tmpvar_4_x, tmpvar_4_y);
//Textures
float4 tmpvar_5 = tex2D(_tex0, tmpvar_4);
float4 tmpvar_9 = tex2D(_tex1, tmpvar_4);
//Setup for 6
float t_7 = max(min((((1 - _time) - 0.45) / 0.11), 1.0), 0.0);
float tmpvar_6 = mul(t_7 , mul(t_7 , (3.0 - mul(2.0 , t_7))));
//Setup for 8
float4 tmpvar_8 = float4(tmpvar_5.x, tmpvar_5.y, tmpvar_5.z, tmpvar_6);
//Setup for 10
float4 tmpvar_10 = float4(tmpvar_9.x, tmpvar_9.y, tmpvar_9.z, (1.0 - tmpvar_6));
//Final output
float3 tmpvar_11_xyz = ((float3(tmpvar_8.x, tmpvar_8.y, tmpvar_8.z) * tmpvar_6) + (float3(tmpvar_10.x, tmpvar_10.y, tmpvar_10.z) * tmpvar_10.w));
float tmpvar_11_w = (tmpvar_6 + tmpvar_10.w);
float4 tmpvar_11 = float4(tmpvar_11_xyz.x, tmpvar_11_xyz.y, tmpvar_11_xyz.z, tmpvar_11_w);
//Return output
return tmpvar_11;
}
ENDCG
}
}
FallBack off
}

@ -1,85 +0,0 @@
Shader "QO/Effect/CrossFade1" {
Properties {
_tex0 ("_tex0 : Original Image (RGBA)", 2D) = "white" {}
_tex1 ("_tex1 : Transform Image (RGBA)", 2D) = "white" {}
_time ("_time : TimeRate", Range(0,1)) = 0
}
SubShader {
LOD 200
Tags { "QUEUE"="Transparent" "RenderType"="Transparent" }
Pass {
Tags { "QUEUE"="Transparent" "RenderType"="Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
Program "vp" {
SubProgram "gles " {
"!!GLES
#ifdef VERTEX
varying lowp vec2 xlv_TEXCOORD0;
varying lowp vec4 xlv_COLOR0;
uniform highp mat4 glstate_matrix_mvp;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesVertex;
void main ()
{
lowp vec2 tmpvar_1;
highp vec2 tmpvar_2;
tmpvar_2 = _glesMultiTexCoord0.xy;
tmpvar_1 = tmpvar_2;
gl_Position = (glstate_matrix_mvp * _glesVertex);
xlv_COLOR0 = vec4(1.0, 1.0, 1.0, 1.0);
xlv_TEXCOORD0 = tmpvar_1;
}
#endif
#ifdef FRAGMENT
varying lowp vec2 xlv_TEXCOORD0;
uniform lowp float _time;
uniform sampler2D _tex1;
uniform sampler2D _tex0;
void main ()
{
mediump vec4 t0_1;
highp float alpha_2;
mediump vec4 toImage_3;
mediump vec4 fromImage_4;
lowp vec4 tmpvar_5;
tmpvar_5 = texture2D (_tex0, xlv_TEXCOORD0);
fromImage_4 = tmpvar_5;
lowp vec4 tmpvar_6;
tmpvar_6 = texture2D (_tex1, xlv_TEXCOORD0);
toImage_3 = tmpvar_6;
lowp float tmpvar_7;
tmpvar_7 = min (1.0, max (0.0, _time));
mediump float tmpvar_8;
tmpvar_8 = (fromImage_4.w * (1.0 - tmpvar_7));
alpha_2 = tmpvar_8;
highp vec4 tmpvar_9;
tmpvar_9.xyz = (fromImage_4.xyz * alpha_2);
tmpvar_9.w = alpha_2;
t0_1 = tmpvar_9;
mediump vec4 tmpvar_10;
tmpvar_10.w = 1.0;
tmpvar_10.xyz = (t0_1.xyz + (toImage_3.xyz * (1.0 - t0_1.w)));
gl_FragData[0] = tmpvar_10;
}
#endif"
}
}
Program "fp" {
SubProgram "gles " {
"!!GLES"
}
}
}
}
Fallback "VertexLit"
}

@ -1,98 +0,0 @@
Shader "QO/Effect/Transition1" {
Properties {
_tex0 ("_tex0 : Original Image (RGBA)", 2D) = "white" {}
_tex1 ("_tex1 : Transform Image (RGBA)", 2D) = "white" {}
_tex2 ("_tex2 : Pattern (GrayScale)", 2D) = "white" {}
_time ("_time : TimeRate", Range(0,1)) = 0
_grad ("_grad : Gradation Level", Float) = 0.1
}
SubShader {
LOD 200
Tags { "QUEUE"="Transparent" "RenderType"="Transparent" }
Pass {
Tags { "QUEUE"="Transparent" "RenderType"="Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
Program "vp" {
SubProgram "gles " {
"!!GLES
#ifdef VERTEX
varying lowp vec2 xlv_TEXCOORD0;
varying lowp vec4 xlv_COLOR0;
uniform highp mat4 glstate_matrix_mvp;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesVertex;
void main ()
{
lowp vec2 tmpvar_1;
highp vec2 tmpvar_2;
tmpvar_2 = _glesMultiTexCoord0.xy;
tmpvar_1 = tmpvar_2;
gl_Position = (glstate_matrix_mvp * _glesVertex);
xlv_COLOR0 = vec4(1.0, 1.0, 1.0, 1.0);
xlv_TEXCOORD0 = tmpvar_1;
}
#endif
#ifdef FRAGMENT
varying lowp vec2 xlv_TEXCOORD0;
uniform lowp float _grad;
uniform lowp float _time;
uniform sampler2D _tex2;
uniform sampler2D _tex1;
uniform sampler2D _tex0;
void main ()
{
mediump float grad_1;
mediump vec4 toImage_2;
mediump vec4 fromImage_3;
mediump vec3 trans_4;
lowp vec3 tmpvar_5;
tmpvar_5 = texture2D (_tex2, xlv_TEXCOORD0).xyz;
trans_4 = tmpvar_5;
lowp vec4 tmpvar_6;
tmpvar_6.w = 1.0;
tmpvar_6.xyz = texture2D (_tex0, xlv_TEXCOORD0).xyz;
fromImage_3 = tmpvar_6;
lowp vec4 tmpvar_7;
tmpvar_7.w = 1.0;
tmpvar_7.xyz = texture2D (_tex1, xlv_TEXCOORD0).xyz;
toImage_2 = tmpvar_7;
lowp float tmpvar_8;
tmpvar_8 = (_grad * 0.5);
grad_1 = tmpvar_8;
mediump float tmpvar_9;
tmpvar_9 = max (0.0, (trans_4.x - grad_1));
mediump float t_10;
t_10 = max (min (((_time - tmpvar_9) / (min (1.0, (trans_4.x + grad_1)) - tmpvar_9)), 1.0), 0.0);
mediump vec4 tmpvar_11;
tmpvar_11.xyz = toImage_2.xyz;
tmpvar_11.w = (toImage_2.w * (t_10 * (t_10 * (3.0 - (2.0 * t_10)))));
mediump vec4 tmpvar_12;
tmpvar_12.xyz = fromImage_3.xyz;
tmpvar_12.w = (1.0 - tmpvar_11.w);
mediump vec4 tmpvar_13;
tmpvar_13.xyz = ((toImage_2.xyz * tmpvar_11.w) + (fromImage_3.xyz * tmpvar_12.w));
tmpvar_13.w = (tmpvar_11.w + tmpvar_12.w);
gl_FragData[0] = tmpvar_13;
}
#endif"
}
}
Program "fp" {
SubProgram "gles " {
"!!GLES"
}
}
}
}
Fallback "VertexLit"
}

@ -1,127 +1,90 @@
Shader "QO/Effect/Ripple" {
Properties {
_tex0 ("_tex0 : Original Image (RGBA)", 2D) = "white" {}
_tex1 ("_tex1 : Transform Image (RGBA)", 2D) = "white" {}
_time ("_time : time rate", Range(0,1)) = 0
_pow ("_pow : screen wave power", Float) = 2
_w ("_w : ripple wave width", Float) = 1.5
_h ("_h : ripple wave height", Float) = 5
_speed ("_speed : ripple wave speed", Float) = 2
}
SubShader {
LOD 200
Tags { "QUEUE"="Transparent" "RenderType"="Transparent" }
Pass {
Tags { "QUEUE"="Transparent" "RenderType"="Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
Program "vp" {
SubProgram "gles " {
"!!GLES
#ifdef VERTEX
varying mediump vec2 xlv_TEXCOORD0;
varying lowp vec4 xlv_COLOR0;
uniform highp mat4 glstate_matrix_mvp;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesVertex;
void main ()
Shader "QO/Effect/Ripple"
{
mediump vec2 tmpvar_1;
highp vec2 tmpvar_2;
tmpvar_2 = _glesMultiTexCoord0.xy;
tmpvar_1 = tmpvar_2;
gl_Position = (glstate_matrix_mvp * _glesVertex);
xlv_COLOR0 = vec4(1.0, 1.0, 1.0, 1.0);
xlv_TEXCOORD0 = tmpvar_1;
}
Properties
{
_tex0("_tex0 : Original Image (RGBA)", 2D) = "white" {}
_tex1("_tex1 : Transform Image (RGBA)", 2D) = "white" {}
_time("time rate", Range(0,1)) = 0
_pow("_pow : screen wave power", Float) = 2
_w("_w : ripple wave width", Float) = 1.5
_h("_h : ripple wave height", Float) = 5
_speed("_speed : ripple wave speed", Float) = 2
}
SubShader
{
LOD 200
Tags { "QUEUE" = "Transparent" "RenderType" = "Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
Lighting Off
#endif
#ifdef FRAGMENT
Pass
{
ZTest Always ZWrite Off
Fog { Mode off }
varying mediump vec2 xlv_TEXCOORD0;
uniform mediump float _speed;
uniform mediump float _w;
uniform mediump float _h;
uniform mediump float _pow;
uniform mediump float _time;
uniform sampler2D _tex1;
uniform sampler2D _tex0;
void main ()
{
lowp float check2_1;
lowp float check1_2;
mediump vec2 tmpvar_3;
tmpvar_3.x = (xlv_TEXCOORD0.x - 0.5);
tmpvar_3.y = ((xlv_TEXCOORD0.y - 0.5) * 0.5625);
mediump float tmpvar_4;
tmpvar_4 = (_time * _speed);
mediump float tmpvar_5;
tmpvar_5 = sqrt(dot (tmpvar_3, tmpvar_3));
mediump float tmpvar_6;
tmpvar_6 = (tmpvar_4 - (_w * 0.01));
mediump float tmpvar_7;
tmpvar_7 = ((_time - 0.25) * _speed);
mediump float tmpvar_8;
tmpvar_8 = sqrt(dot (tmpvar_3, tmpvar_3));
mediump float tmpvar_9;
tmpvar_9 = (tmpvar_7 - (_w * 0.01));
mediump float tmpvar_10;
tmpvar_10 = ((_time - 0.5) * _speed);
mediump float tmpvar_11;
tmpvar_11 = sqrt(dot (tmpvar_3, tmpvar_3));
mediump float tmpvar_12;
tmpvar_12 = (tmpvar_10 - (_w * 0.01));
mediump float tmpvar_13;
tmpvar_13 = ((_time - 0.75) * _speed);
mediump float tmpvar_14;
tmpvar_14 = sqrt(dot (tmpvar_3, tmpvar_3));
mediump float tmpvar_15;
tmpvar_15 = (tmpvar_13 - (_w * 0.01));
mediump float tmpvar_16;
tmpvar_16 = (1.0 - _time);
mediump vec2 tmpvar_17;
tmpvar_17 = ((((((tmpvar_3 * ((sin((((tmpvar_4 - tmpvar_5) / (tmpvar_4 - tmpvar_6)) * 3.14159)) * _h) * 0.02)) * float(((float(((tmpvar_5 - tmpvar_6) >= 0.0)) + float(((tmpvar_4 - tmpvar_5) >= 0.0))) >= 2.0))) + ((tmpvar_3 * ((sin((((tmpvar_7 - tmpvar_8) / (tmpvar_7 - tmpvar_9)) * 3.14159)) * _h) * 0.02)) * float(((float(((tmpvar_8 - tmpvar_9) >= 0.0)) + float(((tmpvar_7 - tmpvar_8) >= 0.0))) >= 2.0)))) + ((tmpvar_3 * ((sin((((tmpvar_10 - tmpvar_11) / (tmpvar_10 - tmpvar_12)) * 3.14159)) * _h) * 0.02)) * float(((float(((tmpvar_11 - tmpvar_12) >= 0.0)) + float(((tmpvar_10 - tmpvar_11) >= 0.0))) >= 2.0)))) + ((tmpvar_3 * ((sin((((tmpvar_13 - tmpvar_14) / (tmpvar_13 - tmpvar_15)) * 3.14159)) * _h) * 0.02)) * float(((float(((tmpvar_14 - tmpvar_15) >= 0.0)) + float(((tmpvar_13 - tmpvar_14) >= 0.0))) >= 2.0)))) * tmpvar_16);
mediump vec2 tmpvar_18;
tmpvar_18 = (xlv_TEXCOORD0 + (((tmpvar_3 * (sin((50.2654 * (sqrt(dot (tmpvar_3, tmpvar_3)) * _time))) * (_pow * 0.01))) * tmpvar_16) + tmpvar_17));
mediump float tmpvar_19;
tmpvar_19 = float((-0.01 >= (xlv_TEXCOORD0.y + tmpvar_17.y)));
check1_2 = tmpvar_19;
mediump float tmpvar_20;
tmpvar_20 = float((-0.01 >= (1.0 - (xlv_TEXCOORD0.y + tmpvar_17.y))));
check2_1 = tmpvar_20;
lowp float tmpvar_21;
tmpvar_21 = float((0.0 >= (check1_2 + check2_1)));
lowp vec4 tmpvar_22;
tmpvar_22 = texture2D (_tex0, tmpvar_18);
mediump vec4 tmpvar_23;
tmpvar_23.xyz = tmpvar_22.xyz;
tmpvar_23.w = (1.0 - _time);
lowp vec4 tmpvar_24;
tmpvar_24 = texture2D (_tex1, tmpvar_18);
mediump vec4 tmpvar_25;
tmpvar_25.xyz = tmpvar_24.xyz;
tmpvar_25.w = (1.0 - tmpvar_23.w);
mediump vec4 tmpvar_26;
tmpvar_26.xyz = (((tmpvar_23.xyz * tmpvar_23.w) + (tmpvar_25.xyz * tmpvar_25.w)) * tmpvar_21);
tmpvar_26.w = (tmpvar_23.w + tmpvar_25.w);
gl_FragData[0] = tmpvar_26;
}
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
#endif"
}
}
Program "fp" {
SubProgram "gles " {
"!!GLES"
}
}
}
}
Fallback "VertexLit"
uniform sampler2D _tex0;
uniform sampler2D _tex1;
uniform float _time;
uniform float _w;
uniform float _h;
uniform float _pow;
uniform float _speed;
fixed4 frag(v2f_img i) :COLOR
{
float2 tmpvar_3 = float2((i.uv.x - 0.5), ((i.uv.y - 0.5) * 0.5625));
float tmpvar_4 = (_time * _speed);
float tmpvar_5 = sqrt(dot(tmpvar_3, tmpvar_3));
float tmpvar_6 = (tmpvar_4 - (_w * 0.01));
float tmpvar_7 = ((_time - 0.25) * _speed);
float tmpvar_8 = sqrt(dot(tmpvar_3, tmpvar_3));
float tmpvar_9 = (tmpvar_7 - (_w * 0.01));
float tmpvar_10 = ((_time - 0.5) * _speed);
float tmpvar_11 = sqrt(dot(tmpvar_3, tmpvar_3));
float tmpvar_12 = (tmpvar_10 - (_w * 0.01));
float tmpvar_13 = ((_time - 0.75) * _speed);
float tmpvar_14 = sqrt(dot(tmpvar_3, tmpvar_3));
float tmpvar_15 = (tmpvar_13 - (_w * 0.01));
float tmpvar_16 = (1.0 - _time);
float2 tmpvar_17 = ((((((tmpvar_3 * ((sin((((tmpvar_4 - tmpvar_5) / (tmpvar_4 - tmpvar_6)) * 3.14159)) * _h) * 0.02)) * float(((float(((tmpvar_5 - tmpvar_6) >= 0.0)) + float(((tmpvar_4 - tmpvar_5) >= 0.0))) >= 2.0))) + ((tmpvar_3 * ((sin((((tmpvar_7 - tmpvar_8) / (tmpvar_7 - tmpvar_9)) * 3.14159)) * _h) * 0.02)) * float(((float(((tmpvar_8 - tmpvar_9) >= 0.0)) + float(((tmpvar_7 - tmpvar_8) >= 0.0))) >= 2.0)))) + ((tmpvar_3 * ((sin((((tmpvar_10 - tmpvar_11) / (tmpvar_10 - tmpvar_12)) * 3.14159)) * _h) * 0.02)) * float(((float(((tmpvar_11 - tmpvar_12) >= 0.0)) + float(((tmpvar_10 - tmpvar_11) >= 0.0))) >= 2.0)))) + ((tmpvar_3 * ((sin((((tmpvar_13 - tmpvar_14) / (tmpvar_13 - tmpvar_15)) * 3.14159)) * _h) * 0.02)) * float(((float(((tmpvar_14 - tmpvar_15) >= 0.0)) + float(((tmpvar_13 - tmpvar_14) >= 0.0))) >= 2.0)))) * tmpvar_16);
float2 tmpvar_18 = (i.uv + (((tmpvar_3 * (sin((50.2654 * (sqrt(dot(tmpvar_3, tmpvar_3)) * _time))) * (_pow * 0.01))) * tmpvar_16) + tmpvar_17));
float tmpvar_19 = float((-0.01 >= (i.uv.y + tmpvar_17.y)));
float check1_2 = tmpvar_19;
float tmpvar_20 = float((-0.01 >= (1.0 - (i.uv.y + tmpvar_17.y))));
float check2_1 = tmpvar_20;
float tmpvar_21 = float((0.0 >= (check1_2 + check2_1)));
float4 tmpvar_22 = tex2D (_tex0, tmpvar_18);
float4 tmpvar_23 = float4(tmpvar_22.x, tmpvar_22.y, tmpvar_22.z, 1.0 - _time);
float4 tmpvar_24 = tex2D (_tex1, tmpvar_18);
float4 tmpvar_25 = float4(tmpvar_24.x, tmpvar_24.y, tmpvar_24.z, 1.0 - tmpvar_23.w);
float3 tmpvar_26_xyz = (((tmpvar_23.xyz * tmpvar_23.w) + (tmpvar_25.xyz * tmpvar_25.w)) * tmpvar_21);
float tmpvar_26_w = (tmpvar_23.w + tmpvar_25.w);
float4 tmpvar_26 = float4(tmpvar_26_xyz.x, tmpvar_26_xyz.y, tmpvar_26_xyz.z, tmpvar_26_w);
return tmpvar_26;
}
ENDCG
}
}
FallBack off
}

@ -1,111 +1,71 @@
Shader "QO/Effect/Wave" {
Properties {
_tex0 ("_tex0 : Original Image (RGBA)", 2D) = "white" {}
_tex1 ("_tex1 : Transform Image (RGBA)", 2D) = "white" {}
_power ("_power : Wave Power", Float) = 0
_count ("_count : Go Return Count", Float) = 0
_time ("_time : Time Rate (0 to 1)", Range(0,1)) = 0
}
SubShader {
LOD 200
Tags { "QUEUE"="Transparent" "RenderType"="Transparent" }
Pass {
Tags { "QUEUE"="Transparent" "RenderType"="Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
Program "vp" {
SubProgram "gles " {
"!!GLES
Shader "QO/Effect/Wave"
{
Properties
{
_tex0("_tex0 : Original Image (RGBA)", 2D) = "white" {}
_tex1("_tex1 : Transform Image (RGBA)", 2D) = "white" {}
_power("_power : Wave Power", Float) = 0
_count("_count : Go Return Count", Float) = 0
_time("_time : Time Rate (0 to 1)", Range(0,1)) = 0
}
#ifdef VERTEX
SubShader
{
LOD 200
Tags { "QUEUE" = "Transparent" "RenderType" = "Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
Lighting Off
varying lowp vec2 xlv_TEXCOORD0;
varying lowp vec4 xlv_COLOR0;
uniform highp mat4 glstate_matrix_mvp;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesVertex;
void main ()
{
lowp vec2 tmpvar_1;
highp vec2 tmpvar_2;
tmpvar_2 = _glesMultiTexCoord0.xy;
tmpvar_1 = tmpvar_2;
gl_Position = (glstate_matrix_mvp * _glesVertex);
xlv_COLOR0 = vec4(1.0, 1.0, 1.0, 1.0);
xlv_TEXCOORD0 = tmpvar_1;
}
Pass
{
ZTest Always ZWrite Off
Fog { Mode off }
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
#endif
#ifdef FRAGMENT
varying lowp vec2 xlv_TEXCOORD0;
uniform highp float _time;
uniform highp float _count;
uniform highp float _power;
uniform sampler2D _tex1;
uniform sampler2D _tex0;
void main ()
{
mediump vec4 t0_1;
lowp float check2_2;
lowp float check1_3;
mediump float wave_4;
mediump float theta_5;
mediump float sin_omega_6;
highp float tmpvar_7;
tmpvar_7 = sin((_time * 3.14159));
sin_omega_6 = tmpvar_7;
highp float tmpvar_8;
tmpvar_8 = (((sin_omega_6 * 3.14159) * (_count * 2.0)) * (0.5 - xlv_TEXCOORD0.y));
theta_5 = tmpvar_8;
mediump float tmpvar_9;
tmpvar_9 = cos(theta_5);
highp float tmpvar_10;
tmpvar_10 = ((tmpvar_9 * sin_omega_6) * _power);
wave_4 = tmpvar_10;
mediump float tmpvar_11;
tmpvar_11 = (xlv_TEXCOORD0.x + wave_4);
mediump vec2 tmpvar_12;
tmpvar_12.x = tmpvar_11;
tmpvar_12.y = xlv_TEXCOORD0.y;
mediump float tmpvar_13;
tmpvar_13 = float((-0.01 >= tmpvar_11));
check1_3 = tmpvar_13;
mediump float tmpvar_14;
tmpvar_14 = float((-0.01 >= (1.0 - tmpvar_11)));
check2_2 = tmpvar_14;
lowp float tmpvar_15;
tmpvar_15 = float((0.0 >= (check1_3 + check2_2)));
lowp vec4 tmpvar_16;
tmpvar_16 = texture2D (_tex0, tmpvar_12);
highp vec4 tmpvar_17;
tmpvar_17.xyz = tmpvar_16.xyz;
tmpvar_17.w = (1.0 - _time);
t0_1 = tmpvar_17;
lowp vec4 tmpvar_18;
tmpvar_18 = texture2D (_tex1, tmpvar_12);
mediump vec4 tmpvar_19;
tmpvar_19.xyz = tmpvar_18.xyz;
tmpvar_19.w = (1.0 - t0_1.w);
mediump vec4 tmpvar_20;
tmpvar_20.xyz = (((t0_1.xyz * t0_1.w) + (tmpvar_19.xyz * tmpvar_19.w)) * tmpvar_15);
tmpvar_20.w = (t0_1.w + tmpvar_19.w);
gl_FragData[0] = tmpvar_20;
}
uniform sampler2D _tex0;
uniform sampler2D _tex1;
uniform float _count;
uniform float _power;
uniform float _time;
fixed4 frag(v2f_img i) :COLOR
{
float sin_omega_6 = sin((_time * 3.14159));
float theta_5 = (((sin_omega_6 * 3.14159) * (_count * 2.0)) * (0.5 - i.uv.y));
float tmpvar_9 = cos(theta_5);
float wave_4 = ((tmpvar_9 * sin_omega_6) * _power);
float tmpvar_11 = (i.uv.x + wave_4);
float2 tmpvar_12 = float2(tmpvar_11, i.uv.y);
float check1_3 = float((-0.01 >= tmpvar_11));
float check2_2 = float((-0.01 >= (1.0 - tmpvar_11)));
float tmpvar_15 = float((0.0 >= (check1_3 + check2_2)));
float4 tmpvar_16 = tex2D (_tex0, tmpvar_12);
float4 tmpvar_17 = float4(tmpvar_16.x, tmpvar_16.y, tmpvar_16.z, (1.0 - _time));
#endif"
}
}
Program "fp" {
SubProgram "gles " {
"!!GLES"
}
}
}
}
Fallback "VertexLit"
float4 t0_1 = tmpvar_17;
float4 tmpvar_18 = tex2D (_tex1, tmpvar_12);
float4 tmpvar_19 = float4(tmpvar_18.x, tmpvar_18.y, tmpvar_18.z, (1.0 - t0_1.w));
float3 tmpvar_20_xyz = (((t0_1.xyz * t0_1.w) + (tmpvar_19.xyz * tmpvar_19.w)) * tmpvar_15);
float tmpvar_20_w = (t0_1.w + tmpvar_19.w);
float4 tmpvar_20 = float4(tmpvar_20_xyz.x, tmpvar_20_xyz.y, tmpvar_20_xyz.z, tmpvar_20_w);
return tmpvar_20;
}
ENDCG
}
}
FallBack off
}

@ -0,0 +1,38 @@
fixed4 SampleYCbCr ( half2 Yuv, half2 CbCruv)
{
#ifdef UNITY_COMPILER_CG
fixed4 YCrCb = fixed4(tex2D (_YTex, Yuv).a + 0.001, tex2D (_CrTex, CbCruv).a + 0.001, tex2D (_CbTex, CbCruv).a + 0.001, 1.0);
#else
fixed4 YCrCb = fixed4(tex2D (_YTex, Yuv).a, tex2D (_CrTex, CbCruv).a, tex2D (_CbTex, CbCruv).a, 1.0);
#endif
return YCrCb;
}
half4 YCbCrToRGB( half4 YCbCr )
{
//Spent ages on these
//www.theora.org/doc/Theora.pdf
//R = ((Y - (16.0/255.0)) * (255.0/219.0)) + (2*(1 - 0.299)*((Cr - (128.0/255.0)) * (255.0/244.0)))
//G = ((Y - (16.0/255.0)) * (255.0/219.0)) - (2 * (((1 - 0.114)*0.114)/(1 - 0.114 - 0.299)) * ((Cb - (128.0/255.0)) * (255.0/244.0))) - (2 * (((1 - 0.299)*0.299)/(1 - 0.114 - 0.299)) * ((Cr - (128.0/255.0)) * (255.0/244.0)))
//B = ((Y - (16.0/255.0)) * (255.0/219.0)) + (2*(1 - 0.114)*((Cb - (128.0/255.0)) * (255.0/244.0)))
//half4 YCbCr2R = half4(1.16438, 1.4652, 0, -0.808535);
//half4 YCbCr2G = half4(1.16438, -0.714136, -0.359651, 0.46594);
//half4 YCbCr2B = half4(1.16438, 0,1.85189, -1.00263);
//However the original ones are more accurate with a colour bar test video
half4 YCbCr2R = half4(1.1643828125, 1.59602734375, 0, -.87078515625);
half4 YCbCr2G = half4(1.1643828125, -.81296875, -.39176171875, .52959375);
half4 YCbCr2B = half4(1.1643828125, 0, 2.017234375, -1.081390625);
half4 rgbVec;
rgbVec.x = dot(YCbCr2R, YCbCr);
rgbVec.y = dot(YCbCr2G, YCbCr);
rgbVec.z = dot(YCbCr2B, YCbCr);
rgbVec.w = 1.0f;
return rgbVec;
}

@ -1,73 +0,0 @@
Shader "Color Space/YCrCbtoRGB Add" {
Properties {
_YTex ("Y (RGB)", 2D) = "white" {}
_CbTex ("Cb (RGB)", 2D) = "white" {}
_CrTex ("Cr (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "QUEUE"="Overlay" "RenderType"="Opaque" }
Pass {
Tags { "QUEUE"="Overlay" "RenderType"="Opaque" }
Fog {
Color (0,0,0,0)
}
Blend One One
ColorMask RGB
Program "vp" {
SubProgram "gles " {
"!!GLES
#ifdef VERTEX
varying highp vec2 xlv_TEXCOORD0;
uniform highp vec4 _YTex_ST;
uniform highp mat4 glstate_matrix_mvp;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesVertex;
void main ()
{
gl_Position = (glstate_matrix_mvp * _glesVertex);
xlv_TEXCOORD0 = ((_glesMultiTexCoord0.xy * _YTex_ST.xy) + _YTex_ST.zw);
}
#endif
#ifdef FRAGMENT
varying highp vec2 xlv_TEXCOORD0;
uniform sampler2D _CrTex;
uniform sampler2D _CbTex;
uniform sampler2D _YTex;
void main ()
{
mediump vec4 rgbVec_1;
mediump vec4 yuvVec_2;
lowp vec4 tmpvar_3;
tmpvar_3.w = 1.0;
tmpvar_3.x = texture2D (_YTex, xlv_TEXCOORD0).x;
tmpvar_3.y = texture2D (_CbTex, xlv_TEXCOORD0).y;
tmpvar_3.z = texture2D (_CrTex, xlv_TEXCOORD0).z;
yuvVec_2 = tmpvar_3;
rgbVec_1.x = dot (vec4(1.16438, 0.0, 1.59603, -0.870785), yuvVec_2);
rgbVec_1.y = dot (vec4(1.16438, -0.391762, -0.812969, 0.529594), yuvVec_2);
rgbVec_1.z = dot (vec4(1.16438, 2.01723, 0.0, -1.08139), yuvVec_2);
rgbVec_1.w = 0.3;
gl_FragData[0] = rgbVec_1;
}
#endif"
}
}
Program "fp" {
SubProgram "gles " {
"!!GLES"
}
}
}
}
Fallback "VertexLit"
}

@ -1,81 +1,59 @@
Shader "Color Space/YCrCbtoRGB" {
Properties {
_YTex ("Y (RGB)", 2D) = "white" {}
_CrTex ("Cr (RGB)", 2D) = "white" {}
_CbTex ("Cb (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "RenderType"="Opaque" }
Pass {
Tags { "RenderType"="Opaque" }
Fog {
Color (0,0,0,0)
}
ColorMask RGB
Program "vp" {
SubProgram "gles " {
"!!GLES
#define SHADER_API_GLES 1
#define tex2D texture2D
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Color Space/YCbCrtoRGB"
{
Properties
{
_YTex ("Y (RGB)", 2D) = "black" {}
_CrTex ("Cr (RGB)", 2D) = "gray" {}
_CbTex ("Cb (RGB)", 2D) = "gray" {}
}
SubShader
{
Tags { "RenderType"="Opaque" }
Pass
{
ColorMask RGB
Lighting Off Fog { Color (0,0,0,0) }
#ifdef VERTEX
#define gl_ModelViewProjectionMatrix glstate_matrix_mvp
uniform mat4 glstate_matrix_mvp;
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
varying mediump vec2 xlv_TEXCOORD1;
varying mediump vec2 xlv_TEXCOORD0;
#include "UnityCG.cginc"
uniform highp vec4 _YTex_ST;
uniform highp vec4 _CbTex_ST;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesVertex;
void main ()
{
mediump vec2 tmpvar_1;
mediump vec2 tmpvar_2;
highp vec2 tmpvar_3;
tmpvar_3 = ((_glesMultiTexCoord0.xy * _YTex_ST.xy) + _YTex_ST.zw);
tmpvar_1 = tmpvar_3;
highp vec2 tmpvar_4;
tmpvar_4 = ((_glesMultiTexCoord0.xy * _CbTex_ST.xy) + _CbTex_ST.zw);
tmpvar_2 = tmpvar_4;
gl_Position = (gl_ModelViewProjectionMatrix * _glesVertex);
xlv_TEXCOORD0 = tmpvar_1;
xlv_TEXCOORD1 = tmpvar_2;
}
sampler2D _YTex;
sampler2D _CbTex;
sampler2D _CrTex;
#endif
#ifdef FRAGMENT
#include "YCbCrtoRGB.cginc"
varying mediump vec2 xlv_TEXCOORD1;
varying mediump vec2 xlv_TEXCOORD0;
uniform sampler2D _YTex;
uniform sampler2D _CrTex;
uniform sampler2D _CbTex;
void main ()
{
lowp vec4 rgbVec;
lowp vec4 tmpvar_1;
tmpvar_1.w = 1.0;
tmpvar_1.x = texture2D (_YTex, xlv_TEXCOORD0).x;
tmpvar_1.y = texture2D (_CrTex, xlv_TEXCOORD1).y;
tmpvar_1.z = texture2D (_CbTex, xlv_TEXCOORD1).z;
rgbVec.x = dot (vec4(1.16438, 0.0, 1.59603, -0.870785), tmpvar_1);
rgbVec.y = dot (vec4(1.16438, -0.391762, -0.812969, 0.529594), tmpvar_1);
rgbVec.z = dot (vec4(1.16438, 2.01723, 0.0, -1.08139), tmpvar_1);
rgbVec.w = 1.0;
gl_FragData[0] = rgbVec;
}
struct v2f
{
float4 pos : SV_POSITION;
half2 uvY : TEXCOORD0;
half2 uvCbCr : TEXCOORD1;
};
#endif"
}
}
Program "fp" {
SubProgram "gles " {
"!!GLES"
}
}
}
}
float4 _YTex_ST;
float4 _CbTex_ST;
v2f vert (appdata_base v)
{
v2f o;
o.pos = UnityObjectToClipPos (v.vertex);
o.uvY = TRANSFORM_TEX (v.texcoord, _YTex);
o.uvCbCr = TRANSFORM_TEX (v.texcoord, _CbTex);
return o;
}
fixed4 frag (v2f i) : COLOR
{
return YCbCrToRGB(SampleYCbCr( i.uvY, i.uvCbCr));
}
ENDCG
}
}
}

@ -1,90 +1,92 @@
Shader "Color Space/YCrCbtoRGB Chroma Key" {
Properties {
_YTex ("Y (RGB)", 2D) = "white" {}
_CrTex ("Cr (RGB)", 2D) = "white" {}
_CbTex ("Cb (RGB)", 2D) = "white" {}
_KeyYCrCb ("Key Color YCrCb", Vector) = (0,0,0,-0.6)
_KeyScale ("Comparison Scale", Vector) = (0.2,1,1,4.5)
}
SubShader {
Tags { "QUEUE"="Transparent" "IGNOREPROJECTOR"="True" "RenderType"="Transparent" }
Pass {
Tags { "QUEUE"="Transparent" "IGNOREPROJECTOR"="True" "RenderType"="Transparent" }
ZWrite Off
Fog {
Color (0,0,0,0)
}
Blend SrcAlpha OneMinusSrcAlpha
Program "vp" {
SubProgram "gles " {
"!!GLES
#define SHADER_API_GLES 1
#define tex2D texture2D
#ifdef VERTEX
#define gl_ModelViewProjectionMatrix glstate_matrix_mvp
uniform mat4 glstate_matrix_mvp;
varying mediump vec2 xlv_TEXCOORD1;
varying mediump vec2 xlv_TEXCOORD0;
uniform highp vec4 _YTex_ST;
uniform highp vec4 _CbTex_ST;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesVertex;
void main ()
{
mediump vec2 tmpvar_1;
mediump vec2 tmpvar_2;
highp vec2 tmpvar_3;
tmpvar_3 = ((_glesMultiTexCoord0.xy * _YTex_ST.xy) + _YTex_ST.zw);
tmpvar_1 = tmpvar_3;
highp vec2 tmpvar_4;
tmpvar_4 = ((_glesMultiTexCoord0.xy * _CbTex_ST.xy) + _CbTex_ST.zw);
tmpvar_2 = tmpvar_4;
gl_Position = (gl_ModelViewProjectionMatrix * _glesVertex);
xlv_TEXCOORD0 = tmpvar_1;
xlv_TEXCOORD1 = tmpvar_2;
}
#endif
#ifdef FRAGMENT
varying mediump vec2 xlv_TEXCOORD1;
varying mediump vec2 xlv_TEXCOORD0;
uniform sampler2D _YTex;
uniform mediump vec4 _KeyYCrCb;
uniform mediump vec4 _KeyScale;
uniform sampler2D _CrTex;
uniform sampler2D _CbTex;
void main ()
{
lowp vec4 rgbVec;
lowp vec4 tmpvar_1;
tmpvar_1.w = 1.0;
tmpvar_1.x = texture2D (_YTex, xlv_TEXCOORD0).x;
tmpvar_1.y = texture2D (_CrTex, xlv_TEXCOORD1).y;
tmpvar_1.z = texture2D (_CbTex, xlv_TEXCOORD1).z;
rgbVec.x = dot (vec4(1.16438, 0.0, 1.59603, -0.870785), tmpvar_1);
rgbVec.y = dot (vec4(1.16438, -0.391762, -0.812969, 0.529594), tmpvar_1);
rgbVec.z = dot (vec4(1.16438, 2.01723, 0.0, -1.08139), tmpvar_1);
mediump float tmpvar_2;
tmpvar_2 = ((length (((tmpvar_1.xyz - _KeyYCrCb.xyz) * _KeyScale.xyz)) + _KeyYCrCb.w) * _KeyScale.w);
rgbVec.w = tmpvar_2;
gl_FragData[0] = rgbVec;
}
#endif"
}
}
Program "fp" {
SubProgram "gles " {
"!!GLES"
}
}
}
}
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Color Space/YCbCrtoRGB Chroma Key"
{
Properties
{
_YTex ("Y (RGB)", 2D) = "black" {}
_CrTex ("Cr (RGB)", 2D) = "gray" {}
_CbTex ("Cb (RGB)", 2D) = "gray" {}
[YCbCr] _KeyYCbCr ("Chroma Key Color", Vector) = (0,0,0,-0.6)
[YCbCrPriority] _YCbCRDeltaScale ("YCbCr priority", Vector) = (0.1,1,1) //Different CbCr means a more different color than a different Y
_LowThreshold ("Low threashold", Range(0.0, 1.0)) = 0.2
_HighThreshold ("High threashold", Range(0.0, 1.0)) = 0.25
}
SubShader
{
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
Pass
{
Lighting Off Fog { Color (0,0,0,0) }
Blend SrcAlpha OneMinusSrcAlpha
ZWrite Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _YTex;
sampler2D _CbTex;
sampler2D _CrTex;
#include "YCbCrtoRGB.cginc"
half3 _KeyYCbCr;
half4 _YCbCRDeltaScale;
half _LowThreshold;
half _HighThreshold;
struct v2f
{
float4 pos : SV_POSITION;
half2 uvY : TEXCOORD0;
half4 uvCbCr : TEXCOORD1; // u,v,offset,normalise
};
float4 _YTex_ST;
float4 _CbTex_ST;
v2f vert (appdata_base v)
{
v2f o;
o.pos = UnityObjectToClipPos (v.vertex);
o.uvY = TRANSFORM_TEX (v.texcoord, _YTex);
o.uvCbCr.xy = TRANSFORM_TEX (v.texcoord, _CbTex);
//Work out the threasholds in the vertex shader
//float scaleLength = length(_YCbCRDeltaScale);
float scaleLength = _YCbCRDeltaScale.w;
float bottom = _LowThreshold * scaleLength;
float top = _HighThreshold * scaleLength;
float range = top - bottom;
float offset = -bottom;
float normalise = 1.0/range;
o.uvCbCr.z = offset;
o.uvCbCr.w = normalise;
return o;
}
fixed4 frag (v2f i) : COLOR
{
fixed4 YCbCr = SampleYCbCr( i.uvY, i.uvCbCr);
fixed4 rgbVec = YCbCrToRGB(YCbCr);
half3 deltaVec = (YCbCr.xyz - _KeyYCbCr.xyz) * _YCbCRDeltaScale.xyz;
rgbVec.w = (length(deltaVec) + i.uvCbCr.z)* i.uvCbCr.w;
return rgbVec;
}
ENDCG
}
}
}

@ -1,100 +1,79 @@
Shader "Color Space/YCrCbtoRGB Split Alpha" {
Properties {
_YTex ("Y (RGB)", 2D) = "white" {}
_CrTex ("Cr (RGB)", 2D) = "white" {}
_CbTex ("Cb (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "QUEUE"="Transparent" "IGNOREPROJECTOR"="True" "RenderType"="Transparent" }
Pass {
Tags { "QUEUE"="Transparent" "IGNOREPROJECTOR"="True" "RenderType"="Transparent" }
ZWrite Off
Fog {
Color (0,0,0,0)
}
Blend SrcAlpha OneMinusSrcAlpha
ColorMask RGB
Program "vp" {
SubProgram "gles " {
"!!GLES
#define SHADER_API_GLES 1
#define tex2D texture2D
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Color Space/YCrCbtoRGB Split Alpha"
{
Properties
{
_YTex ("Y (RGB)", 2D) = "black" {}
_CrTex ("Cr (RGB)", 2D) = "gray" {}
_CbTex ("Cb (RGB)", 2D) = "gray" {}
#ifdef VERTEX
#define gl_ModelViewProjectionMatrix glstate_matrix_mvp
uniform mat4 glstate_matrix_mvp;
[KeywordEnum(Vertical, Horizontal)] Mode ("Alpha Mode", Float) = 0
}
SubShader
{
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Pass
{
Blend SrcAlpha OneMinusSrcAlpha
ColorMask RGB
Lighting Off Fog { Color (0,0,0,0) }
ZWrite Off
varying mediump vec2 xlv_TEXCOORD2;
varying mediump vec2 xlv_TEXCOORD1;
varying mediump vec2 xlv_TEXCOORD0;
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile MODE_VERTICAL MODE_HORIZONTAL
uniform highp vec4 _YTex_ST;
uniform highp vec4 _CbTex_ST;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesVertex;
void main ()
{
highp vec4 texcoordTop;
highp vec4 texcoordBottom;
mediump vec2 tmpvar_1;
mediump vec2 tmpvar_2;
mediump vec2 tmpvar_3;
texcoordBottom = _glesMultiTexCoord0;
texcoordBottom.y = (_glesMultiTexCoord0.y / 2.0);
texcoordTop = _glesMultiTexCoord0;
texcoordTop.y = (texcoordBottom.y + 0.5);
highp vec2 tmpvar_4;
tmpvar_4 = ((texcoordTop.xy * _YTex_ST.xy) + _YTex_ST.zw);
tmpvar_1 = tmpvar_4;
highp vec2 tmpvar_5;
tmpvar_5 = ((texcoordBottom.xy * _YTex_ST.xy) + _YTex_ST.zw);
tmpvar_2 = tmpvar_5;
highp vec2 tmpvar_6;
tmpvar_6 = ((texcoordTop.xy * _CbTex_ST.xy) + _CbTex_ST.zw);
tmpvar_3 = tmpvar_6;
gl_Position = (gl_ModelViewProjectionMatrix * _glesVertex);
xlv_TEXCOORD0 = tmpvar_1;
xlv_TEXCOORD1 = tmpvar_2;
xlv_TEXCOORD2 = tmpvar_3;
}
#include "UnityCG.cginc"
sampler2D _YTex;
sampler2D _CbTex;
sampler2D _CrTex;
#include "YCbCrtoRGB.cginc"
#endif
#ifdef FRAGMENT
struct v2f
{
float4 pos : SV_POSITION;
half2 uvY : TEXCOORD0;
half2 uvAlpha : TEXCOORD1;
half2 uvCbCr : TEXCOORD2;
};
varying mediump vec2 xlv_TEXCOORD2;
varying mediump vec2 xlv_TEXCOORD1;
varying mediump vec2 xlv_TEXCOORD0;
uniform sampler2D _YTex;
uniform sampler2D _CrTex;
uniform sampler2D _CbTex;
void main ()
{
lowp vec4 rgbVec;
lowp vec4 tmpvar_1;
tmpvar_1.w = 1.0;
tmpvar_1.x = texture2D (_YTex, xlv_TEXCOORD0).x;
tmpvar_1.y = texture2D (_CrTex, xlv_TEXCOORD2).y;
tmpvar_1.z = texture2D (_CbTex, xlv_TEXCOORD2).z;
rgbVec.x = dot (vec4(1.16438, 0.0, 1.59603, -0.870785), tmpvar_1);
rgbVec.y = dot (vec4(1.16438, -0.391762, -0.812969, 0.529594), tmpvar_1);
rgbVec.z = dot (vec4(1.16438, 2.01723, 0.0, -1.08139), tmpvar_1);
rgbVec.w = ((texture2D (_YTex, xlv_TEXCOORD1).y - 0.0627451) * 1.16438);
gl_FragData[0] = rgbVec;
}
float4 _YTex_ST;
float4 _CbTex_ST;
v2f vert (appdata_base v)
{
v2f o;
o.pos = UnityObjectToClipPos (v.vertex);
float4 texcoordBottom = v.texcoord;
float4 texcoordTop = v.texcoord;
#if MODE_VERTICAL
texcoordBottom.y = ( v.texcoord.y / 2.0f );
texcoordTop.y = texcoordBottom.y + 0.5f;
#else
texcoordBottom.x = ( v.texcoord.x / 2.0f );
texcoordTop.x = texcoordBottom.x + 0.5f;
#endif
#endif"
}
}
Program "fp" {
SubProgram "gles " {
"!!GLES"
}
}
}
}
o.uvY = TRANSFORM_TEX (texcoordTop, _YTex);
o.uvAlpha = TRANSFORM_TEX (texcoordBottom, _YTex);
o.uvCbCr = TRANSFORM_TEX (texcoordTop, _CbTex);
return o;
}
fixed4 frag (v2f i) : COLOR
{
fixed4 rgbVec = YCbCrToRGB(SampleYCbCr( i.uvY, i.uvCbCr));
rgbVec.w = ((tex2D(_YTex, i.uvAlpha).a - (16.0/255.0)) * (255.0/219.0));
return rgbVec;
}
ENDCG
}
}
}

@ -1,90 +1,63 @@
Shader "Color Space/YCrCbtoRGB Trans" {
Properties {
_YTex ("Y (RGB)", 2D) = "white" {}
_CrTex ("Cr (RGB)", 2D) = "white" {}
_CbTex ("Cb (RGB)", 2D) = "white" {}
_TintColor ("Color", Color) = (1,1,1,1)
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Color Space/YCbCrtoRGB Trans"
{
Properties
{
_YTex ("Y (RGB)", 2D) = "black" {}
_CrTex ("Cr (RGB)", 2D) = "gray" {}
_CbTex ("Cb (RGB)", 2D) = "gray" {}
_TintColor ("Color", COLOR) = (1,1,1,1)
}
SubShader
{
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Pass
{
Blend SrcAlpha OneMinusSrcAlpha
ColorMask RGB
Lighting Off Fog { Color (0,0,0,0) }
ZWrite Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _YTex;
sampler2D _CbTex;
sampler2D _CrTex;
#include "YCbCrtoRGB.cginc"
fixed4 _TintColor;
struct v2f
{
float4 pos : SV_POSITION;
half2 uvY : TEXCOORD0;
half2 uvCbCr : TEXCOORD1;
};
float4 _YTex_ST;
float4 _CbTex_ST;
v2f vert (appdata_base v)
{
v2f o;
o.pos = UnityObjectToClipPos (v.vertex);
o.uvY = TRANSFORM_TEX (v.texcoord, _YTex);
o.uvCbCr = TRANSFORM_TEX (v.texcoord, _CbTex);
return o;
}
fixed4 frag (v2f i) : COLOR
{
return YCbCrToRGB(SampleYCbCr( i.uvY, i.uvCbCr))*_TintColor;
}
ENDCG
}
}
}
SubShader {
Tags { "QUEUE"="Transparent" "IGNOREPROJECTOR"="True" "RenderType"="Transparent" }
Pass {
Tags { "QUEUE"="Transparent" "IGNOREPROJECTOR"="True" "RenderType"="Transparent" }
ZWrite Off
Fog {
Color (0,0,0,0)
}
Blend SrcAlpha OneMinusSrcAlpha
ColorMask RGB
Program "vp" {
SubProgram "gles " {
"!!GLES
#define SHADER_API_GLES 1
#define tex2D texture2D
#ifdef VERTEX
#define gl_ModelViewProjectionMatrix glstate_matrix_mvp
uniform mat4 glstate_matrix_mvp;
varying mediump vec2 xlv_TEXCOORD1;
varying mediump vec2 xlv_TEXCOORD0;
uniform highp vec4 _YTex_ST;
uniform highp vec4 _CbTex_ST;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesVertex;
void main ()
{
mediump vec2 tmpvar_1;
mediump vec2 tmpvar_2;
highp vec2 tmpvar_3;
tmpvar_3 = ((_glesMultiTexCoord0.xy * _YTex_ST.xy) + _YTex_ST.zw);
tmpvar_1 = tmpvar_3;
highp vec2 tmpvar_4;
tmpvar_4 = ((_glesMultiTexCoord0.xy * _CbTex_ST.xy) + _CbTex_ST.zw);
tmpvar_2 = tmpvar_4;
gl_Position = (gl_ModelViewProjectionMatrix * _glesVertex);
xlv_TEXCOORD0 = tmpvar_1;
xlv_TEXCOORD1 = tmpvar_2;
}
#endif
#ifdef FRAGMENT
varying mediump vec2 xlv_TEXCOORD1;
varying mediump vec2 xlv_TEXCOORD0;
uniform sampler2D _YTex;
uniform lowp vec4 _TintColor;
uniform sampler2D _CrTex;
uniform sampler2D _CbTex;
void main ()
{
lowp vec4 rgbVec;
lowp vec4 tmpvar_1;
tmpvar_1.w = 1.0;
tmpvar_1.x = texture2D (_YTex, xlv_TEXCOORD0).x;
tmpvar_1.y = texture2D (_CrTex, xlv_TEXCOORD1).y;
tmpvar_1.z = texture2D (_CbTex, xlv_TEXCOORD1).z;
rgbVec.x = dot (vec4(1.16438, 0.0, 1.59603, -0.870785), tmpvar_1);
rgbVec.y = dot (vec4(1.16438, -0.391762, -0.812969, 0.529594), tmpvar_1);
rgbVec.z = dot (vec4(1.16438, 2.01723, 0.0, -1.08139), tmpvar_1);
rgbVec.w = 1.0;
lowp vec4 tmpvar_2;
tmpvar_2 = (rgbVec * _TintColor);
rgbVec = tmpvar_2;
gl_FragData[0] = tmpvar_2;
}
#endif"
}
}
Program "fp" {
SubProgram "gles " {
"!!GLES"
}
}
}
}
}

@ -1,3 +1,5 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "QO/Sprite Add"
{
Properties
@ -45,7 +47,7 @@ Shader "QO/Sprite Add"
float2 uv_2 = _UVWH.xy;
float2 wh_1 = _UVWH.zw;
o.color = v.color;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = ((v.texcoord * wh_1) + uv_2);
return o;
}

@ -1,3 +1,5 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "QO/Sprite Back"
{
Properties
@ -45,7 +47,7 @@ Shader "QO/Sprite Back"
float2 uv_2 = _UVWH.xy;
float2 wh_1 = _UVWH.zw;
o.color = v.color;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = ((v.texcoord * wh_1) + uv_2);
return o;
}

@ -1,3 +1,5 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "QO/Sprite Flash"
{
Properties
@ -47,7 +49,7 @@ Shader "QO/Sprite Flash"
float2 uv_2 = _UVWH.xy;
float2 wh_1 = _UVWH.zw;
o.color = v.color;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = ((v.texcoord * wh_1) + uv_2);
return o;
}

@ -1,3 +1,5 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "QO/Sprite NoTexAlpha"
{
Properties
@ -45,7 +47,7 @@ Shader "QO/Sprite NoTexAlpha"
float2 uv_2 = _UVWH.xy;
float2 wh_1 = _UVWH.zw;
o.color = v.color;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = ((v.texcoord * wh_1) + uv_2);
return o;
}
@ -53,7 +55,7 @@ Shader "QO/Sprite NoTexAlpha"
half4 frag (v2f IN) : COLOR
{
float3 rest = tex2D(_MainTex, IN.texcoord).xyz;
float4 together = (rest.x,rest.y, rest.z, 0.0);
float4 together = float4(rest.x,rest.y, rest.z, 0.0);
//float4 tex = tex2D(_MainTex, IN.texcoord);
float4 tmpvar_1 = (together * _Color);
return tmpvar_1;

@ -1,4 +1,6 @@
Shader "QO/Sprite"
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "QO/Sprite"
{
Properties
{
@ -45,7 +47,7 @@
float2 uv_2 = _UVWH.xy;
float2 wh_1 = _UVWH.zw;
o.color = v.color;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = ((v.texcoord * wh_1) + uv_2);
return o;
}

@ -1,3 +1,5 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "QO/TextSprite"
{
Properties
@ -52,7 +54,7 @@ Shader "QO/TextSprite"
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.color = v.color;
o.texcoord = v.texcoord;
return o;

Binary file not shown.

@ -52,8 +52,8 @@ public class AdventureMenuWindow : SubTaskBaseWindow
int num2 = 272;
GameObject gameObject = GameObject.CreatePrimitive(PrimitiveType.Quad);
//gameObject.renderer.material = new Material(Resources.Load("Shader/Sprite/Sprite") as Shader);
gameObject.renderer.material = new Material(Shader.Find("QO/Sprite") as Shader);
gameObject.renderer.material.mainTexture = tex;
gameObject.GetComponent<Renderer>().material = new Material(Shader.Find("QO/Sprite") as Shader);
gameObject.GetComponent<Renderer>().material.mainTexture = tex;
gameObject.transform.parent = base.transform;
float num3 = (float)tex.width * scale_w;
float num4 = (float)tex.height * scale_h;
@ -138,7 +138,7 @@ public class AdventureMenuWindow : SubTaskBaseWindow
new BaseWindow.UIImage("Confirm", 136, 182, this.wndz + 3, "screen/common/sys_dialog", true, false),
new BaseWindow.UIButton("Confirm_YES", 312, 277, this.wndz + 4, "screen/common/dlog_btn_y", true, false, 1, 2, 0),
new BaseWindow.UIButton("Confirm_NO", 513, 277, this.wndz + 4, "screen/common/dlog_btn_n", true, false, 1, 2, 0),
new BaseWindow.UIText("Confirm_MSG", 480, 230, this.wndz + 4, "タイトル画面へ戻りますか", 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)
new BaseWindow.UIText("Confirm_MSG", 480, 230, this.wndz + 4, UnityApp.Instance.isJapanese ? "タイトル画面へ戻りますか" : "Return to Title Screen", 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)
};
}
return new BaseWindow.UIComponent[]
@ -157,7 +157,7 @@ public class AdventureMenuWindow : SubTaskBaseWindow
new BaseWindow.UIImage("Confirm", 136, 182, this.wndz + 3, "screen/common/sys_dialog", true, false),
new BaseWindow.UIButton("Confirm_YES", 312, 277, this.wndz + 4, "screen/common/dlog_btn_y", true, false, 1, 2, 0),
new BaseWindow.UIButton("Confirm_NO", 513, 277, this.wndz + 4, "screen/common/dlog_btn_n", true, false, 1, 2, 0),
new BaseWindow.UIText("Confirm_MSG", 480, 230, this.wndz + 4, "回想を停止しますか", 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)
new BaseWindow.UIText("Confirm_MSG", 480, UnityApp.Instance.isJapanese ? 230 : 210, this.wndz + 4, UnityApp.Instance.isJapanese ? "回想を停止しますか" : "Do you want to stop\nreplaying this event", 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)
};
}
@ -254,7 +254,15 @@ public class AdventureMenuWindow : SubTaskBaseWindow
base.GameObjectShow("CofirmCollision", show);
if (show)
{
this.SetText("Confirm_MSG", (!AdventureMenuWindow.IsNormal) ? "回想を停止しますか?" : "タイトル画面へ戻りますか?");
if (UnityApp.Instance.isJapanese)
{
this.SetText("Confirm_MSG", (!AdventureMenuWindow.IsNormal) ? "回想を停止しますか?" : "タイトル画面へ戻りますか?");
}
else
{
this.SetText("Confirm_MSG", (!AdventureMenuWindow.IsNormal) ? "Do you want to stop\nreplaying this event" : "Return to Title Screen");
}
}
else
{

@ -247,9 +247,9 @@ public abstract class BaseWindow : MonoBehaviourWrap
ImageObject imageObject = ImageObject.Create(uiObject, base.transform, collisionEnable);
imageObject.RendererEnableAfterLoad = RendererEnableAfterLoad;
GameObject gameObject = imageObject.gameObject;
if (gameObject.collider != null)
if (gameObject.GetComponent<Collider>() != null)
{
gameObject.collider.enabled = (collisionEnable && RendererEnableAfterLoad);
gameObject.GetComponent<Collider>().enabled = (collisionEnable && RendererEnableAfterLoad);
}
this.UIGameObjectsDic.Add(gameObject.name, gameObject);
this.imageObjectList.Add(imageObject);
@ -300,13 +300,13 @@ public abstract class BaseWindow : MonoBehaviourWrap
{
return;
}
if (go.renderer != null)
if (go.GetComponent<Renderer>() != null)
{
go.renderer.enabled = show;
go.GetComponent<Renderer>().enabled = show;
}
if (go.collider != null)
if (go.GetComponent<Collider>() != null)
{
go.collider.enabled = show;
go.GetComponent<Collider>().enabled = show;
}
}
@ -573,7 +573,8 @@ public abstract class BaseWindow : MonoBehaviourWrap
GameObject gameObject = window.gameObject;
UnityTextSprite unityTextSprite = new UnityTextSprite(false, gameObject);
unityTextSprite.obj.name = this.name;
unityTextSprite.Show = false;
//Changed to true, revisit later
unityTextSprite.Show = true;
unityTextSprite.Font = Singleton<UnityGraph>.Instance.Font;
unityTextSprite.ClearText();
unityTextSprite.SetColor(this.color);

@ -49,7 +49,7 @@ public class CreateSprite : MonoBehaviour
{
Mesh mesh = CreateSprite.CreateMesh();
mesh.RecalculateBounds();
mesh.Optimize();
;
return mesh;
}
@ -70,21 +70,21 @@ public class CreateSprite : MonoBehaviour
{
obj.transform.localPosition = new Vector3(0f, 0f, -1000f);
obj.transform.localScale = new Vector3(1f, 1f, 1f);
obj.camera.orthographic = true;
obj.camera.orthographicSize = (float)(ScreenH / 2);
obj.camera.nearClipPlane = 0f;
obj.camera.farClipPlane = 20000f;
obj.camera.renderingPath = RenderingPath.VertexLit;
obj.camera.clearFlags = CameraClearFlags.Color;
obj.camera.backgroundColor = new Color(0f, 0f, 0f, 1f);
obj.GetComponent<Camera>().orthographic = true;
obj.GetComponent<Camera>().orthographicSize = (float)(ScreenH / 2);
obj.GetComponent<Camera>().nearClipPlane = 0f;
obj.GetComponent<Camera>().farClipPlane = 20000f;
obj.GetComponent<Camera>().renderingPath = RenderingPath.VertexLit;
obj.GetComponent<Camera>().clearFlags = CameraClearFlags.Color;
obj.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f, 1f);
if (IsSprite)
{
obj.camera.cullingMask &= 1 << LayerMask.NameToLayer("Sprite");
obj.camera.gameObject.layer = LayerMask.NameToLayer("Sprite");
obj.GetComponent<Camera>().cullingMask &= 1 << LayerMask.NameToLayer("Sprite");
obj.GetComponent<Camera>().gameObject.layer = LayerMask.NameToLayer("Sprite");
}
else
{
obj.camera.cullingMask &= ~(1 << LayerMask.NameToLayer("Sprite"));
obj.GetComponent<Camera>().cullingMask &= ~(1 << LayerMask.NameToLayer("Sprite"));
}
}

@ -0,0 +1,406 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Qoo;
using UnityEngine;
// Token: 0x02000113 RID: 275
public class CreditsWindow : BaseWindow
{
private Dictionary<string,int> dict = null;
// Token: 0x06000746 RID: 1862 RVA: 0x0001F45C File Offset: 0x0001D65C
protected sealed override string GetBGMName()
{
return "honobono1_a_ali";
}
// Token: 0x06000747 RID: 1863 RVA: 0x0001F464 File Offset: 0x0001D664
protected sealed override void OnAwake()
{
this.moveBackGround = new CreditsWindow.MoveBackGround();
this.pageManager = new CreditsWindow.PageManager(5);
}
// Token: 0x06000748 RID: 1864 RVA: 0x0001F480 File Offset: 0x0001D680
protected sealed override string[] newSceneTextureNameArray()
{
return new string[]
{
"screen/title/help_01",
"screen/title/help_02",
"screen/title/help_03",
"screen/title/help_04",
"screen/title/help_05",
"screen/common/cancel",
"screen/cgmemory/cgm_arwl",
"screen/cgmemory/cgm_arwr"
};
}
// Token: 0x06000749 RID: 1865 RVA: 0x0001F4D8 File Offset: 0x0001D6D8
protected sealed override void BeforeInit()
{
}
// Token: 0x0600074A RID: 1866 RVA: 0x0001F4DC File Offset: 0x0001D6DC
protected sealed override void AfterInit()
{
//this.moveBackGround.Init(base.GetGameObject("Before"), base.GetGameObject("After"), base.GetGameObject("BackGround"));
float delay = 0f;
int repeat = 0;
float speed = 0.8f;
//ImageObject imageObject = base.GetImageObject("ArrowL");
//imageObject.AddImageAnimation(new ImageAnimationLocalPosition(repeat, speed, delay, MoveType.LoopSin000to180, new Vector3(0f, 0f, 0f), new Vector3(-25f, 0f, 0f)));
//ImageObject imageObject2 = base.GetImageObject("ArrowR");
//imageObject2.AddImageAnimation(new ImageAnimationLocalPosition(repeat, speed, delay, MoveType.LoopSin000to180, new Vector3(0f, 0f, 0f), new Vector3(25f, 0f, 0f)));
}
// Token: 0x0600074B RID: 1867 RVA: 0x0001F5AC File Offset: 0x0001D7AC
protected sealed override BaseWindow.UIComponent[] newComponentArray()
{
//string currentFPath = this.pageManager.GetCurrentFPath();
return new BaseWindow.UIComponent[]
{
//new BaseWindow.UIImage("Before", 0, 0, this.wndz - 1, currentFPath, false, false),
//new BaseWindow.UIImage("After", 0, 0, this.wndz - 1, currentFPath, false, false),
//new BaseWindow.UIImage("BackGround", 0, 0, this.wndz, currentFPath, true, true),
new BaseWindow.UIImage("BackGround", 0, 0, this.wndz, "screen/title/cgm_bg_1", true, true),
new BaseWindow.UIText("Credits", 480, 0, this.wndz + 4, "English Translation Credits", 50, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIText("Credits_1", 10, 100, this.wndz + 4, "Administrator:\n *vocaotome\n *stellarroze \n\nImage Editor:\n *Spicy Diamond\n *Straydog12\n *vocaotome\n *Pandora \n *andi_91\n\nProgrammer:\n *Falaina\n\nTesters:\n *Eldiatricc\n *vocaotome", 20, UnityTextSprite.PositionType.TopLeft, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIText("Credits_2", 255, 100, this.wndz + 4, "Translators:\n *vocaotome \n *final_account\n *Kaylin \n *Aubrey\n *Noriri\n *HakaiEve\n *Yukihime\n *Spinster\n *Chirigirl13\n *Shinsuki\n *Ciara\n *amuletcross\n *NuitNoire\n *Atikal07\n *Neri\n *ask-the-mock-turtle", 20, UnityTextSprite.PositionType.TopLeft, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIText("Credits_3", 510, 100, this.wndz + 4, "Editors:\n *Hattingmad\n *Eldiatricc\n *Shay\n *Liza\n *Mimi\n *Lucy\n *Jes\n *Shinsuki\n *Suzubelle-chan\n *Pandora\n *Daeyamati\n *Kytana\n\nTranslation-Checkers:\n *vocaotome", 20, UnityTextSprite.PositionType.TopLeft, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIText("Credits_4", 765, 100, this.wndz + 4, "Proof-Readers:\n *sonic\n *Shay\n *Shinsuki\n *Liza\n *Grimm\n *Mio\n *Maisa\n *Marie\n *Mellissa \n *Jes\n *Ayame Jay\n *Kyatana\n\nSpecial Thanks:\n *yu_eriyama\n *yuvie", 20, UnityTextSprite.PositionType.TopLeft, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIButton("Cancel", 887, 6, this.wndz + 3, "screen/common/cancel", true, true, 1, 2, 0),
//new BaseWindow.UIImage("ArrowL", 33, 80, this.wndz + 3, "screen/cgmemory/cgm_arwl", false, true),
//new BaseWindow.UIImage("ArrowR", 848, 80, this.wndz + 3, "screen/cgmemory/cgm_arwr", false, true)
};
}
// Token: 0x0600074C RID: 1868 RVA: 0x0001F684 File Offset: 0x0001D884
protected sealed override void OnBaseWindowOnButton(string obj)
{
if (obj != null)
{
if (this.dict == null)
{
this.dict = new Dictionary<string, int>(1)
{
{
"Cancel",
0
}
};
}
int num;
if (this.dict.TryGetValue(obj, out num))
{
if (num == 0)
{
base.PlaySE_Cancel();
SceneManager.BackScene();
}
}
}
}
// Token: 0x0600074D RID: 1869 RVA: 0x0001F6EC File Offset: 0x0001D8EC
protected override void OnBaseWindowUpdate()
{
if (this.moveBackGround.Moving)
{
if (!this.moveBackGround.Update())
{
base.SetTexture("BackGround", "screen/title/" + this.pageManager.GetCurrentFPath());
}
return;
}
INPUT_STATUS status = UnityApp.Input.Status;
if (status == INPUT_STATUS.DRAG || status == INPUT_STATUS.FLICK)
{
//this.OnFlick(UnityApp.Input.SlideDragVector);
}
}
// Token: 0x0600074E RID: 1870 RVA: 0x0001F770 File Offset: 0x0001D970
/*private void OnFlick(SLIDE_VECTOR slide)
{
string currentFPath = this.pageManager.GetCurrentFPath();
if (slide != SLIDE_VECTOR.LEFT)
{
if (slide == SLIDE_VECTOR.RIGHT)
{
base.PlaySE_Select();
this.pageManager.Left();
}
}
else
{
base.PlaySE_Select();
this.pageManager.Right();
}
string currentFPath2 = this.pageManager.GetCurrentFPath();
if (currentFPath2 != currentFPath)
{
Qoo.Debug.Print(currentFPath2);
this.ChangeBG(currentFPath, currentFPath2, slide);
}
}*/
// Token: 0x0600074F RID: 1871 RVA: 0x0001F7F4 File Offset: 0x0001D9F4
private void ChangeBG(string beforePath, string afterPath, SLIDE_VECTOR slide)
{
this.moveBackGround.ChangeBG(beforePath, afterPath, slide);
if (this.moveBackGround.Update())
{
base.StartCoroutine(this.TransitionCoroutine(this.moveBackGround.param));
}
}
// Token: 0x06000750 RID: 1872 RVA: 0x0001F838 File Offset: 0x0001DA38
private IEnumerator TransitionCoroutine(CreditsWindow.TransitionParam param)
{
EffectManager.Init(param.effectName, 500, param.renderer, param.before, param.after);
yield return base.StartCoroutine(EffectManager.StartEffect());
param.action();
yield break;
}
// Token: 0x040006A8 RID: 1704
private readonly int wndz;
// Token: 0x040006A9 RID: 1705
private CreditsWindow.MoveBackGround moveBackGround;
// Token: 0x040006AA RID: 1706
private CreditsWindow.PageManager pageManager;
// Token: 0x02000114 RID: 276
private class PageManager
{
// Token: 0x06000751 RID: 1873 RVA: 0x0001F864 File Offset: 0x0001DA64
public PageManager(int pageMax_)
{
this.page = 0;
this.pageMax = pageMax_;
}
// Token: 0x06000752 RID: 1874 RVA: 0x0001F87C File Offset: 0x0001DA7C
public string GetCurrentFPath()
{
return this.getName(this.page);
}
// Token: 0x06000753 RID: 1875 RVA: 0x0001F88C File Offset: 0x0001DA8C
public string LeftFPath()
{
return this.getName(this.getLeft());
}
// Token: 0x06000754 RID: 1876 RVA: 0x0001F89C File Offset: 0x0001DA9C
public string RightFPath()
{
return this.getName(this.getRight());
}
// Token: 0x06000755 RID: 1877 RVA: 0x0001F8AC File Offset: 0x0001DAAC
public void Left()
{
this.page = this.getLeft();
}
// Token: 0x06000756 RID: 1878 RVA: 0x0001F8BC File Offset: 0x0001DABC
public void Right()
{
this.page = this.getRight();
}
// Token: 0x06000757 RID: 1879 RVA: 0x0001F8CC File Offset: 0x0001DACC
private string getName(int page)
{
return (page + 1).ToString("screen/title/help_00");
}
// Token: 0x06000758 RID: 1880 RVA: 0x0001F8EC File Offset: 0x0001DAEC
private int getLeft()
{
return (this.page != 0) ? (this.page - 1) : (this.pageMax - 1);
}
// Token: 0x06000759 RID: 1881 RVA: 0x0001F91C File Offset: 0x0001DB1C
private int getRight()
{
return (this.page != this.pageMax - 1) ? (this.page + 1) : 0;
}
// Token: 0x040006AC RID: 1708
private int page;
// Token: 0x040006AD RID: 1709
private int pageMax;
}
// Token: 0x02000115 RID: 277
private class MoveImage
{
// Token: 0x0600075A RID: 1882 RVA: 0x0001F940 File Offset: 0x0001DB40
public MoveImage()
{
this.go = null;
}
// Token: 0x0600075B RID: 1883 RVA: 0x0001F950 File Offset: 0x0001DB50
public void Init(GameObject go_)
{
this.go = go_;
}
// Token: 0x0600075C RID: 1884 RVA: 0x0001F95C File Offset: 0x0001DB5C
public void SetTexture(string fpath)
{
ImageObject component = this.go.GetComponent<ImageObject>();
if (component == null)
{
return;
}
component.SetTexture("screen/title/" + fpath);
}
// Token: 0x0600075D RID: 1885 RVA: 0x0001F994 File Offset: 0x0001DB94
public Texture Texture()
{
ImageObject component = this.go.GetComponent<ImageObject>();
if (component == null)
{
return null;
}
return component.Texture;
}
// Token: 0x040006AE RID: 1710
private GameObject go;
}
// Token: 0x02000116 RID: 278
private class TransitionParam
{
// Token: 0x0600075E RID: 1886 RVA: 0x0001F9C4 File Offset: 0x0001DBC4
public TransitionParam(string effectName_ = null, Texture before_ = null, Texture after_ = null, Renderer renderer_ = null, Action action_ = null)
{
this.effectName = effectName_;
this.before = before_;
this.after = after_;
this.renderer = renderer_;
this.action = action_;
}
// Token: 0x040006AF RID: 1711
public string effectName;
// Token: 0x040006B0 RID: 1712
public Texture before;
// Token: 0x040006B1 RID: 1713
public Texture after;
// Token: 0x040006B2 RID: 1714
public Renderer renderer;
// Token: 0x040006B3 RID: 1715
public Action action;
}
// Token: 0x02000117 RID: 279
private class MoveBackGround
{
// Token: 0x0600075F RID: 1887 RVA: 0x0001F9F4 File Offset: 0x0001DBF4
public MoveBackGround()
{
this.param = null;
this.before = new CreditsWindow.MoveImage();
this.after = new CreditsWindow.MoveImage();
this.moving = false;
}
// Token: 0x170000DE RID: 222
// (get) Token: 0x06000760 RID: 1888 RVA: 0x0001FA2C File Offset: 0x0001DC2C
public bool Moving
{
get
{
return this.moving;
}
}
// Token: 0x06000761 RID: 1889 RVA: 0x0001FA34 File Offset: 0x0001DC34
public void Init(GameObject before_, GameObject after_, GameObject bg_)
{
this.before.Init(before_);
this.after.Init(after_);
ImageObject component = bg_.GetComponent<ImageObject>();
if (component == null)
{
return;
}
this.renderer = component.GetComponent<Renderer>();
}
// Token: 0x06000762 RID: 1890 RVA: 0x0001FA7C File Offset: 0x0001DC7C
public void ChangeBG(string beforePath, string afterPath, SLIDE_VECTOR slide)
{
string text = this.calcVector(slide);
this.before.SetTexture(beforePath);
this.after.SetTexture(afterPath);
if (text != null)
{
this.moving = true;
this.param = new CreditsWindow.TransitionParam(text, this.before.Texture(), this.after.Texture(), this.renderer, new Action(this.SetTransitionFinish));
}
}
// Token: 0x06000763 RID: 1891 RVA: 0x0001FAEC File Offset: 0x0001DCEC
public bool Update()
{
return this.moving;
}
// Token: 0x06000764 RID: 1892 RVA: 0x0001FAF4 File Offset: 0x0001DCF4
private string calcVector(SLIDE_VECTOR slide)
{
switch (slide)
{
case SLIDE_VECTOR.LEFT:
return "/bytes/effect/grad_r";
case SLIDE_VECTOR.RIGHT:
return "/bytes/effect/grad_l";
case SLIDE_VECTOR.UP:
return "/bytes/effect/grad_d";
case SLIDE_VECTOR.DOWN:
return "/bytes/effect/grad_u";
default:
return null;
}
}
// Token: 0x06000765 RID: 1893 RVA: 0x0001FB3C File Offset: 0x0001DD3C
private void SetTransitionFinish()
{
this.moving = false;
}
// Token: 0x040006B4 RID: 1716
public CreditsWindow.TransitionParam param;
// Token: 0x040006B5 RID: 1717
private CreditsWindow.MoveImage before;
// Token: 0x040006B6 RID: 1718
private CreditsWindow.MoveImage after;
// Token: 0x040006B7 RID: 1719
private Renderer renderer;
// Token: 0x040006B8 RID: 1720
private bool moving;
}
}

@ -253,7 +253,6 @@ public class EffectManager : MonoBehaviour
// Token: 0x060008E4 RID: 2276 RVA: 0x0002728C File Offset: 0x0002548C
private static IEnumerator loadTexture()
{
Debug.LogWarning (EffectManager.Instance.EffectName);
string path = Application.streamingAssetsPath + Pathing.ToPlatformAssetBundleName(EffectManager.Instance.EffectName);
byte[] data = System.IO.File.ReadAllBytes(path + ".png");
Texture2D tex = new Texture2D(0, 0, TextureFormat.RGBA32, false, true);

@ -330,10 +330,10 @@ public class GalleryCGWindow : BaseWindow
// Token: 0x060006DD RID: 1757 RVA: 0x0001CFF8 File Offset: 0x0001B1F8
public void SetRendererEnable(bool lr, bool ud)
{
this.gameObject[0].renderer.enabled = lr;
this.gameObject[1].renderer.enabled = lr;
this.gameObject[2].renderer.enabled = ud;
this.gameObject[3].renderer.enabled = ud;
this.gameObject[0].GetComponent<Renderer>().enabled = lr;
this.gameObject[1].GetComponent<Renderer>().enabled = lr;
this.gameObject[2].GetComponent<Renderer>().enabled = ud;
this.gameObject[3].GetComponent<Renderer>().enabled = ud;
}
// Token: 0x0400066D RID: 1645

@ -119,23 +119,42 @@ public class GalleryInputNameDialogWindow : BaseWindow
switch (this.type)
{
case GalleryInputNameDialogType.EMPTY:
return "名前が入力されていません。";
return UnityApp.Instance.isJapanese ? "名前が入力されていません。" : "No name entered";
case GalleryInputNameDialogType.OVER:
return "入力できる名前は7文字までです。";
return UnityApp.Instance.isJapanese ? "入力できる名前は7文字までです。" : "You can enter up to 7 characters";
case GalleryInputNameDialogType.INVALIDCHAR:
return "表示できない文字が含まれています。";
return UnityApp.Instance.isJapanese ? "表示できない文字が含まれています。" : "Input contains characters that cannot be displayed";
case GalleryInputNameDialogType.CONFIRM:
if (line == 0)
{
string galleryInputNameDialog_Name = UIValue.GalleryInputNameDialog_Name;
string paramString = GameData.GetParamString("familyname", string.Empty);
return string.Format("「{0}{1}」です。", galleryInputNameDialog_Name, paramString);
}
if (line != 1)
{
return string.Empty;
}
return "よろしいですか?";
if (UnityApp.Instance.isJapanese)
{
if (line == 0)
{
string galleryInputNameDialog_Name = UIValue.GalleryInputNameDialog_Name;
string paramString = GameData.GetParamString("familyname", string.Empty);
return string.Format("「{0}{1}」です。", galleryInputNameDialog_Name, paramString);
}
if (line != 1)
{
return string.Empty;
}
return "よろしいですか?";
}
else
{
if (line == 0)
{
string galleryInputNameDialog_Name = UIValue.GalleryInputNameDialog_Name;
string paramString = GameData.GetParamString("familyname", string.Empty);
return string.Format("Is {0} {1} correct?", galleryInputNameDialog_Name, paramString);
}
if (line != 1)
{
return string.Empty;
}
return string.Empty;
}
default:
return string.Empty;
}

@ -15,14 +15,15 @@ public class GalleryInputNameKeyboardWindow : BaseWindow
public IEnumerator Run()
{
string initvalue = UIValue.GalleryInputNameDialog_Name;
switch (Application.platform)
yield return NameInputKeyboard.Open(initvalue, false);
/*switch (Application.platform)
{
case RuntimePlatform.IPhonePlayer:
case RuntimePlatform.Android:
yield return NameInputKeyboard.Open(initvalue, false);
goto IL_82;
}
NameInputKeyboard.DebugInputText = initvalue;
}*/
//NameInputKeyboard.DebugInputText = initvalue;
IL_82:
UIValue.GalleryInputNameDialog_Name = NameInputKeyboard.InputText;
UIValue.GalleryInputNameDialog_Exit = GalleryInputNameDialogExitType.INPUT;

@ -40,7 +40,7 @@ public class GalleryMovieWindow : BaseWindow
{
//TODO fix movie playing. either make platform specific versions OR make platform agnostic
//yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.mp4", FullScreenMovieControlMode.CancelOnInput));
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.mp4", ""));
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.mp4", this.gameObject));
this.state = GalleryMovieWindow.STATE.END;
yield break;
}

@ -336,7 +336,7 @@ public class HelpWindow : BaseWindow
{
return;
}
this.renderer = component.renderer;
this.renderer = component.GetComponent<Renderer>();
}
// Token: 0x06000762 RID: 1890 RVA: 0x0001FA7C File Offset: 0x0001DC7C

@ -85,9 +85,9 @@ public class ImageObject : MonoBehaviour
{
GameObject gameObject = GameObject.CreatePrimitive(PrimitiveType.Quad);
//gameObject.renderer.material = new Material(Resources.Load("Shader/Sprite/Sprite") as Shader);
gameObject.renderer.material = new Material(Shader.Find("QO/Sprite") as Shader);
gameObject.GetComponent<Renderer>().material = new Material(Shader.Find("QO/Sprite") as Shader);
gameObject.transform.parent = parent;
gameObject.collider.enabled = collisionEnable;
gameObject.GetComponent<Collider>().enabled = collisionEnable;
ImageObject imageObject = gameObject.AddComponent<ImageObject>();
imageObject.UIObject = uiObject;
imageObject.InitObject(true, uiObject);
@ -119,7 +119,7 @@ public class ImageObject : MonoBehaviour
{
GraphicManager.ReleaseTexture(this.imageUnityTexture);
this.imageUnityTexture = null;
base.renderer.material.mainTexture = null;
base.GetComponent<Renderer>().material.mainTexture = null;
}
this.changeTexture = true;
this.UIObject.UITexture.TexturePath = texturePath;
@ -180,7 +180,7 @@ public class ImageObject : MonoBehaviour
int num2 = this.ImageBlockIndex % this.UIObject.UITexture.BlockNum + 1;
Vector2 vector = new Vector2(1f / (float)this.UIObject.UITexture.BlockX, 1f / (float)this.UIObject.UITexture.BlockY);
Vector2 vector2 = new Vector2(1f - vector.x * (float)num, 1f - vector.y * (float)num2);
base.transform.renderer.material.SetVector("_UVWH", new Vector4(vector2.x, vector2.y, vector.x, vector.y));
base.transform.GetComponent<Renderer>().material.SetVector("_UVWH", new Vector4(vector2.x, vector2.y, vector.x, vector.y));
}
// Token: 0x06000BC8 RID: 3016 RVA: 0x00031B74 File Offset: 0x0002FD74
@ -188,17 +188,17 @@ public class ImageObject : MonoBehaviour
{
this.loadCompleted = true;
this.imageUnityTexture = unityTexture;
base.renderer.material.mainTexture = unityTexture.m_Texture;
base.GetComponent<Renderer>().material.mainTexture = unityTexture.m_Texture;
// TODO issue with changeTexture, fix later
//base.renderer.enabled = (this.changeTexture && this.rendererEnableAfterLoad);
base.renderer.enabled = this.rendererEnableAfterLoad;
base.GetComponent<Renderer>().enabled = this.rendererEnableAfterLoad;
this.OnTextureLoadComplete2();
}
// Token: 0x06000BC9 RID: 3017 RVA: 0x00031BD0 File Offset: 0x0002FDD0
public void ApplyRendererEnableAfterLoad()
{
base.renderer.enabled = this.rendererEnableAfterLoad;
base.GetComponent<Renderer>().enabled = this.rendererEnableAfterLoad;
}
// Token: 0x06000BCA RID: 3018 RVA: 0x00031BE4 File Offset: 0x0002FDE4

@ -79,11 +79,11 @@ public class ImageObject2
{
get
{
return this.m_GameObject.collider.enabled;
return this.m_GameObject.GetComponent<Collider>().enabled;
}
set
{
this.m_GameObject.collider.enabled = value;
this.m_GameObject.GetComponent<Collider>().enabled = value;
}
}
@ -94,11 +94,11 @@ public class ImageObject2
{
get
{
return this.m_GameObject.renderer.enabled;
return this.m_GameObject.GetComponent<Renderer>().enabled;
}
set
{
this.m_GameObject.collider.enabled = value;
this.m_GameObject.GetComponent<Collider>().enabled = value;
}
}
@ -117,7 +117,7 @@ public class ImageObject2
{
GameObject gameObject = GameObject.CreatePrimitive(PrimitiveType.Quad);
//gameObject.renderer.material = new Material(Resources.Load("Shader/Sprite/Sprite") as Shader);
gameObject.renderer.material = new Material(Shader.Find("QO/Sprite") as Shader);
gameObject.GetComponent<Renderer>().material = new Material(Shader.Find("QO/Sprite") as Shader);
gameObject.name = name;
gameObject.transform.parent = parent;
return new ImageObject2(gameObject, x, y, z, uniTex);
@ -126,8 +126,8 @@ public class ImageObject2
// Token: 0x06000BDB RID: 3035 RVA: 0x00031E0C File Offset: 0x0003000C
public void Hidden(bool hidden)
{
this.m_GameObject.renderer.enabled = !hidden;
this.m_GameObject.collider.enabled = !hidden;
this.m_GameObject.GetComponent<Renderer>().enabled = !hidden;
this.m_GameObject.GetComponent<Collider>().enabled = !hidden;
}
// Token: 0x06000BDC RID: 3036 RVA: 0x00031E44 File Offset: 0x00030044
@ -171,7 +171,7 @@ public class ImageObject2
{
return;
}
this.m_GameObject.renderer.material.mainTexture = this.m_UniTex.m_Texture;
this.m_GameObject.GetComponent<Renderer>().material.mainTexture = this.m_UniTex.m_Texture;
if (fixedTexture)
{
this.FixedTexture();
@ -188,7 +188,7 @@ public class ImageObject2
public void SetTextureUVWH(Vector4 uvwh)
{
this.m_UVWH = uvwh;
this.m_GameObject.renderer.material.SetVector("_UVWH", this.m_UVWH);
this.m_GameObject.GetComponent<Renderer>().material.SetVector("_UVWH", this.m_UVWH);
}
// Token: 0x06000BE4 RID: 3044 RVA: 0x00031F30 File Offset: 0x00030130

@ -71,7 +71,7 @@ public class IntroductionWindow : BaseWindow
new BaseWindow.UIImage("DummyMessage", 304, 275, this.wndz + 1, filenameMessage, false, false),
new BaseWindow.UIImage("BackGround", 0, 0, this.wndz, filenameBackGround, false, true),
new BaseWindow.UIImage("Message", 304, 275, this.wndz + 1, filenameMessage, false, true),
new BaseWindow.UIButton("Start", 465, 172, this.wndz + 1, filenameButton, true, this.GetStartButtonShow(), 1, 2, 0),
//new BaseWindow.UIButton("Start", 465, 172, this.wndz + 1, filenameButton, true, this.GetStartButtonShow(), 1, 2, 0),
new BaseWindow.UIImage("SampleVoice", 50, 423, this.wndz + 1, "screen/title/kyara_voice", true, voiceButtonShow),
new BaseWindow.UIButton("SampleVoice1", 45, 460, this.wndz + 1, "screen/sysmenu/sys_smv", true, voiceButtonShow, 1, 2, 0),
new BaseWindow.UIButton("SampleVoice2", 127, 460, this.wndz + 1, "screen/sysmenu/sys_smv", true, voiceButtonShow, 1, 2, 0),
@ -92,7 +92,7 @@ public class IntroductionWindow : BaseWindow
return;
}
this.SetCharaTexture(string.Empty);
base.SetTexture("Start", this.GetFilenameButton());
//base.SetTexture("Start", this.GetFilenameButton());
this.SetButtonShow();
base.RestartAnimation("ArrowL");
base.RestartAnimation("ArrowR");
@ -153,7 +153,7 @@ public class IntroductionWindow : BaseWindow
base.GameObjectShow("SampleVoice1", voiceButtonShow);
base.GameObjectShow("SampleVoice2", voiceButtonShow);
base.GameObjectShow("SampleVoice3", voiceButtonShow);
base.GameObjectShow("Start", this.GetStartButtonShow());
//base.GameObjectShow("Start", this.GetStartButtonShow());
}
// Token: 0x0600076F RID: 1903 RVA: 0x00020184 File Offset: 0x0001E384

@ -30,7 +30,7 @@ public class ListItemObject : MonoBehaviour
// Token: 0x06000646 RID: 1606 RVA: 0x0001A064 File Offset: 0x00018264
private IEnumerator WaitLoadTextureCoroutine()
{
while (base.renderer.material.mainTexture == null)
while (base.GetComponent<Renderer>().material.mainTexture == null)
{
yield return 0;
}
@ -67,10 +67,10 @@ public class ListItemObject : MonoBehaviour
this.m_ImageObject.OriginalPosition = base.transform.localPosition;
this.m_ImageObject.OnViewPosition = this.m_ImageObject.OriginalPosition;
this.m_ImageObject.OnViewScale = this.m_ImageObject.OriginalScale;
if (base.renderer.material.mainTexture != null)
if (base.GetComponent<Renderer>().material.mainTexture != null)
{
localScale.x = (float)base.renderer.material.mainTexture.width;
localScale.y = (float)base.renderer.material.mainTexture.height;
localScale.x = (float)base.GetComponent<Renderer>().material.mainTexture.width;
localScale.y = (float)base.GetComponent<Renderer>().material.mainTexture.height;
base.transform.localScale = localScale;
this.scaling();
this.positioning();
@ -126,11 +126,11 @@ public class ListItemObject : MonoBehaviour
float num = this.ListViewScale.y / this.m_ImageObject.OriginalScale.y;
if (this.isBotOver)
{
base.renderer.material.SetVector("_UVWH", new Vector4(0f, 1f - num, 1f, num));
base.GetComponent<Renderer>().material.SetVector("_UVWH", new Vector4(0f, 1f - num, 1f, num));
}
else
{
base.renderer.material.SetVector("_UVWH", new Vector4(0f, 0f, 1f, num));
base.GetComponent<Renderer>().material.SetVector("_UVWH", new Vector4(0f, 0f, 1f, num));
}
}

@ -34,7 +34,7 @@ public class LogoMovieWindow : BaseWindow
{
//TODO fix movie playing. either make platform specific versions OR make platform agnostic
//yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/normal/quinrose_logo_8.mp4", FullScreenMovieControlMode.CancelOnInput));
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/normal/quinrose_logo_8.mp4", ""));
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/normal/quinrose_logo_8.mp4", this.gameObject));
this.state = LogoMovieWindow.STATE.END;
yield break;
}

@ -51,16 +51,14 @@ public class Man2D : Singleton<Man2D>
private void OnEnable()
{
this.m_Sprite.Enable();
//TODO determine why camera breaks
base.camera.enabled = true;
//base.camera.enabled = false;
base.GetComponent<Camera>().enabled = true;
}
// Token: 0x06000978 RID: 2424 RVA: 0x00029EF4 File Offset: 0x000280F4
private void OnDisable()
{
this.m_Sprite.Disable();
base.camera.enabled = false;
base.GetComponent<Camera>().enabled = false;
}
// Token: 0x06000979 RID: 2425 RVA: 0x00029F10 File Offset: 0x00028110
@ -266,7 +264,7 @@ public class Man2D : Singleton<Man2D>
// Token: 0x0600098E RID: 2446 RVA: 0x0002A2A4 File Offset: 0x000284A4
public void UpdateFrameBuffer()
{
if (base.camera.targetTexture != null && this.m_FrameBufferAr[this.m_nFrameNo] != null)
if (base.GetComponent<Camera>().targetTexture != null && this.m_FrameBufferAr[this.m_nFrameNo] != null)
{
this.m_FrameBufferAr[this.m_nFrameNo].IsReady = true;
}
@ -277,7 +275,7 @@ public class Man2D : Singleton<Man2D>
}
if (this.m_FrameBufferAr[this.m_nFrameNo] != null)
{
base.camera.targetTexture = this.m_FrameBufferAr[this.m_nFrameNo].Tex;
base.GetComponent<Camera>().targetTexture = this.m_FrameBufferAr[this.m_nFrameNo].Tex;
}
}
@ -286,15 +284,15 @@ public class Man2D : Singleton<Man2D>
{
base.gameObject.AddComponent<Camera>();
CreateSprite.CreateSpriteCamera(base.gameObject, this.m_nScreenH, true);
base.gameObject.camera.aspect = 1.7647059f;
base.gameObject.GetComponent<Camera>().aspect = 1.7647059f;
}
// Token: 0x06000990 RID: 2448 RVA: 0x0002A390 File Offset: 0x00028590
private void CreateSpriteManager()
{
this.m_Sprite = new ManSprite();
float z = base.camera.transform.localPosition.z;
this.m_Sprite.SetZ(base.camera.nearClipPlane + z, base.camera.farClipPlane + z);
float z = base.GetComponent<Camera>().transform.localPosition.z;
this.m_Sprite.SetZ(base.GetComponent<Camera>().nearClipPlane + z, base.GetComponent<Camera>().farClipPlane + z);
this.m_Sprite.SetScreenSize(this.m_nScreenW, this.m_nScreenH);
}
@ -316,14 +314,14 @@ public class Man2D : Singleton<Man2D>
this.m_FrameBufferAr[i] = new FrameBuffer(w, h, "2D Sprite FrameBuffer" + i);
}
this.m_nFrameNo = 0;
base.camera.targetTexture = this.m_FrameBufferAr[this.m_nFrameNo].Tex;
base.GetComponent<Camera>().targetTexture = this.m_FrameBufferAr[this.m_nFrameNo].Tex;
}
// Token: 0x06000992 RID: 2450 RVA: 0x0002A4B8 File Offset: 0x000286B8
public void ReleaseFrameBuffer()
{
Qoo.Debug.Print("Release Frame Buffer");
base.camera.targetTexture = null;
base.GetComponent<Camera>().targetTexture = null;
for (int i = 0; i < this.m_FrameBufferAr.Length; i++)
{
if (this.m_FrameBufferAr[i] != null)

@ -27,7 +27,7 @@ public class Meter : MonoBehaviour
// Token: 0x0600064F RID: 1615 RVA: 0x0001A4D0 File Offset: 0x000186D0
protected virtual IEnumerator WaitLoadTextureCoroutine()
{
while (base.gameObject.renderer.material.mainTexture == null)
while (base.gameObject.GetComponent<Renderer>().material.mainTexture == null)
{
yield return 0;
}

@ -16,7 +16,7 @@ public class MeterCollider : MonoBehaviour
// Token: 0x06000656 RID: 1622 RVA: 0x0001A5E0 File Offset: 0x000187E0
private IEnumerator WaitLoadTextureCoroutine()
{
while (this.m_MeterObject.renderer.material.mainTexture == null)
while (this.m_MeterObject.GetComponent<Renderer>().material.mainTexture == null)
{
yield return 0;
}
@ -27,7 +27,7 @@ public class MeterCollider : MonoBehaviour
{
this.m_Collider = base.gameObject.AddComponent<BoxCollider>();
}
this.m_Collider.size = new Vector3((float)this.m_MeterObject.renderer.material.mainTexture.width, (float)this.m_MeterObject.renderer.material.mainTexture.height, 1f);
this.m_Collider.size = new Vector3((float)this.m_MeterObject.GetComponent<Renderer>().material.mainTexture.width, (float)this.m_MeterObject.GetComponent<Renderer>().material.mainTexture.height, 1f);
this.m_Collider.center = new Vector3(0f, 0f, -3f);
this.m_ImageObject = this.m_MeterObject.GetComponent<ImageObject>();
yield break;

@ -1,9 +1,10 @@
using System;
using System.Collections;
using UnityEngine;
using UnityEngine.Video;
// Token: 0x0200017E RID: 382
public class MovieManager
public static class MovieManager
{
//TODO fix movie playing. either make platform specific versions OR make platform agnostic
@ -15,11 +16,64 @@ public class MovieManager
yield break;
}*/
public static IEnumerator PlayMovie(string path, string mode)
//public static IEnumerator PlayMovie(string path, string mode)
public static IEnumerator PlayMovie(string filePath, GameObject gameObject)
{
int m_width = 960;
int m_height = 544;
yield return 0;
yield return 0;
UnitySprite movieFrame = new UnitySprite(false, gameObject, false);
movieFrame.CalcRenderImageOffset(m_width, m_height);
movieFrame.Update(m_width, m_height, 10f);
movieFrame.SetName("Movie Frame");
//NewCode
string path = filePath;
if (path.IndexOf('/') == 0)
{
path = path.Substring(1);
}
string pathExt = System.IO.Path.GetExtension(path);
path = path.Substring(0, path.Length - pathExt.Length);
VideoPlayer m_tex = movieFrame.obj.transform.gameObject.AddComponent<VideoPlayer>();
m_tex.playOnAwake = true;
Material newMat = new Material(Shader.Find("QO/Sprite") as Shader);
m_tex.url = Application.streamingAssetsPath + "/" + path + ".mp4";
m_tex.isLooping = false;
movieFrame.SetMaterial(newMat, 960, 544);
m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
//OLD Code
//movieFrame.SetMaterial(movie.Play(name, MOVIE_TEX_TYPE.ADD, false), 960, 544);
//yield return 0;
//while (movie.IsPlay)
//m_tex.Play();
yield return 0;
while (!m_tex.isPrepared)
{
yield return 0;
}
yield return 0;
while (m_tex.isPlaying || !m_tex.isPrepared)
{
if (Input.GetMouseButtonDown(0))
{
break;
}
movieFrame.CalcRenderImageOffset(m_width, m_height);
movieFrame.Update(m_width, m_height, 10f);
yield return 0;
}
//GameObject.Destroy(gameObject);
//Handheld.PlayFullScreenMovie(path, Color.black, mode);
yield return 0;
yield break;
}
}

@ -1,6 +1,7 @@
using System;
using Qoo;
using UnityEngine;
using UnityEngine.Video;
// Token: 0x02000180 RID: 384
public class MovieTex : MonoBehaviour
@ -34,10 +35,25 @@ public class MovieTex : MonoBehaviour
{
path = path.Substring(1);
}
this.m_tex = base.gameObject.AddComponent<MobileMovieTexture>();
this.m_tex.m_path = path;
this.m_tex.m_loop = isLoop;
if (eType != MOVIE_TEX_TYPE.NORMAL)
string pathExt = System.IO.Path.GetExtension(path);
path = path.Substring(0, path.Length - pathExt.Length);
//this.m_tex = base.gameObject.AddComponent<MobileMovieTexture>();
this.m_tex = base.gameObject.AddComponent<VideoPlayer>();
this.m_tex.playOnAwake = false;
Material newMat = new Material(Shader.Find("QO/Sprite") as Shader);
/*this.m_tex.url = "file:///" + Application.streamingAssetsPath + "/" + path;
this.m_tex.isLooping = isLoop;*/
//this.m_tex.m_path = path + ".mp4";
this.m_tex.url = "file:///" + Application.streamingAssetsPath + "/" + path + ".mp4";
this.m_tex.isLooping = isLoop;
this.m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
//this.m_tex.targetMaterialRenderer = newMat;
this.m_tex.Play();
//GameObject.Find();
/*if (eType != MOVIE_TEX_TYPE.NORMAL)
{
if (eType != MOVIE_TEX_TYPE.ADD)
{
@ -46,15 +62,19 @@ public class MovieTex : MonoBehaviour
}
else
{
this.m_tex.m_movieMaterial = new Material(Resources.Load("Shader/Movie/YCrCbtoRGB Add") as Shader);
//this.m_tex.m_movieMaterial = new Material(Resources.Load("Shader/Movie/YCrCbtoRGB Add") as Shader);
this.m_tex.m_movieMaterial = new Material(Shader.Find("QO/Sprite") as Shader);
}
}
else
{
this.m_tex.m_movieMaterial = new Material(Resources.Load("Shader/Movie/YCrCbtoRGB") as Shader);
}
this.m_tex.Play();
return this.m_tex.MovieMaterial;
//this.m_tex.m_movieMaterial = new Material(Resources.Load("Shader/Movie/YCrCbtoRGB") as Shader);
this.m_tex.m_movieMaterial = new Material(Shader.Find("QO/Sprite") as Shader);
}*/
//return gameObject.GetComponent<Renderer>().material;
//return this.m_tex.MovieMaterial;
return newMat;
}
// Token: 0x06000AD3 RID: 2771 RVA: 0x0002F764 File Offset: 0x0002D964
@ -69,5 +89,6 @@ public class MovieTex : MonoBehaviour
}
// Token: 0x040008C0 RID: 2240
private MobileMovieTexture m_tex;
//private MobileMovieTexture m_tex;
private VideoPlayer m_tex;
}

@ -58,7 +58,15 @@ public class NameInputKeyboard : MonoBehaviour
}
if (ScreenKeyboardManager.IsCancel)
{
NameInputKeyboard.Instance.m_inputText = "アリス";
if (UnityApp.Instance.isJapanese)
{
NameInputKeyboard.Instance.m_inputText = "アリス";
}
else
{
NameInputKeyboard.Instance.m_inputText = "Alice";
}
}
else
{

@ -28,7 +28,7 @@ public class OptionSoundMeter : Meter
// Token: 0x06000679 RID: 1657 RVA: 0x0001AE14 File Offset: 0x00019014
protected override IEnumerator WaitLoadTextureCoroutine()
{
while (base.gameObject.renderer.material.mainTexture == null)
while (base.gameObject.GetComponent<Renderer>().material.mainTexture == null)
{
yield return 0;
}

@ -19,7 +19,7 @@ public class OptionVoiceMeter : Meter
// Token: 0x0600067F RID: 1663 RVA: 0x0001AF2C File Offset: 0x0001912C
protected override IEnumerator WaitLoadTextureCoroutine()
{
while (base.gameObject.renderer.material.mainTexture == null)
while (base.gameObject.GetComponent<Renderer>().material.mainTexture == null)
{
yield return 0;
}

@ -60,7 +60,7 @@ public class ParamWnd : Singleton<ParamWnd>
"fps:",
(1f / Time.deltaTime).ToString("0.0"),
" heap:",
Profiler.usedHeapSize / 1048576U,
UnityEngine.Profiling.Profiler.usedHeapSize / 1048576U,
"MB all=",
SystemInfo.systemMemorySize,
"MB"

@ -46,7 +46,7 @@ namespace QO
stringBuilder.Append("usedHeapSize ");
stringBuilder.Append(string.Concat(new object[]
{
Profiler.usedHeapSize / 1024f,
UnityEngine.Profiling.Profiler.usedHeapSize / 1024f,
" KB / ",
(float)SystemInfo.systemMemorySize * 1024f,
" KB"

@ -5,6 +5,21 @@ namespace Qoo.Def
// Token: 0x020000C8 RID: 200
public class ErrorDef
{
void Awake()
{
ERROR_MSG_NO_GLYPH = "Contains characters that cannot be displayed";
ERROR_MSG_MAX_OVER = "You can enter up to 7 characters for the name.";
ERROR_MSG_NO_NAME = "No name has been entered.";
ERROR_MSG_FAIL_CONNECT = "Connection failed. Try again later";
ERROR_MSG_ASSERT_FORMAT = "We apologize for the inconvenience.\nA critical error has occurred.\n\nError Code ={0}\n{1}\n\nPlease send the above information to\n<ArnethMyndraavn@gmail.com>\n\nThank you";
ERROR_MSG_UNKOWN = "Unexpected error";
ERROR_MSG_FAIL_SAVE = "Failed to save game";
ERROR_MSG_FAIL_LOAD = "Failed to load save file";
CONFIRM_MSG_0 = "Is {0} {1} Correct?";
CONFIRM_MSG_1 = "";
}
// Token: 0x040004A1 RID: 1185
public const string DLG_CG = "sys_dialog";
@ -57,34 +72,34 @@ namespace Qoo.Def
public const int DLG_MSG_OFS_Y = 40;
// Token: 0x040004B2 RID: 1202
public const string ERROR_MSG_NO_GLYPH = "表示できない文字が含まれています。";
public string ERROR_MSG_NO_GLYPH = "表示できない文字が含まれています。";
// Token: 0x040004B3 RID: 1203
public const string ERROR_MSG_MAX_OVER = "入力できる名前は7文字までです。";
public string ERROR_MSG_MAX_OVER = "入力できる名前は7文字までです。";
// Token: 0x040004B4 RID: 1204
public const string ERROR_MSG_NO_NAME = "名前が入力されていません。";
public string ERROR_MSG_NO_NAME = "名前が入力されていません。";
// Token: 0x040004B5 RID: 1205
public const string ERROR_MSG_FAIL_CONNECT = "通信に失敗しました。通信状態の良いところで再度接続を試みてください。";
public string ERROR_MSG_FAIL_CONNECT = "通信に失敗しました。通信状態の良いところで再度接続を試みてください。";
// Token: 0x040004B6 RID: 1206
public const string ERROR_MSG_ASSERT_FORMAT = "ご迷惑をお掛けし、大変申し訳ございません。\n継続不能なエラーが発生しました。\n\nエラーコード={0}\n{1}\n\n上記のエラーコードを記載し、\ninfo@quinrose.comまでご連絡ください。\n\nご協力のほどよろしくお願い申し上げます。";
public string ERROR_MSG_ASSERT_FORMAT = "ご迷惑をお掛けし、大変申し訳ございません。\n継続不能なエラーが発生しました。\n\nエラーコード={0}\n{1}\n\n上記のエラーコードを記載し、\ninfo@quinrose.comまでご連絡ください。\n\nご協力のほどよろしくお願い申し上げます。";
// Token: 0x040004B7 RID: 1207
public const string ERROR_MSG_UNKOWN = "予期せぬエラー";
public string ERROR_MSG_UNKOWN = "予期せぬエラー";
// Token: 0x040004B8 RID: 1208
public const string ERROR_MSG_FAIL_SAVE = "ゲームデータの保存を正常に終了できませんでした。";
public string ERROR_MSG_FAIL_SAVE = "ゲームデータの保存を正常に終了できませんでした。";
// Token: 0x040004B9 RID: 1209
public const string ERROR_MSG_FAIL_LOAD = "ゲームデータの読込を正常に終了できませんでした。";
public string ERROR_MSG_FAIL_LOAD = "ゲームデータの読込を正常に終了できませんでした。";
// Token: 0x040004BA RID: 1210
public const string CONFIRM_MSG_0 = "「{0}{1}」です。";
public string CONFIRM_MSG_0 = "「{0}{1}」です。";
// Token: 0x040004BB RID: 1211
public const string CONFIRM_MSG_1 = "よろしいですか?";
public string CONFIRM_MSG_1 = "よろしいですか?";
// Token: 0x040004BC RID: 1212
public const float WAIT_TIME = 1f;

@ -90,8 +90,8 @@ namespace Qoo.Def
// Token: 0x040004FE RID: 1278
private static readonly GameDef.GAME_PARAM_TABLE[] g_GameParamTable = new GameDef.GAME_PARAM_TABLE[]
{
new GameDef.GAME_PARAM_TABLE("firstname", "アリス", false),
new GameDef.GAME_PARAM_TABLE("familyname", "リデル", false),
UnityApp.Instance.isJapanese? new GameDef.GAME_PARAM_TABLE("firstname", "アリス", false) : new GameDef.GAME_PARAM_TABLE("firstname", "Alice", false),
UnityApp.Instance.isJapanese? new GameDef.GAME_PARAM_TABLE("familyname", "リデル", false) : new GameDef.GAME_PARAM_TABLE("familyname", "Liddell", false),
new GameDef.GAME_PARAM_TABLE("scene", string.Empty, false),
new GameDef.GAME_PARAM_TABLE("memory", string.Empty, false),
new GameDef.GAME_PARAM_TABLE("map_bg", string.Empty, false),

@ -5,6 +5,7 @@ namespace Qoo.Def
// Token: 0x020000D7 RID: 215
public class PaymentDef
{
// Token: 0x04000554 RID: 1364
public const string APLICATION_ID = "";
@ -32,28 +33,14 @@ namespace Qoo.Def
// Token: 0x0400055C RID: 1372
public const float DLG_ENDTIME = 1f;
// Token: 0x0400055D RID: 1373
public const string SCCESS_MSG_PURCHASE = "アドオンの購入が完了しました。";
// Token: 0x0400055E RID: 1374
public const string PROCESS_MSG_PURCHASE = "購入処理中です。";
// Token: 0x0400055F RID: 1375
public const string SCCESS_MSG_RENEWAL_LIST = "アドオンの購入履歴を更新しました。";
// Token: 0x04000560 RID: 1376
public const string PROCESS_MSG_RENEWAL_LIST = "アドオン購入履歴を更新中です。";
// Token: 0x04000561 RID: 1377
public const string SCCESS_MSG_RESTORE = "リストア(アドオン情報の復元)が完了しました。";
// Token: 0x04000562 RID: 1378
public const string PROCESS_MSG_RESTORE = "リストア処理中です。";
// Token: 0x04000563 RID: 1379
public const string ERROR_MSG_FAIL_CONNECT = "通信に失敗しました。\n通信状態の良いところで再度接続を試みてください。";
// Token: 0x04000564 RID: 1380
public const string ERROR_MSG_NOUSE_APP = "App内での購入が許可されていません。\n「機能制限」の設定画面から\n「App内での購入」をオンにしてください。";
//Should no longer be needed
public string SCCESS_MSG_PURCHASE = "アドオンの購入が完了しました。";
public string PROCESS_MSG_PURCHASE = "購入処理中です。";
public string SCCESS_MSG_RENEWAL_LIST = "アドオンの購入履歴を更新しました。";
public string PROCESS_MSG_RENEWAL_LIST = "アドオン購入履歴を更新中です。";
public string SCCESS_MSG_RESTORE = "リストア(アドオン情報の復元)が完了しました。";
public string PROCESS_MSG_RESTORE = "リストア処理中です。";
public string ERROR_MSG_FAIL_CONNECT = "通信に失敗しました。\n通信状態の良いところで再度接続を試みてください。";
public string ERROR_MSG_NOUSE_APP = "App内での購入が許可されていません。\n「機能制限」の設定画面から\n「App内での購入」をオンにしてください。";
}
}

@ -5,6 +5,16 @@ namespace Qoo.Def
// Token: 0x020000D8 RID: 216
public class SaveLoadDef
{
void Awake()
{
if (!UnityApp.Instance.isJapanese)
{
MSG_SAVE_CONFIRM = "Do you want to save?";
MSG_OVER_CONFIRM = "Do you want to overwrite this save";
MSG_LOAD_CONFIRM = "Do you want to load this save";
}
}
// Token: 0x04000565 RID: 1381
public const string DLG_CG = "screen/common/sys_dialog";
@ -21,12 +31,12 @@ namespace Qoo.Def
public const int DLG_MSG_Y = 230;
// Token: 0x0400056A RID: 1386
public const string MSG_SAVE_CONFIRM = "セーブしますか?";
public string MSG_SAVE_CONFIRM = "セーブしますか?";
// Token: 0x0400056B RID: 1387
public const string MSG_OVER_CONFIRM = "上書きしますか?";
public string MSG_OVER_CONFIRM = "上書きしますか?";
// Token: 0x0400056C RID: 1388
public const string MSG_LOAD_CONFIRM = "ロードしますか?";
public string MSG_LOAD_CONFIRM = "ロードしますか?";
}
}

@ -71,7 +71,7 @@ namespace Qoo
{
this.guiStyle = GUI.skin.textArea;
this.guiStyle.fontSize = 20;
string format = "ご迷惑をお掛けし、大変申し訳ございません。\n継続不能なエラーが発生しました。\n\nエラーコード={0}\n{1}\n\n上記のエラーコードを記載し、\ninfo@quinrose.comまでご連絡ください。\n\nご協力のほどよろしくお願い申し上げます。";
string format = "ご迷惑をお掛けし、大変申し訳ございません。\n継続不能なエラーが発生しました。\n\nエラーコード={0}\n{1}\n\n上記のエラーコードを記載し、\nArnethMyndraavn@gmail.comまでご連絡ください。\n\nご協力のほどよろしくお願い申し上げます。";
string str = "E";
int num = (int)this.errorCode;
string text = string.Format(format, str + num.ToString("0000"), this.errorMessage);

@ -44,12 +44,14 @@ namespace Qoo.Game
}
KsInput.Enable = false;
KsInput.Clear();
bool flag = KsExec.ExecPay(Param, Value, count);
/*bool flag = KsExec.ExecPay(Param, Value, count);
if (flag)
{
KsInput.Enable = true;
}
return flag;
return flag;*/
//should disable all payment checks
return true;
}
}
else
@ -74,11 +76,20 @@ namespace Qoo.Game
// Token: 0x06000612 RID: 1554 RVA: 0x0001943C File Offset: 0x0001763C
public static bool InputName(int count)
{
//UnityEngine.Debug.LogWarning(count);
if (count == 0)
{
UnityEngine.Debug.LogWarning("first");
KsExec.confirm = false;
KsExec.confirmResult = false;
KsExec.editName = "アリス";
if (UnityApp.Instance.isJapanese)
{
KsExec.editName = "アリス";
}
else
{
KsExec.editName = "Alice";
}
NameInputKeyboard.DebugInputText = KsExec.editName;
KsExec.KeyboardMain();
}
@ -99,28 +110,40 @@ namespace Qoo.Game
KsExec.editName = NameInputKeyboard.InputText;
if (KsExec.editName.Length == 0 || KsExec.checkSpaceOnly(KsExec.editName))
{
UnityTask.SetSubNoUnityTask(MessageDlg.ExecDlg("名前が入力されていません。", null));
UnityTask.SetSubNoUnityTask(MessageDlg.ExecDlg("No name entered", null));
KsExec.KeyboardMain();
}
else if (KsExec.editName.Length > 7)
{
UnityTask.SetSubNoUnityTask(MessageDlg.ExecDlg("入力できる名前は7文字までです。", null));
UnityTask.SetSubNoUnityTask(MessageDlg.ExecDlg("You can enter up to 7 characters for the name.", null));
KsExec.KeyboardMain();
}
else if (!Singleton<UnityGraph>.Instance.Font.Font.CheckGlyph(KsExec.editName))
{
UnityTask.SetSubNoUnityTask(MessageDlg.ExecDlg("表示できない文字が含まれています。", null));
UnityTask.SetSubNoUnityTask(MessageDlg.ExecDlg("Contains characters that cannot be displayed.", null));
KsExec.KeyboardMain();
}
else
{
string arg = KsExec.editName;
string paramString = GameData.GetParamString("familyname", string.Empty);
string[] msgs = new string[]
{
string.Format("「{0}{1}」です。", arg, paramString),
"よろしいですか?"
};
string[] msgs;
if (UnityApp.Instance.isJapanese)
{
msgs = new string[]
{
string.Format("「{0}{1}」です。", arg, paramString),
"よろしいですか?"
};
}
else
{
msgs = new string[]
{
string.Format("Is {0} {1} correct?", arg, paramString)
};
}
UnityTask.SetSubNoUnityTask(MessageDlg.ExecDlg(msgs, new Action<bool>(KsExec.SetResult)));
KsExec.confirm = true;
KsExec.confirmResult = false;
@ -145,13 +168,14 @@ namespace Qoo.Game
// Token: 0x06000614 RID: 1556 RVA: 0x00019604 File Offset: 0x00017804
private static void KeyboardMain()
{
switch (UnityEngine.Application.platform)
UnityTask.SetSubTask(NameInputKeyboard.Open(KsExec.editName, true));
/*switch (UnityEngine.Application.platform)
{
case RuntimePlatform.IPhonePlayer:
case RuntimePlatform.Android:
UnityTask.SetSubTask(NameInputKeyboard.Open(KsExec.editName, true));
break;
}
}*/
}
// Token: 0x06000615 RID: 1557 RVA: 0x0001964C File Offset: 0x0001784C

@ -1,4 +1,5 @@
using System;
using System.Collections;
using Qoo.File;
using UnityEngine;
@ -8,7 +9,7 @@ namespace Qoo.Graphics
public static class Movie
{
// Token: 0x06000165 RID: 357 RVA: 0x000066A4 File Offset: 0x000048A4
internal static void Play(string name, bool IsSkip)
internal static IEnumerator Play(string name, bool IsSkip)
{
FileId fileId = new FileId(string.Empty);
fileId.Set(name);
@ -17,7 +18,7 @@ namespace Qoo.Graphics
Debug.Print(string.Format("INFO:Start Movie({0} Skip={1})", text, IsSkip.ToString()));
//TODO fix movie playing. either make platform specific versions OR make platform agnostic
//UnityTask.SetSubTask(MovieManager.PlayMovie(text, FullScreenMovieControlMode.CancelOnInput));
UnityTask.SetSubTask(MovieManager.PlayMovie(text, ""));
yield return MovieManager.PlayMovie(text, new GameObject());
}
}
}

@ -29,6 +29,7 @@ namespace Qoo.Ks
// Token: 0x060002DF RID: 735 RVA: 0x00009ED0 File Offset: 0x000080D0
public override TAG_RESULT Run(EventPlayer player, TagData tag)
{
UnityEngine.Debug.LogWarning("RUN");
Singleton<MsgWnd>.Instance.ResetMessage();
Singleton<MsgWnd>.Instance.Show(false);
if (!player.RestoreOn)

@ -77,28 +77,28 @@ public class SaveLoadManager
catch (Exception ex2)
{
Qoo.Debug.Print(ex2.Message);
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_CATCH_EXCEPTION, "ゲームデータの保存を正常に終了できませんでした。");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_CATCH_EXCEPTION, UnityApp.Instance.isJapanese ? "ゲームデータの保存を正常に終了できませんでした。" : "The game data could not be saved");
break;
}
}
if (array == null)
{
Qoo.Debug.Print("####Save file create error");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_DATA_CREATE, "ゲームデータの保存を正常に終了できませんでした。");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_DATA_CREATE, UnityApp.Instance.isJapanese ? "ゲームデータの保存を正常に終了できませんでした。" : "The game data could not be saved");
return false;
}
string text2 = BytesHash.CreateHashCode(array);
if (text2 == null)
{
Qoo.Debug.Print("####hash = null death");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_HASHCODE_CREATE, "ゲームデータの保存を正常に終了できませんでした。");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_HASHCODE_CREATE, UnityApp.Instance.isJapanese ? "ゲームデータの保存を正常に終了できませんでした。" : "The game data could not be saved");
return false;
}
info.HashCode = text2;
if (SaveLoadManager.SaveToXML<SaveFileInfo>("H_" + text + "_TMP", info, Encoding.UTF8, false) == null)
{
Qoo.Debug.Print("header file save error");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_HEADER_CREATE, "ゲームデータの保存を正常に終了できませんでした。");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_SAVE_HEADER_CREATE, UnityApp.Instance.isJapanese ? "ゲームデータの保存を正常に終了できませんでした。" : "The game data could not be saved");
return false;
}
try
@ -180,20 +180,20 @@ public class SaveLoadManager
catch (Exception ex2)
{
Qoo.Debug.Print(ex2.Message);
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_LOAD_CATCH_EXCEPTION, "ゲームデータの読込を正常に終了できませんでした。");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_LOAD_CATCH_EXCEPTION, UnityApp.Instance.isJapanese ? "ゲームデータの読込を正常に終了できませんでした。" : "The game data could not be loaded");
break;
}
}
if (array == null)
{
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_LOAD, "ゲームデータの読込を正常に終了できませんでした。");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.FAIL_LOAD, UnityApp.Instance.isJapanese ? "ゲームデータの読込を正常に終了できませんでした。" : "The game data could not be loaded");
return null;
}
string hashCode = BytesHash.CreateHashCode(array);
if (!saveFileInfo.CheckHash(hashCode))
{
Qoo.Debug.Print("hash ga tigau yo");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.UNMATCH_SAVE_HASH, "ゲームデータの読込を正常に終了できませんでした。");
DispAssert.Show(ErrorDef.ASSERT_ERROR_CODE.UNMATCH_SAVE_HASH, UnityApp.Instance.isJapanese ? "ゲームデータの読込を正常に終了できませんでした。" : "The game data could not be loaded");
return null;
}
return array;

@ -91,13 +91,13 @@ public class SaveLoadWindow : BaseWindow
switch (ct)
{
case SaveLoadWindow.ConfrmType.Save:
this.SetText("SaveConfirmMsg", (!show) ? string.Empty : "セーブしますか?");
this.SetText("SaveConfirmMsg", (!show) ? string.Empty : UnityApp.Instance.isJapanese ? "セーブしますか?" : "Do you want to save?");
break;
case SaveLoadWindow.ConfrmType.Load:
this.SetText("LoadConfirmMsg", (!show) ? string.Empty : "ロードしますか?");
this.SetText("LoadConfirmMsg", (!show) ? string.Empty : UnityApp.Instance.isJapanese ? "ロードしますか?" : "Do you want to load this save?");
break;
case SaveLoadWindow.ConfrmType.Over:
this.SetText("OverConfirmMsg", (!show) ? string.Empty : "上書きしますか?");
this.SetText("OverConfirmMsg", (!show) ? string.Empty : UnityApp.Instance.isJapanese ? "上書きしますか?" : "Do you want to overwrite this Save?");
break;
}
}
@ -329,9 +329,9 @@ public class SaveLoadWindow : BaseWindow
new BaseWindow.UIImage("Confirm", 136, 182, this.wndz + 3, "screen/common/sys_dialog", true, false),
new BaseWindow.UIButton("Confirm_YES", 312, 277, this.wndz + 4, "screen/common/dlog_btn_y", true, false, 1, 2, 0),
new BaseWindow.UIButton("Confirm_NO", 513, 277, this.wndz + 4, "screen/common/dlog_btn_n", true, false, 1, 2, 0),
new BaseWindow.UIText("SaveConfirmMsg", 480, 230, this.wndz + 4, "セーブしますか?", 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIText("LoadConfirmMsg", 480, 230, this.wndz + 4, "ロードしますか?", 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIText("OverConfirmMsg", 480, 230, this.wndz + 4, "上書きしますか?", 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)
new BaseWindow.UIText("SaveConfirmMsg", 480, 230, this.wndz + 4, UnityApp.Instance.isJapanese ? "セーブしますか?" : "Do you want to save?", 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIText("LoadConfirmMsg", 480, 230, this.wndz + 4, UnityApp.Instance.isJapanese ? "ロードしますか?" : "Do you want to load this save?", 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIText("OverConfirmMsg", 480, 230, this.wndz + 4, UnityApp.Instance.isJapanese ? "上書きしますか?" : "Do you want to overwrite this Save?", 28, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.TopLeft, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)
};
}

@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.SceneManagement;
using UnityEngine;
// Token: 0x0200013B RID: 315
@ -114,24 +115,23 @@ public class SceneManager : MonoBehaviour
}
// Token: 0x0600088C RID: 2188 RVA: 0x00026388 File Offset: 0x00024588
/*private static AsyncOperation LoadScene(string sceneName)
private static AsyncOperation LoadScene(string sceneName)
{
return Application.LoadLevelAdditiveAsync(sceneName);
}*/
private static void LoadScene(string sceneName)
{
Application.LoadLevelAdditive(sceneName);
return UnityEngine.SceneManagement.SceneManager.LoadSceneAsync(sceneName, LoadSceneMode.Additive);
//return Application.LoadLevelAdditiveAsync(sceneName);
}
// Token: 0x0600088D RID: 2189 RVA: 0x00026390 File Offset: 0x00024590
private static void UnloadScene(string sceneName)
{
//UnityEngine.SceneManagement.SceneManager.UnloadScene(sceneName);
GameObject gameObject = GameObject.Find(sceneName);
if (gameObject != null)
{
UnityEngine.Object.Destroy(gameObject);
}
Application.UnloadLevel(sceneName);
Resources.UnloadUnusedAssets();
}
@ -156,8 +156,8 @@ public class SceneManager : MonoBehaviour
// Token: 0x06000891 RID: 2193 RVA: 0x000263FC File Offset: 0x000245FC
private IEnumerator WaitForLoadScene(string currentSceneName, string nextSceneName, Action<string> action)
{
//AsyncOperation ao = SceneManager.LoadScene(nextSceneName);
SceneManager.LoadScene(nextSceneName);
AsyncOperation ao = SceneManager.LoadScene(nextSceneName);
//SceneManager.LoadScene(nextSceneName);
if (currentSceneName != null)
{
SceneManager.UnloadScene(currentSceneName);
@ -166,10 +166,10 @@ public class SceneManager : MonoBehaviour
{
action(nextSceneName);
}
/*while (ao.progress < 1f)
while (ao.progress < 1f)
{
yield return new WaitForSeconds(0.1f);
}*/
}
GameObject go = GameObject.Find(nextSceneName + "/Wnd");
if (go != null)
{

@ -42,7 +42,7 @@ public class ScreenEffect
{
ScreenEffect.Init(99, Color.black, null);
}
ScreenEffect.goScreenEffect.renderer.material.SetColor("_Color", work.Offset);
ScreenEffect.goScreenEffect.GetComponent<Renderer>().material.SetColor("_Color", work.Offset);
work.Update();
yield return 0;
}
@ -57,7 +57,7 @@ public class ScreenEffect
if (ScreenEffect.goScreenEffect == null)
{
ScreenEffect.goScreenEffect = GameObject.CreatePrimitive(PrimitiveType.Quad);
ScreenEffect.goScreenEffect.renderer.material = new Material(Resources.Load("Shader/Color/UnlitColor") as Shader);
ScreenEffect.goScreenEffect.GetComponent<Renderer>().material = new Material(Resources.Load("Shader/Color/UnlitColor") as Shader);
ScreenEffect.goScreenEffect.transform.localScale = new Vector3(960f, 544f, 1f);
ScreenEffect.goScreenEffect.name = "__ScreenEffenct";
}
@ -71,7 +71,7 @@ public class ScreenEffect
//ScreenEffect.goScreenEffect.transform.localPosition = new Vector3(2000f, 0f, (float)(-(float)z));
ScreenEffect.goScreenEffect.transform.localPosition = new Vector3(0f, 0f, (float)(-(float)z));
}
ScreenEffect.goScreenEffect.renderer.material.SetColor("_Color", color);
ScreenEffect.goScreenEffect.GetComponent<Renderer>().material.SetColor("_Color", color);
}
// Token: 0x060008EF RID: 2287 RVA: 0x000274EC File Offset: 0x000256EC

@ -1,6 +1,8 @@
using System;

using System;
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
// Token: 0x02000174 RID: 372
public class ScreenKeyboardManager : MonoBehaviour
@ -59,6 +61,86 @@ public class ScreenKeyboardManager : MonoBehaviour
// Token: 0x06000A97 RID: 2711 RVA: 0x0002EAC8 File Offset: 0x0002CCC8
public static IEnumerator Open(string defaultString = "")
{
bool isKeyboardActive = true;
int width = 350;
int height = 50;
int fontSize = 24;
Color fontColor = Color.white;
Color inputBoxColor = new Color(87f/255f,48f / 255f, 55f / 255f, 255f / 255f);
GameObject manager= ScreenKeyboardManager.Instance.gameObject;
Canvas canvas = manager.AddComponent<Canvas>();
canvas.gameObject.AddComponent<CanvasScaler>();
canvas.gameObject.AddComponent<GraphicRaycaster>();
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
GameObject container = new GameObject();
container.name = "InputField";
container.transform.parent = canvas.transform;
container.AddComponent<CanvasRenderer>();
Image _image = container.AddComponent<Image>();
//_image.sprite = UnityEditor.AssetDatabase.GetBuiltinExtraResource<Sprite>("UI/Skin/UISprite.psd");
_image.type = Image.Type.Sliced;
_image.color = inputBoxColor;
Font font = (Font)Resources.Load("font/Cabin");
GameObject textContainer = new GameObject();
textContainer.name = "Text";
textContainer.transform.parent = container.transform;
Text _text = textContainer.AddComponent<Text>();
RectTransform _textTransform = _text.GetComponent<RectTransform>();
_textTransform.sizeDelta = new Vector2(width, height);
_text.supportRichText = false;
_text.color = fontColor;
_text.font = font;
_text.fontSize = fontSize;
_text.horizontalOverflow = HorizontalWrapMode.Overflow;
_text.alignment = TextAnchor.MiddleCenter;
GameObject placeholderContainer = new GameObject();
placeholderContainer.name = "Placeholder";
placeholderContainer.transform.parent = container.transform;
Text _placeholder = placeholderContainer.AddComponent<Text>();
RectTransform _placeholderTransform = _placeholder.GetComponent<RectTransform>();
_placeholderTransform.sizeDelta = new Vector2(width, height);
_placeholder.color = fontColor;
_placeholder.font = font;
_placeholder.fontSize = fontSize;
_placeholder.fontStyle = FontStyle.Italic;
_placeholder.supportRichText = false;
_placeholder.horizontalOverflow = HorizontalWrapMode.Overflow;
_placeholder.text = "Enter your Name";
_placeholder.alignment = TextAnchor.MiddleCenter;
InputField _inputField = container.AddComponent<InputField>();
_inputField.targetGraphic = _image;
_inputField.textComponent = _text;
_inputField.placeholder = _placeholder;
RectTransform _inputFieldTransform = _inputField.GetComponent<RectTransform>();
_inputFieldTransform.localPosition = new Vector3(0, 0, 0);
_inputFieldTransform.sizeDelta = new Vector2(width, height);
_inputField.characterLimit = 7;
_inputField.characterValidation = InputField.CharacterValidation.Name;
_inputField.text = defaultString;
string nameString = _inputField.text;
while (isKeyboardActive)
{
yield return 0;
if (Input.GetKeyDown(KeyCode.Return))
{
nameString = _inputField.text;
ScreenKeyboardManager.Instance.m_inputText = nameString;
GameObject.Destroy(canvas.gameObject);
isKeyboardActive = false;
}
}
//TODO fix TouchScreenKeyboard issue
/*ScreenKeyboardManager.Instance.m_inputText = defaultString;
ScreenKeyboardManager.Instance.m_keyboard = TouchScreenKeyboard.Open(defaultString, TouchScreenKeyboardType.NamePhonePad);

@ -10,7 +10,7 @@ public class ScreenMovieSample : MonoBehaviour
{
//TODO fix movie playing. either make platform specific versions OR make platform agnostic
//yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.mp4", FullScreenMovieControlMode.CancelOnInput));
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.mp4", ""));
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.mp4", this.gameObject));
Debug.Log(" #DEBUGLOG::MOVIE OWATA ");
yield break;
}

@ -152,7 +152,7 @@ public class SoundVoice : MonoBehaviour
private void Awake()
{
this.voice = base.gameObject.AddComponent<AudioSource>();
this.voice.panLevel = 0f;
this.voice.spatialBlend = 0f;
}
// Token: 0x06000B5A RID: 2906 RVA: 0x000308B4 File Offset: 0x0002EAB4
@ -161,7 +161,7 @@ public class SoundVoice : MonoBehaviour
if (this.m_data != null && this.voice.clip == null && this.m_data.Data != null)
{
this.voice.clip = this.m_data.Data;
this.voice.panLevel = 0f;
this.voice.spatialBlend = 0f;
this.m_data = null;
}
if (this.isStart && this.voice.clip != null)
@ -188,7 +188,7 @@ public class SoundVoice : MonoBehaviour
}
this.voice.clip = null;
this.voice.clip = SoundData.Load(category, name_);
this.voice.panLevel = 0f;
this.voice.spatialBlend = 0f;
return this.voice.clip != null;
}

@ -40,7 +40,7 @@ public class SubPartCamera : MonoBehaviour
SubPartCamera.Instance.m_Camera.enabled = true;
//TODO Camera change
//SubPartCamera.Instance.gameObject.transform.localPosition = new Vector3(2000f, 0f, -1000f);
SubPartCamera.Instance.gameObject.transform.localPosition = new Vector3(0f, 0f, -1000f);
SubPartCamera.Instance.gameObject.transform.localPosition = new Vector3(0f, 0f, -1100f);
}
// Token: 0x0600063A RID: 1594 RVA: 0x00019EE8 File Offset: 0x000180E8

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using Qoo.Application;
using Qoo.Game;
using UnityEngine;
@ -54,8 +55,9 @@ public class TitleWindow : BaseWindow
// Token: 0x0600084C RID: 2124 RVA: 0x0002543C File Offset: 0x0002363C
protected sealed override BaseWindow.UIComponent[] newComponentArray()
{
List<BaseWindow.UIComponent> components;
string str = (!base.IsTrial) ? string.Empty : "_tri";
return new BaseWindow.UIComponent[]
components = new List<BaseWindow.UIComponent>
{
new BaseWindow.UIImage("BackGround", 0, 0, this.wndz, "screen/title/title_base", true, true),
new BaseWindow.UIButton("Btn0", 171, 272, this.wndz + 1, "screen/title/title_0", true, true, 1, 2, 0),
@ -67,6 +69,11 @@ public class TitleWindow : BaseWindow
new BaseWindow.UIButton("BtnRestore", 814, 472, this.wndz + 1, "screen/title/restore", !base.IsTrial, !base.IsTrial, 1, 2, 0),
new BaseWindow.UICollision("BtnGuard", 0, 0, this.wndz + 3, 960, 544)
};
if (!UnityApp.Instance.isJapanese)
{
components.Add(new BaseWindow.UIButton("BtnCredits", 16, 472, this.wndz + 1, "screen/title/restore", !base.IsTrial, !base.IsTrial, 1, 2, 0));
}
return components.ToArray();
}
// Token: 0x0600084D RID: 2125 RVA: 0x000255E8 File Offset: 0x000237E8
@ -122,8 +129,13 @@ public class TitleWindow : BaseWindow
SceneManager.ChangeScene(UIValue.SCENE_HELP);
break;
case "BtnRestore":
Application.Quit();
//base.PlaySE_Ok();
//base.AddScene(UIValue.SCENE_TITLERESTORE);
break;
case "BtnCredits":
base.PlaySE_Ok();
base.AddScene(UIValue.SCENE_TITLERESTORE);
SceneManager.ChangeScene(UIValue.SCENE_TITLECREDITS);
break;
}
}

@ -15,6 +15,8 @@ public class UIValue
// Token: 0x0400062F RID: 1583
public static readonly string SCENE_TITLERESTORE = "SceneTitleRestore";
public static readonly string SCENE_TITLECREDITS = "SceneTitleCredits";
// Token: 0x04000630 RID: 1584
public static readonly string SCENE_GALLERYMENU = "SceneGalleryMenu";

@ -23,6 +23,7 @@ public class UnityApp : Singleton<UnityApp>
private void Awake()
{
UnityEngine.Object.DontDestroyOnLoad(this);
Application.targetFrameRate = 60;
this.task = base.gameObject.AddComponent<TaskManager>();
this.time = base.gameObject.AddComponent<UnityTimer>();
this.file = base.gameObject.AddComponent<UnityFileLoader>();
@ -304,4 +305,6 @@ public class UnityApp : Singleton<UnityApp>
// Token: 0x04000774 RID: 1908
private bool m_isInit;
public bool isJapanese;
}

@ -91,7 +91,7 @@ public class UnityFile
public bool CreateFromAssetBundle(AssetBundle asset, string name)
{
this.m_szName = name;
this.m_ReadData = (asset.Load(name) as TextAsset).bytes;
this.m_ReadData = (asset.LoadAsset(name) as TextAsset).bytes;
this.m_isReadEnd = true;
return true;
}
@ -139,7 +139,7 @@ public class UnityFile
{
if (this.m_isLoadPackFile)
{
AssetBundleCreateRequest req = AssetBundle.CreateFromMemory(this.m_ReadData);
AssetBundleCreateRequest req = AssetBundle.LoadFromMemoryAsync(this.m_ReadData);
yield return req;
this.m_object = req.assetBundle.mainAsset;
req.assetBundle.Unload(false);

@ -4,6 +4,7 @@ using Qoo;
using Qoo.Application;
using Qoo.File;
using UnityEngine;
using UnityEngine.Video;
// Token: 0x02000157 RID: 343
public class UnityGraph : Singleton<UnityGraph>
@ -46,6 +47,7 @@ public class UnityGraph : Singleton<UnityGraph>
// Token: 0x060009B2 RID: 2482 RVA: 0x0002AD30 File Offset: 0x00028F30
private void Awake()
{
this.sprite_obj = new GameObject("2D Sprite Manager");
this.sprite_obj.transform.parent = base.gameObject.transform;
this.m_ManSprite = this.sprite_obj.AddComponent<Man2D>();
@ -58,8 +60,8 @@ public class UnityGraph : Singleton<UnityGraph>
this.m_FrameDraw = new UnitySprite(false, base.gameObject, false);
this.m_FrameDraw.obj.name = "FrameBuffer Sprite";
this.m_FrameDraw.z = 100;
this.m_FrameDraw.Brend = SPRITE_DRAW_MODE.MUL_NOTEXALPHA;
this.m_FrameDraw.Update(Screen.width, Screen.height, 0f);
//this.m_FrameDraw.Brend = SPRITE_DRAW_MODE.MUL_NOTEXALPHA;
this.m_FrameDraw.Update(this.m_width, this.m_height, 0f);
this.FadeParam = 0;
this.m_FrameBg = new UnitySprite(false, base.gameObject, false);
this.m_FrameBg.obj.name = "FrameBufferBG";
@ -81,10 +83,10 @@ public class UnityGraph : Singleton<UnityGraph>
this.RunEffect = false;
this.m_ManSprite.enabled = true;
CreateSprite.CreateSpriteCamera(base.gameObject, Screen.height, false);
base.gameObject.camera.aspect = (float)Screen.width / (float)Screen.height;
base.gameObject.GetComponent<Camera>().aspect = (float)Screen.width / (float)Screen.height;
//TODO fix camera issues, find out why this is needed
//base.gameObject.camera.enabled = true;
base.gameObject.camera.enabled = false;
base.gameObject.GetComponent<Camera>().enabled = false;
this.m_FrameBg.obj.SetActive(true);
if (this.m_FrameBg.tex == null)
{
@ -105,10 +107,10 @@ public class UnityGraph : Singleton<UnityGraph>
{
this.m_FrameDraw.SetRenderImage(this.m_ManSprite.GetFrameBuffer(), 960, 544);
}
this.m_FrameDraw.CalcRenderImageOffset(Screen.width, Screen.height);
this.m_FrameDraw.Brend = SPRITE_DRAW_MODE.MUL_NOTEXALPHA;
this.m_FrameDraw.Update(Screen.width, Screen.height, 0f);
UnityApp.Input.SetScreenRect(this.m_FrameDraw.x, this.m_FrameDraw.y, this.m_FrameDraw.w, this.m_FrameDraw.h, 960, 544);
this.m_FrameDraw.CalcRenderImageOffset(this.m_width, this.m_height);
//this.m_FrameDraw.Brend = SPRITE_DRAW_MODE.MUL_NOTEXALPHA;
this.m_FrameDraw.Update(this.m_width, this.m_height, 0f);
UnityApp.Input.SetScreenRect(this.m_FrameDraw.x, this.m_FrameDraw.y, Screen.width, Screen.height, 960, 544);
base.enabled = true;
}
@ -116,7 +118,7 @@ public class UnityGraph : Singleton<UnityGraph>
public void Disable(bool IsClean = false)
{
base.enabled = false;
base.gameObject.camera.enabled = false;
base.gameObject.GetComponent<Camera>().enabled = false;
this.m_ManSprite.enabled = false;
this.m_FrameDraw.obj.SetActive(false);
this.m_FrameBg.obj.SetActive(false);
@ -200,8 +202,8 @@ public class UnityGraph : Singleton<UnityGraph>
{
this.m_FrameDraw.A = 0;
}
this.m_FrameDraw.CalcRenderImageOffset(Screen.width, Screen.height);
this.m_FrameDraw.Update(Screen.width, Screen.height, 0f);
this.m_FrameDraw.CalcRenderImageOffset(this.m_width, this.m_height);
this.m_FrameDraw.Update(this.m_width, this.m_height, 0f);
}
}
@ -305,7 +307,7 @@ public class UnityGraph : Singleton<UnityGraph>
name = imageDir + name;
return this.EffectMain(name, time);
}
return this.CrossFade(time);
//return this.CrossFade(time);
NMB_FILEINFO fileInfo = Nmb.GetFileInfo(name);
if (fileInfo == null)
{
@ -321,13 +323,11 @@ public class UnityGraph : Singleton<UnityGraph>
// Token: 0x060009C0 RID: 2496 RVA: 0x0002B524 File Offset: 0x00029724
protected IEnumerator EffectMain(string name, float time)
{
UnityEngine.Debug.LogWarning ("NAME: " + name);
yield return 0;
yield return 0;
this.m_ManSprite.UpdateFrameBuffer();
this.m_ManSprite.enabled = false;
EffectManager.Init(name, (int)(time * 1000f), this.m_FrameDraw.obj.renderer, this.m_ManSprite.GetFrameBufferOld(), this.m_ManSprite.GetFrameBuffer());
EffectManager.Init(name, (int)(time * 1000f), this.m_FrameDraw.obj.GetComponent<Renderer>(), this.m_ManSprite.GetFrameBufferOld(), this.m_ManSprite.GetFrameBuffer());
yield return base.StartCoroutine(EffectManager.StartEffect());
this.m_isRunEffect = false;
this.m_ManSprite.enabled = true;
@ -342,23 +342,56 @@ public class UnityGraph : Singleton<UnityGraph>
yield return 0;
this.m_ManSprite.UpdateFrameBuffer();
this.m_ManSprite.enabled = false;
MovieTex movie = base.gameObject.AddComponent<MovieTex>();
//MovieTex movie = base.gameObject.AddComponent<MovieTex>();
this.m_FrameDraw.SetRenderImage(this.m_ManSprite.GetFrameBuffer(), 960, 544);
UnitySprite movieFrame = new UnitySprite(false, base.gameObject, false);
movieFrame.SetName("Movie Frame");
this.m_FrameDraw.A = (movieFrame.R = (movieFrame.G = (movieFrame.B = (movieFrame.A = byte.MaxValue))));
movieFrame.SetMaterial(movie.Play(name, MOVIE_TEX_TYPE.ADD, false), 960, 544);
//NewCode
string path = name;
if (path.IndexOf('/') == 0)
{
path = path.Substring(1);
}
string pathExt = System.IO.Path.GetExtension(path);
path = path.Substring(0, path.Length - pathExt.Length);
VideoPlayer m_tex = movieFrame.obj.transform.gameObject.AddComponent<VideoPlayer>();
m_tex.playOnAwake = false;
Material newMat = new Material(Shader.Find("QO/Sprite Add") as Shader);
m_tex.url = Application.streamingAssetsPath + "/" + path + ".mp4";
m_tex.isLooping = false;
movieFrame.SetMaterial(newMat, 960, 544);
m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
//OLD Code
//movieFrame.SetMaterial(movie.Play(name, MOVIE_TEX_TYPE.ADD, false), 960, 544);
//yield return 0;
//while (movie.IsPlay)
m_tex.Play();
yield return 0;
yield return 0;
while (movie.IsPlay)
yield return 0;
while (m_tex.isPlaying || !m_tex.isPrepared)
{
this.m_FrameDraw.CalcRenderImageOffset(Screen.width, Screen.height);
movieFrame.CalcRenderImageOffset(Screen.width, Screen.height);
this.m_FrameDraw.Update(Screen.width, Screen.height, 10f);
movieFrame.Update(Screen.width, Screen.height, 0f);
if (Input.GetMouseButtonDown(0))
{
break;
}
UnityEngine.Debug.LogWarning(m_tex.isPlaying + ", " + !m_tex.isPrepared);
this.m_FrameDraw.CalcRenderImageOffset(this.m_width, this.m_height);
movieFrame.CalcRenderImageOffset(this.m_width, this.m_height);
this.m_FrameDraw.Update(this.m_width, this.m_height, 10f);
movieFrame.Update(this.m_width, this.m_height, 0f);
yield return 0;
yield return 0;
yield return 0;
}
UnityEngine.Object.Destroy(movie);
movieFrame.obj.renderer.material = null;
//UnityEngine.Object.Destroy(movie);
movieFrame.obj.GetComponent<Renderer>().material = null;
movieFrame.tex = null;
this.m_ManSprite.RemoveSprite(movieFrame);
movieFrame = null;
@ -371,7 +404,7 @@ public class UnityGraph : Singleton<UnityGraph>
// Token: 0x060009C2 RID: 2498 RVA: 0x0002B588 File Offset: 0x00029788
private IEnumerator CrossFade(float time)
{
/*int ms = (int)(time * 1000f);
int ms = (int)(time * 1000f);
this.m_isRunEffect = true;
yield return 0;
yield return 0;
@ -379,10 +412,10 @@ public class UnityGraph : Singleton<UnityGraph>
this.m_ManSprite.enabled = false;
UnitySprite BaseFrame = new UnitySprite(false, base.gameObject, false);
BaseFrame.SetName("CrossFade Frame");
BaseFrame.Brend = SPRITE_DRAW_MODE.MUL_NOTEXALPHA;
BaseFrame.Brend = SPRITE_DRAW_MODE.MUL;
BaseFrame.Update(Screen.width, Screen.height, 0f);
this.m_FrameDraw.Brend = SPRITE_DRAW_MODE.MUL_NOTEXALPHA;
this.m_FrameDraw.Update(Screen.width, Screen.height, 10f);
//this.m_FrameDraw.Brend = SPRITE_DRAW_MODE.MUL_NOTEXALPHA;
this.m_FrameDraw.Update(this.m_width, this.m_height, 10f);
BaseFrame.SetRenderImage(this.m_ManSprite.GetFrameBufferOld(), 960, 544);
this.m_FrameDraw.SetRenderImage(this.m_ManSprite.GetFrameBuffer(), 960, 544);
BaseFrame.R = (this.m_FrameBg.G = (this.m_FrameBg.B = byte.MaxValue));
@ -403,10 +436,10 @@ public class UnityGraph : Singleton<UnityGraph>
param = 0f;
}
BaseFrame.A = (byte)(255f * (1f - param));
this.m_FrameDraw.CalcRenderImageOffset(Screen.width, Screen.height);
BaseFrame.CalcRenderImageOffset(Screen.width, Screen.height);
this.m_FrameDraw.Update(Screen.width, Screen.height, 10f);
BaseFrame.Update(Screen.width, Screen.height, 0f);
this.m_FrameDraw.CalcRenderImageOffset(this.m_width, this.m_height);
BaseFrame.CalcRenderImageOffset(this.m_width, this.m_height);
this.m_FrameDraw.Update(this.m_width, this.m_height, 10f);
BaseFrame.Update(this.m_width, this.m_height, 0f);
yield return 0;
}
BaseFrame.tex = null;
@ -415,7 +448,7 @@ public class UnityGraph : Singleton<UnityGraph>
this.m_FrameDraw.A = byte.MaxValue;
this.m_ManSprite.enabled = true;
this.m_isRunEffect = false;
yield return 0;*/
yield return 0;
yield break;
}
@ -502,4 +535,7 @@ public class UnityGraph : Singleton<UnityGraph>
// Token: 0x040007E9 RID: 2025
private bool m_isRunEffect;
private int m_width = 960;
private int m_height = 544;
}

@ -212,10 +212,10 @@ public class UnitySprite
// Token: 0x060009DC RID: 2524 RVA: 0x0002B874 File Offset: 0x00029A74
public void DeleteMaterial()
{
if (this.obj != null && this.obj.renderer != null && this.obj.renderer.material != null && this.obj.renderer.material.shader != null)
if (this.obj != null && this.obj.GetComponent<Renderer>() != null && this.obj.GetComponent<Renderer>().material != null && this.obj.GetComponent<Renderer>().material.shader != null)
{
UnityEngine.Object.Destroy(this.obj.renderer.material);
this.obj.renderer.material = null;
UnityEngine.Object.Destroy(this.obj.GetComponent<Renderer>().material);
this.obj.GetComponent<Renderer>().material = null;
}
}
@ -223,7 +223,7 @@ public class UnitySprite
public void SetMaterial(string shader_name)
{
this.DeleteMaterial();
this.obj.renderer.material = new Material(Resources.Load(shader_name) as Shader);
this.obj.GetComponent<Renderer>().material = new Material(Resources.Load(shader_name) as Shader);
}
// Token: 0x060009DE RID: 2526 RVA: 0x0002B940 File Offset: 0x00029B40
@ -258,11 +258,11 @@ public class UnitySprite
{
if (this.tex != null)
{
this.obj.renderer.material.mainTexture = this.tex.m_Texture;
this.obj.GetComponent<Renderer>().material.mainTexture = this.tex.m_Texture;
}
else
{
this.obj.renderer.material.mainTexture = null;
this.obj.GetComponent<Renderer>().material.mainTexture = null;
}
}
this.UpdateUVAnim();
@ -277,14 +277,14 @@ public class UnitySprite
}
if (this.Brend != SPRITE_DRAW_MODE.OTHER)
{
this.obj.renderer.material.SetVector("_UVWH", new Vector4((float)this.U / (float)this.OrgW, (float)(this.OrgH - this.V) / (float)this.OrgH - (float)this.VH / (float)this.OrgH, (float)this.UW / (float)this.OrgW, (float)this.VH / (float)this.OrgH));
this.obj.GetComponent<Renderer>().material.SetVector("_UVWH", new Vector4((float)this.U / (float)this.OrgW, (float)(this.OrgH - this.V) / (float)this.OrgH - (float)this.VH / (float)this.OrgH, (float)this.UW / (float)this.OrgW, (float)this.VH / (float)this.OrgH));
SPRITE_DRAW_MODE brend = this.Brend;
if (brend == SPRITE_DRAW_MODE.TEX_ALPHA)
{
this.obj.renderer.material.SetColor("_EffectColor", this.m_colorFx);
this.obj.GetComponent<Renderer>().material.SetColor("_EffectColor", this.m_colorFx);
}
}
this.obj.renderer.material.color = new Color((float)this.R / 255f, (float)this.G / 255f, (float)this.B / 255f, (float)this.A / 255f);
this.obj.GetComponent<Renderer>().material.color = new Color((float)this.R / 255f, (float)this.G / 255f, (float)this.B / 255f, (float)this.A / 255f);
}
// Token: 0x060009DF RID: 2527 RVA: 0x0002BC1C File Offset: 0x00029E1C
@ -333,7 +333,7 @@ public class UnitySprite
{
this.A = 0;
}
this.obj.renderer.material.mainTexture = offscreen;
this.obj.GetComponent<Renderer>().material.mainTexture = offscreen;
this.OrgW = w_;
this.UW = w_;
this.w = w_;
@ -349,7 +349,7 @@ public class UnitySprite
this.IsUseTex = false;
if (this.obj)
{
this.obj.renderer.material = mat_;
this.obj.GetComponent<Renderer>().material = mat_;
this.OrgW = screenW;
this.UW = screenW;
this.w = screenW;

@ -284,16 +284,16 @@ public class UnityTextSprite : UnitySprite
{
if (this.tex != null)
{
this.obj.renderer.material.mainTexture = this.tex.m_Texture;
this.obj.GetComponent<Renderer>().material.mainTexture = this.tex.m_Texture;
}
else
{
this.obj.renderer.material.mainTexture = null;
this.obj.GetComponent<Renderer>().material.mainTexture = null;
}
}
this.obj.transform.localPosition = new Vector3((float)(this.x - ScrW / 2), (float)(-(float)this.y + ScrH / 2), worldZ);
this.obj.transform.localScale = new Vector3(this.fWidth, this.fHeight, 0f);
this.obj.renderer.material.color = new Color((float)this.R / 255f, (float)this.G / 255f, (float)this.B / 255f, (float)this.A / 255f);
this.obj.GetComponent<Renderer>().material.color = new Color((float)this.R / 255f, (float)this.G / 255f, (float)this.B / 255f, (float)this.A / 255f);
this.obj.SetActive(this.Show);
}
@ -335,7 +335,11 @@ public class UnityTextSprite : UnitySprite
this.mesh.triangles = this.mIndices;
}
this.mesh.RecalculateBounds();
this.mFilter.mesh = this.mesh;
if (this.mFilter != null)
{
this.mFilter.mesh = this.mesh;
}
}
// Token: 0x06000A11 RID: 2577 RVA: 0x0002CCE4 File Offset: 0x0002AEE4

@ -11,10 +11,10 @@ public class effect_sample_main : MonoBehaviour
this.idx = 0;
yield return base.StartCoroutine(this.loadAssetBundle());
GameObject panel = GameObject.Find("Panel");
panel.renderer.material.mainTexture = this.fromTex;
panel.GetComponent<Renderer>().material.mainTexture = this.fromTex;
for (;;)
{
EffectManager.Init(this.ManageEffects[this.idx], this.transTime, panel.renderer, this.fromTex, this.toTex);
EffectManager.Init(this.ManageEffects[this.idx], this.transTime, panel.GetComponent<Renderer>(), this.fromTex, this.toTex);
yield return new WaitForSeconds(1f);
yield return base.StartCoroutine(EffectManager.StartEffect());
this.idx++;

@ -74,7 +74,7 @@ namespace Prime31
GameObject gameObject = new GameObject(type.ToString());
gameObject.AddComponent(type);
gameObject.transform.parent = prime31ManagerGameObject.transform;
UnityEngine.Object.DontDestroyOnLoad(gameObject);
//UnityEngine.Object.DontDestroyOnLoad(gameObject);
}
}
catch (UnityException)

@ -0,0 +1,470 @@
TextMesh Pro!
Advanced Text Rendering for Unity 3D
USER GUIDE
Release 1.0.54
Dec 2016
Copyright (C) 2016 Stephan Bouchard - All Rights Reserved
This manual, as well as the software described in it, is furnished under license and may
be used or copied only in accordance with the terms of such license. The content of
this manual is furnished for informational use only, is subject to change without notice
and should not be construed as a commitment by its authors. The author assumes no
responsibility or liability for any errors or inaccuracies that may appear in this manual.
TextMesh Pro!
User Guide / Table of Contents
Getting Started
Overview........................................................................................................................ 4
Installation..................................................................................................................... 4
Quick Start..................................................................................................................... 4
Support & API documentation.................................................................................. 4
TextMeshPro Component
Text Input Box............................................................................................................... 5
Font Settings................................................................................................................. 6
Material Editor & Shaders Overview
Shader Overview.......................................................................................................... 7
Material Editor UI Panels & Features........................................................................ 7
Font Asset Creator
General Overview...................................................................................................... 10
Font Asset
General Font Information & Sub-Assets............................................................... 13
Font Settings............................................................................................................... 13
Character Set Info...................................................................................................... 14
Kerning Table.............................................................................................................. 14
3 / 14
TextMesh Pro!
User Guide / Getting Started
Overview
This User Guide was designed to provide TextMesh Pro users with a basic overview of the
features and functionality of the tool.
Installation
Once you have downloaded TextMesh Pro from Unitys Asset Store, go to: “Assets->Import
Package->Custom Package...”. In the Import Asset window, find and select the TextMeshPro.
unitypackage file. After the “Importing package” window appears in Unity, verify that all items to
import are selected and then click the Import button in the bottom right of the window.
Quick Start
There are two TextMesh Pro components available. To add a new TextMesh Pro text object
which works with the Mesh Renderer, go to: “GameObject->3D Object->TextMeshPro Text”.
To add a TextMesh Pro Component which works with the New UI, go to: “GameObject->UI-
>TextMeshPro Text”.
You may also wish to watch this short video showing how to add TextMesh Pro text objects into
a scene.
Support & API Documentation
Should you have questions or require assistance, please visit the TextMesh Pro User Forum
where you will find additional information, Video Tutorials and FAQ. In the event you are unable
to find the information you seek, feel free to register and post on the user forum or to contact
Support@DigitalNativeStudios.com
Online Documentation is also available on TextMesh Pro including Rich Text tags, Shaders,
Scripting API and more.
4 / 14
TextMesh Pro!
User Guide / Component Overview
Component Overview
The TextMesh Pro component is divided into two sections: The Text Input and the Font Settings.
Text Input Box
This area is where you will type the text to be rendered. Multiple lines of text can be entered by
pressing <Enter> on your keyboard or by typing the special character \n.
Tabulation can be achieved by using \t. These are tab stops with a spacing interval equal to
roughly 25% of the point size. For an alternative to tabs, see the <pos> tag below.
The Text Input area also supports Rich Text tags. Tags are defined by enclosing the tag between
“<” and “>” characters. Below is a partial list of supported tags. Updated tag list is available here.
<b>Bold</b>
<i>Italics</i>
<u>Underline</u>
<s>Strikethrough</s>
<sup>Superscript</sup>
<sub>Subscript</sub>
<size=48>Point size 48</size>
<size=+18>Point size increased by 18</size>
<size=-18>Point size decreased by 18</size>
<pos=5.5>Characters positioned about 5.5 characters from left side.
<color=yellow>Yellow text</color>
<#00ff00>Green text</color>
5 / 14
TextMesh Pro!
User Guide / Component Overview
Font Settings
Font Asset This is the TextMeshPro Font Asset that
will be used to render the text.
Font Style Applies a global style to the text like
bold, italics, etc.
Vertex Color Color that will be assigned as a vertex
color for each character unless a color
tag has been specified.
Color Gradient Enables using a Vertex Color Gradient.
Override Color Tags Enables overriding color tags. This
results in all characters using the Face
Color instead of the color tag.
Font Size The point size of the characters.
Auto Size Dynamically adjusts the point size
between the min & max to fit the size
of the text container.
Character Spacing Controls the spacing between individual characters.
Spacing Enables adjustments to character, line and paragraph spacing.
Alignment Controls the alignment of the text. Options are Left, Center, Right and Justified. When Justified is
selected, the ratio controls how additional spacing is added between words and characters.
Enable Word Wrap Enables or disables Word Wrapping.
UV Mapping Options Controls how the texture (face & border) are mapping on the text object.
Enable Kerning Enables or disables Kerning if any kerning pairs are defined in the kerning table of the Font Asset.
Extra Padding Extra padding may be required for very small fonts. This extra padding prevents the characters
from being clipped.
6 / 14
TextMesh Pro!
User Guide / Material Editor & Shader Overview
Material Editor & Shaders
TextMeshPro includes several custom shaders along with a custom material editor which was
designed to keep things simple by only exposing those properties which are expected to be
modified.
There are two groups of shaders which include a Bitmap shader & a few Signed Distance Field
shaders. TextMesh Pros shaders can be found in “TextMeshPro/...” section of the shader list in
the material component. Below is a list and brief description of the SDF shaders. Updated shader
information is also available here.
Distance Field Mobile
This lightweight shader contains just the bare essential features and offers the best overall performance.
Distance Field
This more advanced shader includes a large selection of features. It is the shader that is assigned by default to all
Signed Distance Field font assets. It still offers excellent performance.
Distance Field Surface
This shader includes essentially the same features as the Distance Field shader. However, instead of using simulated
lighting, it uses the scene lights. These text objects can also cast shadows. This shader uses per pixel lighting.
Distance Field Surface Mobile
This is a lightweight version of the Surface shader with limited features. It uses per vertex lighting and does not use
directional information from lights. However it does factor in light distance.
Material Editor Feature Panels
In this section, you will find an overview of each of the feature panels used by the custom
material editor. Clicking on these panels will hide or reveal their features. Some of these panels
need to be enabled to turn on their functionality. Different panels will be available on the various
shaders.
Face Panel
Color - Select the color and transparency for the face of the characters.
This color will be combined with the vertex color.
Texture - Select a texture to be applied to the face of the characters.
The Color will affect the color of the texture. How the texture is applied
to the characters / text object is controlled by the mapping options in
the Editor Panel. The texture option is not available on all shaders.
Softness - Controls the softness of the face of the characters. Please not the face softness begins at the edge which
may be underneath the Outline.
Dilate - Increases or decreases the size of the characters.
7 / 14
TextMesh Pro!
User Guide / Material Editor & Shader Overview
Gloss - Controls how shiny the surface of the characters appears
when using the Surface shaders.
Outline Panel
Color - Controls the color and transparency for the Outline of the
characters.
Texture - Select a texture to be applied to the face of the characters.
The Color will affect the color of the texture. How the texture is
applied to the characters / text object is controlled by the mapping
options in the Editor Panel. The texture option is not available on all
shaders.
Thickness - Controls the thickness of the Outline. The Outline is
applied on the edge of the face and expands inwards and outwards.
Gloss - Controls how shiny the surface of the characters appears when using the Surface shaders.
Underlay Panel
Underlay can be used to add a shadow or border to the text object.
This is a very efficient way to add contrast to small text.
Color - Controls the color and transparency for the Underlay.
Offset (X, Y) - Controls the position of the Underlay. Please not
Underlay has a limited range.
Dilate - Increases or decreases the size of the underlay. This can be
used to make the shadow appear bigger or with an Offset of (0, 0)
create a nice border around the text.
Softness - Controls the softness of the underlay.
Bevel Panel
Bevel simulates the visual appearance of a 3D bevel on a 2D object.
Type - Two types are available; Outer and Inner bevel.
Amount - Controls the amount of bevel being applied.
Offset - Controls the position of the bevel relative to the edge of the
face of the character.
Width - Controls the width of the bevel effect.
Roundness - Determines if the bevel ridges will appear sharp or
rounded.
Clamp - Limits the height of the bevel. This visually looks like the edges have been flattened.
8 / 14
TextMesh Pro!
User Guide / Material Editor & Shader Overview
Lighting Panel
The lighting settings controls the appearance of the bevel, bump and
environmental mapping.
Light Angle - Controls the angle of the light.
Specular Color - Determines the color of the specular highlights.
Specular Power - Controls the strength of the specular highlights.
Reflectivity Power - Controls the amount of light being reflected.
Diffuse Shadow - Increase or decrease the amount of light received
by the object.
Ambient Shadow - Controls how pronounced the light and bevel
edges appear.
BumpMap Panel
Texture - The normal map to be applied to the text object.
Face - Controls the amount of bump mapping to be applied to the
face of the characters.
Outline - The amount of bump mapping applied to the Outline of the
characters.
EnvMap Panel
Color - The color will brighten, darken or tint the environmental map.
Default color is black which leaves the text object unaffected.
Texture - The Cube map to be applied to the text object.
Glow Panel
Color - The color and transparency of the Glow.
Offset - Controls the position of the glow. A value of 0.0 is on the
edge of the face of the character.
Inner - Controls how far the Glow effect extends towards the inside
of the face.
Outer - Controls how far the Glow effect extends towards the outside
of the face.
Power - Controls the amount of Glow.
9 / 14
TextMesh Pro!
User Guide / Font Asset Creator
Font Asset Creator Overview
To access TextMesh Pros Font Asset Creator go to: “Window->TextMeshPro Font Asset
Creator”. The following video provides a detailed overview of the Font Asset Creation Process.
Online documentation is also available on
this topic at this location.
It is also strongly recommended that you
video the following video about Creating &
Working with Material Presets with TextMesh
Pro.
Font Settings
The Font Settings panel is where the font for which a font asset is to be created is selected along
with various settings.
Font Source is where the font for which an asset is to be created is
selected.
Point Size determines at what point size the font will be created.
You can either manually select the size of the font or use the Auto
Sizing mode which will find the largest possible font size to fit in the
given Atlas Resolution. It is recommended to use Auto Sizing.
Font Padding determines how much space in pixel units between
each character. Font Padding also determines the spread used in the
Signed Distance Field Font Render Mode. For an Atlas Resolution of
512 X 512, a value of 5 for padding is generally adequate.
Atlas Resolution determines the size of the Font Atlas. For most fonts
which include the full ASCII character set, a size of 512 X 512 works usually
well for Signed Distance Field Render Mode.
Character Set determines what characters will be included in the font atlas.
10 / 14
TextMesh Pro!
User Guide / Font Asset Creator
Custom Range allows you to define a range that represents
which characters to be included. To define a range the includes
the ASCII set + Latin supplemental characters, a user would enter
32-126, 161-255 in the Custom Range window.
Custom Characters allows the user to specify characters to
include by typing them Custom Character window.
Characters from File enables a user to supply a plain text file that
contains all the characters to be included in the atlas.
Font Style allows the user to select if the characters will be
created as bold, italics or as an outline as well as defining the
thickness of the outline or boldness. Keep in mind that this is
mostly useful for normal bitmap fonts. Since Signed Distance
Field font rendering enables the creation of bold or an outline
dynamically these style options are fun to experiment with but
not essential.
Font Render Mode determines how the characters will be
rendered.
Hinted Smooth is anti-aliased rendering with hinting.
Smooth is the same without hinting.
Raster Hinted renders the characters without anti-aliasing with
hinting.
Raster is no anti-aliasing or hinting.
Signed Distance Field 16 is the standard mode for creating a
SDF Atlas. The font will be up sampled 16X to produce a more
accurate Signed Distance Field Atlas.
Signed Distance Field 32 is the same as above but with 32X up sampling. Using this mode will result in a more
accurate SDF Atlas which although more accurate may deliver only subtle visual improvements. This options should
mostly be used when trying to fit a full ASCII set into a small 256 X 256 atlas or when dealing with a complex shaped
font with high frequency curve changes. Note: This processing mode will be significantly slower than the 16X mode.
Note: Padding represents the spread that will be used in the creation of the SDF Atlas. The larger the spread the longer it will
take to process the atlas. Higher spread provides for better control over outline thickness, bevel and glow “tweak-ability” but will
result in the characters being smaller in the atlas. Smaller point size means potentially less sampling points and perhaps not as
good contour accuracy. It is a trade off or balance between those two. Typically a Spread or padding of 5 is good for normal text
and Spread of 7 for things like titles which typically have larger outline, bevel and glow options.
Get Kerning Pairs determines if the kerning pairs that may exist in the font file will be added to the font asset. In the
event no kerning pairs are found in the font file, new kerning pairs can always be added in the TextMeshPro Font
Asset Editor Panel.
11 / 14
TextMesh Pro!
User Guide / Font Asset Creator
Generate Font Atlas will get the font engine to render the select font / characters.
Save TextMeshPro Font Asset will bring up a file requester allowing you to choose a file location and a name for
the newly created asset. By default the font name will be that of the font name. When using Signed Distance Field
Render Mode, this name will be Font Name with SDF added. We recommend you save your font assets in the
“Assets/Resources/Fonts/...” or create such folder structure if one does not exists. As text objects are frequently
created via scripts which results in font assets not being referenced by any scene objects, this guarantees your fonts
assets will be include in the build and available.
12 / 14
TextMesh Pro!
User Guide / Font Asset
Font Asset
TextMesh Pro uses a custom font asset which contains
information necessary to display the font. The font asset is
divided into five sections which are as follows:
Face Info contains information specific to the font that was
rendered using the Font Asset Creator. This includes the
follow information:
Font Source - The name of the font.
Font Size - The point size at which the font was renderer in the font
atlas.
Line Height - This is the spacing between each lines of text.
Baseline - The position where the characters “sit” on the line.
Ascender - The highest point of any characters in the font.
Descender - The lowest point of any characters in the font.
Underline - The position of the underline.
Width & Height - The width and height of the font atlas.
Font Sub-Assets displays the sub assets that are part of the
custom font.
Font Atlas - Texture which contains all the characters of the font. This
texture is specific to such font.
Font Material - Default material for this font which holds a reference to the Font Atlas texture.
Face Style contains style properties for the font.
Normal & Bold weight - This defines the normal & bold weight of the font.
Italic Style - Defines the slant of italic.
13 / 14
TextMesh Pro!
User Guide / Font Asset
Glyph Info contains specific information about each
character in the font.
ASC II & Char - The ASC II code and Character.
X & Y - The X and Y position of the character in the font atlas.
W & H - The Width and Height of the character in the font atlas.
Offsets - The X Offset is where the character is drawn relative to (0, 0).
The Y offset represents where the top of the character is located relative
to the baseline or (0, 0). The Advance is how far to advance after this
character.
Kerning Table Info contains the kerning information for the
font. Kerning data can either import at font creation time or
added manually using this panel.
Left Char - The left character part of the pair.
Right Char - The right character part of the pair.
Offset - The offset between the left and right character.
14 / 14

@ -0,0 +1,46 @@
Digitized data copyright (c) 2010 Google Corporation
with Reserved Font Arimo, Tinos and Cousine.
Copyright (c) 2012 Red Hat, Inc.
with Reserved Font Name Liberation.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.

@ -0,0 +1,106 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LiberationSans SDF - Drop Shadow
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
m_ShaderKeywords: OUTLINE_ON UNDERLAY_ON
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Cube:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FaceTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OutlineTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
- _BevelClamp: 0
- _BevelOffset: 0
- _BevelRoundness: 0
- _BevelWidth: 0
- _BumpFace: 0
- _BumpOutline: 0
- _ColorMask: 15
- _Diffuse: 0.5
- _DiffusePower: 1
- _FaceDilate: 0.1
- _FaceUVSpeedX: 0
- _FaceUVSpeedY: 0
- _GlowInner: 0.05
- _GlowOffset: 0
- _GlowOuter: 0.05
- _GlowPower: 0.75
- _GradientScale: 10
- _LightAngle: 3.1416
- _MaskSoftnessX: 0
- _MaskSoftnessY: 0
- _OutlineSoftness: 0
- _OutlineUVSpeedX: 0
- _OutlineUVSpeedY: 0
- _OutlineWidth: 0.1
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 0.9
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.64125
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0
- _Sharpness: 0
- _SpecularPower: 2
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _TextureHeight: 1024
- _TextureWidth: 1024
- _UnderlayDilate: 0
- _UnderlayOffsetX: 0.5
- _UnderlayOffsetY: -0.5
- _UnderlaySoftness: 0.05
- _VertexOffsetX: 0
- _VertexOffsetY: 0
- _WeightBold: 0.75
- _WeightNormal: 0
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}

@ -0,0 +1,343 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2180264
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LiberationSans SDF Material
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Cube:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FaceTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 28268798066460806}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OutlineTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
- _BevelClamp: 0
- _BevelOffset: 0
- _BevelRoundness: 0
- _BevelWidth: 0
- _BumpFace: 0
- _BumpOutline: 0
- _BumpScale: 1
- _ColorMask: 15
- _CullMode: 0
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _Diffuse: 0.5
- _DstBlend: 0
- _FaceDilate: 0
- _FaceUVSpeedX: 0
- _FaceUVSpeedY: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _GlowInner: 0.05
- _GlowOffset: 0
- _GlowOuter: 0.05
- _GlowPower: 0.75
- _GradientScale: 10
- _LightAngle: 3.1416
- _MaskSoftnessX: 0
- _MaskSoftnessY: 0
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _OutlineSoftness: 0
- _OutlineUVSpeedX: 0
- _OutlineUVSpeedY: 0
- _OutlineWidth: 0
- _Parallax: 0.02
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 0.90909094
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.7386364
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0
- _Sharpness: 0
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SpecularPower: 2
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _TextureHeight: 512
- _TextureWidth: 512
- _UVSec: 0
- _UnderlayDilate: 0
- _UnderlayOffsetX: 0
- _UnderlayOffsetY: 0
- _UnderlaySoftness: 0
- _VertexOffsetX: 0
- _VertexOffsetY: 0
- _WeightBold: 0.75
- _WeightNormal: 0
- _ZWrite: 1
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 71c1514a6bd24e1e882cebbe1904ce04, type: 3}
m_Name: LiberationSans SDF - Fallback
m_EditorClassIdentifier:
hashCode: -1699145518
material: {fileID: 2180264}
materialHashCode: 462855346
m_Version: 1.1.0
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75,
type: 3}
m_SourceFontFile: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
m_AtlasPopulationMode: 1
m_FaceInfo:
m_FamilyName: Liberation Sans
m_StyleName: Regular
m_PointSize: 86
m_Scale: 1
m_LineHeight: 98.8916
m_AscentLine: 77.853516
m_CapLine: 59
m_MeanLine: 45
m_Baseline: 0
m_DescentLine: -18.22461
m_SuperscriptOffset: 77.853516
m_SuperscriptSize: 0.5
m_SubscriptOffset: -18.22461
m_SubscriptSize: 0.5
m_UnderlineOffset: -12.261719
m_UnderlineThickness: 6.298828
m_StrikethroughOffset: 18
m_StrikethroughThickness: 6.298828
m_TabWidth: 24
m_GlyphTable: []
m_CharacterTable: []
m_AtlasTextures:
- {fileID: 28268798066460806}
m_AtlasTextureIndex: 0
m_IsMultiAtlasTexturesEnabled: 0
m_ClearDynamicDataOnBuild: 1
m_UsedGlyphRects: []
m_FreeGlyphRects:
- m_X: 0
m_Y: 0
m_Width: 511
m_Height: 511
m_fontInfo:
Name: Liberation Sans
PointSize: 86
Scale: 1
CharacterCount: 250
LineHeight: 98.90625
Baseline: 0
Ascender: 77.84375
CapHeight: 59.1875
Descender: -18.21875
CenterLine: 0
SuperscriptOffset: 77.84375
SubscriptOffset: -12.261719
SubSize: 0.5
Underline: -12.261719
UnderlineThickness: 6.298828
strikethrough: 23.675
strikethroughThickness: 0
TabWidth: 239.0625
Padding: 9
AtlasWidth: 1024
AtlasHeight: 1024
atlas: {fileID: 0}
m_AtlasWidth: 512
m_AtlasHeight: 512
m_AtlasPadding: 9
m_AtlasRenderMode: 4169
m_glyphInfoList: []
m_KerningTable:
kerningPairs: []
m_FontFeatureTable:
m_GlyphPairAdjustmentRecords: []
fallbackFontAssets: []
m_FallbackFontAssetTable: []
m_CreationSettings:
sourceFontFileName:
sourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
pointSizeSamplingMode: 0
pointSize: 86
padding: 9
packingMode: 4
atlasWidth: 512
atlasHeight: 512
characterSetSelectionMode: 1
characterSequence: 32 - 126, 160 - 255, 8192 - 8303, 8364, 8482, 9633
referencedFontAssetGUID: 8f586378b4e144a9851e7b34d9b748ee
referencedTextAssetGUID:
fontStyle: 0
fontStyleModifier: 0
renderMode: 4169
includeFontFeatures: 1
m_FontWeightTable:
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
fontWeights:
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
normalStyle: 0
normalSpacingOffset: 0
boldStyle: 0.75
boldSpacing: 7
italicStyle: 35
tabSize: 10
--- !u!28 &28268798066460806
Texture2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LiberationSans SDF Atlas
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 2
m_Width: 0
m_Height: 0
m_CompleteImageSize: 0
m_TextureFormat: 1
m_MipCount: 1
m_IsReadable: 1
m_StreamingMipmaps: 0
m_StreamingMipmapsPriority: 0
m_AlphaIsTransparency: 0
m_ImageCount: 1
m_TextureDimension: 2
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 0
m_WrapV: 0
m_WrapW: 0
m_LightmapFormat: 0
m_ColorSpace: 0
image data: 0
_typelessdata:
m_StreamData:
offset: 0
size: 0
path:

@ -0,0 +1,104 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LiberationSans SDF - Outline
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
m_ShaderKeywords: OUTLINE_ON
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Cube:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FaceTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OutlineTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
- _BevelClamp: 0
- _BevelOffset: 0
- _BevelRoundness: 0
- _BevelWidth: 0
- _BumpFace: 0
- _BumpOutline: 0
- _ColorMask: 15
- _Diffuse: 0.5
- _FaceDilate: 0.1
- _FaceUVSpeedX: 0
- _FaceUVSpeedY: 0
- _GlowInner: 0.05
- _GlowOffset: 0
- _GlowOuter: 0.05
- _GlowPower: 0.75
- _GradientScale: 10
- _LightAngle: 3.1416
- _MaskSoftnessX: 0
- _MaskSoftnessY: 0
- _OutlineSoftness: 0
- _OutlineUVSpeedX: 0
- _OutlineUVSpeedY: 0
- _OutlineWidth: 0.1
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 0.9
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.64125
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0
- _Sharpness: 0
- _SpecularPower: 2
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _TextureHeight: 1024
- _TextureWidth: 1024
- _UnderlayDilate: 0
- _UnderlayOffsetX: 0
- _UnderlayOffsetY: 0
- _UnderlaySoftness: 0
- _VertexOffsetX: 0
- _VertexOffsetY: 0
- _WeightBold: 0.75
- _WeightNormal: 0
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
)]}〕〉》」』】〙〗〟’”⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、%,.:;。!?]):;=}¢°"†‡℃〆%,.

@ -0,0 +1 @@
([{〔〈《「『【〘〖〝‘“⦅«$—…‥〳〴〵\{£¥"々〇$¥₩ #

@ -0,0 +1,659 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2103686
Material:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TextMeshPro/Sprite
m_Shader: {fileID: 4800000, guid: cf81c85f95fe47e1a27f6ae460cf182c, type: 3}
m_ShaderKeywords: UNITY_UI_CLIP_RECT
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: dffef66376be4fa480fb02b19edbe903, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _ColorMask: 15
- _CullMode: 0
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _Color: {r: 1, g: 1, b: 1, a: 1}
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 84a92b25f83d49b9bc132d206b370281, type: 3}
m_Name: EmojiOne
m_EditorClassIdentifier:
hashCode: -1836805472
material: {fileID: 2103686}
materialHashCode: 0
m_Version: 1.1.0
m_FaceInfo:
m_FamilyName:
m_StyleName:
m_PointSize: 0
m_Scale: 0
m_LineHeight: 0
m_AscentLine: 0
m_CapLine: 0
m_MeanLine: 0
m_Baseline: 0
m_DescentLine: 0
m_SuperscriptOffset: 0
m_SuperscriptSize: 0
m_SubscriptOffset: 0
m_SubscriptSize: 0
m_UnderlineOffset: 0
m_UnderlineThickness: 0
m_StrikethroughOffset: 0
m_StrikethroughThickness: 0
m_TabWidth: 0
spriteSheet: {fileID: 2800000, guid: dffef66376be4fa480fb02b19edbe903, type: 3}
m_SpriteCharacterTable:
- m_ElementType: 2
m_Unicode: 128522
m_GlyphIndex: 0
m_Scale: 1
m_Name: Smiling face with smiling eyes
m_HashCode: -1318250903
- m_ElementType: 2
m_Unicode: 128523
m_GlyphIndex: 1
m_Scale: 1
m_Name: 1f60b
m_HashCode: 57188339
- m_ElementType: 2
m_Unicode: 128525
m_GlyphIndex: 2
m_Scale: 1
m_Name: 1f60d
m_HashCode: 57188341
- m_ElementType: 2
m_Unicode: 128526
m_GlyphIndex: 3
m_Scale: 1
m_Name: 1f60e
m_HashCode: 57188340
- m_ElementType: 2
m_Unicode: 128512
m_GlyphIndex: 4
m_Scale: 1
m_Name: Grinning face
m_HashCode: -95541379
- m_ElementType: 2
m_Unicode: 128513
m_GlyphIndex: 5
m_Scale: 1
m_Name: 1f601
m_HashCode: 57188256
- m_ElementType: 2
m_Unicode: 128514
m_GlyphIndex: 6
m_Scale: 1
m_Name: Face with tears of joy
m_HashCode: 239522663
- m_ElementType: 2
m_Unicode: 128515
m_GlyphIndex: 7
m_Scale: 1
m_Name: 1f603
m_HashCode: 57188258
- m_ElementType: 2
m_Unicode: 128516
m_GlyphIndex: 8
m_Scale: 1
m_Name: 1f604
m_HashCode: 57188261
- m_ElementType: 2
m_Unicode: 128517
m_GlyphIndex: 9
m_Scale: 1
m_Name: 1f605
m_HashCode: 57188260
- m_ElementType: 2
m_Unicode: 128518
m_GlyphIndex: 10
m_Scale: 1
m_Name: 1f606
m_HashCode: 57188263
- m_ElementType: 2
m_Unicode: 128521
m_GlyphIndex: 11
m_Scale: 1
m_Name: 1f609
m_HashCode: 57188264
- m_ElementType: 2
m_Unicode: 0
m_GlyphIndex: 12
m_Scale: 1
m_Name: .notdef
m_HashCode: -600915428
- m_ElementType: 2
m_Unicode: 129315
m_GlyphIndex: 13
m_Scale: 1
m_Name: 1f923
m_HashCode: 57200239
- m_ElementType: 2
m_Unicode: 9786
m_GlyphIndex: 14
m_Scale: 1
m_Name: 263a
m_HashCode: 1748406
- m_ElementType: 2
m_Unicode: 9785
m_GlyphIndex: 15
m_Scale: 1
m_Name: 2639
m_HashCode: 1748462
m_SpriteGlyphTable:
- m_Index: 0
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 0
m_Y: 384
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
- m_Index: 1
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 128
m_Y: 384
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
- m_Index: 2
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 256
m_Y: 384
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
- m_Index: 3
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 384
m_Y: 384
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
- m_Index: 4
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 0
m_Y: 256
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
- m_Index: 5
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 128
m_Y: 256
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
- m_Index: 6
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 256
m_Y: 256
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
- m_Index: 7
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 384
m_Y: 256
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
- m_Index: 8
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 0
m_Y: 128
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
- m_Index: 9
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 128
m_Y: 128
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
- m_Index: 10
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 256
m_Y: 128
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
- m_Index: 11
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 384
m_Y: 128
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
- m_Index: 12
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 0
m_Y: 0
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
- m_Index: 13
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 128
m_Y: 0
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
- m_Index: 14
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 256
m_Y: 0
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
- m_Index: 15
m_Metrics:
m_Width: 128
m_Height: 128
m_HorizontalBearingX: 0
m_HorizontalBearingY: 115.6
m_HorizontalAdvance: 128
m_GlyphRect:
m_X: 384
m_Y: 0
m_Width: 128
m_Height: 128
m_Scale: 1
m_AtlasIndex: 0
sprite: {fileID: 0}
spriteInfoList:
- id: 0
x: 0
y: 384
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: Smiling face with smiling eyes
hashCode: -1318250903
unicode: 128522
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
- id: 1
x: 128
y: 384
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: 1f60b
hashCode: 57188339
unicode: 128523
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
- id: 2
x: 256
y: 384
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: 1f60d
hashCode: 57188341
unicode: 128525
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
- id: 3
x: 384
y: 384
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: 1f60e
hashCode: 57188340
unicode: 128526
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
- id: 4
x: 0
y: 256
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: Grinning face
hashCode: -95541379
unicode: 128512
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
- id: 5
x: 128
y: 256
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: 1f601
hashCode: 57188256
unicode: 128513
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
- id: 6
x: 256
y: 256
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: Face with tears of joy
hashCode: 239522663
unicode: 128514
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
- id: 7
x: 384
y: 256
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: 1f603
hashCode: 57188258
unicode: 128515
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
- id: 8
x: 0
y: 128
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: 1f604
hashCode: 57188261
unicode: 128516
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
- id: 9
x: 128
y: 128
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: 1f605
hashCode: 57188260
unicode: 128517
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
- id: 10
x: 256
y: 128
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: 1f606
hashCode: 57188263
unicode: 128518
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
- id: 11
x: 384
y: 128
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: 1f609
hashCode: 57188264
unicode: 128521
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
- id: 12
x: 0
y: 0
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: 1f618
hashCode: 57188168
unicode: 128536
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
- id: 13
x: 128
y: 0
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: 1f923
hashCode: 57200239
unicode: 129315
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
- id: 14
x: 256
y: 0
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: 263a
hashCode: 1748406
unicode: 9786
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
- id: 15
x: 384
y: 0
width: 128
height: 128
xOffset: 0
yOffset: 115.6
xAdvance: 128
scale: 1
name: 2639
hashCode: 1748462
unicode: 9785
pivot: {x: 0.5, y: 0.5}
sprite: {fileID: 0}
fallbackSpriteAssets: []
--- !u!21 &1369835458
Material:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TextMeshPro/Sprite
m_Shader: {fileID: 4800000, guid: cf81c85f95fe47e1a27f6ae460cf182c, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Floats: []
m_Colors: []

@ -0,0 +1,68 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ab2114bdc8544297b417dfefe9f1e410, type: 3}
m_Name: Default Style Sheet
m_EditorClassIdentifier:
m_StyleList:
- m_Name: H1
m_HashCode: 2425
m_OpeningDefinition: <size=2em><b><#40ff80>*
m_ClosingDefinition: '*</size></b></color>'
m_OpeningTagArray: 3c00000073000000690000007a000000650000003d00000032000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000660000006600000038000000300000003e0000002a000000
m_ClosingTagArray: 2a0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000
- m_Name: Quote
m_HashCode: 92254330
m_OpeningDefinition: <i><size=75%><margin=10%>
m_ClosingDefinition: </i></size></width></margin>
m_OpeningTagArray: 3c000000690000003e0000003c00000073000000690000007a000000650000003d0000003700000035000000250000003e0000003c0000006d000000610000007200000067000000690000006e0000003d0000003100000030000000250000003e000000
m_ClosingTagArray: 3c0000002f000000690000003e0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f00000077000000690000006400000074000000680000003e0000003c0000002f0000006d000000610000007200000067000000690000006e0000003e000000
- m_Name: Link
m_HashCode: 2687968
m_OpeningDefinition: <u><#40a0ff><link="ID_01">
m_ClosingDefinition: </u></color></link>
m_OpeningTagArray: 3c000000750000003e0000003c000000230000003400000030000000610000003000000066000000660000003e0000003c0000006c000000690000006e0000006b0000003d0000002200000049000000440000005f0000003000000031000000220000003e000000
m_ClosingTagArray: 3c0000002f000000750000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f0000006c000000690000006e0000006b0000003e000000
- m_Name: Title
m_HashCode: 98732960
m_OpeningDefinition: <size=125%><b><align=center>
m_ClosingDefinition: </size></b></align>
m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e0000003c000000620000003e0000003c000000610000006c00000069000000670000006e0000003d00000063000000650000006e0000007400000065000000720000003e000000
m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000610000006c00000069000000670000006e0000003e000000
- m_Name: H2
m_HashCode: 2426
m_OpeningDefinition: <size=1.5em><b><#4080FF>
m_ClosingDefinition: </size></b></color>
m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000002e00000035000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000380000003000000046000000460000003e000000
m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000
- m_Name: H3
m_HashCode: 2427
m_OpeningDefinition: <size=1.17em><b><#FF8040>
m_ClosingDefinition: </size></b></color>
m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000002e0000003100000037000000650000006d0000003e0000003c000000620000003e0000003c000000230000004600000046000000380000003000000034000000300000003e000000
m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000
- m_Name: C1
m_HashCode: 2194
m_OpeningDefinition: <color=#ffff40>
m_ClosingDefinition: </color>
m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000006600000066000000660000006600000034000000300000003e000000
m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e000000
- m_Name: C2
m_HashCode: 2193
m_OpeningDefinition: <color=#ff40FF><size=125%>
m_ClosingDefinition: </color></size>
m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000006600000066000000340000003000000046000000460000003e0000003c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e000000
m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f00000073000000690000007a000000650000003e000000
- m_Name: C3
m_HashCode: 2192
m_OpeningDefinition: <color=#80A0FF><b>
m_ClosingDefinition: </color></b>
m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000003800000030000000410000003000000046000000460000003e0000003c000000620000003e000000
m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f000000620000003e000000

@ -0,0 +1,46 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391, type: 3}
m_Name: TMP Settings
m_EditorClassIdentifier:
m_enableWordWrapping: 1
m_enableKerning: 1
m_enableExtraPadding: 0
m_enableTintAllSprites: 0
m_enableParseEscapeCharacters: 1
m_EnableRaycastTarget: 1
m_GetFontFeaturesAtRuntime: 1
m_missingGlyphCharacter: 0
m_warningsDisabled: 0
m_defaultFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_defaultFontAssetPath: Fonts & Materials/
m_defaultFontSize: 36
m_defaultAutoSizeMinRatio: 0.5
m_defaultAutoSizeMaxRatio: 2
m_defaultTextMeshProTextContainerSize: {x: 20, y: 5}
m_defaultTextMeshProUITextContainerSize: {x: 200, y: 50}
m_autoSizeTextContainer: 0
m_fallbackFontAssets: []
m_matchMaterialPreset: 1
m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45,
type: 2}
m_defaultSpriteAssetPath: Sprite Assets/
m_enableEmojiSupport: 1
m_MissingCharacterSpriteUnicode: 0
m_defaultColorGradientPresetsPath: Color Gradient Presets/
m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e,
type: 2}
m_StyleSheetsResourcePath:
m_leadingCharacters: {fileID: 4900000, guid: d82c1b31c7e74239bff1220585707d2b, type: 3}
m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b,
type: 3}
m_UseModernHangulLineBreakingRules: 0

@ -0,0 +1,143 @@
Shader "TextMeshPro/Bitmap Custom Atlas" {
Properties {
_MainTex ("Font Atlas", 2D) = "white" {}
_FaceTex ("Font Texture", 2D) = "white" {}
[HDR]_FaceColor ("Text Color", Color) = (1,1,1,1)
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_Padding ("Padding", float) = 0
_StencilComp("Stencil Comparison", Float) = 8
_Stencil("Stencil ID", Float) = 0
_StencilOp("Stencil Operation", Float) = 0
_StencilWriteMask("Stencil Write Mask", Float) = 255
_StencilReadMask("Stencil Read Mask", Float) = 255
_CullMode("Cull Mode", Float) = 0
_ColorMask("Color Mask", Float) = 15
}
SubShader{
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
Stencil
{
Ref[_Stencil]
Comp[_StencilComp]
Pass[_StencilOp]
ReadMask[_StencilReadMask]
WriteMask[_StencilWriteMask]
}
Lighting Off
Cull [_CullMode]
ZTest [unity_GUIZTestMode]
ZWrite Off
Fog { Mode Off }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask[_ColorMask]
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
struct appdata_t {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct v2f {
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
float4 mask : TEXCOORD2;
};
uniform sampler2D _MainTex;
uniform sampler2D _FaceTex;
uniform float4 _FaceTex_ST;
uniform fixed4 _FaceColor;
uniform float _VertexOffsetX;
uniform float _VertexOffsetY;
uniform float4 _ClipRect;
uniform float _MaskSoftnessX;
uniform float _MaskSoftnessY;
float2 UnpackUV(float uv)
{
float2 output;
output.x = floor(uv / 4096);
output.y = uv - 4096 * output.x;
return output * 0.001953125;
}
v2f vert (appdata_t v)
{
float4 vert = v.vertex;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert));
fixed4 faceColor = v.color;
faceColor *= _FaceColor;
v2f OUT;
OUT.vertex = vPosition;
OUT.color = faceColor;
OUT.texcoord0 = v.texcoord0;
OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex);
float2 pixelSize = vPosition.w;
pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
// Clamp _ClipRect to 16bit.
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
return OUT;
}
fixed4 frag (v2f IN) : SV_Target
{
fixed4 color = tex2D(_MainTex, IN.texcoord0) * tex2D(_FaceTex, IN.texcoord1) * IN.color;
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
color *= m.x * m.y;
#endif
#if UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
return color;
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI"
}

@ -0,0 +1,145 @@
Shader "TextMeshPro/Mobile/Bitmap" {
Properties {
_MainTex ("Font Atlas", 2D) = "white" {}
[HDR]_Color ("Text Color", Color) = (1,1,1,1)
_DiffusePower ("Diffuse Power", Range(1.0,4.0)) = 1.0
_VertexOffsetX("Vertex OffsetX", float) = 0
_VertexOffsetY("Vertex OffsetY", float) = 0
_MaskSoftnessX("Mask SoftnessX", float) = 0
_MaskSoftnessY("Mask SoftnessY", float) = 0
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_StencilComp("Stencil Comparison", Float) = 8
_Stencil("Stencil ID", Float) = 0
_StencilOp("Stencil Operation", Float) = 0
_StencilWriteMask("Stencil Write Mask", Float) = 255
_StencilReadMask("Stencil Read Mask", Float) = 255
_CullMode("Cull Mode", Float) = 0
_ColorMask("Color Mask", Float) = 15
}
SubShader {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Stencil
{
Ref[_Stencil]
Comp[_StencilComp]
Pass[_StencilOp]
ReadMask[_StencilReadMask]
WriteMask[_StencilWriteMask]
}
Lighting Off
Cull [_CullMode]
ZTest [unity_GUIZTestMode]
ZWrite Off
Fog { Mode Off }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask[_ColorMask]
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
struct appdata_t {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct v2f {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float4 mask : TEXCOORD2;
};
sampler2D _MainTex;
fixed4 _Color;
float _DiffusePower;
uniform float _VertexOffsetX;
uniform float _VertexOffsetY;
uniform float4 _ClipRect;
uniform float _MaskSoftnessX;
uniform float _MaskSoftnessY;
v2f vert (appdata_t v)
{
v2f OUT;
float4 vert = v.vertex;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
OUT.vertex = UnityPixelSnap(UnityObjectToClipPos(vert));
OUT.color = v.color;
OUT.color *= _Color;
OUT.color.rgb *= _DiffusePower;
OUT.texcoord0 = v.texcoord0;
float2 pixelSize = OUT.vertex.w;
//pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
// Clamp _ClipRect to 16bit.
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
return OUT;
}
fixed4 frag (v2f IN) : COLOR
{
fixed4 color = fixed4(IN.color.rgb, IN.color.a * tex2D(_MainTex, IN.texcoord0).a);
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
color *= m.x * m.y;
#endif
#if UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
return color;
}
ENDCG
}
}
SubShader {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Lighting Off Cull Off ZTest Always ZWrite Off Fog { Mode Off }
Blend SrcAlpha OneMinusSrcAlpha
BindChannels {
Bind "Color", color
Bind "Vertex", vertex
Bind "TexCoord", texcoord0
}
Pass {
SetTexture [_MainTex] {
constantColor [_Color] combine constant * primary, constant * texture
}
}
}
CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI"
}

@ -0,0 +1,143 @@
Shader "TextMeshPro/Bitmap" {
Properties {
_MainTex ("Font Atlas", 2D) = "white" {}
_FaceTex ("Font Texture", 2D) = "white" {}
[HDR]_FaceColor ("Text Color", Color) = (1,1,1,1)
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_StencilComp("Stencil Comparison", Float) = 8
_Stencil("Stencil ID", Float) = 0
_StencilOp("Stencil Operation", Float) = 0
_StencilWriteMask("Stencil Write Mask", Float) = 255
_StencilReadMask("Stencil Read Mask", Float) = 255
_CullMode("Cull Mode", Float) = 0
_ColorMask("Color Mask", Float) = 15
}
SubShader{
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
Stencil
{
Ref[_Stencil]
Comp[_StencilComp]
Pass[_StencilOp]
ReadMask[_StencilReadMask]
WriteMask[_StencilWriteMask]
}
Lighting Off
Cull [_CullMode]
ZTest [unity_GUIZTestMode]
ZWrite Off
Fog { Mode Off }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask[_ColorMask]
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
struct appdata_t {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct v2f {
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
float4 mask : TEXCOORD2;
};
uniform sampler2D _MainTex;
uniform sampler2D _FaceTex;
uniform float4 _FaceTex_ST;
uniform fixed4 _FaceColor;
uniform float _VertexOffsetX;
uniform float _VertexOffsetY;
uniform float4 _ClipRect;
uniform float _MaskSoftnessX;
uniform float _MaskSoftnessY;
float2 UnpackUV(float uv)
{
float2 output;
output.x = floor(uv / 4096);
output.y = uv - 4096 * output.x;
return output * 0.001953125;
}
v2f vert (appdata_t v)
{
float4 vert = v.vertex;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert));
fixed4 faceColor = v.color;
faceColor *= _FaceColor;
v2f OUT;
OUT.vertex = vPosition;
OUT.color = faceColor;
OUT.texcoord0 = v.texcoord0;
OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex);
float2 pixelSize = vPosition.w;
pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
// Clamp _ClipRect to 16bit.
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
return OUT;
}
fixed4 frag (v2f IN) : SV_Target
{
fixed4 color = tex2D(_MainTex, IN.texcoord0);
color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, IN.color.a * color.a);
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
color *= m.x * m.y;
#endif
#if UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
return color;
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI"
}

@ -0,0 +1,317 @@
Shader "TextMeshPro/Distance Field Overlay" {
Properties {
_FaceTex ("Face Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
_Bevel ("Bevel", Range(0,1)) = 0.5
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
[HDR]_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularPower ("Specular", Range(0,4)) = 2.0
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
_Diffuse ("Diffuse", Range(0,1)) = 0.5
_Ambient ("Ambient", Range(1,0)) = 0.5
_BumpMap ("Normal map", 2D) = "bump" {}
_BumpOutline ("Bump Outline", Range(0,1)) = 0
_BumpFace ("Bump Face", Range(0,1)) = 0
_ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1)
_ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1)
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
_GlowPower ("Falloff", Range(1, 0)) = 0.75
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = 0.5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5.0
_ScaleX ("Scale X", float) = 1.0
_ScaleY ("Scale Y", float) = 1.0
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767)
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags
{
"Queue"="Overlay"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest Always
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma target 3.0
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ BEVEL_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma shader_feature __ GLOW_ON
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
#include "TMPro.cginc"
struct vertex_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 position : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 position : SV_POSITION;
fixed4 color : COLOR;
float2 atlas : TEXCOORD0; // Atlas
float4 param : TEXCOORD1; // alphaClip, scale, bias, weight
float4 mask : TEXCOORD2; // Position in object space(xy), pixel Size(zw)
float3 viewDir : TEXCOORD3;
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 texcoord2 : TEXCOORD4; // u,v, scale, bias
fixed4 underlayColor : COLOR1;
#endif
float4 textures : TEXCOORD5;
};
// Used by Unity internally to handle Texture Tiling and Offset.
float4 _FaceTex_ST;
float4 _OutlineTex_ST;
pixel_t VertShader(vertex_t input)
{
pixel_t output;
UNITY_INITIALIZE_OUTPUT(pixel_t, output);
UNITY_SETUP_INSTANCE_ID(input);
UNITY_TRANSFER_INSTANCE_ID(input,output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float4 vert = input.position;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
if (UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
float bias =(.5 - weight) + (.5 / scale);
float alphaClip = (1.0 - _OutlineWidth*_ScaleRatioA - _OutlineSoftness*_ScaleRatioA);
#if GLOW_ON
alphaClip = min(alphaClip, 1.0 - _GlowOffset * _ScaleRatioB - _GlowOuter * _ScaleRatioB);
#endif
alphaClip = alphaClip / 2.0 - ( .5 / scale) - weight;
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 underlayColor = _UnderlayColor;
underlayColor.rgb *= underlayColor.a;
float bScale = scale;
bScale /= 1 + ((_UnderlaySoftness*_ScaleRatioC) * bScale);
float bBias = (0.5 - weight) * bScale - 0.5 - ((_UnderlayDilate * _ScaleRatioC) * 0.5 * bScale);
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 bOffset = float2(x, y);
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Support for texture tiling and offset
float2 textureUV = UnpackUV(input.texcoord1.x);
float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex);
float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex);
output.position = vPosition;
output.color = input.color;
output.atlas = input.texcoord0;
output.param = float4(alphaClip, scale, bias, weight);
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
output.viewDir = mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz);
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord2 = float4(input.texcoord0 + bOffset, bScale, bBias);
output.underlayColor = underlayColor;
#endif
output.textures = float4(faceUV, outlineUV);
return output;
}
fixed4 PixShader(pixel_t input) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(input);
float c = tex2D(_MainTex, input.atlas).a;
#ifndef UNDERLAY_ON
clip(c - input.param.x);
#endif
float scale = input.param.y;
float bias = input.param.z;
float weight = input.param.w;
float sd = (bias - c) * scale;
float outline = (_OutlineWidth * _ScaleRatioA) * scale;
float softness = (_OutlineSoftness * _ScaleRatioA) * scale;
half4 faceColor = _FaceColor;
half4 outlineColor = _OutlineColor;
faceColor.rgb *= input.color.rgb;
faceColor *= tex2D(_FaceTex, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y);
outlineColor *= tex2D(_OutlineTex, input.textures.zw + float2(_OutlineUVSpeedX, _OutlineUVSpeedY) * _Time.y);
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
#if BEVEL_ON
float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0);
float3 n = GetSurfaceNormal(input.atlas, weight, dxy);
float3 bump = UnpackNormal(tex2D(_BumpMap, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y)).xyz;
bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5));
n = normalize(n- bump);
float3 light = normalize(float3(sin(_LightAngle), cos(_LightAngle), -1.0));
float3 col = GetSpecular(n, light);
faceColor.rgb += col*faceColor.a;
faceColor.rgb *= 1-(dot(n, light)*_Diffuse);
faceColor.rgb *= lerp(_Ambient, 1, n.z*n.z);
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));
faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
#endif
#if UNDERLAY_ON
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
faceColor += input.underlayColor * saturate(d - input.texcoord2.w) * (1 - faceColor.a);
#endif
#if UNDERLAY_INNER
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
faceColor += input.underlayColor * (1 - saturate(d - input.texcoord2.w)) * saturate(1 - sd) * (1 - faceColor.a);
#endif
#if GLOW_ON
float4 glowColor = GetGlowColor(sd, scale);
faceColor.rgb += glowColor.rgb * glowColor.a;
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
faceColor *= m.x * m.y;
#endif
#if UNITY_UI_ALPHACLIP
clip(faceColor.a - 0.001);
#endif
return faceColor * input.color.a;
}
ENDCG
}
}
Fallback "TextMeshPro/Mobile/Distance Field"
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

@ -0,0 +1,310 @@
Shader "TextMeshPro/Distance Field SSD" {
Properties {
_FaceTex ("Face Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
_Bevel ("Bevel", Range(0,1)) = 0.5
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
[HDR]_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularPower ("Specular", Range(0,4)) = 2.0
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
_Diffuse ("Diffuse", Range(0,1)) = 0.5
_Ambient ("Ambient", Range(1,0)) = 0.5
_BumpMap ("Normal map", 2D) = "bump" {}
_BumpOutline ("Bump Outline", Range(0,1)) = 0
_BumpFace ("Bump Face", Range(0,1)) = 0
_ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1)
_ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1)
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
_GlowPower ("Falloff", Range(1, 0)) = 0.75
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = 0.5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5.0
_ScaleX ("Scale X", float) = 1.0
_ScaleY ("Scale Y", float) = 1.0
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767)
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Stencil
{
Ref[_Stencil]
Comp[_StencilComp]
Pass[_StencilOp]
ReadMask[_StencilReadMask]
WriteMask[_StencilWriteMask]
}
Cull[_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest[unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask[_ColorMask]
Pass {
CGPROGRAM
#pragma target 3.0
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ BEVEL_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma shader_feature __ GLOW_ON
#pragma shader_feature __ FORCE_LINEAR
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
#include "TMPro.cginc"
struct vertex_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 position : POSITION;
float3 normal : NORMAL;
float4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 position : SV_POSITION;
float4 color : COLOR;
float2 atlas : TEXCOORD0;
float weight : TEXCOORD1;
float2 mask : TEXCOORD2; // Position in object space(xy)
float3 viewDir : TEXCOORD3;
#if (UNDERLAY_ON || UNDERLAY_INNER)
float2 texcoord2 : TEXCOORD4;
float4 underlayColor : COLOR1;
#endif
float4 textures : TEXCOORD5;
};
// Used by Unity internally to handle Texture Tiling and Offset.
float4 _FaceTex_ST;
float4 _OutlineTex_ST;
float4 SRGBToLinear(float4 rgba) {
return float4(lerp(rgba.rgb / 12.92f, pow((rgba.rgb + 0.055f) / 1.055f, 2.4f), step(0.04045f, rgba.rgb)), rgba.a);
}
pixel_t VertShader(vertex_t input)
{
pixel_t output;
UNITY_INITIALIZE_OUTPUT(pixel_t, output);
UNITY_SETUP_INSTANCE_ID(input);
UNITY_TRANSFER_INSTANCE_ID(input,output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float4 vert = input.position;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 underlayColor = _UnderlayColor;
underlayColor.rgb *= underlayColor.a;
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 bOffset = float2(x, y);
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
// Support for texture tiling and offset
float2 textureUV = UnpackUV(input.texcoord1.x);
float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex);
float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex);
float4 color = input.color;
#if (FORCE_LINEAR && !UNITY_COLORSPACE_GAMMA)
color = SRGBToLinear(input.color);
#endif
output.position = vPosition;
output.color = color;
output.atlas = input.texcoord0;
output.weight = weight;
output.mask = half2(vert.xy * 2 - clampedRect.xy - clampedRect.zw);
output.viewDir = mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz);
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord2 = input.texcoord0 + bOffset;
output.underlayColor = underlayColor;
#endif
output.textures = float4(faceUV, outlineUV);
return output;
}
fixed4 PixShader(pixel_t input) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(input);
float c = tex2D(_MainTex, input.atlas).a;
float2 pixelSize = float2(ddx(input.atlas.y), ddy(input.atlas.y));
pixelSize *= _TextureWidth * .75;
float scale = rsqrt(dot(pixelSize, pixelSize)) * _GradientScale * (_Sharpness + 1);
float weight = input.weight;
float bias = (.5 - weight) + (.5 / scale);
float sd = (bias - c) * scale;
float outline = (_OutlineWidth * _ScaleRatioA) * scale;
float softness = (_OutlineSoftness * _ScaleRatioA) * scale;
half4 faceColor = _FaceColor;
half4 outlineColor = _OutlineColor;
faceColor.rgb *= input.color.rgb;
faceColor *= tex2D(_FaceTex, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y);
outlineColor *= tex2D(_OutlineTex, input.textures.zw + float2(_OutlineUVSpeedX, _OutlineUVSpeedY) * _Time.y);
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
#if BEVEL_ON
float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0);
float3 n = GetSurfaceNormal(input.atlas, weight, dxy);
float3 bump = UnpackNormal(tex2D(_BumpMap, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y)).xyz;
bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5));
n = normalize(n - bump);
float3 light = normalize(float3(sin(_LightAngle), cos(_LightAngle), -1.0));
float3 col = GetSpecular(n, light);
faceColor.rgb += col * faceColor.a;
faceColor.rgb *= 1 - (dot(n, light) * _Diffuse);
faceColor.rgb *= lerp(_Ambient, 1, n.z * n.z);
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));
faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
#endif
#if (UNDERLAY_ON || UNDERLAY_INNER)
float bScale = scale;
bScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * bScale);
float bBias = (0.5 - weight) * bScale - 0.5 - ((_UnderlayDilate * _ScaleRatioC) * 0.5 * bScale);
#endif
#if UNDERLAY_ON
float d = tex2D(_MainTex, input.texcoord2.xy).a * bScale;
faceColor += input.underlayColor * saturate(d - bBias) * (1 - faceColor.a);
#endif
#if UNDERLAY_INNER
float d = tex2D(_MainTex, input.texcoord2.xy).a * bScale;
faceColor += input.underlayColor * (1 - saturate(d - bBias)) * saturate(1 - sd) * (1 - faceColor.a);
#endif
#if GLOW_ON
float4 glowColor = GetGlowColor(sd, scale);
faceColor.rgb += glowColor.rgb * glowColor.a;
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
float2 maskZW = 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + (1 / scale));
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * maskZW);
faceColor *= m.x * m.y;
#endif
#if UNITY_UI_ALPHACLIP
clip(faceColor.a - 0.001);
#endif
return faceColor * input.color.a;
}
ENDCG
}
}
Fallback "TextMeshPro/Mobile/Distance Field"
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

@ -0,0 +1,247 @@
// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field - Masking" {
Properties {
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = .5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5
_ScaleX ("Scale X", float) = 1
_ScaleY ("Scale Y", float) = 1
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_MaskTex ("Mask Texture", 2D) = "white" {}
_MaskInverse ("Inverse", float) = 0
_MaskEdgeColor ("Edge Color", Color) = (1,1,1,1)
_MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01
_MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ OUTLINE_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
struct vertex_t {
float4 vertex : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
float4 vertex : SV_POSITION;
fixed4 faceColor : COLOR;
fixed4 outlineColor : COLOR1;
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
#if (UNDERLAY_ON | UNDERLAY_INNER)
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
#endif
};
float _MaskWipeControl;
float _MaskEdgeSoftness;
fixed4 _MaskEdgeColor;
bool _MaskInverse;
pixel_t VertShader(vertex_t input)
{
float bold = step(input.texcoord1.y, 0);
float4 vert = input.vertex;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
float layerScale = scale;
scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
float bias = (0.5 - weight) * scale - 0.5;
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
float opacity = input.color.a;
#if (UNDERLAY_ON | UNDERLAY_INNER)
opacity = 1.0;
#endif
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
faceColor.rgb *= faceColor.a;
fixed4 outlineColor = _OutlineColor;
outlineColor.a *= opacity;
outlineColor.rgb *= outlineColor.a;
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
#if (UNDERLAY_ON | UNDERLAY_INNER)
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 layerOffset = float2(x, y);
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Structure for pixel shader
pixel_t output = {
vPosition,
faceColor,
outlineColor,
float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y),
half4(scale, bias - outline, bias + outline, bias),
half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)),
#if (UNDERLAY_ON | UNDERLAY_INNER)
float4(input.texcoord0 + layerOffset, input.color.a, 0),
half2(layerScale, layerBias),
#endif
};
return output;
}
// PIXEL SHADER
fixed4 PixShader(pixel_t input) : SV_Target
{
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
half4 c = input.faceColor * saturate(d - input.param.w);
#ifdef OUTLINE_ON
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
c *= saturate(d - input.param.y);
#endif
#if UNDERLAY_ON
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
#endif
#if UNDERLAY_INNER
half sd = saturate(d - input.param.z);
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
//#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
c *= m.x * m.y;
//#endif
float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a);
float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl;
a = saturate(t / _MaskEdgeSoftness);
c.rgb = lerp(_MaskEdgeColor.rgb*c.a, c.rgb, a);
c *= a;
#if (UNDERLAY_ON | UNDERLAY_INNER)
c *= input.texcoord1.z;
#endif
#if UNITY_UI_ALPHACLIP
clip(c.a - 0.001);
#endif
return c;
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

@ -0,0 +1,240 @@
// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field Overlay" {
Properties {
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = .5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5
_ScaleX ("Scale X", float) = 1
_ScaleY ("Scale Y", float) = 1
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags
{
"Queue"="Overlay"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest Always
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ OUTLINE_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
struct vertex_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 vertex : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 vertex : SV_POSITION;
fixed4 faceColor : COLOR;
fixed4 outlineColor : COLOR1;
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
#if (UNDERLAY_ON | UNDERLAY_INNER)
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
#endif
};
pixel_t VertShader(vertex_t input)
{
pixel_t output;
UNITY_INITIALIZE_OUTPUT(pixel_t, output);
UNITY_SETUP_INSTANCE_ID(input);
UNITY_TRANSFER_INSTANCE_ID(input, output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float4 vert = input.vertex;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
float layerScale = scale;
scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
float bias = (0.5 - weight) * scale - 0.5;
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
float opacity = input.color.a;
#if (UNDERLAY_ON | UNDERLAY_INNER)
opacity = 1.0;
#endif
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
faceColor.rgb *= faceColor.a;
fixed4 outlineColor = _OutlineColor;
outlineColor.a *= opacity;
outlineColor.rgb *= outlineColor.a;
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
#if (UNDERLAY_ON | UNDERLAY_INNER)
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 layerOffset = float2(x, y);
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Populate structure for pixel shader
output.vertex = vPosition;
output.faceColor = faceColor;
output.outlineColor = outlineColor;
output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
output.param = half4(scale, bias - outline, bias + outline, bias);
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
output.underlayParam = half2(layerScale, layerBias);
#endif
return output;
}
// PIXEL SHADER
fixed4 PixShader(pixel_t input) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(input);
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
half4 c = input.faceColor * saturate(d - input.param.w);
#ifdef OUTLINE_ON
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
c *= saturate(d - input.param.y);
#endif
#if UNDERLAY_ON
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
#endif
#if UNDERLAY_INNER
half sd = saturate(d - input.param.z);
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
c *= m.x * m.y;
#endif
#if (UNDERLAY_ON | UNDERLAY_INNER)
c *= input.texcoord1.z;
#endif
#if UNITY_UI_ALPHACLIP
clip(c.a - 0.001);
#endif
return c;
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

@ -0,0 +1,106 @@
// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field SSD" {
Properties {
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = .5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5
_ScaleX ("Scale X", float) = 1
_ScaleY ("Scale Y", float) = 1
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_MaskTex ("Mask Texture", 2D) = "white" {}
_MaskInverse ("Inverse", float) = 0
_MaskEdgeColor ("Edge Color", Color) = (1,1,1,1)
_MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01
_MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags {
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ OUTLINE_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
#include "TMPro_Mobile.cginc"
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

@ -0,0 +1,240 @@
// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field" {
Properties {
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = .5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5
_ScaleX ("Scale X", float) = 1
_ScaleY ("Scale Y", float) = 1
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ OUTLINE_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
struct vertex_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 vertex : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 vertex : SV_POSITION;
fixed4 faceColor : COLOR;
fixed4 outlineColor : COLOR1;
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
#if (UNDERLAY_ON | UNDERLAY_INNER)
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
#endif
};
pixel_t VertShader(vertex_t input)
{
pixel_t output;
UNITY_INITIALIZE_OUTPUT(pixel_t, output);
UNITY_SETUP_INSTANCE_ID(input);
UNITY_TRANSFER_INSTANCE_ID(input, output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float4 vert = input.vertex;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
float layerScale = scale;
scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
float bias = (0.5 - weight) * scale - 0.5;
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
float opacity = input.color.a;
#if (UNDERLAY_ON | UNDERLAY_INNER)
opacity = 1.0;
#endif
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
faceColor.rgb *= faceColor.a;
fixed4 outlineColor = _OutlineColor;
outlineColor.a *= opacity;
outlineColor.rgb *= outlineColor.a;
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
#if (UNDERLAY_ON | UNDERLAY_INNER)
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 layerOffset = float2(x, y);
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Populate structure for pixel shader
output.vertex = vPosition;
output.faceColor = faceColor;
output.outlineColor = outlineColor;
output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
output.param = half4(scale, bias - outline, bias + outline, bias);
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
output.underlayParam = half2(layerScale, layerBias);
#endif
return output;
}
// PIXEL SHADER
fixed4 PixShader(pixel_t input) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(input);
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
half4 c = input.faceColor * saturate(d - input.param.w);
#ifdef OUTLINE_ON
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
c *= saturate(d - input.param.y);
#endif
#if UNDERLAY_ON
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
#endif
#if UNDERLAY_INNER
half sd = saturate(d - input.param.z);
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
c *= m.x * m.y;
#endif
#if (UNDERLAY_ON | UNDERLAY_INNER)
c *= input.texcoord1.z;
#endif
#if UNITY_UI_ALPHACLIP
clip(c.a - 0.001);
#endif
return c;
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

@ -0,0 +1,138 @@
// Simplified version of the SDF Surface shader :
// - No support for Bevel, Bump or envmap
// - Diffuse only lighting
// - Fully supports only 1 directional light. Other lights can affect it, but it will be per-vertex/SH.
Shader "TextMeshPro/Mobile/Distance Field (Surface)" {
Properties {
_FaceTex ("Fill Texture", 2D) = "white" {}
[HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
_GlowPower ("Falloff", Range(1, 0)) = 0.75
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = 0.5
// Should not be directly exposed to the user
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5.0
_ScaleX ("Scale X", float) = 1.0
_ScaleY ("Scale Y", float) = 1.0
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_CullMode ("Cull Mode", Float) = 0
//_MaskCoord ("Mask Coords", vector) = (0,0,0,0)
//_MaskSoftness ("Mask Softness", float) = 0
}
SubShader {
Tags {
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
LOD 300
Cull [_CullMode]
CGPROGRAM
#pragma surface PixShader Lambert alpha:blend vertex:VertShader noforwardadd nolightmap nodirlightmap
#pragma target 3.0
#pragma shader_feature __ GLOW_ON
#include "TMPro_Properties.cginc"
#include "TMPro.cginc"
half _FaceShininess;
half _OutlineShininess;
struct Input
{
fixed4 color : COLOR;
float2 uv_MainTex;
float2 uv2_FaceTex;
float2 uv2_OutlineTex;
float2 param; // Weight, Scale
float3 viewDirEnv;
};
#include "TMPro_Surface.cginc"
ENDCG
// Pass to render object as a shadow caster
Pass
{
Name "Caster"
Tags { "LightMode" = "ShadowCaster" }
Offset 1, 1
Fog {Mode Off}
ZWrite On ZTest LEqual Cull Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_shadowcaster
#include "UnityCG.cginc"
struct v2f {
V2F_SHADOW_CASTER;
float2 uv : TEXCOORD1;
float2 uv2 : TEXCOORD3;
float alphaClip : TEXCOORD2;
};
uniform float4 _MainTex_ST;
uniform float4 _OutlineTex_ST;
float _OutlineWidth;
float _FaceDilate;
float _ScaleRatioA;
v2f vert( appdata_base v )
{
v2f o;
TRANSFER_SHADOW_CASTER(o)
o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex);
o.alphaClip = o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2;
return o;
}
uniform sampler2D _MainTex;
float4 frag(v2f i) : COLOR
{
fixed4 texcol = tex2D(_MainTex, i.uv).a;
clip(texcol.a - i.alphaClip);
SHADOW_CASTER_FRAGMENT(i)
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

@ -0,0 +1,158 @@
Shader "TextMeshPro/Distance Field (Surface)" {
Properties {
_FaceTex ("Fill Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
[HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
_Bevel ("Bevel", Range(0,1)) = 0.5
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_BumpMap ("Normalmap", 2D) = "bump" {}
_BumpOutline ("Bump Outline", Range(0,1)) = 0.5
_BumpFace ("Bump Face", Range(0,1)) = 0.5
_ReflectFaceColor ("Face Color", Color) = (0,0,0,1)
_ReflectOutlineColor ("Outline Color", Color) = (0,0,0,1)
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
[HDR]_SpecColor ("Specular Color", Color) = (0,0,0,1)
_FaceShininess ("Face Shininess", Range(0,1)) = 0
_OutlineShininess ("Outline Shininess", Range(0,1)) = 0
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
_GlowPower ("Falloff", Range(1, 0)) = 0.75
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = 0.5
// Should not be directly exposed to the user
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5.0
_ScaleX ("Scale X", float) = 1.0
_ScaleY ("Scale Y", float) = 1.0
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_CullMode ("Cull Mode", Float) = 0
//_MaskCoord ("Mask Coords", vector) = (0,0,0,0)
//_MaskSoftness ("Mask Softness", float) = 0
}
SubShader {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
LOD 300
Cull [_CullMode]
CGPROGRAM
#pragma surface PixShader BlinnPhong alpha:blend vertex:VertShader nolightmap nodirlightmap
#pragma target 3.0
#pragma shader_feature __ GLOW_ON
#pragma glsl
#include "TMPro_Properties.cginc"
#include "TMPro.cginc"
half _FaceShininess;
half _OutlineShininess;
struct Input
{
fixed4 color : COLOR;
float2 uv_MainTex;
float2 uv2_FaceTex;
float2 uv2_OutlineTex;
float2 param; // Weight, Scale
float3 viewDirEnv;
};
#define BEVEL_ON 1
#include "TMPro_Surface.cginc"
ENDCG
// Pass to render object as a shadow caster
Pass
{
Name "Caster"
Tags { "LightMode" = "ShadowCaster" }
Offset 1, 1
Fog {Mode Off}
ZWrite On
ZTest LEqual
Cull Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_shadowcaster
#include "UnityCG.cginc"
struct v2f {
V2F_SHADOW_CASTER;
float2 uv : TEXCOORD1;
float2 uv2 : TEXCOORD3;
float alphaClip : TEXCOORD2;
};
uniform float4 _MainTex_ST;
uniform float4 _OutlineTex_ST;
float _OutlineWidth;
float _FaceDilate;
float _ScaleRatioA;
v2f vert( appdata_base v )
{
v2f o;
TRANSFER_SHADOW_CASTER(o)
o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex);
o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2;
return o;
}
uniform sampler2D _MainTex;
float4 frag(v2f i) : COLOR
{
fixed4 texcol = tex2D(_MainTex, i.uv).a;
clip(texcol.a - i.alphaClip);
SHADOW_CASTER_FRAGMENT(i)
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

@ -0,0 +1,317 @@
Shader "TextMeshPro/Distance Field" {
Properties {
_FaceTex ("Face Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
_Bevel ("Bevel", Range(0,1)) = 0.5
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
[HDR]_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularPower ("Specular", Range(0,4)) = 2.0
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
_Diffuse ("Diffuse", Range(0,1)) = 0.5
_Ambient ("Ambient", Range(1,0)) = 0.5
_BumpMap ("Normal map", 2D) = "bump" {}
_BumpOutline ("Bump Outline", Range(0,1)) = 0
_BumpFace ("Bump Face", Range(0,1)) = 0
_ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1)
_ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1)
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
_GlowPower ("Falloff", Range(1, 0)) = 0.75
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = 0.5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5.0
_ScaleX ("Scale X", float) = 1.0
_ScaleY ("Scale Y", float) = 1.0
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767)
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma target 3.0
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ BEVEL_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma shader_feature __ GLOW_ON
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
#include "TMPro.cginc"
struct vertex_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 position : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 position : SV_POSITION;
fixed4 color : COLOR;
float2 atlas : TEXCOORD0; // Atlas
float4 param : TEXCOORD1; // alphaClip, scale, bias, weight
float4 mask : TEXCOORD2; // Position in object space(xy), pixel Size(zw)
float3 viewDir : TEXCOORD3;
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 texcoord2 : TEXCOORD4; // u,v, scale, bias
fixed4 underlayColor : COLOR1;
#endif
float4 textures : TEXCOORD5;
};
// Used by Unity internally to handle Texture Tiling and Offset.
float4 _FaceTex_ST;
float4 _OutlineTex_ST;
pixel_t VertShader(vertex_t input)
{
pixel_t output;
UNITY_INITIALIZE_OUTPUT(pixel_t, output);
UNITY_SETUP_INSTANCE_ID(input);
UNITY_TRANSFER_INSTANCE_ID(input,output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float4 vert = input.position;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
if (UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
float bias =(.5 - weight) + (.5 / scale);
float alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _OutlineSoftness * _ScaleRatioA);
#if GLOW_ON
alphaClip = min(alphaClip, 1.0 - _GlowOffset * _ScaleRatioB - _GlowOuter * _ScaleRatioB);
#endif
alphaClip = alphaClip / 2.0 - ( .5 / scale) - weight;
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 underlayColor = _UnderlayColor;
underlayColor.rgb *= underlayColor.a;
float bScale = scale;
bScale /= 1 + ((_UnderlaySoftness*_ScaleRatioC) * bScale);
float bBias = (0.5 - weight) * bScale - 0.5 - ((_UnderlayDilate * _ScaleRatioC) * 0.5 * bScale);
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 bOffset = float2(x, y);
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Support for texture tiling and offset
float2 textureUV = UnpackUV(input.texcoord1.x);
float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex);
float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex);
output.position = vPosition;
output.color = input.color;
output.atlas = input.texcoord0;
output.param = float4(alphaClip, scale, bias, weight);
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
output.viewDir = mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz);
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord2 = float4(input.texcoord0 + bOffset, bScale, bBias);
output.underlayColor = underlayColor;
#endif
output.textures = float4(faceUV, outlineUV);
return output;
}
fixed4 PixShader(pixel_t input) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(input);
float c = tex2D(_MainTex, input.atlas).a;
#ifndef UNDERLAY_ON
clip(c - input.param.x);
#endif
float scale = input.param.y;
float bias = input.param.z;
float weight = input.param.w;
float sd = (bias - c) * scale;
float outline = (_OutlineWidth * _ScaleRatioA) * scale;
float softness = (_OutlineSoftness * _ScaleRatioA) * scale;
half4 faceColor = _FaceColor;
half4 outlineColor = _OutlineColor;
faceColor.rgb *= input.color.rgb;
faceColor *= tex2D(_FaceTex, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y);
outlineColor *= tex2D(_OutlineTex, input.textures.zw + float2(_OutlineUVSpeedX, _OutlineUVSpeedY) * _Time.y);
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
#if BEVEL_ON
float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0);
float3 n = GetSurfaceNormal(input.atlas, weight, dxy);
float3 bump = UnpackNormal(tex2D(_BumpMap, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y)).xyz;
bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5));
n = normalize(n- bump);
float3 light = normalize(float3(sin(_LightAngle), cos(_LightAngle), -1.0));
float3 col = GetSpecular(n, light);
faceColor.rgb += col*faceColor.a;
faceColor.rgb *= 1-(dot(n, light)*_Diffuse);
faceColor.rgb *= lerp(_Ambient, 1, n.z*n.z);
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));
faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
#endif
#if UNDERLAY_ON
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
faceColor += input.underlayColor * saturate(d - input.texcoord2.w) * (1 - faceColor.a);
#endif
#if UNDERLAY_INNER
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
faceColor += input.underlayColor * (1 - saturate(d - input.texcoord2.w)) * saturate(1 - sd) * (1 - faceColor.a);
#endif
#if GLOW_ON
float4 glowColor = GetGlowColor(sd, scale);
faceColor.rgb += glowColor.rgb * glowColor.a;
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
faceColor *= m.x * m.y;
#endif
#if UNITY_UI_ALPHACLIP
clip(faceColor.a - 0.001);
#endif
return faceColor * input.color.a;
}
ENDCG
}
}
Fallback "TextMeshPro/Mobile/Distance Field"
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save