Fixes for various graphics bugs on Linux

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:

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                                  
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);                     = vec2(1.0, 1.0);                                            
    vs_TEXCOORD0.xy = in_TEXCOORD0.xy;                                          

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%

(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()                                                                     

, 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

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); = vec2(0.0, 1.0);
    vs_TEXCOORD0.xy = in_TEXCOORD0.xy;

I know nothing about shaders but 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.

1 Like


I tried this but it didn’t work.

I also tried to dump shaders with the following command (replacing “username” with my username) but didn’t work as well :
MESA_SHADER_DUMP_PATH=/home/username/le_shaders_dump/ /home/username/.local/share/Steam/steamapps/common/Last\ Epoch/Last\ Epoch.x86_64

That’s too bad. What GPU are you using? It did not dump any shaders at all? Did you create the dump directory beforehand?

Edit: Ah I looked at your post history and it seems you use an NVIDIA GPU with the closed source driver. I do not think that will work as it probably does not allow for runtime replacement of shaders. At least not the way I explained above. You could try with the Nouveau driver: Nouveau - ArchWiki as that is part of mesa but I have no experience with NVIDIA.

Thanks for your feedback. Yes, I created the dump directory before.

You’re right, I have a Nvidia GTX 660 with closed source drivers (Ubuntu 20.04). Anyway I don’t think I’ll try with other drivers. Except the character selection screen, the game works well and I don’t want to risk to break anything.

I hope your post will give a hint to Eleventh hour’s developper to fix the bug.



I tried your solution (Linux Mint 21.1 + Ryzen 5800X3D + Radeon 5600XT) and IT WORKS!!! At first it didn’t work because within Steam I copy/pasted MESA_SHADER_READ_PATH=/home/username/le_shaders/ %command% forgetting to change username with my actual username lol lol. Now I will play for a while to see if flashes problem is solved also…

PS: EHG should hire you to fix their linux client…

Update 2023-08-20: added Waste Pools fix

Some more fixed shaders:

Same instructions as above.
The following “bugs” are fixed/circumvented:

Purple character select screen:


White circles on water textures:

According to a MESA Contributor this is caused by the shader trying to calculate log2 of 0 which is INF.
The solution used here is to define a variable > 0 and use the max of that variable and the actually passed variable so log2 will never get a 0.

Divine Era - Deep Harbor:

Divine Era - Maj’elka Lower District:

Divine Era - The Upper Temple:

Monolith - Twisted Mire

Monolith - Sinking City

Monolith - Waste Pools


White flashes:

Monolith - Vessel of Chaos

General - Sirens

1 Like

Added some more fixed water shaders that were needed for 0.9.2 patch and the reworked Imperial Era:

(archive contains all fixed shaders so far)


When I did the fix for the character menu is when i started having the flickering screen.

It also often gets stuck in the black and white screen. I have a pretty good screen shot. (to band-aid this you can just remove your chest and put it back on but the problem comes back quickly) I really dont know why this works but it does.

Hi @KingEKoP,
thanks for the feedback. So if you do not apply the purple character select workaround you do not get the black/white flashing screen when i.e. attacking a Vessel of Chaos? What is your setup (Hardware, driver)?
I just tried again without any replaced shaders and for me all issues appear again:

  • purple character select
  • white circles on water textures in i.e. Deep Harbor
  • black & white flashes when attacking i.e. Vessels of Chaos (also happens with Sirens, and Vessels of Hope)
  • Fire Beam from elementals in Lightless Harbor is a plain white beam.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.