Do you have access for any gbuffer data?
No, as I said no directX API or other raw 3D / GPU instructions. Only (repeated for the 3rd time now):
- Camera world position
- Camera direction
- Camera FOV
- 2 Box corner world coordinates (left-bottom-front, right-top-back)
plus the mentioned functions to calculate the distance and view angle to a given world space point.
Is it really that hard?