Cutting of triangles has become more aggressive
thisnickwasfree opened this issue · 3 comments
I've noticed that in previous version some kind of filtering "not in frustum" triangles has appeared.
It works fine at fov 60 (use it in my project), but a bit worse with fov 90.
In the last version of 3DreamEngine it has become more aggressive: some tiles not drawn at the edges of the screen or right after fast camera rotation even with fov 60.
Changing self:inFrustum(cam, s.pos, s.s.boundingBox.size) to self:inFrustum(cam, s.pos, s.s.boundingBox.size * 2) fixes this problem for me.
Ouf, the latest version actually fixed the math behind it and should have improved it. I probably messed up something and will look into it.
Ok I "think" I fixed it, forgot a *2. Reopen this issue if it still occur.
I tested with every fov and a complex scene and did not see an error, but that proves nothing.
(functions.lua:461 needs to be twice as big)