Compact photonic spin filters