Rather than do it in post, you can do it on a per-material basis.
Ideally, I’d do this in post, but I feel that the best way to do this would require a 24-bit buffer that can be drawn into in the same manner as other scene textures (e.g. diffuse), but this feature is not available in UE4 unless you want to add it yourself.