Void Destroyer 2

Void Destroyer 2

评价数不足
Performance hacks and tweaks
由 Sayonara 制作
Are you stuck with a low-performance graphics card, but still want your fix of Void Destroyer?
Or your high-end GPU isn't getting the performance you'd expect from it?
Here are some hacks I discovered recently to boost FPS in Void Destroyer 2.
   
奖励
收藏
已收藏
取消收藏
Disclaimers
This is a collection of hacks I have come up with for improving performance in Void Destroyer 2, especially on low-end systems. I discovered them while stuck with a low-end laptop for a while, but some of the tweaks can also affect performance of high-end GPUs, especially if you're running at 4k resolution.

Before we start: I can't promise that these hacks will work on your system/GPU. In addition, some of these involve messing around with the game files, and it is possible you may mess up your installation so that the game won't start. If this happens, you can fix it using the 'Properties -> Local Files -> Verify Integrity of game files" command from within Steam (or as a last resort, uninstalling and reinstalling).

This will NOT affect your save games in any way (unless you for some reason manually delete them while browsing the game files... but why would you do that?!).
0) Adjust your options first
When using these tweaks, you should keep track of your actual performance so you can tell whether they are helping or not. There is a frame-rate counter available in-game by pressing Ctrl+Alt+F8. Make sure you actually go into game and fly your ship around; the frame-rate performance you see in the main menu or inside a space station are no indication of what you'll get in-game.

Before messing with the game files, make sure you've done the obvious and adjusted the basic settings: lower the resolution; try full-screen and windowed mode and see if makes a difference; turn off toon shading and edge highlighting, FSAA, and SSAO; turn down / off any other game options that seem performance-related. (In particular, turn off the 'Space Cloud (NOISE)' option under Gameplay - General.)

If your video card has a settings program (eg Nvidia Settings), check the settings that are applied there (both global settings and individual game profiles, if your settings program has that option), and make sure they are turned to the best performance settings, and not set to override game settings (such as forcing antialiasing on).

Relevant forum thread to read: https://psteamcommunity.yuanyoumao.com/app/369530/discussions/6/350542145709912119/
0.1) Use an alternate skybox
Update - Feb 2020: A recent patch has fixed the performance of the default skybox, so this is likely to no longer help with performance. However, feel free to try it just in case - perhaps there's a few rare cases where it might help.

This is likely to help performance on all but the most powerful GPUs. Even on my reasonably powerful (though slightly older) GPU, this made the difference between 20fps and 50fps.

The default 'skybox' (background with space and stars) that you see while flying through space, is drawn using a GPU fragment shader program to calculate a fractal image. While it looks very pretty, it takes a lot of calculation, which is bad for performance on older or lower-spec graphics chips - or even high-end cards, if you're running at high resolution.

If you're continuing a save from a different PC, or your game performance is just good enough to play through the intro and get to a station, but you really wish it was better (or that you could increase the screen resolution you play at), try going to a station, and in the 'other upgrades' menu, buy one of the skybox packs that you like the look of.
1) Completely remove edge-highlighting shader
Although you can turn off most edge-highlighting from the game options menu, the target selection display has an always-active edge highlight in blue, both in the HUD and in the lower-right box in tactical view. On some low-end cards, this can cause a significant performance hit (seen on Intel HD 515, for example). However, this does not appear to make a noticeable difference on a higher-performance video card (so probably most Nvidia and AMD cards, though I haven't tested much).

WARNING: This involves messing with game files. Be careful, and if you get in trouble use the 'verify game install' option to restore to normal state.

Lesser warning: Disabling the edge highlighting can make the HUD more confusing, as the target display will look the same as any other ship.


  1. Go to your Void Destroyer 2 install dir. Typically it's c:\Program Files (x86)\Steam\SteamApps\Common\Void Destroyer 2, but it's usually easier to use Steam's "browse local files" option.
  2. Within the game directory, go to the Media\materials\programs directory. You should see a list of files, most of them ending with ".hlsl".
  3. Find the two files, "ToonEdge.hlsl' and "ToonEdgeAlpha.hlsl". We want to prevent the game from loading these, which will disable all edge highlighting.
  4. Rename those files to something else: I recommend adding "_d_" (for 'disabled') to the start of their names, that way you can easily see them in the list, and rename them back later if you need to.
  5. Launch the game. You should see the edge highlighting for targets is no longer present, and if you're lucky, your FPS has improved.
2a) Replace fractal skybox shader with a gradient
UPDATE - Feb 2020 - Chaosavy (game's dev) has released a patch which fixes the performance of the default skybox - at least for desktop GPUs at high-resolution; I haven't yet tested it on my laptop. Chances are that 2a and 2b are now not necessary - however, I will leave them in the guide for reference, in case anybody wants to experiment with replacing the shaders to see what happens.

Original text continues:

As mentioned earlier, the default space background is generated in real-time using a shader program in the GPU. This hack replaces that shader with a different one that generates a simple gradient from black horizon fading to colours above and below. If you are starting a new game and the performance makes it impossible to play, this hack may get you going - I was able to improve from 1 (one!) frame per second up to 30-40fps on an Intel HD515 laptop.

(One of these shaders is also used for the 'Space Cloud (NOISE)' gameplay option; after this hack, the 'space clouds' will be replaced by a haze that grows thicker the higher you tilt your view - so you may want to turn that option off when using this.)

    Create gradient shader files
  1. First we need to create the alternate shaders that we're going to use. Go to the game's install folder, then create the following subdirectories: Mod\Media\materials\programs

  2. In that directory, create the following two files. They should be plain text files, but named with ".hlsl" extension - make sure it's not ".hlsl.txt". You can use any text editor to paste the contents into them. (Note: the two files are very similar, but not identical! Make sure you paste the correct contents into each file.)
    spacescape_noise_hlsl_fbm_fp.hlsl
    struct PS_INPUT {float3 vertexPos : TEXCOORD;}; float3 innerColor; float3 outerColor; float ditherAmt; float gain; float hdrMultiplier; float hdrPowerAmt; float lacunarity; float noiseScale; float powerAmt; float shelfAmt; int octaves; float4 main(PS_INPUT input) : COLOR { float foo = ditherAmt + gain + hdrMultiplier + hdrPowerAmt + lacunarity + noiseScale + powerAmt + shelfAmt + octaves; foo /= 131072; float3 v = normalize(input.vertexPos); return float4(lerp(outerColor, innerColor, v.y + foo) * hdrMultiplier, 1.0); }
    spacescape_noise_hlsl_ridged_fp.hlsl
    struct PS_INPUT {float3 vertexPos : TEXCOORD;}; float3 innerColor; float3 outerColor; float ditherAmt; float gain; float hdrMultiplier; float hdrPowerAmt; float lacunarity; float noiseScale; float offset; float powerAmt; float shelfAmt; int octaves; float4 main(PS_INPUT input) : COLOR { float foo = ditherAmt + gain + hdrMultiplier + hdrPowerAmt + lacunarity + noiseScale + offset + powerAmt + shelfAmt + octaves; foo /= 131072; float3 v = normalize(input.vertexPos); return float4(lerp(outerColor, innerColor, -v.y + foo) * hdrMultiplier, 1.0); }
    Disable the original shaders
  3. I'm not sure if this is a bug, but the game will not read the new shaders from the 'Mod' directory unless the original shader files are missing. These files are found in the game's install dir, under Media\materials\Programs. (Note: this is almost the same as the directory we put the new shaders in, but without the 'Mod\' at the start.) Go and locate the 'spacescape_noise_hlsl_...' files in this directory.

  4. There will be four of the spacescape_noise_... files, but you only need to disable two: 'spacescape_noise_hlsl_fbm_fp.hlsl' and 'spacescape_noise_hlsl_ridged_fp.hlsl'. I recommend renaming them to add '_d_' to the start of the name (indicating 'disabled'), so that you can easily spot them and rename the back later if you need to.

  5. Finally, go to the main game install directory, and look for a file named 'VD2Shader.cache'. This is the cache of compiled shaders for the game; you need to delete it to force the game to recompile them using the new version we just added.

  6. Launch the game - it will likely take a little longer than usual to start, due to recompiling all the shaders. You should now find that the default sky background is a simple gradient, with black at the horizon, and your frame rate should be much improved!

2b) Reduce the loop count of the skybox shader
This is a variation of tweak 2a, suggested in a comment by user Otaku know that on my avatar. Instead of replacing the shader with a gradient, it tweaks the shader so that it doesn't repeat its calculations as many times, resulting in a better framerate. The background will be prettier than the plain gradient, but still much simpler than the original version - here's an example:


To do it this way, follow the same steps as it 4a, but at step 2, instead of creating new files with the listed contents, make a copy of the original two files from <game>\Media\materials\programs -- spacescape_noise_hlsl_fbm_fp.hlsl and spacescape_noise_hlsl_ridged_fp.hlsl -- and place them in the same location under mods (<game>\Mod\Media\materials\programs).

Then, open each one with a text editor (you can drag and drop them onto Notepad, for example), and look for the following lines to change.

spacescape_noise_hlsl_fbm_fp.hlsl -- change this
float noiseSum = fbmNoise(noiseScale * v, octaves, lacunarity, gain); // add a crazy amount of dithering noise noiseSum += fbmNoise(v * 10000.0, 2, lacunarity, gain) * ditherAmt;
to this
float noiseSum = fbmNoise(noiseScale * v, 2, lacunarity, gain) + octaves; // add a crazy amount of dithering noise noiseSum += fbmNoise(v * 10000.0, 2, lacunarity, gain) * ditherAmt - octaves;

spacescape_noise_hlsl_ridged_fp -- change this
float noiseSum = ridgedFbmNoise(noiseScale * v, octaves, lacunarity, gain, offset); // add a crazy amount of dithering noise noiseSum += ridgedFbmNoise(v * 10000.0, octaves, lacunarity, gain, offset) * ditherAmt;
to this
float noiseSum = ridgedFbmNoise(noiseScale * v, 2, lacunarity, gain, offset) + octaves; // add a crazy amount of dithering noise noiseSum += ridgedFbmNoise(v * 10000.0, 2, lacunarity, gain, offset) * ditherAmt - octaves;

Then, continue with the steps in 4a to disable the original shaders and delete the VD2shader.cache file so that the new shaders are used.
15 条留言
Ta123 2024 年 1 月 31 日 上午 9:20 
THANK YOU so much. I bought this game but then never played it for weeks. somehow then try to look at this guide and then it really does make my game smoother to play
NerevarineGMSV 2023 年 3 月 20 日 上午 12:06 
FANTASTIC guide, hugely expanded fps and super-save on GPU power (barely touches now and runs silky-smooth lol)
Sayonara  [作者] 2020 年 2 月 9 日 下午 10:52 
Guide has been updated to note the recent fix to the default skybox performance issues. I've added notes, but left the sections in, in case players want to try them to see what effect they have - maybe in some rare cases it will still help.
Otaku know that on my avatar 2020 年 2 月 9 日 上午 10:52 
On GTX 970.
Before change i have 40 fps in open space with nothing nearby.
After - 180 is same place.

But in big fight fps drops to 25 even with lowest settings, disabled clouds and static background (skybox).
Sayonara  [作者] 2020 年 2 月 8 日 下午 7:34 
Thanks otaku, I'll add that in as an option... how much effect did you get on your FPS with that change?
Otaku know that on my avatar 2020 年 2 月 8 日 上午 4:43 
I reduce loop count on shader - so it no so much computation heavy, but seems not so broken (even with SPACE CLOUD (NOIZE) turned on). Try if it fits on your GPU as it works on my.

https://dl.dropbox.com/s/len00yztso22q2a/spacescape_noise_hlsl_fbm_fp.hlsl
https://dl.dropbox.com/s/ja7qcfp81i4lx0i/spacescape_noise_hlsl_ridged_fp.hlsl

*consider updating a post as files my gone into void*

How it looks: https://dl.dropbox.com/s/z9ijh816l9rin4t/void%20destroyer%202.exe%20Screenshot%202020.02.08%20-%2014.41.27.31.png
Sraika 2020 年 2 月 7 日 下午 9:45 
a good guide
:)
TrojaN 2020 年 2 月 7 日 下午 7:54 
That helped me out lol, thanks!
Sayonara  [作者] 2020 年 2 月 7 日 下午 5:01 
I'll just add, if you first create them as text files, you might need to disable the "hide extensions for known file types" option in Windows Explorer in order to be able to rename the extensions to .hlsl.
Sayonara  [作者] 2020 年 2 月 7 日 下午 4:59 
Hi TrojaN, name the files as given in the titles above each box; they are plain text, but must have ".hlsl" extension:
- spacescape_noise_hlsl_fbm_fp.hlsl
- spacescape_noise_hlsl_ridged_fp.hlsl

They should have exactly the same names as the files that you have to disable in the following step.