Fix LOS effect on linux. Not sure why the parameter names are different in the OpenGL shader but this seems to work ¯\_(ツ)_/¯
This commit is contained in:
@@ -82,7 +82,7 @@ namespace Barotrauma.Lights
|
||||
#if WINDOWS
|
||||
LosEffect = content.Load<Effect>("losshader");
|
||||
#else
|
||||
losEffect = content.Load<Effect>("losshader_opengl");
|
||||
LosEffect = content.Load<Effect>("losshader_opengl");
|
||||
#endif
|
||||
|
||||
if (lightEffect == null)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user