Material Index pass and object index pass not working at all

My setup is fine. But why the image is black or white? Why the masking is not working?

I want the headlight to glare, so I gave it a pass of 1. But it’s not working. I also tried he material index, it’s not working either.

Because it is occluded by another object.

:pensive: Gotta try different method.