Backported vsync changes from new-netcode, WIP hull visibility culling

The hull culling functions are there, they just aren't being used right now because there are some annoying bugs.
This commit is contained in:
juanjp600
2016-10-02 22:24:31 -03:00
parent 75e7b3a94e
commit e1296e4a8e
27 changed files with 316 additions and 99 deletions

View File

@@ -63,10 +63,7 @@ namespace Barotrauma
waterEffect.Parameters["xWavePos"].SetValue(wavePos);
waterEffect.Parameters["xBlurDistance"].SetValue(blurAmount);
//waterEffect.CurrentTechnique.Passes[0].Apply();
wavePos.X += 0.0001f;
wavePos.Y += 0.0001f;
#if WINDOWS
waterEffect.Parameters["xTexture"].SetValue(texture);
spriteBatch.Draw(waterTexture, new Rectangle(0, 0, GameMain.GraphicsWidth, GameMain.GraphicsHeight), Color.White);
@@ -77,6 +74,12 @@ namespace Barotrauma
spriteBatch.End();
}
public void ScrollWater(float deltaTime)
{
wavePos.X += 0.006f * deltaTime;
wavePos.Y += 0.006f * deltaTime;
}
public void Render(GraphicsDevice graphicsDevice, Camera cam, RenderTarget2D texture, Matrix transform)
{
if (vertices == null) return;