in progress changes

pull/5/head
Arneth 4 years ago
parent f4ba5fc852
commit fe17ead9c5

@ -19,7 +19,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Temp\bin\Debug\</OutputPath>
<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;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>
@ -440,19 +440,37 @@
<Compile Include="Assets\Scripts\P31RestKit\ThreadingCallbackHelper.cs" />
<Compile Include="Assets\Scripts\P31RestKit\Utils.cs" />
<None Include="Assets\Resources\shader\sprite\Sprite Flash.shader" />
<None Include="Assets\TestShaders\Unlit - Masked Colored.shader" />
<None Include="Assets\TestShaders\Unlit - Transparent Colored (Packed).shader" />
<None Include="Assets\TestShaders\Unlit - Dynamic Font (AlphaClip).shader" />
<None Include="Assets\Resources\shader\movie\YCrCbtoRGBTrans.shader" />
<None Include="Assets\Resources\shader\effect\Transition.shader" />
<None Include="Assets\TestShaders\Unlit - Depth.shader" />
<None Include="Assets\TestShaders\Unlit - Transparent Colored.shader" />
<None Include="Assets\Resources\shader\movie\YCrCbtoRGBChromaKey.shader" />
<None Include="Assets\Resources\shader\sprite\Sprite Back.shader" />
<None Include="Assets\TestShaders\Unlit - Transparent Colored (Packed) (AlphaClip) .shader" />
<None Include="Assets\TestShaders\GUI - Text Shader (SoftClip).shader" />
<None Include="Assets\Resources\shader\sprite\TextSprite.shader" />
<None Include="Assets\TestShaders\Unlit - Depth Cutout.shader" />
<None Include="Assets\Resources\shader\movie\YCrCbtoRGB.shader" />
<None Include="Assets\TestShaders\GUI - Text Shader (AlphaClip).shader" />
<None Include="Assets\Resources\shader\movie\YCrCbtoRGBSplitAlpha.shader" />
<None Include="Assets\Resources\shader\sprite\Sprite.shader" />
<None Include="Assets\StreamingAssets\font\h2m_font.fnt" />
<None Include="Assets\TestShaders\Unlit - Transparent Colored (Packed) (SoftClip).shader" />
<None Include="Assets\Resources\shader\sprite\Sprite NoTexAlpha.shader" />
<None Include="Assets\Resources\shader\effect\Mosaic.shader" />
<None Include="Assets\Resources\shader\color\UnlitColor.shader" />
<None Include="Assets\TestShaders\Unlit - Premultiplied Colored (SoftClip).shader" />
<None Include="Assets\TestShaders\Unlit - Premultiplied Colored (AlphaClip).shader" />
<None Include="Assets\Resources\shader\sprite\Sprite Sub.shader" />
<None Include="Assets\TestShaders\Unlit - Dynamic Font.shader" />
<None Include="Assets\TestShaders\Unlit - Dynamic Font (SoftClip).shader" />
<None Include="Assets\TestShaders\Unlit - Transparent Colored (SoftClip).shader" />
<None Include="Assets\TestShaders\Unlit - Transparent Colored (AlphaClip).shader" />
<None Include="Assets\TestShaders\Unlit - Additive Colored.shader" />
<None Include="Assets\TestShaders\Unlit - Premultiplied Colored.shader" />
<None Include="Assets\Resources\shader\effect\Ripple.shader" />
<None Include="Assets\Resources\shader\sprite\Sprite Add.shader" />
<None Include="Assets\Resources\shader\movie\YCrCbtoRGB Add.shader" />

@ -19,7 +19,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Temp\bin\Debug\</OutputPath>
<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;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>
@ -440,19 +440,37 @@
<Compile Include="Assets\Scripts\P31RestKit\ThreadingCallbackHelper.cs" />
<Compile Include="Assets\Scripts\P31RestKit\Utils.cs" />
<None Include="Assets\Resources\shader\sprite\Sprite Flash.shader" />
<None Include="Assets\TestShaders\Unlit - Masked Colored.shader" />
<None Include="Assets\TestShaders\Unlit - Transparent Colored (Packed).shader" />
<None Include="Assets\TestShaders\Unlit - Dynamic Font (AlphaClip).shader" />
<None Include="Assets\Resources\shader\movie\YCrCbtoRGBTrans.shader" />
<None Include="Assets\Resources\shader\effect\Transition.shader" />
<None Include="Assets\TestShaders\Unlit - Depth.shader" />
<None Include="Assets\TestShaders\Unlit - Transparent Colored.shader" />
<None Include="Assets\Resources\shader\movie\YCrCbtoRGBChromaKey.shader" />
<None Include="Assets\Resources\shader\sprite\Sprite Back.shader" />
<None Include="Assets\TestShaders\Unlit - Transparent Colored (Packed) (AlphaClip) .shader" />
<None Include="Assets\TestShaders\GUI - Text Shader (SoftClip).shader" />
<None Include="Assets\Resources\shader\sprite\TextSprite.shader" />
<None Include="Assets\TestShaders\Unlit - Depth Cutout.shader" />
<None Include="Assets\Resources\shader\movie\YCrCbtoRGB.shader" />
<None Include="Assets\TestShaders\GUI - Text Shader (AlphaClip).shader" />
<None Include="Assets\Resources\shader\movie\YCrCbtoRGBSplitAlpha.shader" />
<None Include="Assets\Resources\shader\sprite\Sprite.shader" />
<None Include="Assets\StreamingAssets\font\h2m_font.fnt" />
<None Include="Assets\TestShaders\Unlit - Transparent Colored (Packed) (SoftClip).shader" />
<None Include="Assets\Resources\shader\sprite\Sprite NoTexAlpha.shader" />
<None Include="Assets\Resources\shader\effect\Mosaic.shader" />
<None Include="Assets\Resources\shader\color\UnlitColor.shader" />
<None Include="Assets\TestShaders\Unlit - Premultiplied Colored (SoftClip).shader" />
<None Include="Assets\TestShaders\Unlit - Premultiplied Colored (AlphaClip).shader" />
<None Include="Assets\Resources\shader\sprite\Sprite Sub.shader" />
<None Include="Assets\TestShaders\Unlit - Dynamic Font.shader" />
<None Include="Assets\TestShaders\Unlit - Dynamic Font (SoftClip).shader" />
<None Include="Assets\TestShaders\Unlit - Transparent Colored (SoftClip).shader" />
<None Include="Assets\TestShaders\Unlit - Transparent Colored (AlphaClip).shader" />
<None Include="Assets\TestShaders\Unlit - Additive Colored.shader" />
<None Include="Assets\TestShaders\Unlit - Premultiplied Colored.shader" />
<None Include="Assets\Resources\shader\effect\Ripple.shader" />
<None Include="Assets\Resources\shader\sprite\Sprite Add.shader" />
<None Include="Assets\Resources\shader\movie\YCrCbtoRGB Add.shader" />

Binary file not shown.

@ -92,7 +92,8 @@ public abstract class BaseWindow : MonoBehaviourWrap
public sealed override void Start()
{
//base.transform.parent.localPosition = new Vector3(2000f, 0f, 0f);
base.transform.gameObject.transform.position = new Vector3(2000f, 0f, 0f);
//base.transform.gameObject.transform.position = new Vector3(2000f, 0f, 0f);
base.transform.gameObject.transform.position = new Vector3(0f, 0f, 0f);
this.BeforeInit();
foreach (BaseWindow.UIComponent uicomponent in this.newComponentArray())
{

@ -32,9 +32,7 @@ public class CreateSprite : MonoBehaviour
{
UnityEngine.Object.Destroy(meshRenderer.material);
}
// TODO Font
//meshRenderer.material = new Material(Resources.Load("Shader/Sprite/TextSprite") as Shader);
meshRenderer.material = new Material(Shader.Find("Unlit/Transparent") as Shader);
meshRenderer.material = new Material(Resources.Load("Shader/Sprite/TextSprite") as Shader);
meshRenderer.castShadows = false;
meshRenderer.receiveShadows = false;

@ -38,7 +38,8 @@ public class GalleryMovieWindow : BaseWindow
// Token: 0x06000723 RID: 1827 RVA: 0x0001E854 File Offset: 0x0001CA54
private IEnumerator PlayMovie()
{
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.mp4", FullScreenMovieControlMode.CancelOnInput));
//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));
this.state = GalleryMovieWindow.STATE.END;
yield break;
}

@ -32,7 +32,8 @@ public class LogoMovieWindow : BaseWindow
// Token: 0x06000781 RID: 1921 RVA: 0x0002049C File Offset: 0x0001E69C
private IEnumerator PlayMovie()
{
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/normal/quinrose_logo_8.mp4", FullScreenMovieControlMode.CancelOnInput));
//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));
this.state = LogoMovieWindow.STATE.END;
yield break;
}

@ -51,7 +51,9 @@ public class Man2D : Singleton<Man2D>
private void OnEnable()
{
this.m_Sprite.Enable();
base.camera.enabled = true;
//TODO determine why camera breaks
//base.camera.enabled = true;
base.camera.enabled = false;
}
// Token: 0x06000978 RID: 2424 RVA: 0x00029EF4 File Offset: 0x000280F4
@ -303,12 +305,12 @@ public class Man2D : Singleton<Man2D>
Qoo.Debug.Print("Create Frame Buffer");
int w = 960;
int h = 544;
if (iPhone.generation == iPhoneGeneration.iPhone4)
/*if (iPhone.generation == iPhoneGeneration.iPhone4)
{
w = 512;
h = 512;
}
Qoo.Debug.Print("Info:iPhone.generation:" + iPhone.generation);
}*/
//Qoo.Debug.Print("Info:iPhone.generation:" + iPhone.generation);
for (int i = 0; i < this.m_FrameBufferAr.Length; i++)
{
this.m_FrameBufferAr[i] = new FrameBuffer(w, h, "2D Sprite FrameBuffer" + i);

@ -5,6 +5,8 @@ using UnityEngine;
// Token: 0x0200017E RID: 382
public class MovieManager
{
//TODO fix movie playing. either make platform specific versions OR make platform agnostic
/*
// Token: 0x06000ACD RID: 2765 RVA: 0x0002F630 File Offset: 0x0002D830
public static IEnumerator PlayMovie(string path, FullScreenMovieControlMode mode)
{
@ -12,4 +14,5 @@ public class MovieManager
yield return 0;
yield break;
}
*/
}

@ -15,7 +15,8 @@ namespace Qoo.Graphics
NMB_FILEINFO fileInfo = Nmb.GetFileInfo(fileId.Name);
string text = fileInfo.DirName + fileInfo.FileName;
Debug.Print(string.Format("INFO:Start Movie({0} Skip={1})", text, IsSkip.ToString()));
UnityTask.SetSubTask(MovieManager.PlayMovie(text, FullScreenMovieControlMode.CancelOnInput));
//TODO fix movie playing. either make platform specific versions OR make platform agnostic
//UnityTask.SetSubTask(MovieManager.PlayMovie(text, FullScreenMovieControlMode.CancelOnInput));
}
}
}

@ -490,6 +490,7 @@ namespace Qoo.Ks
}
// Token: 0x06000384 RID: 900 RVA: 0x0000BECC File Offset: 0x0000A0CC
// TODO investigate for message printing
private EVENTSCENE SceneApplySub(EVENTSCENE Scene, bool bMsg, bool IsVoice = true)
{
if (Scene.Message.Sw == SWITCH.ON && Scene.Message.Tag != null)

@ -68,7 +68,8 @@ public class ScreenEffect
}
else
{
ScreenEffect.goScreenEffect.transform.localPosition = new Vector3(2000f, 0f, (float)(-(float)z));
//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);
}

@ -51,14 +51,16 @@ public class ScreenKeyboardManager : MonoBehaviour
{
get
{
return ScreenKeyboardManager.Instance.m_keyboard.wasCanceled;
return false;
//return ScreenKeyboardManager.Instance.m_keyboard.wasCanceled;
}
}
// Token: 0x06000A97 RID: 2711 RVA: 0x0002EAC8 File Offset: 0x0002CCC8
public static IEnumerator Open(string defaultString = "")
{
ScreenKeyboardManager.Instance.m_inputText = defaultString;
//TODO fix TouchScreenKeyboard issue
/*ScreenKeyboardManager.Instance.m_inputText = defaultString;
ScreenKeyboardManager.Instance.m_keyboard = TouchScreenKeyboard.Open(defaultString, TouchScreenKeyboardType.NamePhonePad);
while (!ScreenKeyboardManager.Instance.m_keyboard.active)
{
@ -71,7 +73,7 @@ public class ScreenKeyboardManager : MonoBehaviour
if (ScreenKeyboardManager.Instance.m_keyboard.done)
{
ScreenKeyboardManager.Instance.m_inputText = ScreenKeyboardManager.Instance.m_keyboard.text;
}
}*/
yield break;
}
@ -89,7 +91,7 @@ public class ScreenKeyboardManager : MonoBehaviour
private static ScreenKeyboardManager m_instance;
// Token: 0x04000886 RID: 2182
private TouchScreenKeyboard m_keyboard;
//private TouchScreenKeyboard m_keyboard;
// Token: 0x04000887 RID: 2183
private string m_inputText;

@ -8,7 +8,8 @@ public class ScreenMovieSample : MonoBehaviour
// Token: 0x06000011 RID: 17 RVA: 0x00002238 File Offset: 0x00000438
private IEnumerator Start()
{
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.mp4", FullScreenMovieControlMode.CancelOnInput));
//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));
Debug.Log(" #DEBUGLOG::MOVIE OWATA ");
yield break;
}

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

@ -83,6 +83,7 @@ public class UnityFile
this.m_szPath = path;
this.m_IsAssetBandle = IsAssetBandle;
UnityTask.SetReadTask(this.LoadWait());
return true;
}
@ -185,11 +186,23 @@ public class UnityFile
}
else if (this.m_IsAssetBandle)
{
//TODO fix issue with resources ang streaming assets folders and the build
//New code start. This loads PNGs directly rather than from assetbundles
UnityEngine.Debug.Log (Application.dataPath + "/Resources" + m_szPath + m_szName + ".png");
byte[] data = System.IO.File.ReadAllBytes(Application.dataPath + "/Resources" + m_szPath + m_szName + ".png");
this.m_ReadData = data;
//New code end
//Old code for asset bundles
/*
AssetBundle ab = loader.assetBundle;
TextAsset ta = ab.mainAsset as TextAsset;
this.m_ReadData = data;
this.m_ReadData = ta.bytes;
Resources.UnloadAsset(ta);
ab.Unload(false);
*/
}
else
{

@ -82,7 +82,9 @@ public class UnityGraph : Singleton<UnityGraph>
this.m_ManSprite.enabled = true;
CreateSprite.CreateSpriteCamera(base.gameObject, Screen.height, false);
base.gameObject.camera.aspect = (float)Screen.width / (float)Screen.height;
base.gameObject.camera.enabled = true;
//TODO fix camera issues, find out why this is needed
//base.gameObject.camera.enabled = true;
base.gameObject.camera.enabled = false;
this.m_FrameBg.obj.SetActive(true);
if (this.m_FrameBg.tex == null)
{
@ -275,6 +277,8 @@ public class UnityGraph : Singleton<UnityGraph>
// Token: 0x060009BF RID: 2495 RVA: 0x0002B3BC File Offset: 0x000295BC
public IEnumerator Effect(string name, float time = 1f)
{
//TODO effect movies crash game and standard effects need shaders. Fix and re-add them
/*
string text = name;
switch (text)
{
@ -311,11 +315,14 @@ public class UnityGraph : Singleton<UnityGraph>
name = fileInfo.DirName + fileInfo.FileName;
}
return this.EffectMovie(name);
*/
yield break;
}
// Token: 0x060009C0 RID: 2496 RVA: 0x0002B524 File Offset: 0x00029724
private IEnumerator EffectMain(string name, float time)
{
yield return 0;
yield return 0;
this.m_ManSprite.UpdateFrameBuffer();

@ -223,8 +223,15 @@ public class UnitySprite
public void SetMaterial(string shader_name)
{
this.DeleteMaterial();
//TODO get all shaders working or implement workarounds
//added workaround
if (shader_name == "Shader/Sprite/Sprite") {
this.obj.renderer.material = new Material (Shader.Find ("Unlit/Transparent") as Shader);
} else {
this.obj.renderer.material = new Material(Resources.Load(shader_name) as Shader);
}
//this.obj.renderer.material = new Material(Resources.Load(shader_name) as Shader);
}
// Token: 0x060009DE RID: 2526 RVA: 0x0002B940 File Offset: 0x00029B40
public virtual void Update(int ScrW, int ScrH, float worldZ)

@ -0,0 +1,111 @@
Shader "GUI/Text Shader (AlphaClip)"
{
Properties
{
_MainTex ("Alpha (A)", 2D) = "white" {}
}
SubShader
{
LOD 200
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
Offset -1, -1
Fog { Mode Off }
//ColorMask RGB
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
float4 _MainTex_ST;
struct appdata_t
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
float2 worldPos : TEXCOORD1;
};
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color;
o.texcoord = v.texcoord;
o.worldPos = TRANSFORM_TEX(v.vertex.xy, _MainTex);
return o;
}
half4 frag (v2f IN) : COLOR
{
// Sample the texture
half4 col = IN.color;
col.a *= tex2D(_MainTex, IN.texcoord).a;
float2 factor = abs(IN.worldPos);
float val = 1.0 - max(factor.x, factor.y);
// Option 1: 'if' statement
if (val < 0.0) col.a = 0.0;
// Option 2: no 'if' statement -- may be faster on some devices
//col.a *= ceil(clamp(val, 0.0, 1.0));
return col;
}
ENDCG
}
}
SubShader
{
LOD 100
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
Fog { Mode Off }
ColorMask RGB
AlphaTest Greater .01
Blend SrcAlpha OneMinusSrcAlpha
ColorMaterial AmbientAndDiffuse
SetTexture [_MainTex]
{
Combine Texture * Primary
}
}
}
}

@ -0,0 +1,109 @@
Shader "GUI/Text Shader (SoftClip)"
{
Properties
{
_MainTex ("Alpha (A)", 2D) = "white" {}
}
SubShader
{
LOD 200
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
Offset -1, -1
Fog { Mode Off }
//ColorMask RGB
AlphaTest Greater .01
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
float4 _MainTex_ST;
float2 _ClipSharpness = float2(20.0, 20.0);
struct appdata_t
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
float2 worldPos : TEXCOORD1;
};
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color;
o.texcoord = v.texcoord;
o.worldPos = TRANSFORM_TEX(v.vertex.xy, _MainTex);
return o;
}
half4 frag (v2f IN) : COLOR
{
// Softness factor
float2 factor = (float2(1.0, 1.0) - abs(IN.worldPos)) * _ClipSharpness;
// Sample the texture
half4 col = IN.color;
col.a *= tex2D(_MainTex, IN.texcoord).a;
col.a *= clamp( min(factor.x, factor.y), 0.0, 1.0);
return col;
}
ENDCG
}
}
SubShader
{
LOD 100
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
Fog { Mode Off }
ColorMask RGB
AlphaTest Greater .01
Blend SrcAlpha OneMinusSrcAlpha
ColorMaterial AmbientAndDiffuse
SetTexture [_MainTex]
{
Combine Texture * Primary
}
}
}
}

@ -0,0 +1,36 @@
Shader "Unlit/Additive Colored"
{
Properties
{
_MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {}
}
SubShader
{
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
LOD 100
Cull Off
Lighting Off
ZWrite Off
Fog { Mode Off }
ColorMask RGB
AlphaTest Greater .01
Blend One One
Pass
{
ColorMaterial AmbientAndDiffuse
SetTexture [_MainTex]
{
Combine Texture * Primary
}
}
}
}

@ -0,0 +1,35 @@
Shader "Unlit/Depth Cutout"
{
Properties
{
_MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {}
}
SubShader
{
LOD 100
Tags
{
"Queue" = "Background"
"IgnoreProjector" = "True"
}
Pass
{
Cull Off
Lighting Off
Blend Off
ColorMask 0
ZWrite On
ZTest Less
AlphaTest Greater .99
ColorMaterial AmbientAndDiffuse
SetTexture [_MainTex]
{
Combine Texture * Primary
}
}
}
}

@ -0,0 +1,20 @@
Shader "Unlit/Depth"
{
SubShader
{
Lod 100
Tags
{
"Queue" = "Geometry+1"
"RenderType"="Opaque"
}
Pass
{
ZWrite On
ZTest LEqual
ColorMask 0
}
}
}

@ -0,0 +1,112 @@
Shader "Unlit/Dynamic Font (AlphaClip)"
{
Properties
{
_MainTex ("Alpha (A)", 2D) = "white" {}
}
SubShader
{
LOD 200
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
Offset -1, -1
Fog { Mode Off }
//ColorMask RGB
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
float4 _MainTex_ST;
struct appdata_t
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
float2 worldPos : TEXCOORD1;
};
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color;
o.texcoord = v.texcoord;
o.worldPos = TRANSFORM_TEX(v.vertex.xy, _MainTex);
return o;
}
half4 frag (v2f IN) : COLOR
{
// Sample the texture
//half4 col = tex2D(_MainTex, IN.texcoord) * IN.color;
half4 col = IN.color;
col.a *= tex2D(_MainTex, IN.texcoord).a;
float2 factor = abs(IN.worldPos);
float val = 1.0 - max(factor.x, factor.y);
// Option 1: 'if' statement
if (val < 0.0) col.a = 0.0;
// Option 2: no 'if' statement -- may be faster on some devices
//col.a *= ceil(clamp(val, 0.0, 1.0));
return col;
}
ENDCG
}
}
SubShader
{
LOD 100
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
Fog { Mode Off }
ColorMask RGB
AlphaTest Greater .01
Blend SrcAlpha OneMinusSrcAlpha
ColorMaterial AmbientAndDiffuse
SetTexture [_MainTex]
{
Combine Texture * Primary
}
}
}
}

@ -0,0 +1,109 @@
Shader "Unlit/Dynamic Font (SoftClip)"
{
Properties
{
_MainTex ("Alpha (A)", 2D) = "white" {}
}
SubShader
{
LOD 200
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
Offset -1, -1
Fog { Mode Off }
//ColorMask RGB
AlphaTest Greater .01
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
float4 _MainTex_ST;
float2 _ClipSharpness = float2(20.0, 20.0);
struct appdata_t
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
float2 worldPos : TEXCOORD1;
};
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color;
o.texcoord = v.texcoord;
o.worldPos = TRANSFORM_TEX(v.vertex.xy, _MainTex);
return o;
}
half4 frag (v2f IN) : COLOR
{
// Softness factor
float2 factor = (float2(1.0, 1.0) - abs(IN.worldPos)) * _ClipSharpness;
// Sample the texture
half4 col = IN.color;
col.a *= tex2D(_MainTex, IN.texcoord).a;
col.a *= clamp( min(factor.x, factor.y), 0.0, 1.0);
return col;
}
ENDCG
}
}
SubShader
{
LOD 100
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
Fog { Mode Off }
ColorMask RGB
AlphaTest Greater .01
Blend SrcAlpha OneMinusSrcAlpha
ColorMaterial AmbientAndDiffuse
SetTexture [_MainTex]
{
Combine Texture * Primary
}
}
}
}

@ -0,0 +1,99 @@
Shader "Unlit/Dynamic Font"
{
Properties
{
_MainTex ("Alpha (A)", 2D) = "white" {}
}
SubShader
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Cull Off
Lighting Off
ZWrite Off
Fog { Mode Off }
Offset -1, -1
AlphaTest Greater .01
Blend SrcAlpha OneMinusSrcAlpha
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
struct appdata_t
{
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
sampler2D _MainTex;
uniform float4 _MainTex_ST;
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color;
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
return o;
}
fixed4 frag (v2f i) : COLOR
{
fixed4 col = i.color;
col.a *= tex2D(_MainTex, i.texcoord).a;
return col;
}
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", texcoord
}
Pass
{
SetTexture [_MainTex]
{
constantColor [_Color] combine constant * primary, constant * texture
}
}
}
}

@ -0,0 +1,106 @@
Shader "Unlit/Masked Colored"
{
Properties
{
_MainTex ("Base (RGB) Mask (A)", 2D) = "white" {}
_Color ("Tint Color", Color) = (1,1,1,1)
}
SubShader
{
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
LOD 200
Cull Off
Lighting Off
ZWrite Off
Fog { Mode Off }
ColorMask RGB
Blend Off
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
sampler2D _MainTex;
fixed4 _Color;
struct appdata_t
{
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
float4 _MainTex_ST;
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color;
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
return o;
}
fixed4 frag (v2f i) : COLOR
{
half4 col = tex2D(_MainTex, i.texcoord) * i.color;
return half4( lerp(col.rgb, col.rgb * _Color.rgb, col.a), col.a );
}
ENDCG
}
}
SubShader
{
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
LOD 100
Cull Off
Lighting Off
ZWrite Off
Fog { Mode Off }
ColorMask RGB
AlphaTest Greater .01
Blend Off
Pass
{
ColorMaterial AmbientAndDiffuse
SetTexture [_MainTex]
{
Combine Texture * Primary
}
SetTexture [_MainTex]
{
ConstantColor [_Color]
Combine Previous * Constant
}
}
}
}

@ -0,0 +1,111 @@
Shader "Unlit/Premultiplied Colored (AlphaClip)"
{
Properties
{
_MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {}
}
SubShader
{
LOD 200
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
AlphaTest Off
Fog { Mode Off }
Offset -1, -1
ColorMask RGB
Blend One OneMinusSrcAlpha
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
float4 _MainTex_ST;
struct appdata_t
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
float2 worldPos : TEXCOORD1;
};
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color;
o.texcoord = v.texcoord;
o.worldPos = TRANSFORM_TEX(v.vertex.xy, _MainTex);
return o;
}
half4 frag (v2f IN) : COLOR
{
// Sample the texture
half4 col = tex2D(_MainTex, IN.texcoord) * IN.color;
float2 factor = abs(IN.worldPos);
float val = 1.0 - max(factor.x, factor.y);
// Option 1: 'if' statement
if (val < 0.0) col = half4(0.0, 0.0, 0.0, 0.0);
// Option 2: no 'if' statement -- may be faster on some devices
//col *= ceil(clamp(val, 0.0, 1.0));
return col;
}
ENDCG
}
}
SubShader
{
LOD 100
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
AlphaTest Off
Fog { Mode Off }
Offset -1, -1
ColorMask RGB
Blend One OneMinusSrcAlpha
ColorMaterial AmbientAndDiffuse
SetTexture [_MainTex]
{
Combine Texture * Primary
}
}
}
}

@ -0,0 +1,109 @@
Shader "Unlit/Premultiplied Colored (SoftClip)"
{
Properties
{
_MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {}
}
SubShader
{
LOD 200
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
AlphaTest Off
Fog { Mode Off }
Offset -1, -1
ColorMask RGB
Blend One OneMinusSrcAlpha
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
float4 _MainTex_ST;
float2 _ClipSharpness = float2(20.0, 20.0);
struct appdata_t
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
float2 worldPos : TEXCOORD1;
};
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color;
o.texcoord = v.texcoord;
o.worldPos = TRANSFORM_TEX(v.vertex.xy, _MainTex);
return o;
}
half4 frag (v2f IN) : COLOR
{
// Softness factor
float2 factor = (float2(1.0, 1.0) - abs(IN.worldPos)) * _ClipSharpness;
// Sample the texture
half4 col = tex2D(_MainTex, IN.texcoord) * IN.color;
float fade = clamp( min(factor.x, factor.y), 0.0, 1.0);
col.a *= fade;
col.rgb = lerp(half3(0.0, 0.0, 0.0), col.rgb, fade);
return col;
}
ENDCG
}
}
SubShader
{
LOD 100
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
AlphaTest Off
Fog { Mode Off }
Offset -1, -1
ColorMask RGB
Blend One OneMinusSrcAlpha
ColorMaterial AmbientAndDiffuse
SetTexture [_MainTex]
{
Combine Texture * Primary
}
}
}
}

@ -0,0 +1,100 @@
Shader "Unlit/Premultiplied Colored"
{
Properties
{
_MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {}
}
SubShader
{
LOD 200
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
AlphaTest Off
Fog { Mode Off }
Offset -1, -1
ColorMask RGB
Blend One OneMinusSrcAlpha
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
float4 _MainTex_ST;
struct appdata_t
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color;
o.texcoord = v.texcoord;
return o;
}
half4 frag (v2f IN) : COLOR
{
half4 col = tex2D(_MainTex, IN.texcoord) * IN.color;
//col.rgb = lerp(half3(0.0, 0.0, 0.0), col.rgb, col.a);
return col;
}
ENDCG
}
}
SubShader
{
LOD 100
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
AlphaTest Off
Fog { Mode Off }
Offset -1, -1
ColorMask RGB
Blend One OneMinusSrcAlpha
ColorMaterial AmbientAndDiffuse
SetTexture [_MainTex]
{
Combine Texture * Primary
}
}
}
}

@ -0,0 +1,110 @@
Shader "Unlit/Transparent Colored (AlphaClip)"
{
Properties
{
_MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {}
}
SubShader
{
LOD 200
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
Offset -1, -1
Fog { Mode Off }
ColorMask RGB
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
float4 _MainTex_ST;
struct appdata_t
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
float2 worldPos : TEXCOORD1;
};
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color;
o.texcoord = v.texcoord;
o.worldPos = TRANSFORM_TEX(v.vertex.xy, _MainTex);
return o;
}
half4 frag (v2f IN) : COLOR
{
// Sample the texture
half4 col = tex2D(_MainTex, IN.texcoord) * IN.color;
float2 factor = abs(IN.worldPos);
float val = 1.0 - max(factor.x, factor.y);
// Option 1: 'if' statement
if (val < 0.0) col.a = 0.0;
// Option 2: no 'if' statement -- may be faster on some devices
//col.a *= ceil(clamp(val, 0.0, 1.0));
return col;
}
ENDCG
}
}
SubShader
{
LOD 100
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
Fog { Mode Off }
ColorMask RGB
AlphaTest Greater .01
Blend SrcAlpha OneMinusSrcAlpha
ColorMaterial AmbientAndDiffuse
SetTexture [_MainTex]
{
Combine Texture * Primary
}
}
}
}

@ -0,0 +1,80 @@
Shader "Unlit/Transparent Colored (Packed) (AlphaClip)"
{
Properties
{
_MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {}
}
SubShader
{
LOD 200
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
Offset -1, -1
Fog { Mode Off }
ColorMask RGB
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
half4 _MainTex_ST;
struct appdata_t
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
float2 worldPos : TEXCOORD1;
};
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color;
o.texcoord = v.texcoord;
o.worldPos = TRANSFORM_TEX(v.vertex.xy, _MainTex);
return o;
}
half4 frag (v2f IN) : COLOR
{
half4 mask = tex2D(_MainTex, IN.texcoord);
half4 mixed = saturate(ceil(IN.color - 0.5));
half4 col = saturate((mixed * 0.51 - IN.color) / -0.49);
float2 factor = abs(IN.worldPos);
float val = 1.0 - max(factor.x, factor.y);
if (val < 0.0) col.a = 0.0;
mask *= mixed;
col.a *= mask.r + mask.g + mask.b + mask.a;
return col;
}
ENDCG
}
}
Fallback Off
}

@ -0,0 +1,80 @@
Shader "Unlit/Transparent Colored (Packed) (SoftClip)"
{
Properties
{
_MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {}
}
SubShader
{
LOD 200
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
Offset -1, -1
Fog { Mode Off }
ColorMask RGB
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
half4 _MainTex_ST;
float2 _ClipSharpness = float2(20.0, 20.0);
struct appdata_t
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
float2 worldPos : TEXCOORD1;
};
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color;
o.texcoord = v.texcoord;
o.worldPos = TRANSFORM_TEX(v.vertex.xy, _MainTex);
return o;
}
half4 frag (v2f IN) : COLOR
{
half4 mask = tex2D(_MainTex, IN.texcoord);
half4 mixed = saturate(ceil(IN.color - 0.5));
half4 col = saturate((mixed * 0.51 - IN.color) / -0.49);
float2 factor = (float2(1.0, 1.0) - abs(IN.worldPos)) * _ClipSharpness;
mask *= mixed;
col.a *= clamp( min(factor.x, factor.y), 0.0, 1.0);
col.a *= mask.r + mask.g + mask.b + mask.a;
return col;
}
ENDCG
}
}
Fallback Off
}

@ -0,0 +1,75 @@
Shader "Unlit/Transparent Colored (Packed)"
{
Properties
{
_MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {}
}
SubShader
{
LOD 200
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
Offset -1, -1
Fog { Mode Off }
ColorMask RGB
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
half4 _MainTex_ST;
struct appdata_t
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color;
o.texcoord = v.texcoord;
return o;
}
half4 frag (v2f IN) : COLOR
{
half4 mask = tex2D(_MainTex, IN.texcoord);
half4 mixed = saturate(ceil(IN.color - 0.5));
half4 col = saturate((mixed * 0.51 - IN.color) / -0.49);
mask *= mixed;
col.a *= mask.r + mask.g + mask.b + mask.a;
return col;
}
ENDCG
}
}
Fallback Off
}

@ -0,0 +1,107 @@
Shader "Unlit/Transparent Colored (SoftClip)"
{
Properties
{
_MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {}
}
SubShader
{
LOD 200
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
Offset -1, -1
Fog { Mode Off }
ColorMask RGB
AlphaTest Greater .01
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
float4 _MainTex_ST;
float2 _ClipSharpness = float2(20.0, 20.0);
struct appdata_t
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
float2 worldPos : TEXCOORD1;
};
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.color = v.color;
o.texcoord = v.texcoord;
o.worldPos = TRANSFORM_TEX(v.vertex.xy, _MainTex);
return o;
}
half4 frag (v2f IN) : COLOR
{
// Softness factor
float2 factor = (float2(1.0, 1.0) - abs(IN.worldPos)) * _ClipSharpness;
// Sample the texture
half4 col = tex2D(_MainTex, IN.texcoord) * IN.color;
col.a *= clamp( min(factor.x, factor.y), 0.0, 1.0);
return col;
}
ENDCG
}
}
SubShader
{
LOD 100
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Pass
{
Cull Off
Lighting Off
ZWrite Off
Fog { Mode Off }
ColorMask RGB
AlphaTest Greater .01
Blend SrcAlpha OneMinusSrcAlpha
ColorMaterial AmbientAndDiffuse
SetTexture [_MainTex]
{
Combine Texture * Primary
}
}
}
}

@ -0,0 +1,68 @@
Shader "Unlit/Transparent Colored"
{
Properties
{
_MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {}
}
SubShader
{
LOD 100
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Cull Off
Lighting Off
ZWrite Off
Fog { Mode Off }
Offset -1, -1
Blend SrcAlpha OneMinusSrcAlpha
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata_t
{
float4 vertex : POSITION;
float2 texcoord : TEXCOORD0;
fixed4 color : COLOR;
};
struct v2f
{
float4 vertex : SV_POSITION;
half2 texcoord : TEXCOORD0;
fixed4 color : COLOR;
};
sampler2D _MainTex;
float4 _MainTex_ST;
v2f vert (appdata_t v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
o.color = v.color;
return o;
}
fixed4 frag (v2f i) : COLOR
{
fixed4 col = tex2D(_MainTex, i.texcoord) * i.color;
return col;
}
ENDCG
}
}
}

@ -1,19 +1,24 @@
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" PreferredExecutionTarget="MonoDevelop.Default" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets\Scripts\Assembly-CSharp\ImageObject.cs">
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets\Scripts\Assembly-CSharp\UnityFile.cs">
<Files>
<File FileName="Assets\Scripts\Assembly-CSharp\SceneManager.cs" Line="1" Column="1" />
<File FileName="Assets\Scripts\Assembly-CSharp\CreateSprite.cs" Line="1" Column="1" />
<File FileName="Assets\Scripts\Assembly-CSharp\UnityFile.cs" Line="191" Column="27" />
<File FileName="Assets\Scripts\Assembly-CSharp\UnityFileLoader.cs" Line="61" Column="22" />
<File FileName="Assets\Scripts\Assembly-CSharp\TitleWindow.cs" Line="1" Column="1" />
<File FileName="Assets\Scripts\Assembly-CSharp\BaseWindow.cs" Line="1" Column="1" />
<File FileName="Assets\Scripts\Assembly-CSharp\AdventureMenuWindow.cs" Line="1" Column="1" />
<File FileName="Assets\Scripts\Assembly-CSharp\ImageObject.cs" Line="194" Column="55" />
<File FileName="Assets\Scripts\Assembly-CSharp\UnitySprite.cs" Line="1" Column="1" />
<File FileName="Assets\Scripts\Assembly-CSharp\UIActionButton.cs" Line="1" Column="1" />
<File FileName="Assets\Scripts\Assembly-CSharp\Qoo\Input\KsInput.cs" Line="1" Column="1" />
<File FileName="Assets\Scripts\Assembly-CSharp\GraphicManager.cs" Line="1" Column="1" />
<File FileName="Assets\Scripts\Assembly-CSharp\Pathing.cs" Line="1" Column="1" />
<File FileName="Assets\Scripts\Assembly-CSharp\EffectManager.cs" Line="1" Column="1" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
<BreakpointStore>
<Breakpoint enabled="false" file="C:\Users\lovel\Documents\unityshinsoubanalice\Assets\Scripts\Assembly-CSharp\MsgWnd.cs" line="316" />
<Breakpoint enabled="false" file="C:\Users\lovel\Documents\unityshinsoubanalice\Assets\Scripts\Assembly-CSharp\Qoo\Ks\KsScene.cs" line="846" />
<Breakpoint enabled="false" file="C:\Users\lovel\Documents\unityshinsoubanalice\Assets\Scripts\Assembly-CSharp\Qoo\Ks\KsTagInfo_PRINT.cs" line="30" />
<Breakpoint file="C:\Users\lovel\Documents\unityshinsoubanalice\Assets\Scripts\Assembly-CSharp\Pathing.cs" line="55" />
<Breakpoint file="C:\Users\lovel\Documents\unityshinsoubanalice\Assets\Scripts\Assembly-CSharp\UnityFile.cs" line="192" />
</BreakpointStore>
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
</Properties>
Loading…
Cancel
Save