ThePinkPanzer / Godherja-Github-Version

The Github repository for Godherja, giving another facet for users to download versions of the mod as well as serve as our main error reporting channel
7 stars 3 forks source link

Linux: FPS always lower than 5 with Vulkan, and flatmap is completely black with OpenGL #519

Open Karnor opened 1 year ago

Karnor commented 1 year ago

Linux os Ubuntu 21.10 with NVidia 1080Ti, all software and drivers up to date.

The Vulkan renderer runs extremely slow, never getting above 5 and I'm being very generous saying 5.

The OpenGL renderer presents a completely black flatmap with icons on top. The Royal Court is just a blur, akin to being way too close to the spotlights at a gig or floodlights at a football match, just a couple of huge halos in an otherwise black space, and I do not even know how to describe the crazy effect the drifting fog has when I back out to the save/load/exit game menu.

terrapass commented 1 year ago

Hello. Sorry to hear you're having such severe performance problems on Linux. I assume you're playing the latest version of the mod from Steam Workshop? And, just in case, if you have an integrated GPU in addition to your NVidia card, could you confirm in the game's graphics settings that your NVidia 1080Ti is selected when you run with Vulkan renderer?

I'm afraid OpenGL mode not working is expected, because starting with CK3 v1.8.0 (Robe), due to a combination of several factors, we have stopped investing development time into maintaining GLSL code for our shaders, causing them to no longer compile in OpenGL mode, which is why you're experiencing broken map and RC graphics with OpenGL.

As for Vulkan, 5 FPS indeed sounds anomalously slow for your hardware. What FPS do you typically get in vanilla Crusader Kings III or with other mods, with Vulkan and with OpenGL?

To confirm if our custom shaders are primarily to blame, could you try removing gfx/FX folder from the directory where Godherja is installed and seeing if it brings your FPS more in line with vanilla on Vulkan? (For Steam Workshop version Godherja should be at steamapps/workshop/content/1158310/2326030123 within your Steam library folder.) This will make the mod use vanilla shaders, which should in theory remove the bulk of Godherja's added graphics performance costs. Additionally, this will temporarily make OpenGL mode work, if you choose to run the game in it.

Thinking about this a bit more, there might also be a couple of things to try narrowing down the issue before removing the entire gfx/FX folder, if you'd like to try them:

  1. See if deleting just gfx/FX/jomini/restorescene.shader has any significant effect on Vulkan FPS for you.

  2. Run the game in debug mode (-debug_mode -develop or a corresponding button in the launcher), open the console with ~ and execute shader_debug GH_FORCE_DISABLE_DYNAMIC_TERRAIN console command - the game will freeze for some time as it recompiles the shaders; after it unfreezes, see if your FPS improves.

terrapass commented 1 year ago

I've taken some time to make our shaders compile as GLSL, so OpenGL compatibility on Linux should be restored in v0.3 (Rituals).

@Karnor In case you're still interested in running the current v0.2.8.02 version of the mod on Linux in OpenGL mode, please try taking the files from gh_v0.2.8.02_github_519.zip and putting them in your mod directory, overwriting files with the same name.

Karnor commented 1 year ago

Both Vulkan and OpenGL give me very high FPS though it varies depending where in CK3 I am at the time as some areas are way slower then others but still very acceptable.

That's the case for vanilla and most mods.

I'll try to get some time to test your mod in the next week but nudge me on discord if I forget now I dox'd myself lol

ThatOneGuy42 commented 1 year ago

Please let us know if the 0.3 update performs better for you