I found a block of cesium code used to calculate the horizon bounds in relation to the viewer’s camera. I have tweeked the code to draw a red rectangle over the area it calculates which you can view here:
As you can see, when you are zoomed all the way out, the entire face of the globe is covered. This is not a big deal for my use case, as I only need this calculation for when I am zoomed in over an area smaller than your average country.
My problem however is that the area that the rectangle covers is too large at any given zoom level, which causes me performance problems when using it for other things (such as using it as a bounding box for billboards). I’d like the rectangle to be about half the width / height which it currently calculates. Does anyone have any ideas on how to do this?
It can be a simple operation at the end of the rectangle calculation which simply shrinks the rectangle, I just can’t figure out how to do that.
Thank you for any help you can offer