I have this simple shader:
Shader "Swirly Glow Outline"
{
Properties
{
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader
{
Tags
{
"RenderType" = "Transparent"
"Queue" = "Transparent"
}
Lighting Off
ZWrite Off
Cull Off
Blend One One
CGPROGRAM
#pragma target 3.0
#pragma surface surf BlinnPhong vertex:vert alpha
#include "UnityCG.cginc"
sampler2D _MainTex;
float4 _Color;
void vert (inout appdata_full v)
{
v.texcoord = float4(sin(_Time.x), _Time.x, 0, 0)*1.5;
}
struct Input
{
float2 uv_MainTex;
float4 color:COLOR;
float4 screenPos;
};
void surf (Input IN, inout SurfaceOutput o)
{
IN.uv_MainTex += IN.screenPos*4;
half tex = tex2D(_MainTex, IN.uv_MainTex).r;
o.Albedo = _Color.rgb;
o.Alpha = 1;
}
ENDCG
}
Fallback "Particles/Additive"
}
which should result in additive blended, but for some reason shows up as normal blending, like so:
The yellow outline shape should be additive, but it’s not. I’m probably missing something really obvious, but I’m damned if I can see it. Can anyone shed some light on this?