edit2: Update: more fixed shaders in a comment below
edit: This will not work with the proprietary NVIDIA driver.
I found a manual workaround to fix the purple character select screen that has plagued Linux users running the native client (using OpenGL) for quite some time:
TLDR:
Create a folder and the following file somewhere:
$ mkdir ~/le_shaders
$ cat > ~/le_shaders/VS_eb68bdbc455fedce16d4835a1b5bf77caa6ba716.glsl<<EOF
#version 460
#extension GL_ARB_explicit_attrib_location : require
#ifdef GL_ARB_shader_bit_encoding
#extension GL_ARB_shader_bit_encoding : enable
#endif
in vec4 in_POSITION0;
in vec4 in_TEXCOORD0;
out vec2 vs_TEXCOORD0;
void main()
{
gl_Position.xy = in_POSITION0.xy * vec2(-2.0, 2.0);
gl_Position.zw = vec2(1.0, 1.0);
vs_TEXCOORD0.xy = in_TEXCOORD0.xy;
return;
}
EOF
Then either start the game as follows while steam is running:
MESA_SHADER_READ_PATH=/home/username/le_shaders/ /home/username/.local/share/Steam/steamapps/common/Last\ Epoch/Last\ Epoch.x86_64
or edit Last Epoch’ Launch options within Steam as follows:
MESA_SHADER_READ_PATH=/home/username/le_shaders/ %command%
Explanation:
(also see Shading Language — The Mesa 3D Graphics Library latest documentation)
I dumped all shaders by starting the game as above but with MESA_SHADER_DUMP_PATH=/home/username/le_shaders_dump/
set. I got into the char select menu and quit the game.
I then copied all dumped shaders to the le_shaders folder:
cp /home/username/le_shaders_dump/* /home/username/le_shaders/
and in that folder replaced half the files with a shader doing nothing:
#version 460
void main()
{
return;
}
, checked, split more until I found the shader responsible:
$ cat VS_eb68bdbc455fedce16d4835a1b5bf77caa6ba716.glsl
#version 460
#extension GL_ARB_explicit_attrib_location : require
#ifdef GL_ARB_shader_bit_encoding
#extension GL_ARB_shader_bit_encoding : enable
#endif
in vec4 in_POSITION0;
in vec4 in_TEXCOORD0;
out vec2 vs_TEXCOORD0;
void main()
{
gl_Position.xy = in_POSITION0.xy * vec2(-2.0, 2.0);
gl_Position.zw = vec2(0.0, 1.0);
vs_TEXCOORD0.xy = in_TEXCOORD0.xy;
return;
}
I know nothing about shaders but gl_Position.zw sounded like the depth/z position is set here and after setting it to 1.0 instead of 0.0 the purple screen is gone.
I am not entirely sure whether the shader filenames are the same across systems or not. In case they are not you can repeat the steps I did above and look for the shader having the same contents and modify it.
Also did I metion I know nothing about shaders? Not sure if anything else breaks (visually) because of said modification but so far it seems fine here. I did a quick visual comparison of the char select screen using the modified shader and the char select screen when running with -force-vulkan
and they appear the same to me.
Hope this helps and please let me know if it works for you.