pioneerspacesim / pioneer

A game of lonely space adventure
https://pioneerspacesim.net
1.58k stars 364 forks source link

Terrain textures disappear #5806

Open SomenameIchose opened 2 months ago

SomenameIchose commented 2 months ago

Observed behaviour

When approaching the planet at a certain distance some terrain textures disappear. On a first screenshot textures are proper screenshot-20240324-215601 But at some point they(textures) start bugging like this screenshot-20240324-215625 screenshot-20240324-215536 screenshot-20240324-215524

Expected behaviour

Terrain textures should be stable and shouldn't disappear

Steps to reproduce

Fly up to critical distance to certain planets and moons (in this case it is Pallas, I also saw this bug approaching Thebe)

My pioneer version (and OS): ver 20240314 (8b6ae92) OS: Windows 10 Home Edition

My output.txt (required) and game save (optional, but recommended) output.txt save.zip

fluffyfreak commented 2 months ago

That's not rendering the patch at all it seems, almost like the culling has decided it isn't visible

fluffyfreak commented 2 months ago

I've not been able to repro' this with some quick local testing around Pallas or Thebe. I also tried with the supplied savegame.

@SomenameIchose what GPU do you have?

SomenameIchose commented 2 months ago

I've not been able to repro' this with some quick local testing around Pallas or Thebe. I also tried with the supplied savegame.

@SomenameIchose what GPU do you have? Intel(R) Pentium(R) Gold G5420 CPU @ 3.80GHz 3.79 GHz

SomenameIchose commented 2 months ago

I gave an another try to fly to Pallas but textures don't disappear this time. Maybe it happens at certain coordinates?

SomenameIchose commented 2 months ago

Yes, I tested it, they disappear at coordinates of S029°25'12 E042°42'07

pcercuei commented 1 month ago

I can reproduce, see the attached save file. Just load it in Pioneer and you should see it.

Jameson2.zip

pcercuei commented 1 month ago

Note that it happens both on my integrated Intel card and my discrete Nvidia card (with Nouveau).

fluffyfreak commented 1 month ago

This isn't a GPU/driver bug, this is CPU side terrain generation and the rendering calls itself. Can confirm that it's CPU side only so you'll see it on anything that can run it.

fluffyfreak commented 1 month ago

I can confirm that it's the Horizon Culling optimisation which is... over optimising for some reason 🤷 however nothing appears to have changed in the SSphere::HorizonCulling method in years. The only change I can see is to the centroid in GeoPatch but I don't know how that might be affecting it.

fluffyfreak commented 1 month ago

Oof nope that ain't it either, you have found me a real doozy of a bug 🤣

fluffyfreak commented 1 month ago

Ok, I might have a fix for this in the works but it's after midnight, so I'll continue another day

fluffyfreak commented 1 month ago

I've put in a first draft of a fix in #5829 which will need some serious testing.