Perspective or Resolution?
We are back! Yesterday I had to work from home which meant no work being done for project Gangan. But today I managed to look further into the perspective rendering stuff.
Last time I noticed that around 107 thousand tiles were being rendered when setting the resolution to Full HD. Imagine how many it would be on 4K or 8K resolution haha. Luckily I found a way to fix this.
I thought the problem was with the projection calculation Maybe I was using the wrong values or doing it wrong all together. Though in the end I reverted it all and set the screen bounds directly. Since I now knew that the result would have to be in meters, not in pixels. So cooking up a little calculation seems to do the job now. With the screen bounds finally properly showing up when using Full HD. Rectangles being sized correctly as well! And not thousands of tiles being rendered anymore haha.
The only caveat is that I didn’t have the time to test it on other resolutions. So the calculation is based on metersToPixels and the base resolution. And from there the correct conversion should happen. So I expect it to work just fine for the base resolutions or other ones like 4K. But I can test it later today on my way home 🙂