Influence of spectral filtering on the quantum nature of light