Any way to do a dilation/convolve?

I’ve searched around for quite a while, through the rendering library, the GMod post-processing material shaders, etc., and I haven’t found anything resembling a way to do an image convolve.
It’s most likely the case there just isn’t a way to do it, but it’s always nice to be wrong.
Does anyone know of a way to do it? If not a general-purpose method, then at least a basic 1-pixel dilation would meet my needs: that of rendering customized crisp outlines (Here is a simulation of what that might look like. I prepared it by using a RenderScreenSpaceEffects hook to render them a flat purple color with no shading and then did a bit of GIMP work to produce a two-layer outline.)
I know that upcoming in GMod 13 is the Halo library, but the resulting effect is too soft for my tastes, I prefer my outlines to be harder and more pixelated. Being able to do the dilation manually also would give me a bit more control over the exact process of outlining things, and also open up the possibility of outlining arbitrary things, or thickening arbitrary lines.

Render targets.

you know you can alter the look and ‘feel’ of the halo effect right?

[lua]effects.halo.Add( ents, color, blurx, blury, passes, add, ignorez )[/lua]

all effect.halo.Add functions go in the “PreDrawHalos” hook

[editline]28th August 2012[/editline]

oh also the ‘ents’ argument (number 1) is a table of entities to draw the halo around.

im sure you can figure out how to use red for friendlies and red for baddies :slight_smile: [let me know if you cant]

I believe using 0 for blurx and blury would show no outline at all, as that is the only reason the outline is shown.

You usually just have to change the cull direction, increase the model size a little, and draw the model BEFORE that actual model to achieve this outline, no need for rt’s or stencils.