GlowCompose.shader 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
  2. Shader "Hidden/GlowCompose" {
  3. Properties {
  4. _Color ("Glow Amount", Color) = (1,1,1,1)
  5. _MainTex ("", 2D) = "white" {}
  6. }
  7. Category {
  8. ZTest Always Cull Off ZWrite Off Fog { Mode Off }
  9. Blend One One
  10. Subshader {
  11. Pass {
  12. CGPROGRAM
  13. #pragma vertex vert
  14. #pragma fragment frag
  15. #pragma fragmentoption ARB_precision_hint_fastest
  16. #include "UnityCG.cginc"
  17. struct v2f {
  18. float4 pos : POSITION;
  19. half2 uv : TEXCOORD0;
  20. };
  21. float4 _MainTex_TexelSize;
  22. float4 _BlurOffsets;
  23. v2f vert (appdata_img v)
  24. {
  25. v2f o;
  26. o.pos = UnityObjectToClipPos (v.vertex);
  27. o.uv = MultiplyUV (UNITY_MATRIX_TEXTURE0, v.texcoord.xy);
  28. return o;
  29. }
  30. sampler2D _MainTex;
  31. fixed4 _Color;
  32. fixed4 frag( v2f i ) : COLOR
  33. {
  34. return 2.0f * _Color * tex2D( _MainTex, i.uv );
  35. }
  36. ENDCG
  37. }
  38. }
  39. SubShader {
  40. Pass {
  41. SetTexture [_MainTex] {constantColor [_Color] combine constant * texture DOUBLE}
  42. }
  43. }
  44. }
  45. Fallback off
  46. }