How to disable the fog

space-engineers

I would like to disable the fog in the game, because I dislike it visually.
I could not find an option in the video settings. Can I do that in any other way?

Best Answer

To disable the fog, you need to go to

Steam\SteamApps\common\SpaceEngineers\Content\Effects2

and find the file MyEffectBase.fxh.

Open this file with any text editor you have installed, e.g. Notepad or Notepad++ etc.

Find the following code:

float4 CalculateFogLinear(float3 sourceColor, float distance, float backgroundBlend)
{
    float fogBlend = saturate((distance - FogDistanceNear) / (FogDistanceFar - FogDistanceNear));

    return float4(FogColor, fogBlend * FogMultiplier);

    // This is no hack, it's just interpolator based on background blend and fog blend, it's pretty complicated, but right
    float i = (backgroundBlend * (fogBlend + backgroundBlend - 2) + 1) * FogMultiplier;
    //return lerp(sourceColor.xyz, FogColor, i);
    return float4(FogColor, i);
}

Replace this code with:

float4 CalculateFogLinear(float3 sourceColor, float distance, float backgroundBlend)
{
    return float4(FogColor, 0.0f);
}

Then open a command window in this directory by right clicking into explorer with shift held down and enter the following command:

del /s *.fxo

This will force the game to recompile all shaders. When you launch the game, your fog will be disabled:

Game without fog

If the game patches via Steam, you probably need to do it again, but this is only until the devs add an option to disable the fog in the settings.