1. svn -> git

This commit is contained in:
2017-04-12 01:23:07 +09:00
commit daaaf2997b
406 changed files with 68990 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
Shader "Destructible 2D/Gradient"
{
Properties
{
_BottomColour("Bottom Colour", Color) = (0.0, 0.0, 1.0, 1.0)
_BottomHeight("Bottom Height", Float) = 1.0
_TopColour("Top Colour", Color) = (0.0, 0.0, 0.0, 1.0)
_TopHeight("Top Height", Float) = 10.0
}
SubShader
{
Tags
{
"IgnoreProjector" = "True"
}
Pass
{
Lighting Off
Cull Off
CGPROGRAM
#pragma vertex Vert
#pragma fragment Frag
float4 _BottomColour;
float _BottomHeight;
float4 _TopColour;
float _TopHeight;
struct a2v
{
float4 vertex : POSITION;
};
struct v2f
{
float4 pos : SV_POSITION;
float height : TEXCOORD0;
};
struct f2g
{
half4 rgba : COLOR0;
};
void Vert(a2v i, out v2f o)
{
o.pos = mul(UNITY_MATRIX_MVP, i.vertex);
o.height = mul(_Object2World, i.vertex).y;
}
void Frag(v2f i, out f2g o)
{
float height01 = saturate((i.height - _BottomHeight) / (_TopHeight - _BottomHeight));
o.rgba = lerp(_BottomColour, _TopColour, height01);
}
ENDCG
} // Pass
} // SubShader
} // Shader

View File

@@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: 9d5fb8d2f8e5212489f42508dc13b450
ShaderImporter:
defaultTextures: []
userData:

View File

@@ -0,0 +1,48 @@
Shader "Destructible 2D/Vertex Colours"
{
SubShader
{
Tags
{
"IgnoreProjector" = "True"
}
Pass
{
Lighting Off
Cull Off
CGPROGRAM
#pragma vertex Vert
#pragma fragment Frag
struct a2v
{
float4 vertex : POSITION;
float4 color : COLOR;
};
struct v2f
{
float4 pos : SV_POSITION;
float4 rgba : COLOR;
};
struct f2g
{
half4 rgba : COLOR0;
};
void Vert(a2v i, out v2f o)
{
o.pos = mul(UNITY_MATRIX_MVP, i.vertex);
o.rgba = i.color;
}
void Frag(v2f i, out f2g o)
{
o.rgba = i.rgba;
}
ENDCG
} // Pass
} // SubShader
} // Shader

View File

@@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: da33f6ad62fd6c44999c7d9d96955ee3
ShaderImporter:
defaultTextures: []
userData: