Where is the x-ray option in 2.8?
If you're talking about the former Limit Selection to Visible:

It's now in the 3D view N panel > Tool tab > Brush > Options > 2D Falloff.



Or in the Properties editor > Active Tool tab > Brush > Options > 2D Falloff.