I found an old message from Aras referring to Unity 1.5 and how transparent shaders would not write to the alpha channel and hence would not affect glow. Unfortunatly, I guess something must have changed along the way because they certainly seem to be glowing for me.
Anyway, I’ve been using a custom shader from the Wiki, which I think was called Unlit. I’ve adapted that to use alpha masking, and this doesn’t glow because there’s no blending, just masking. However, I need some alpha transparency in the scene too, and I’d like to keep it consistent with the other materials, so I’d like to adapt the unlit shader to use alpha transparency, but not have any effect on bloom.
I don’t need someone to do it for me, but a finger pointing in the right direction would be a big help.
For reference, here’s the original shader:
Shader "Custom/Unlit" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
}
Category {
Lighting Off
ZWrite On
Cull Back
SubShader {
Pass {
SetTexture [_MainTex] {
constantColor [_Color]
Combine texture * constant, texture * constant
}
}
}
}
}
To use alpha masking, I just changed it to:
Shader "Custom/UnlitAlpha" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
}
Category {
Alphatest Greater [_Cutoff]
AlphaToMask True
ColorMask RGB
Lighting Off
ZWrite On
Cull Back
SubShader {
Pass {
SetTexture [_MainTex] {
constantColor [_Color]
Combine texture * constant, texture * constant
}
}
}
}
}
I’m wondering if ColorMask might be the key. Does that designate which channels are written to?