Skip to content

Commit

Permalink
Fix overlays
Browse files Browse the repository at this point in the history
  • Loading branch information
VMSolidus committed Nov 2, 2024
1 parent 29326dc commit 0d3b724
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
9 changes: 5 additions & 4 deletions Content.Client/Overlays/ColorTintOverlay.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Numerics;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Enums;
Expand All @@ -22,7 +23,7 @@ public sealed class ColorTintOverlay : Overlay
/// <summary>
/// The color to tint the screen to as RGB on a scale of 0-1.
/// </summary>
public Vector3? TintColor = null;
public Robust.Shared.Maths.Vector3? TintColor = null;
/// <summary>
/// The percent to tint the screen by on a scale of 0-1.
/// </summary>
Expand All @@ -49,15 +50,15 @@ protected override void Draw(in OverlayDrawArgs args)

_shader.SetParameter("SCREEN_TEXTURE", ScreenTexture);
if (TintColor != null)
_shader.SetParameter("tint_color", (Vector3) TintColor);
_shader.SetParameter("tint_color", (Robust.Shared.Maths.Vector3) TintColor);
if (TintAmount != null)
_shader.SetParameter("tint_amount", (float) TintAmount);

var worldHandle = args.WorldHandle;
var viewport = args.WorldBounds;
worldHandle.SetTransform(Matrix3.Identity);
worldHandle.SetTransform(Matrix3x2.Identity);
worldHandle.UseShader(_shader);
worldHandle.DrawRect(viewport, Color.White);
worldHandle.UseShader(null);
}
}
}
3 changes: 2 additions & 1 deletion Content.Client/Overlays/DogVisionOverlay.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Numerics;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Enums;
Expand Down Expand Up @@ -41,7 +42,7 @@ protected override void Draw(in OverlayDrawArgs args)

var worldHandle = args.WorldHandle;
var viewport = args.WorldBounds;
worldHandle.SetTransform(Matrix3.Identity);
worldHandle.SetTransform(Matrix3x2.Identity);
worldHandle.UseShader(_dogVisionShader);
worldHandle.DrawRect(viewport, Color.White);
worldHandle.UseShader(null);
Expand Down
5 changes: 3 additions & 2 deletions Content.Client/Overlays/EtherealOverlay.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Numerics;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Enums;
Expand Down Expand Up @@ -40,9 +41,9 @@ protected override void Draw(in OverlayDrawArgs args)

var worldHandle = args.WorldHandle;
var viewport = args.WorldBounds;
worldHandle.SetTransform(Matrix3.Identity);
worldHandle.SetTransform(Matrix3x2.Identity);
worldHandle.UseShader(_shader);
worldHandle.DrawRect(viewport, Color.White);
worldHandle.UseShader(null);
}
}
}
5 changes: 3 additions & 2 deletions Content.Client/Overlays/SaturationScaleOverlay.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Robust.Client.Graphics;
using System.Numerics;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Enums;
using Robust.Shared.Prototypes;
Expand Down Expand Up @@ -45,7 +46,7 @@ protected override void Draw(in OverlayDrawArgs args)
_shader.SetParameter("saturation", Saturation);

var handle = args.WorldHandle;
handle.SetTransform(Matrix3.Identity);
handle.SetTransform(Matrix3x2.Identity);
handle.UseShader(_shader);
handle.DrawRect(args.WorldBounds, Color.White);
handle.UseShader(null);
Expand Down
3 changes: 2 additions & 1 deletion Content.Client/Overlays/UltraVisionOverlay.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Numerics;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Enums;
Expand Down Expand Up @@ -41,7 +42,7 @@ protected override void Draw(in OverlayDrawArgs args)

var worldHandle = args.WorldHandle;
var viewport = args.WorldBounds;
worldHandle.SetTransform(Matrix3.Identity);
worldHandle.SetTransform(Matrix3x2.Identity);
worldHandle.UseShader(_ultraVisionShader);
worldHandle.DrawRect(viewport, Color.White);
worldHandle.UseShader(null);
Expand Down

0 comments on commit 0d3b724

Please sign in to comment.