Thank you for playing! I tried several different approaches, including polygon clipping, but I needed it to work over a large terrain area, which caused a lot of lag. So I looked for a better solution and found this open-source repository: link