You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.2 KiB
63 lines
1.2 KiB
Shader "UltraCombos/Frozen/Unlit/Texture"
|
|
{
|
|
Properties
|
|
{
|
|
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
|
|
_Color("Color",Color) = (1,1,1,1)
|
|
[Toggle] _isGamma("is Gamma", Float) = 0
|
|
}
|
|
SubShader
|
|
{
|
|
//Tags { "RenderType"="Opaque" }
|
|
Tags{ "Queue" = "Transparent" "RenderType" = "Transparent" "IgnoreProjector" = "True" }
|
|
LOD 100
|
|
ZWrite Off
|
|
Cull off
|
|
// Blend SrcAlpha OneMinusSrcAlpha
|
|
//Blend One OneMinusSrcAlpha
|
|
Blend SrcAlpha OneMinusSrcAlpha, Zero One
|
|
|
|
Pass
|
|
{
|
|
CGPROGRAM
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
#include "UnityCG.cginc"
|
|
|
|
struct appdata
|
|
{
|
|
float4 vertex : POSITION;
|
|
float2 uv : TEXCOORD0;
|
|
};
|
|
|
|
struct v2f
|
|
{
|
|
float2 uv : TEXCOORD0;
|
|
float4 vertex : SV_POSITION;
|
|
};
|
|
|
|
sampler2D _MainTex;
|
|
float4 _MainTex_ST;
|
|
float4 _Color;
|
|
float _Rate;
|
|
float _isGamma;
|
|
|
|
v2f vert (appdata v)
|
|
{
|
|
v2f o;
|
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
|
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
|
return o;
|
|
}
|
|
|
|
fixed4 frag (v2f i) : SV_Target
|
|
{
|
|
fixed4 frag_color = tex2D(_MainTex, i.uv);
|
|
frag_color.rgb = lerp(frag_color.rgb, GammaToLinearSpace(frag_color.rgb), _isGamma);
|
|
return frag_color * _Color;
|
|
}
|
|
ENDCG
|
|
}
|
|
}
|
|
}
|
|
|