[How to?] alpha channel from grayscale on rendertexture

Hello,
As the title says, im looking for a way to build the alpha channel from the grayscale to the rendertexture.

little inside:
I have a camera that looks on a black plane and objects(cars, people) moving between the camera and the plane.
I want to use the rendertexture of this camera as a normalmap on another plane so it will looks like a embossing.
So the rendertexture has to contain the RGB data and add the alpha from the grayscale of the RGB.

Thank you for any help !

That wasn’t enough clarification for me. Do you just need an algorithm to convert to grayscale?

Thanks for the reply,
But in the meanwhile i figured it out: the rendertexture can be altered by shaders if i apply them in the OnRenderImage().

I didn’t know how to apply shader to a rendertexture, and i also didn’t know how to make it grayscale and how to give value to the alpha channel. but i also found a solution for this somewhere in the forum.

Can you share your solution? I’m also looking to have a RenderTexture that uses the grayscale as Alpha.