Info on Linux lighting issues / fix


Yobbo
  • Branch: Preview Branch Version: Linux Pending

Hi, so it was mentioned by klei.ruby that a fix is in testing for the current problems with lighting on linux (and perhaps mac?), but i'm posting the info i found in case it proves useful for comparison. This issue was heinous enough recently that i hacked together a fix of my own, by which i mean i used Harmony to invert a couple textures before they got sent to the GPU.

There are two main, clear problems:

  1. There is a massive area of sunlight-level brightness at the bottom of the map
  2. Biome colours are often wildly incorrect

Both can be seen as in this image:

ss_old_zoom.jpg.dbafa806ae4d298f63370aa8f6014833.jpg

The sunlight issue was fixed when i inverted `PropertyTextures.externallyUpdatedTextures[Property.ExposedToSunlight]`. I assume this is incorrectly used inside the relevant shader. As solar panels and telescopes work correctly, this appears to simply be an issue of application inside the graphics pipeline.

The biome colour issue was "fixed" when i inverted `SubworldZoneRenderData.colourTex` a.k.a. `_WorldZoneTex`. This apparently is being used incorrectly inside the relevant shader for rendering terrain.

Inverting these two textures results in something apparently correct:

ss_new_zoom.jpg.57ad29e9c90bee5b5dd2e32765e6e4a1.jpg

I verified that sunlight still worked and is now correctly on the top of the map not the bottom.

There is however another problem after inverting the zone colour texture: Although the terrain is tinted correctly after doing so (including buildable tiles), buildings and debris are now tinted incorrectly, whereas before they were tinted correctly.

I can only surmise that whatever shader code is applying the zone tint currently correctly applies it for buildings and debris, and incorrectly applies it for terrain.

 

Well, it may be that you've already fixed this, but in any case this is as i found.


Steps to Reproduce
  • Run on Linux
  • Invert the mentioned textures in the Y direction


User Feedback


There are no comments to display.



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