GLSL - Merge two textures
The simplest solution would be just a multiplication, which would give black edges:

combinedColor = sceneColor * edgeRGB.r;


For more control I would suggest something very similar to what @PaulHK proposed in the comments:

float opacity = maxEdgeOpacity * (1. - edgeRGB.r);
combinedColor = mix(sceneColor, edgeColor, opacity);


edgeColor is the desired edge color and maxEdgeOpacity is meant to be a parameter between 0 (no edges at all) and 1 (opaque edges), that you both choose to your liking.