From c5b976bb80eb490b15ee24a4f5ba3b4e2b1e56b1 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Fri, 28 Jan 2022 19:05:58 +0100 Subject: [PATCH] Fixed the outline color for the arms --- NPCs/ExoMechs/Ares/AresGaussNuke.cs | 3 ++- NPCs/ExoMechs/Ares/AresLaserCannon.cs | 5 +++-- NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/NPCs/ExoMechs/Ares/AresGaussNuke.cs b/NPCs/ExoMechs/Ares/AresGaussNuke.cs index 10dca034a7..fce110fc23 100644 --- a/NPCs/ExoMechs/Ares/AresGaussNuke.cs +++ b/NPCs/ExoMechs/Ares/AresGaussNuke.cs @@ -565,10 +565,11 @@ namespace CalamityMod.NPCs.ExoMechs.Ares { CalamityUtils.EnterShaderRegion(spriteBatch); Color outlineColor = Color.Lerp(Color.Yellow, Color.White, npc.Calamity().newAI[2] / telegraphDuration); + 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(npc.Calamity().newAI[2] / telegraphDuration * 4f, 0f, 3f); GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(1f); - GameShaders.Misc["CalamityMod:BasicTint"].UseColor(outlineColor); + 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) diff --git a/NPCs/ExoMechs/Ares/AresLaserCannon.cs b/NPCs/ExoMechs/Ares/AresLaserCannon.cs index f2e261b61d..ef27f71a82 100644 --- a/NPCs/ExoMechs/Ares/AresLaserCannon.cs +++ b/NPCs/ExoMechs/Ares/AresLaserCannon.cs @@ -633,11 +633,12 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if ((npc.Calamity().newAI[2] < deathrayTelegraphDuration) && AIState == (float)Phase.Deathray) { CalamityUtils.EnterShaderRegion(spriteBatch); - Color outlineColor = Color.Lerp(Color.GreenYellow, Color.White, npc.Calamity().newAI[2] / deathrayTelegraphDuration); + Color outlineColor = Color.Lerp(Color.OrangeRed, Color.White, npc.Calamity().newAI[2] / deathrayTelegraphDuration); + 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(npc.Calamity().newAI[2] / deathrayTelegraphDuration * 4f, 0f, 3f); GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(1f); - GameShaders.Misc["CalamityMod:BasicTint"].UseColor(outlineColor); + 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) diff --git a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs index 54ad228d6a..1b034863bd 100644 --- a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs +++ b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs @@ -563,10 +563,11 @@ namespace CalamityMod.NPCs.ExoMechs.Ares { CalamityUtils.EnterShaderRegion(spriteBatch); Color outlineColor = Color.Lerp(Color.GreenYellow, Color.White, npc.Calamity().newAI[2] / plasmaBoltTelegraphDuration); + 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(npc.Calamity().newAI[2] / plasmaBoltTelegraphDuration * 4f, 0f, 3f); GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(1f); - GameShaders.Misc["CalamityMod:BasicTint"].UseColor(outlineColor); + 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)