Fixed long-standing visual offset of photovisc projectiles

The shader for these projectiles was always drawn a specific amount down and to the right of the hitbox
This commit is contained in:
AquaSG committed 2023-01-07 00:56:28 -05:00
1 parent 294ea3c539
commit 972c211d1f
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Ranged
float colorInterpolation = (float)Math.Cos(Projectile.timeLeft / 16f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f;
Color color = Color.Lerp(Color.LightGreen, Color.LightPink, colorInterpolation) * 0.4f;
color.A = 0;
Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY);
Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY) + new Vector2(-25f, -25f);
Color outerColor = color;
Color innerColor = color * 0.5f;
float intensity = 0.9f + 0.15f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 60f * MathHelper.TwoPi);
+1 -1
View File
@@ -145,7 +145,7 @@ namespace CalamityMod.Projectiles.Ranged
Color.SlateGray
}) * Projectile.Opacity;
color.A = 0;
Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY);
Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY) + new Vector2(-15f, -15f);
Color outerColor = color;
Color innerColor = color * 0.5f;
float intensity = 0.9f + 0.15f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 60f * MathHelper.TwoPi);