Skip to content

Instantly share code, notes, and snippets.

@Makizemi
Created October 19, 2018 11:57
Show Gist options
  • Save Makizemi/b51382795f17234adb18bccc2b430f38 to your computer and use it in GitHub Desktop.
Save Makizemi/b51382795f17234adb18bccc2b430f38 to your computer and use it in GitHub Desktop.
Shader "CustomParticleShader"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
}
SubShader
{
Tags{ "RenderType" = "Transparent" "Queue" = "Transparent" }
CGPROGRAM
#pragma surface surf Standard fullforwardshadows alpha:fade
#pragma target 3.0
sampler2D _MainTex;
struct Input
{
float2 uv_MainTex;
float4 color:COLOR;
};
fixed4 _Color;
void surf (Input IN, inout SurfaceOutputStandard o)
{
fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = c.rgb * IN.color.rgb;
o.Alpha = c.a * IN.color.a;
}
ENDCG
}
FallBack "Diffuse"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment