Closed Venuskan closed 1 year ago
Hey! Thank you for your collaboration!
I've checked the code for ocean sorting and there are two small issues in the implementation:
tile = tiles_w->find(a)->second
. is_ocean
should be tile->has_water()
Once I get home I will check the position code, as I don't quite remember how was tile positioning handled :thinking:
(BTW: If you have trouble running the game once compiled, the assets may be really outdated. I have uploaded new ones to the Releases/ folder so that the game can run).
There you go.
I've modified the code slightly and it should compile now. Right now due to the modifications to scene code it's not possible to get a planet to render, but this is a small change to a lua file as the vehicle spawns in the middle of space.
I'll check if the ordering is correct and it should be ready to merge :)
Testing around with renderdoc on a simple scene the amount of overdraw is not tremendous (specially looking straight down), but this does reduce it pretty much to zero. Ocean drawing first still needs to implement the check to see if the camera is above the sea, and then switch around the draw order for water and ground, but for now i'll merge this PR.
Oops I accidentally pushed some code to your fork instead of to the main repo! Sorry for that.
The tiles nearest to the player get drawn first, after the ocean