diff --git a/Barotrauma/BarotraumaClient/Source/Map/Lights/LightManager.cs b/Barotrauma/BarotraumaClient/Source/Map/Lights/LightManager.cs index d8405163e..e17aca912 100644 --- a/Barotrauma/BarotraumaClient/Source/Map/Lights/LightManager.cs +++ b/Barotrauma/BarotraumaClient/Source/Map/Lights/LightManager.cs @@ -82,7 +82,7 @@ namespace Barotrauma.Lights #if WINDOWS LosEffect = content.Load("losshader"); #else - losEffect = content.Load("losshader_opengl"); + LosEffect = content.Load("losshader_opengl"); #endif if (lightEffect == null) diff --git a/Barotrauma/BarotraumaClient/Source/Screens/GameScreen.cs b/Barotrauma/BarotraumaClient/Source/Screens/GameScreen.cs index 3c66a302b..e78de2f5b 100644 --- a/Barotrauma/BarotraumaClient/Source/Screens/GameScreen.cs +++ b/Barotrauma/BarotraumaClient/Source/Screens/GameScreen.cs @@ -237,8 +237,14 @@ namespace Barotrauma if (GameMain.LightManager.LosEnabled && Character.Controlled!=null) { GameMain.LightManager.LosEffect.CurrentTechnique = GameMain.LightManager.LosEffect.Techniques["LosShader"]; +#if LINUX + GameMain.LightManager.LosEffect.Parameters["TextureSampler+xTexture"].SetValue(renderTargetBackground); + GameMain.LightManager.LosEffect.Parameters["LosSampler+xLosTexture"].SetValue(GameMain.LightManager.losTexture); +#else GameMain.LightManager.LosEffect.Parameters["xTexture"].SetValue(renderTargetBackground); GameMain.LightManager.LosEffect.Parameters["xLosTexture"].SetValue(GameMain.LightManager.losTexture); +#endif + //convert the los color to HLS and make sure the luminance of the color is always the same regardless //of the ambient light color and the luminance of the damage overlight color