mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
Play around more with text rendering
This commit is contained in:
51
Assets/Shaders/TMPBlit.shader
Normal file
51
Assets/Shaders/TMPBlit.shader
Normal file
@ -0,0 +1,51 @@
|
||||
Shader "ConformalDecals/TMP_Blit"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex("_MainTex (RGB spec(A))", 2D) = "white" {}
|
||||
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "Queue" = "Transparent" }
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
|
||||
Pass
|
||||
{
|
||||
Blend One One
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
sampler2D _MainTex;
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "Lighting.cginc"
|
||||
#include "AutoLight.cginc"
|
||||
|
||||
struct v2f {
|
||||
float4 pos : SV_POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
v2f vert(float4 vertex : POSITION, float2 uv : TEXCOORD0) {
|
||||
v2f o;
|
||||
o.pos = UnityObjectToClipPos(vertex);
|
||||
o.uv = uv;
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target {
|
||||
fixed4 c = 0;
|
||||
|
||||
c.r = tex2D(_MainTex,(i.uv)).a;
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user