Optimized GameScreen.DrawMap

- Downscaled lightmap, since blurring will make this unnoticeable anyway
(TODO: make this optional)
- Render LOS in fewer passes by using a shader
- Use light volume to calculate LOS
- This also means we can use the override texture to render the diving
suit obstruct effect
- Don't render bunks and labels onto LOS background (TODO: add the
option to render back into the LOS background, i.e. just use
multiplicative blending as if it was the lightmap)
- Prefer SpriteSortMode.Deferred over all others, prefer
SamplerState.LinearClamp/PointClamp over all others
- Remove shader blur in favor of geometry blur (TODO: improve on this
further, right now it has a few artifacts)
- Trim light volumes
- Do some weird shit with the background particles (use DrawTiled
instead of relying on SamplerState.LinearWrap, because that's faster
somehow :/ )
- Pressing up/down in the console only returns a typed command now
This commit is contained in:
juanjp600
2017-12-20 19:41:23 -03:00
parent 1cb39f7fd5
commit 7a413aee93
30 changed files with 1986 additions and 1960 deletions
@@ -1,4 +1,4 @@
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input;
namespace Barotrauma
{
@@ -94,9 +94,9 @@ namespace Barotrauma
}
}
class Key
{
private bool hit, hitQueue;
class Key
{
private bool hit, hitQueue;
private bool held, heldQueue;
@@ -106,23 +106,23 @@ namespace Barotrauma
//{
// get { return canBeHeld; }
//}
public Key(KeyOrMouse binding)
{
public Key(KeyOrMouse binding)
{
this.binding = binding;
}
}
public bool Hit
{
get
{
return hit;
}
set
{
hit = value;
}
}
public bool Hit
{
get
{
return hit;
}
set
{
hit = value;
}
}
public bool Held
{
@@ -141,14 +141,14 @@ namespace Barotrauma
get { return binding; }
}
public void SetState()
{
hit = binding.IsHit();
if (hit) hitQueue = true;
public void SetState()
{
hit = binding.IsHit();
if (hit) hitQueue = true;
held = binding.IsDown();
if (held) heldQueue = true;
}
}
public void SetState(bool hit, bool held)
{
@@ -156,12 +156,12 @@ namespace Barotrauma
if (held) heldQueue = true;
}
public bool DequeueHit()
{
bool value = hitQueue;
hitQueue = false;
return value;
}
public bool DequeueHit()
{
bool value = hitQueue;
hitQueue = false;
return value;
}
public bool DequeueHeld()
{
@@ -187,11 +187,11 @@ namespace Barotrauma
held = false;
}
public void ResetHit()
{
hit = false;
//stateQueue = false;
}
public void ResetHit()
{
hit = false;
//stateQueue = false;
}
public void ResetHeld()
@@ -199,5 +199,5 @@ namespace Barotrauma
held = false;
//stateQueue = false;
}
}
}
}