Jump to content
  • 0

Rendering issues on Linux: Now there's a work-around!


Question

Posted (edited)

The Linux version of Pillars of Eternity has had some annoying rendering issues ever since it was first released, and although people have submitted bug reports for them, Obsidian hasn't done anything about them and they're still present in the latest patch. :(

 

Luckily, a programming-savvy fan who goes by the name of dscharrer has now created an unofficial hack which fixes several of those issues! :)

Since the hack hasn't been publicized in many places yet, I'm creating this thread to help other Linux gamers (and Obsidian) become aware of it.

Instructions for installing the hack are at the end of this post.

 

The rendering issues in question, are:

 

Black noise on water surfaces

R6D3BXx.png

 

The picture is self-descriptive I think.

 

 

Anti-aliasing not working

LNlwQrp.png

Without the hack, many Linux users get no anti-aliasing at all in Pillars of Eternity, no matter what graphics quality they choose in the settings.

 

The hack enforces anti-aliasing of character/weapon outlines and selection circles. Textures on the characters are still not anti-aliased even with the hack (look at the stripes on her head in the screenshot), so it's not perfect, but at least an improvement.

 

 

Flickering black splotches on the map screen

dZnpQso.png

This is actually a problem that has only surfaced recently, because it only happens with the newest version of the open-source (Mesa) graphics drivers for Intel/AMD/Nvidia cards.

A performance improvement that was added in the latest version of the drivers, causes the driver to no longer perform some redundant function calls which it did in earlier version. A standard-compliant OpenGL application should not be affected by this change at all, but unfortunately it seems that Pillars of Eternity (and maybe other Unity games?) incorrectly relied on the earlier redundant behavior of the drivers.

In this case, it horribly messes up the drawing of the fog-of-war on the map screen.

 

The hack fixes that.

 

Bonus: Disabling map overlays

 

As a bonus, the hack also gives you the option of disabling map screen overlays altogether. If you enable said option, the following things will simply not be rendered on map screen... (Note: the main viewport is not affected - only the map screen!)

  • Fog of war
  • Map markers
  • Selection circles
  • Viewport rectangle
  • Inset shadow around the map's border

Of course there is no good reason to enable this option for normal game play, but it's great in case you want to take map screenshots for walk-throughs and the like.

 

 

Still without fix: Capes not being rendered

 

In the Linux version of Pillars of Eternity, capes are simply not rendered at all. This hack does not fix that; I just mention it here for the sake of completeness, since AFAIK that's the last remaining graphics rendering problem with the game on Linux.

 

 

Instructions

 

The hack only works for the open-source (Mesa) graphics-drivers - which are available for Intel / AMD / Nvidia cards.

(AMD and Nvidia also offer a proprietary driver as an alternative - this hack will not work for those. So switch to the open-source drivers if you want this hack.)

 

This is how you enable the hack for your game:

 

 

 

1. Make sure you have the necessary dependencies installed:

  • GCC
  • Mesa development files
  • pkg-config

On Ubuntu, this command should install those dependencies for you:

sudo apt-get install gcc-multilib libgl1-mesa-dev libgl1-mesa-dev:i386 pkg-config

2. Open the Pillars of Eternity installation directory in a terminal. (If you use the GOG version, it's the directory which contains the start.sh.)

 

3. Download the pillarsfix.c hack into that directory, for example by running:

wget https://raw.githubusercontent.com/dscharrer/void/master/hacks/pillarsfix.c

4. OPTIONAL:  Edit pillarsfix.c in a text editor if you want to customize it. For example if you want to disable map overlays (see above), you need to find the line that says  #define PILLARS_PLAIN_MAP 0  and change the 0 to 1.

 

5. Start the game by running:

sh pillarsfix.c ./start.sh

(Or if you don't use the GOG version, replace ./start.sh with whatever command you would normally use to start the game in your version.)

 

You will always have to run the game like that from now on if you want to keep using the hack.

 

 

 

Note that the hack does not modify the game's executable or data files on disk; it does all it's magic "live" for the currently running game instance when you run it as shown it step 5.

 

Have fun!

And let's hope that Obsidian takes this as an inspiration to fix these issues properly now.

Edited by spambot
  • Like 4

17 answers to this question

Recommended Posts

  • 0
Posted (edited)

A note for testers:

 

"Black noise on water surfaces" affects...

  • newer AMD graphics cards (those released since 2011 or so)
  • the Mesa drivers and the proprietary Catalyst driver

"Anti-aliasing not working" affects...

  • not sure which cards, exactly - at least newer AMD cards though
  • the Mesa drivers (untested on Catalyst)

"Flickering black splotches on the map screen" affects...

  • all AMD cards, apparently
  • Mesa 11 drivers (not older Mesa versions, and not Catalyst)
Edited by spambot
  • 0
Posted

Also, contrary to what I wrote in the opening post, the hack may actually work for Catalyst as well - provided that you install the correct OpenGL development headers. Untested though.

  • 0
Posted

I have a much simpler workaround that, from the looks of these screen grabs, will work absolute wonders for any Linux gaming system: dual-boot to Windows 10.  Elementary, my dear Spambot... :biggrin:

It's very well known that I don't make mistakes, so if you should stumble across the odd error here and there in what I have written, you may immediately deduce--quite correctly--that I did not write it... :biggrin:

  • 0
Posted

Never!

I see...So you'd say, "My only regret is that I have but one life to give for my Linux!", eh?  j/k!

  • Like 1

It's very well known that I don't make mistakes, so if you should stumble across the odd error here and there in what I have written, you may immediately deduce--quite correctly--that I did not write it... :biggrin:

  • 0
Posted

The capes not rendering is because of a plugin incompatibility, not a rendering engine issue/bug/problem.

Windows 10 x64 | Intel i7 920 @ 2.66GHZ | Gigabyte Geforce 760 4GB OC1 Windforce x3 | Integrated Audio | 8GB DDR3 RAM | ASUS P6T | Corsair AX760 PSU

  • 0
Posted

Successfully used this with a GTX 970 and the proprietary Nvidia drivers. Game did load and seem to work fine with the standard config, but since I don't have any problems other than the lack of AA, I disabled everything else. 8xAA looked a bit weak, 16x seems a bit blurry. But a major improvement, nonetheless, thanks!

 

If you're getting syntax errors, try bash instead of sh. Looks like LMDE defaults to dash, which does not support the syntax used by the script. Maybe add a shebang?

 

If you're getting complaints from the linker about libGL missing, check the symlinks in /usr/lib/x86_64-linux-gnu and/or the 32 bit variant. I admit to being clueless which one's are used. NVidia's libGL will be the one with the three digit number. I think it's the driver version, but not sure. My libGL.so was linked to libGL.so.1.2, which wasn't even there.

  • Like 1
  • 0
Posted (edited)

I asked some time ago about it and the answer was after Patch 3.0 they will look into it. If they do... well...

 

Other question is, if this is a Unity engine issue or if they can change the shader code themselves.

 

They still use an older Unity 4.6.5p1 version and have not updated it to the last available version of the 4.x branch which is 4.7.0

 

http://blogs.unity3d.com/2015/12/17/final-release-for-unity-4-x/

 

I doubt we will ever see a Unity 5 version of PoE but I hoped that they updated it at least to the last available version of 4.x.

Edited by Aurelio
  • Like 1
  • 0
Posted

I've integrated the water fix for 3.02.  The others are on my list.  Big thanks to Daniel Scharrer for tracking those down!

 

Neat. Hopefully at least the map rendering bug can be fixed soon as well.

 

The missing multisample anti-aliasing is something I see in a couple of other Unity engine games as well, so the cause could very well not be game-specific. From the API perspective the game asks for available framebuffer formats - some of which support msaa - and then selects one without msaa support. The game/egine needs to either request msaa support when asking for the framebuffer formats (as part of the arguments to glXChooseFBConfig) or take msaa support into account when selecting the framebuffer format (as queried via glXGetFBConfigAttrib).

  • 0
Posted

I can confirm the water is fixed in 3.02 beta - thanks @BMac!

 

I'm not seeing the map screen bug anymore, either - though since it hasn't been officially announced as a fix by the devs I'd cautiously say it needs testing on more systems/drivers before we can check it off the list.

 

Anti-aliasing is still broken - so for that we'll have to continue to use this hack for now.

  • 0
Posted

You're right - I did integrate the area map fix, but I did not get to the AA issue (and I suspect that it is more of a Unity-side problem).

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...