Shaders and Layers

Hi unity community,

I’m quite a beginner with Unity. I’ve been working with it for some month now and I’ve got a problem with the Unity Pro 3.5 “GlowEffect” shader I couldn’t solve by now. I know that the shader is controlled by alpha values of the textures but what I’d like to do is to limit it as well for objects on a certain layer.
What I did was create a layer called “Glow” and associated my glowing objects with it.
Now I created two cameras: The first one renders everything but the glow layer, the second one only the glow layer.
Then I placed the Glow Effect shader on the second cam, but for some reason everything starts glowing, even though the Camera Preview window shows only my glowing objects being rendered by the second camera.

Am I using the layers correctly? Or is there a better way to limit shaders but with the alpha values. I’d like to use the MotionBlur shader, too, but I want to limit it on specific objects and don’t know how. So this layer system seemed like a good starting point to me.

Thanks in advance.

Hi, I think that everything starts glowing because second camera gets image that was rendered with first camera as it is with all alpha values. You can write custom post effect that just sets alpha to zero, then attach it as last effect on first camera. With this post effect second camera will receive image with zero alphas so that glow effect will not affect all pixels from first camera.