2394425147 / LC_CullFactory

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PortalOcclusionCulling

NilaierMusic opened this issue · comments

Either PortalOcclusionCulling doesn't produce any logs or it doesn't work entirely. I mostly see the same amount of fps (or even worse) on the surface of the moon, but in a facility it may or may not be around +15 fps. Hard to tell if PortalOcclusionCulling is working, since it may also not take Update frequency into consideration.

Nologsforportalocclusion.1.mp4

It does work for me, as using a free cam mod will show the culling. No errors spam either, and I notice a big performance boost. So perhaps another mod or config issue is to blame.

(It also works on most custom interiors)

Okay, i've tested it with freecam mod and it does look like it culls rooms indeed. Still doesn't cull entire exterior, doors, scrap, monsters, smoke and landmines, but better than nothing. Logs are still empty of any debug information related to culling with PortalOcclusionCulling, but this is dev's decision to add them or not, so i'm closing this issue.

Currently, the portal occlusion culling implementation ignores the update rate, since it works on all cameras separately. It could be made to respect it, but personally I'm inclined to think that wouldn't have much of a benefit, and it would also contribute to inconsistent frametimes, as well as making pop-in visible. The fact that it runs the culling every frame also means that printing information about the culling would be ridiculously spammy to the point of being impractical.

However, if the culling is enabled and you see it print messages during landing on the moon like

Preparing portal information for the dungeon took #.###ms
Preparing tile information for the dungeon took #.###ms

you can be pretty sure that the culling is working if there is no error spam. All tiles in the interior are invisible by default, and only made visible based on what each camera can see, so you should see holes in the world or objects popping in and out if it isn't working correctly.

The framerate gain will depend a lot on the interior size, for smaller moons like Experimentation, it may result in no gain at all.