If you just want to check if something is visible, you can also go with occlusion queries, as that is what they are for. I just wonder what you actually want to do with that information after you got it, as it won´t really make your AI.