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:
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Color = Microsoft.Xna.Framework.Color;
|
||||
@@ -44,7 +44,7 @@ namespace Barotrauma
|
||||
try
|
||||
{
|
||||
|
||||
using (Stream fileStream = File.OpenRead(path))
|
||||
using (Stream fileStream = File.OpenRead(path))
|
||||
{
|
||||
var texture = Texture2D.FromStream(_graphicsDevice, fileStream);
|
||||
texture = PreMultiplyAlpha(texture);
|
||||
|
||||
Reference in New Issue
Block a user