Created
October 19, 2018 11:57
-
-
Save Makizemi/b51382795f17234adb18bccc2b430f38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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