Stellaris

Stellaris

Not enough ratings
Fix No Borders Bug
 
Rate  
Favorite
Favorited
Unfavorite
File Size
Posted
0.002 MB
Apr 17, 2017 @ 5:33am
1 Change Note ( view )

Subscribe to download
Fix No Borders Bug

Subscribed
Unsubscribe
Description
On Linux with certain older AMD GPUs the empire borders are not visible. This mod contains a fix for the pixel shader that draws the borders.

I have only tested this mod on Arch Linux system with a Radeon HD 6870. I cannot guarantee it will work for any other GPU. Please post your results in the comments below.

I cannot pretend to understand why it works. I got to it by hours of trial and error. If someone has an insight into why it works, please comment below. For some reason the original shader gets rejected by the GPU. I simply rewrote the function AddAreaToID() with a macro to force the compiler to inline it.

#define AddAreaToID(vID, vArea, vTotals, vIDs) \
vTotals[0] += vArea * ( 1 - saturate( abs( vIDs[0] - vID ) * 1000 ) ); \
vTotals[1] += vArea * ( 1 - saturate( abs( vIDs[1] - vID ) * 1000 ) ); \
vTotals[2] += vArea * ( 1 - saturate( abs( vIDs[2] - vID ) * 1000 ) ); \
vTotals[3] += vArea * ( 1 - saturate( abs( vIDs[3] - vID ) * 1000 ) ); \
vTotals[4] += vArea * ( 1 - saturate( abs( vIDs[4] - vID ) * 1000 ) ); \
vTotals[5] += vArea * ( 1 - saturate( abs( vIDs[5] - vID ) * 1000 ) ); \
vTotals[6] += vArea * ( 1 - saturate( abs( vIDs[6] - vID ) * 1000 ) ); \
vTotals[7] += vArea * ( 1 - saturate( abs( vIDs[7] - vID ) * 1000 ) ); \
vTotals[8] += vArea * ( 1 - saturate( abs( vIDs[8] - vID ) * 1000 ) );
< >
15 Comments
Petete Feb 14 @ 10:46am 
Thank you! I used to use some console commands but this is so much better.
mk-fg Jan 5 @ 7:09pm 
You should be able to ignore that warning.
It's just a number in .mod file that wasn't updated.
Hans Big Bird Lammers Jan 3 @ 7:29am 
I tried this, and it's saying "This mod does not support the current version of the game". I'm on Mac BTW
Hoso001 Dec 27, 2017 @ 1:30am 
Works Great, fixed my bug in 1.9.1.
Cobaltblood Princess Oct 6, 2017 @ 7:04am 
still works on 1.8
TazKhaelyor Jun 29, 2017 @ 1:53pm 
Thank you very much for this mod

Works for me in 1.6.2 with Ubuntu and a HD 6850

You sir deserve a fresh-baked cookie !
JerseyMilker Jun 5, 2017 @ 6:01pm 
Works on a 2011 iMac (MacOS) with an AMD Radeon HD 6970M! Installing the mod though, it complains about not being compatible with the latest version of Stellaris. Not sure if there's anything that needs to be updated? Seems to work great though, thank you!
Aztorius May 11, 2017 @ 4:29am 
According to this : https://github.com/Unvanquished/Unvanquished/issues/701 :
"The developers of the driver in #radeon explained that it was a bug in the compiler that caused temporary arrays to take more registers than they should which makes us eventually use more than the 124 GPRS (General Purpose RegisterS) of r600 hardware. As far as I understand, it is because their compiler produces badly optimized machine code, and then optimizes it which loses some information. They are discussing fixing this.

On our side we can fix this by using less arrays, and in the case replacing the deforms array by GLSL code generated on the fly."
Si this explains why.
Aztorius May 10, 2017 @ 2:40am 
Thanks it's working. There is a new borders.fxh file with some changes (Stellaris v1.6) since your intital changes. Beginning at line 70-72 they added some if else statements that you should include. It dosen't break this fix and may increase performance (less calls to AddAreaToID).
arpad May 3, 2017 @ 12:26pm 
Thank you for this mod! It's working on my system flawlessly. I'm using Radeon 6670/7670 with the open-source r600 driver.