Ein Bisschen mehr Geilheit, achso und uMotion installiert
This commit is contained in:
73
3d Prototyp/Assets/UMotionEditor/Shaders/CameraLit.shader
Normal file
73
3d Prototyp/Assets/UMotionEditor/Shaders/CameraLit.shader
Normal file
@ -0,0 +1,73 @@
|
||||
Shader "UMotion Editor/Camera Lit"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color("Main Color (RGB)", color) = (1, 1, 1, 1)
|
||||
_WireColor("Wire Color (RGB) Trans (A)", color) = (0, 0, 0, 1)
|
||||
_WireSize("Wire Size", Range(0, 4)) = 0.9
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType" = "Opaque" "IgnoreProjector"="True" }
|
||||
LOD 100
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 3.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
fixed4 _Color;
|
||||
fixed4 _WireColor;
|
||||
half _WireSize;
|
||||
|
||||
struct vInput
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
half4 texcoord : TEXCOORD0;
|
||||
float3 normal : NORMAL;
|
||||
};
|
||||
|
||||
struct vOutput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
fixed3 wirecoord : TEXCOORD1;
|
||||
float3 lambert : TEXCOORD2;
|
||||
};
|
||||
|
||||
vOutput vert(vInput i)
|
||||
{
|
||||
vOutput o;
|
||||
|
||||
o.pos = UnityObjectToClipPos(i.vertex);
|
||||
|
||||
o.wirecoord = fixed3(floor(i.texcoord.x), frac(i.texcoord.x) * 10, i.texcoord.y);
|
||||
|
||||
float3 viewDir = normalize(WorldSpaceViewDir(i.vertex));
|
||||
float3 worldNormal = normalize(UnityObjectToWorldNormal(i.normal));
|
||||
o.lambert = saturate(dot(viewDir, worldNormal));
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag(vOutput i) : SV_Target
|
||||
{
|
||||
fixed4 outColor;
|
||||
outColor.rgb = i.lambert * _Color;
|
||||
outColor.a = 1.0;
|
||||
|
||||
half3 width = abs(ddx(i.wirecoord.xyz)) + abs(ddy(i.wirecoord.xyz));
|
||||
half3 smoothed = smoothstep(half3(0, 0, 0), width * _WireSize, i.wirecoord.xyz);
|
||||
half wireAlpha = min(min(smoothed.x, smoothed.y), smoothed.z);
|
||||
|
||||
return lerp(lerp(outColor, _WireColor, _WireColor.a), outColor, wireAlpha);
|
||||
}
|
||||
|
||||
ENDCG
|
||||
} //Pass
|
||||
} //SubShader
|
||||
} //Shader
|
||||
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 48874f7fa809410459fad9f55010f4bb
|
||||
timeCreated: 1473450613
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
41
3d Prototyp/Assets/UMotionEditor/Shaders/ColorUnlit.shader
Normal file
41
3d Prototyp/Assets/UMotionEditor/Shaders/ColorUnlit.shader
Normal file
@ -0,0 +1,41 @@
|
||||
Shader "UMotion Editor/Color Unlit"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
// Color property for material inspector, default to white
|
||||
_Color ("Main Color", Color) = (1,1,1,1)
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" "IgnoreProjector"="True" }
|
||||
LOD 100
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
// vertex shader
|
||||
// this time instead of using "appdata" struct, just spell inputs manually,
|
||||
// and instead of returning v2f struct, also just return a single output
|
||||
// float4 clip position
|
||||
float4 vert (float4 vertex : POSITION) : SV_POSITION
|
||||
{
|
||||
return UnityObjectToClipPos(vertex);
|
||||
}
|
||||
|
||||
// color from the material
|
||||
fixed4 _Color;
|
||||
|
||||
// pixel shader, no inputs needed
|
||||
fixed4 frag () : SV_Target
|
||||
{
|
||||
return _Color; // just return it
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d54d617e69b06a4085e3437d19a8ec1
|
||||
timeCreated: 1473578258
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,43 @@
|
||||
Shader "UMotion Editor/Color Unlit Transparent"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
// Color property for material inspector, default to white
|
||||
_Color ("Main Color", Color) = (1,1,1,1)
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Transparent" "IgnoreProjector"="True" }
|
||||
LOD 100
|
||||
ZWrite Off
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
// vertex shader
|
||||
// this time instead of using "appdata" struct, just spell inputs manually,
|
||||
// and instead of returning v2f struct, also just return a single output
|
||||
// float4 clip position
|
||||
float4 vert (float4 vertex : POSITION) : SV_POSITION
|
||||
{
|
||||
return UnityObjectToClipPos(vertex);
|
||||
}
|
||||
|
||||
// color from the material
|
||||
fixed4 _Color;
|
||||
|
||||
// pixel shader, no inputs needed
|
||||
fixed4 frag () : SV_Target
|
||||
{
|
||||
return _Color; // just return it
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ffd3c4e17a9e1d54ba9f7ca169a4b98f
|
||||
timeCreated: 1503310892
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,70 @@
|
||||
Shader "UMotion Editor/Unlit Dashed Line"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color("Line Color (RGB) Trans (A)", color) = (0, 0, 0, 1)
|
||||
_Thickness("Line Thikness", Range(0, 4)) = 0.9
|
||||
_DashFrequency("Dash Frequency", Range(0, 150)) = 100
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags {"Queue"="Transparent" "RenderType"="Transparent" "IgnoreProjector"="True" "DisableBatching"="True" }
|
||||
LOD 100
|
||||
|
||||
ZWrite Off
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
Cull Off
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 3.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
fixed4 _Color;
|
||||
half _Thickness;
|
||||
half _DashFrequency;
|
||||
|
||||
struct vInput
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
half4 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct vOutput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
vOutput vert(vInput i)
|
||||
{
|
||||
vOutput o;
|
||||
|
||||
o.pos = UnityObjectToClipPos(i.vertex);
|
||||
|
||||
o.uv = i.texcoord.xy;
|
||||
o.uv.x *= length(float3(unity_ObjectToWorld[0].z, unity_ObjectToWorld[1].z, unity_ObjectToWorld[2].z));
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag(vOutput i) : SV_Target
|
||||
{
|
||||
half2 mass = half2(sin(i.uv.x * _DashFrequency), i.uv.y);
|
||||
|
||||
half2 width = abs(ddx(mass)) + abs(ddy(mass));
|
||||
half2 smoothed = smoothstep(half2(0, 0), width * _Thickness, mass.xy);
|
||||
half alpha = max(smoothed.x, smoothed.y);
|
||||
|
||||
return fixed4(_Color.x, _Color.y, _Color.z, 1 - alpha);
|
||||
}
|
||||
|
||||
ENDCG
|
||||
} //Pass
|
||||
} //SubShader
|
||||
} //Shader
|
||||
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d57a3d80d6b9c334692747b789c7d8d7
|
||||
timeCreated: 1436426827
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
63
3d Prototyp/Assets/UMotionEditor/Shaders/UnlitLine.shader
Normal file
63
3d Prototyp/Assets/UMotionEditor/Shaders/UnlitLine.shader
Normal file
@ -0,0 +1,63 @@
|
||||
Shader "UMotion Editor/Unlit Line"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color("Line Color (RGB) Trans (A)", color) = (0, 0, 0, 1)
|
||||
_Thickness("Line Thikness", Range(0, 4)) = 0.9
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags {"Queue"="Transparent" "RenderType"="Transparent" "IgnoreProjector"="True" }
|
||||
LOD 100
|
||||
|
||||
ZWrite Off
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
Cull Off
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 3.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
fixed4 _Color;
|
||||
half _Thickness;
|
||||
|
||||
struct vInput
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
half4 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct vOutput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float uv_y : TEXCOORD0;
|
||||
};
|
||||
|
||||
vOutput vert(vInput i)
|
||||
{
|
||||
vOutput o;
|
||||
|
||||
o.pos = UnityObjectToClipPos(i.vertex);
|
||||
o.uv_y = i.texcoord.y;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag(vOutput i) : SV_Target
|
||||
{
|
||||
half width = abs(ddx(i.uv_y)) + abs(ddy(i.uv_y));
|
||||
half alpha = smoothstep(0, width * _Thickness, i.uv_y);
|
||||
|
||||
return fixed4(_Color.x, _Color.y, _Color.z, 1 - alpha);
|
||||
}
|
||||
|
||||
ENDCG
|
||||
} //Pass
|
||||
} //SubShader
|
||||
} //Shader
|
||||
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b514aec5044c41141ac3b62eca518b25
|
||||
timeCreated: 1436426827
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,32 @@
|
||||
// Source: http://wiki.unity3d.com/index.php/VertexColorUnlit
|
||||
Shader "UMotion Editor/Vertex Color Unlit"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex ("Texture", 2D) = "white" {}
|
||||
}
|
||||
|
||||
Category
|
||||
{
|
||||
Tags { "RenderType"="Opaque" "IgnoreProjector"="True" }
|
||||
Lighting Off
|
||||
|
||||
BindChannels
|
||||
{
|
||||
Bind "Color", color
|
||||
Bind "Vertex", vertex
|
||||
Bind "TexCoord", texcoord
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Pass
|
||||
{
|
||||
SetTexture [_MainTex]
|
||||
{
|
||||
Combine texture * primary DOUBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7bb4c2b089bb2f841bb905642a28daad
|
||||
timeCreated: 1473539026
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
65
3d Prototyp/Assets/UMotionEditor/Shaders/WiresOnly.shader
Normal file
65
3d Prototyp/Assets/UMotionEditor/Shaders/WiresOnly.shader
Normal file
@ -0,0 +1,65 @@
|
||||
Shader "UMotion Editor/Wires Only"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color("Main Color (RGB)", color) = (1, 1, 1, 1)
|
||||
_Size("Wire Size", Range(0, 4)) = 0.9
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags {"Queue"="Transparent" "RenderType"="Transparent" "IgnoreProjector"="True" }
|
||||
LOD 100
|
||||
|
||||
ZWrite Off
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
Cull Off
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 3.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
fixed4 _Color;
|
||||
half _Size;
|
||||
|
||||
struct vInput
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
half4 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct vOutput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
fixed3 wirecoord : TEXCOORD1;
|
||||
};
|
||||
|
||||
vOutput vert(vInput i)
|
||||
{
|
||||
vOutput o;
|
||||
|
||||
o.pos = UnityObjectToClipPos(i.vertex);
|
||||
|
||||
o.wirecoord = fixed3(floor(i.texcoord.x), frac(i.texcoord.x) * 10, i.texcoord.y);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag(vOutput i) : SV_Target
|
||||
{
|
||||
half3 width = abs(ddx(i.wirecoord.xyz)) + abs(ddy(i.wirecoord.xyz));
|
||||
half3 smoothed = smoothstep(half3(0, 0, 0), width * _Size, i.wirecoord.xyz);
|
||||
half wireAlpha = min(min(smoothed.x, smoothed.y), smoothed.z);
|
||||
|
||||
return fixed4(_Color.xyz, 1 - wireAlpha);
|
||||
}
|
||||
|
||||
ENDCG
|
||||
} //Pass
|
||||
} //SubShader
|
||||
} //Shader
|
||||
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a326767bf949111429490e01d3a59d11
|
||||
timeCreated: 1521051594
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user