Draw MapAtmosphere gasses (#17688)

This commit is contained in:
metalgearsloth
2023-06-28 21:22:03 +10:00
committed by GitHub
parent 2488dd4ecd
commit 44a3db398b
11 changed files with 250 additions and 81 deletions

View File

@@ -46,7 +46,7 @@ public sealed class ParallaxOverlay : Overlay
return;
var position = args.Viewport.Eye?.Position.Position ?? Vector2.Zero;
var screenHandle = args.WorldHandle;
var worldHandle = args.WorldHandle;
var layers = _parallax.GetParallaxLayers(args.MapId);
var realTime = (float) _timing.RealTime.TotalSeconds;
@@ -60,7 +60,7 @@ public sealed class ParallaxOverlay : Overlay
else
shader = null;
screenHandle.UseShader(shader);
worldHandle.UseShader(shader);
var tex = layer.Texture;
// Size of the texture in world units.
@@ -101,17 +101,17 @@ public sealed class ParallaxOverlay : Overlay
{
for (var y = flooredBL.Y; y < args.WorldAABB.Top; y += size.Y)
{
screenHandle.DrawTextureRect(tex, Box2.FromDimensions((x, y), size));
worldHandle.DrawTextureRect(tex, Box2.FromDimensions((x, y), size));
}
}
}
else
{
screenHandle.DrawTextureRect(tex, Box2.FromDimensions(originBL, size));
worldHandle.DrawTextureRect(tex, Box2.FromDimensions(originBL, size));
}
}
screenHandle.UseShader(null);
worldHandle.UseShader(null);
}
}