shader_flare.shader 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Shader "shader_flare"
  2. {
  3. Properties
  4. {
  5. _TextureSample0("Texture Sample 0", 2D) = "white" {}
  6. _Opacity("Opacity", Float) = 1
  7. _Emission("Emission", Float) = 1
  8. _Color("Color", Color) = (1,1,1,0)
  9. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  10. [HideInInspector] __dirty( "", Int ) = 1
  11. }
  12. SubShader
  13. {
  14. Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" "IsEmissive" = "true" }
  15. Cull Back
  16. CGPROGRAM
  17. #pragma target 3.0
  18. #pragma surface surf Standard alpha:fade keepalpha noshadow
  19. struct Input
  20. {
  21. float2 uv_texcoord;
  22. };
  23. uniform float4 _Color;
  24. uniform sampler2D _TextureSample0;
  25. uniform float4 _TextureSample0_ST;
  26. uniform float _Emission;
  27. uniform float _Opacity;
  28. void surf( Input i , inout SurfaceOutputStandard o )
  29. {
  30. float2 uv_TextureSample0 = i.uv_texcoord * _TextureSample0_ST.xy + _TextureSample0_ST.zw;
  31. float4 tex2DNode1 = tex2D( _TextureSample0, uv_TextureSample0 );
  32. o.Emission = ( ( _Color * tex2DNode1 ) * _Emission ).rgb;
  33. o.Alpha = ( tex2DNode1.a * _Opacity );
  34. }
  35. ENDCG
  36. }
  37. CustomEditor "ASEMaterialInspector"
  38. }