Draw material to render target doesn't work with post process material.

I am trying to render a material to a render target canvas. It’s a very simple post process material that renders everything with custom stencil value of 1 as white and the rest as black. Here is a picture showing what that looks like. (All of the scene has a custom stencil value of 0 except for the character model)

When I call the function render material to a render target it paints the whole render target white, instead of painting the shape of the character as shown in the image. What am I doing wrong here? and how do i get it to work?