From 7a56aa800afd704f1bec192b30d1f01b51db3fa6 Mon Sep 17 00:00:00 2001 From: GinYuH <> Date: Thu, 5 Jan 2023 01:04:17 -0800 Subject: [PATCH] made gfb signus' eyes more clear --- NPCs/Signus/Signus.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index 79d8b0d59d..bae99f7781 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -21,6 +21,7 @@ using System.IO; using Terraria; using Terraria.GameContent; using Terraria.GameContent.Bestiary; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; @@ -868,6 +869,24 @@ namespace CalamityMod.NPCs.Signus } } + if (Main.getGoodWorld) // make Sig's eyes more visible in the zenith seed due to the color change, move to zenith seed later + { + CalamityUtils.EnterShaderRegion(spriteBatch); + Color outlineColor = Color.Lerp(Color.Blue, Color.White, 0.4f); + Vector3 outlineHSL = Main.rgbToHsl(outlineColor); //BasicTint uses the opposite hue i guess? or smth is fucked with the way shaders get their colors. anyways, we invert it + float outlineThickness = MathHelper.Clamp(0.5f, 0f, 1f); + + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(1f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(Main.hslToRgb(1 - outlineHSL.X, outlineHSL.Y, outlineHSL.Z)); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + + for (float i = 0; i < 1; i += 0.125f) + { + spriteBatch.Draw(glowMaskTexture, vector43 + (i * MathHelper.TwoPi).ToRotationVector2() * outlineThickness, new Rectangle?(frame), outlineColor, rotation, vector11, scale, spriteEffects, 0f); + } + CalamityUtils.ExitShaderRegion(spriteBatch); + } + spriteBatch.Draw(glowMaskTexture, vector43, new Rectangle?(frame), color40, rotation, vector11, scale, spriteEffects, 0f); return false;