- add: new tiles and another ui tweaks (#11)

* - fix: audio crash

* - tweak: main menu

* connect gui

* some shaders here

* tiles
This commit is contained in:
rhailrake
2024-01-31 15:08:17 +00:00
committed by GitHub
parent 177d295346
commit 483ab4eb2c
66 changed files with 342 additions and 187 deletions

View File

@@ -0,0 +1,38 @@
using Robust.Client.Graphics;
using Robust.Shared.Enums;
using Robust.Shared.Prototypes;
namespace Content.Client._White.Overlays;
public sealed class GrainOverlay : Overlay
{
[Dependency] private readonly IPrototypeManager _prototype = default!;
private readonly ShaderInstance _shader;
public GrainOverlay()
{
IoCManager.InjectDependencies(this);
_shader = _prototype.Index<ShaderPrototype>("Grain").Instance().Duplicate();
}
public override OverlaySpace Space => OverlaySpace.WorldSpace;
public override bool RequestScreenTexture => true;
protected override void Draw(in OverlayDrawArgs args)
{
if (ScreenTexture is null)
return;
var worldHandle = args.WorldHandle;
_shader.SetParameter("SCREEN_TEXTURE", ScreenTexture);
_shader.SetParameter("strength", 40.0f);
worldHandle.UseShader(_shader);
worldHandle.DrawRect(args.WorldBounds, Color.White);
worldHandle.UseShader(null);
}
}