Fractal Softworks Forum
Starsector => Mods => Modding => Topic started by: MnHebi on July 08, 2024, 02:51:03 PM
-
So, I've been using Mesa3D to improve Starsector's performance in battle. I get up to 110 fps stable with no freezes or anything with it.
https://github.com/pal1000/mesa-dist-win is a prebuilt package of Mesa3D for Windows. You can use either msvc or mingw build, most systems should be able to run msvc just fine, if not use the mingw build.
Install anywhere you like, as long as it is not a protected system path(such as Program Files, Desktop etc). Use perappdeploy.cmd to set up usage for Starsector(select Starsector.exe), and you have to add a new Environment Variable(look up how to do this if you don't know) to make the Vulkan part work. Add new User Environment Variable called VK_ADD_DRIVER_FILES , and as value declare where lvp_icd.x86_64.json is. For example my value is G:\Utility\Mesa\x64\lvp_icd.x86_64.json
Also follow the usage instructions on how to force Mesa to use either zink or GLonD3D12 drivers: https://github.com/pal1000/mesa-dist-win?tab=readme-ov-file#desktop-opengl-drivers
Now Mesa3d should be set up, and Starsector should work with Vulkan providing you with immense performance boost in battles.
-
Nice, thanks for sharing. Will try
-
Would this help if I'm CPU limited? I only get slowdowns when I use a lot of missiles which spikes my CPU usage (Diable micro missiles, namely)
-
It should if your GPU is Vulkan capable.
-
I can't get perappdeploy.cmd to work with either the msvc or mingw version. It just opens and closes a cmd window too fast to see anything, and running as admin doesn't change anything. I have a Ryzen 5600X and a 3090, and I think I unzipped the packages in a folder that isn't a protected system path (it's in C:\RandomFolder\RandomFolder).
-
Put "cmd" into your search bar and run the .cmd via that and see what it says, you are probably getting an error.
First you put in the drive you want to access like G: , then use cd foldername like cd RandomFolder to access folders. Then when you get to the folder perappdeploy.cmd is in you can just type that in and it'll execute.
-
Thanks! I was able to get perappdeploy.cmd working by running Command Prompt as admin and then running perappdeploy.cmd from within Command Prompt. During setup I chose the x64 option and selected Yes for all the follow-up questions. Then I set up the user environment variable for Vulkan and system environment variables for GLonD3D12 and restarted my PC. After all this, I get the same performance as before when there's tons of missiles on screen so I'm thinking I either bungled the setup or this just doesn't help much when you're CPU-limited like me.
-
Well my old computer had an Ryzen 5 2600, and it gained performance with GLonD3D12. Did you set LIBGL_ALWAYS_SOFTWARE=1 environment variable?
You can also ensure it is loading Starsector with the right environment variables set by making a .cmd file. In my case I made this for running Miko's JDK23.
@set GALLIUM_DRIVER=zink
@.\Miko_Rouge.bat
-
I have an AMD laptop with a Ryzen 5800h and struggle running this game above 20 fps in big battles. I am using MIKO's JAVA 23 as well. Unfortunately, I don't have enough computer knowledge to pull this off or attempt to do it afraid I'm going to mess it up. I'm going to save this in case I turn back to this in the future, or not if I get a new PC that can run Starsector well. Thank!
-
Mesa3D is not making starsector "use" vulkan, the title is meaningless. Mesa is a driver that may implement the opengl functions used in starsector more efficiently if it is used than whatever existing default graphics driver stack the user has.
-
Zink very specifically translates OpenGL calls into Vulkan ones to utilize hardware acceleration, so in a way it is using Vulkan. GlonD3D12 does the same except it uses DirectX12. AMD quite often fumbles their OpenGL driver, and in my case the performance improvement was over 60fps in battles. Without Mesa my FPS was 40-50 at most with constant stalling every time weapons fired or a phase ship phased.
-
Zink very specifically translates OpenGL calls into Vulkan ones to utilize hardware acceleration, so in a way it is using Vulkan. GlonD3D12 does the same except it uses DirectX12. AMD quite often fumbles their OpenGL driver, and in my case the performance improvement was over 60fps in battles. Without Mesa my FPS was 40-50 at most with constant stalling every time weapons fired or a phase ship phased.
My mistake, this software is pretty convoluted and I missed reading that part of your post when I was researching it out of interest. It definitely seems like a valuable tool so thanks for posting
-
So, one user alerted me to the fact, when you do the per application deployment for Starsector, and at least when using mikohime, you gotta copy the .symlinks the per application deploy creates to the jdk-23+7\bin folder, otherwise its still running the renderer on OpenGL, but the Mesa driver instead of whatever your system provides. I did get similar performance with Vulkan(tho Vulkan speeded up the loadtime from around 15 minutes to less than 5). Found this out by using rivatuner, added an text field with <APP> as the hyperlink into the overlay and it provides the renderer info.
I'll try to see if I can find the time to edit this guide this week so it provides more steps(with pictures) so less technically inclined persons can understand how to implement it.
[attachment deleted by admin]
-
So, one user alerted me to the fact, when you do the per application deployment for Starsector, and at least when using mikohime, you gotta copy the .symlinks the per application deploy creates to the jdk-23+7\bin folder, otherwise its still running the renderer on OpenGL, but the Mesa driver instead of whatever your system provides. I did get similar performance with Vulkan(tho Vulkan speeded up the loadtime from around 15 minutes to less than 5). Found this out by using rivatuner, added an text field with <APP> as the hyperlink into the overlay and it provides the renderer info.
I'll try to see if I can find the time to edit this guide this week so it provides more steps(with pictures) so less technically inclined persons can understand how to implement it.
Thank you very much. It was very complicated.
I execute the perappdeploy.cmd. I think for opengl ES and offscreen rendering I selected no. After that I copy 8 symlink files (which was created in the Starsector folder) into jdk-23+7\bin. In the Starsector folder I created a bat file which contain:
@set VK_ADD_DRIVER_FILES=D:\Games\Mesa3D\x64\lvp_icd.x86_64.json
@set LIBGL_ALWAYS_SOFTWARE=1
@set GALLIUM_DRIVER=zink
@.\Miko_Silent.bat
I don't know the function but it seems to work? The performance is very poor in main menu, but I'm sure some settings was wrong, because I don't understand the part "how to force Mesa to use either zink or GLonD3D12" See screenshot.
My system:
Laptop 7840HS with 780M, 32GB W11.
I hope to avoid the poor AMD OpenGL performance.
Update: After I just removed the "@set LIBGL_ALWAYS_SOFTWARE=1" it seems to work fine now. No issues at the moment. Before I had 5 fps in tactical map in big battles. I will further test it.
[attachment deleted by admin]
-
I followed the instruction
But d3d12 wouldn't work, it even get as low as 15fps on main menu (from ~115) and the vsst showed that the game still use OGL to render
Zink on the otherhand did change renderer to VULKAN but the fps displayed on vsst is higher than actual in game fps, which actually had no noticeable improvement.
Idk where did i do wrong, pls help
-
Hello, I did get Star sector to run with D3D12 (I use AMD so I needed an alternative to OGL)
Base starsector couldn't even launch
Miko had like 15 FPS instead of 120+ at all time (outside of combat)
I probably messed up some part of the installation or the force d3d12 but for now ill disable it til there's a better guide for it, I don't know enough around computer and coding to find out what's wrong
Good day to you all o7
-
my peasant brain is highly intrigued, but cannot process how to make it work.