Unity5: How to draw texture additive to rendertexture?
<p>So I have a RenderTexture on which I want to draw with a "brush" texture. It's a height-map, so watherver is in the brush should be added to the value of the RenderTexture.</p>

<p>Drawing a texture to a rendertexture isn't too hard:</p>

<pre><code>RenderTexture.active = _heightMap; //the render texture to be drawn to
Rect screenRect = new Rect(x, y, width, height);
Graphics.DrawTexture(screenRect, _brush, _addBrushMaterial);
</code></pre>

<p>I think I now need a material that will add the color of the brush to me texture ("_addBrushMaterial"). However I can't find how to make it so it adds it's color. At the moment it's fragment shader simply sets the color, so that's no good, it should add it:</p>

<pre><code>float4 frag (v2f_img i) : SV_Target
{
    float4 col = tex2D(_MainTex, i.uv);
    return col * _Scale;
}
</code></pre>

<p>The documentation about this seems very limited, so any help is very much appreciated!</p>

<p>Thanks</p>