Cut 10b Soul Pass #2 + juicy art pass: near-lens fade, adaptive Bitonic sort, 64K stochastic opaque curl sparks, and thick Aetheria smoke/fire
This commit is contained in:
parent
326101158e
commit
9051cdba06
8 changed files with 391 additions and 272 deletions
|
|
@ -231,8 +231,8 @@ public partial class ParticlePool : Node3D
|
|||
|
||||
float massScale = Math.Clamp(pulse.MassKg / 2600f, 0.72f, 1.55f);
|
||||
float loadScale = Math.Clamp(pulse.LoadG, 0.5f, 1.8f);
|
||||
int count = pulse.MassKg >= 3600f ? 6 : 4;
|
||||
_gpuSparks?.EmitDustMotes(footPos, Vector3.Up, count, groundTint with { A = 0.72f }, 3.4f * massScale * MathF.Sqrt(loadScale), 0.06f * massScale);
|
||||
int count = pulse.MassKg >= 3600f ? 42 : 26;
|
||||
_gpuSparks?.EmitDustMotes(footPos, Vector3.Up, count, groundTint with { A = 0.76f }, 3.4f * massScale * MathF.Sqrt(loadScale), 0.048f * massScale);
|
||||
_volumetrics?.EmitFootstepOrTirePuff(footPos, groundTint, massScale);
|
||||
}
|
||||
|
||||
|
|
@ -245,7 +245,7 @@ public partial class ParticlePool : Node3D
|
|||
}
|
||||
|
||||
float scale = Math.Clamp(intensity, 0.5f, 1.5f);
|
||||
_gpuSparks?.EmitDustMotes(worldPos, Vector3.Up, 3, groundTint with { A = 0.65f }, 2.6f * scale, 0.055f * scale);
|
||||
_gpuSparks?.EmitDustMotes(worldPos, Vector3.Up, 18, groundTint with { A = 0.70f }, 2.6f * scale, 0.045f * scale);
|
||||
_volumetrics?.EmitFootstepOrTirePuff(worldPos, groundTint, scale * 0.9f);
|
||||
}
|
||||
|
||||
|
|
@ -260,7 +260,7 @@ public partial class ParticlePool : Node3D
|
|||
_volumetrics?.EmitThermalVentPlume(worldPos, thermalRatio);
|
||||
if (thermalRatio >= 0.94f)
|
||||
{
|
||||
_gpuSparks?.EmitSparkBurst(worldPos, Vector3.Up, 3, new Color(4.0f, 2.2f, 0.55f, 0.96f), 6.5f, 0.038f);
|
||||
_gpuSparks?.EmitSparkBurst(worldPos, Vector3.Up, 20, new Color(4.6f, 2.4f, 0.55f, 0.96f), 6.5f, 0.026f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -275,7 +275,7 @@ public partial class ParticlePool : Node3D
|
|||
_volumetrics?.EmitDamageSmokePlume(worldPos, coreHpRatio);
|
||||
if (coreHpRatio < 0.24f)
|
||||
{
|
||||
_gpuSparks?.EmitEmberBurst(worldPos, 2, new Color(3.8f, 1.8f, 0.45f, 0.92f), 2.2f, 0.045f);
|
||||
_gpuSparks?.EmitEmberBurst(worldPos, 16, new Color(4.2f, 1.8f, 0.35f, 0.94f), 2.4f, 0.030f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -287,9 +287,14 @@ public partial class ParticlePool : Node3D
|
|||
return;
|
||||
}
|
||||
|
||||
Color hdr = new(accentCol.R * 4.2f, accentCol.G * 4.2f, accentCol.B * 4.2f, 0.98f);
|
||||
_gpuSparks?.EmitSparkBurst(pos, Vector3.Up, Math.Clamp(sparkCount * 3, 6, 24), hdr, 14f * radiusScale, 0.044f);
|
||||
_gpuSparks?.EmitEmberBurst(pos, Math.Clamp(sparkCount, 3, 12), hdr * 0.85f, 4.5f * radiusScale, 0.052f);
|
||||
Color moltenHdr = new(4.8f, 2.6f, 0.65f, 0.98f);
|
||||
Color subtleTint = new(
|
||||
Mathf.Lerp(moltenHdr.R, accentCol.R * 3.8f, 0.25f),
|
||||
Mathf.Lerp(moltenHdr.G, accentCol.G * 3.8f, 0.25f),
|
||||
Mathf.Lerp(moltenHdr.B, accentCol.B * 3.8f, 0.25f),
|
||||
0.98f);
|
||||
_gpuSparks?.EmitSparkBurst(pos, Vector3.Up, Math.Clamp(sparkCount * 16, 48, 160), subtleTint, 15f * radiusScale, 0.028f);
|
||||
_gpuSparks?.EmitEmberBurst(pos, Math.Clamp(sparkCount * 7, 22, 80), moltenHdr * 0.85f, 5.0f * radiusScale, 0.032f);
|
||||
}
|
||||
|
||||
public void EmitThermalPoolEmber(Vector3 pos, float radius, Color accentCol, Vector3 camPos, bool hasCam)
|
||||
|
|
@ -312,7 +317,7 @@ public partial class ParticlePool : Node3D
|
|||
}
|
||||
|
||||
_volumetrics?.EmitPodReentryPlume(podPos, podVel, heatGlow, isContender);
|
||||
_gpuSparks?.EmitEmberBurst(podPos, isContender ? 3 : 2, new Color(4.0f, 2.2f, 0.65f, 0.95f), 2.5f, 0.048f);
|
||||
_gpuSparks?.EmitEmberBurst(podPos, isContender ? 20 : 12, new Color(4.4f, 2.2f, 0.55f, 0.95f), 2.8f, 0.030f);
|
||||
}
|
||||
|
||||
public void EmitPodRetroBurn(
|
||||
|
|
@ -464,13 +469,13 @@ public partial class ParticlePool : Node3D
|
|||
switch (wClass)
|
||||
{
|
||||
case WeaponVisualClass.KineticLight:
|
||||
_gpuSparks?.EmitMuzzleStarburst(start, new Color(3.8f, 2.8f, 1.1f, 0.96f), isPd ? 0.42f : 0.30f, 0.07f);
|
||||
_gpuSparks?.EmitSparkBurst(start, aimDir, 3, new Color(4.0f, 2.8f, 0.9f, 0.95f), 11f, 0.035f);
|
||||
_gpuSparks?.EmitMuzzleStarburst(start, new Color(4.2f, 2.8f, 1.0f, 0.96f), isPd ? 0.42f : 0.30f, 0.07f);
|
||||
_gpuSparks?.EmitSparkBurst(start, aimDir, 18, new Color(4.5f, 2.8f, 0.8f, 0.96f), 11f, 0.024f);
|
||||
break;
|
||||
|
||||
case WeaponVisualClass.Autocannon:
|
||||
_gpuSparks?.EmitMuzzleStarburst(start, new Color(4.4f, 2.6f, 0.75f, 0.98f), 0.56f, 0.08f);
|
||||
_gpuSparks?.EmitSparkBurst(start, aimDir, 5, new Color(4.2f, 2.5f, 0.7f, 0.96f), 13f, 0.04f);
|
||||
_gpuSparks?.EmitMuzzleStarburst(start, new Color(4.6f, 2.6f, 0.75f, 0.98f), 0.56f, 0.08f);
|
||||
_gpuSparks?.EmitSparkBurst(start, aimDir, 32, new Color(4.8f, 2.6f, 0.65f, 0.96f), 13f, 0.026f);
|
||||
_volumetrics?.EmitMuzzleBreechPuff(start, end, sampleGroundTint(start.X, start.Z), wClass, isRecoilless: false);
|
||||
if (!hasCam || start.DistanceSquaredTo(camPos) <= 45f * 45f)
|
||||
{
|
||||
|
|
@ -479,8 +484,8 @@ public partial class ParticlePool : Node3D
|
|||
break;
|
||||
|
||||
case WeaponVisualClass.Explosive:
|
||||
_gpuSparks?.EmitMuzzleStarburst(start, new Color(4.8f, 2.6f, 0.70f, 0.98f), isRecoilless ? 0.78f : 0.48f, 0.09f);
|
||||
_gpuSparks?.EmitSparkBurst(start, aimDir, isRecoilless ? 8 : 4, new Color(4.5f, 2.4f, 0.65f, 0.98f), 15f, 0.042f);
|
||||
_gpuSparks?.EmitMuzzleStarburst(start, new Color(5.0f, 2.6f, 0.70f, 0.98f), isRecoilless ? 0.78f : 0.48f, 0.09f);
|
||||
_gpuSparks?.EmitSparkBurst(start, aimDir, isRecoilless ? 64 : 32, new Color(5.0f, 2.5f, 0.60f, 0.98f), 15f, 0.028f);
|
||||
_volumetrics?.EmitMuzzleBreechPuff(start, end, sampleGroundTint(start.X, start.Z), wClass, isRecoilless);
|
||||
if (!hasCam || start.DistanceSquaredTo(camPos) <= 65f * 65f)
|
||||
{
|
||||
|
|
@ -490,7 +495,7 @@ public partial class ParticlePool : Node3D
|
|||
|
||||
case WeaponVisualClass.ThermalBeam:
|
||||
{
|
||||
Color beamCol = isLance ? new Color(4.5f, 3.2f, 0.95f, 0.96f) : new Color(0.95f, 3.6f, 4.5f, 0.96f);
|
||||
Color beamCol = isLance ? new Color(4.8f, 3.2f, 0.95f, 0.96f) : new Color(2.8f, 3.4f, 3.8f, 0.96f);
|
||||
_gpuSparks?.EmitMuzzleStarburst(start, beamCol, isLance ? 0.68f : 0.48f, 0.09f);
|
||||
if (!hasCam || start.DistanceSquaredTo(camPos) <= 45f * 45f)
|
||||
{
|
||||
|
|
@ -502,9 +507,9 @@ public partial class ParticlePool : Node3D
|
|||
|
||||
case WeaponVisualClass.GaussRail:
|
||||
{
|
||||
Color gaussHdr = new(0.85f, 3.5f, 4.8f, 0.98f);
|
||||
_gpuSparks?.EmitMuzzleStarburst(start, gaussHdr, 0.72f, 0.09f);
|
||||
_gpuSparks?.EmitSparkBurst(start, aimDir, 10, gaussHdr, 19f, 0.04f);
|
||||
Color gaussHdr = new(3.6f, 2.8f, 1.8f, 0.98f);
|
||||
_gpuSparks?.EmitMuzzleStarburst(start, new Color(1.4f, 3.5f, 4.8f, 0.98f), 0.72f, 0.09f);
|
||||
_gpuSparks?.EmitSparkBurst(start, aimDir, 56, gaussHdr, 19f, 0.026f);
|
||||
if (!hasCam || start.DistanceSquaredTo(camPos) <= 65f * 65f)
|
||||
{
|
||||
SpawnFlashLight(start, new Color(0.22f, 0.78f, 1.0f), 4.2f, 14f, 0.11f, priority: 5);
|
||||
|
|
@ -514,9 +519,9 @@ public partial class ParticlePool : Node3D
|
|||
|
||||
case WeaponVisualClass.PlasmaPpc:
|
||||
{
|
||||
Color plasmaHdr = new(0.65f, 3.4f, 4.2f, 0.96f);
|
||||
_gpuSparks?.EmitMuzzleStarburst(start, plasmaHdr, 0.65f, 0.09f);
|
||||
_gpuSparks?.EmitSparkBurst(start, aimDir, 6, plasmaHdr, 12f, 0.042f);
|
||||
Color plasmaHdr = new(3.4f, 2.8f, 1.6f, 0.96f);
|
||||
_gpuSparks?.EmitMuzzleStarburst(start, new Color(1.0f, 3.4f, 4.2f, 0.96f), 0.65f, 0.09f);
|
||||
_gpuSparks?.EmitSparkBurst(start, aimDir, 38, plasmaHdr, 12f, 0.028f);
|
||||
if (!hasCam || start.DistanceSquaredTo(camPos) <= 55f * 55f)
|
||||
{
|
||||
SpawnFlashLight(start, new Color(0.16f, 0.88f, 0.95f), 3.4f, 12f, 0.12f, priority: 4);
|
||||
|
|
@ -525,13 +530,13 @@ public partial class ParticlePool : Node3D
|
|||
}
|
||||
|
||||
case WeaponVisualClass.RocketSalvo:
|
||||
_gpuSparks?.EmitMuzzleStarburst(start, new Color(4.4f, 2.6f, 0.75f, 0.96f), 0.62f, 0.095f);
|
||||
_gpuSparks?.EmitSparkBurst(start, aimDir, 6, new Color(4.2f, 2.4f, 0.65f, 0.96f), 13f, 0.042f);
|
||||
_gpuSparks?.EmitMuzzleStarburst(start, new Color(4.8f, 2.6f, 0.75f, 0.96f), 0.62f, 0.095f);
|
||||
_gpuSparks?.EmitSparkBurst(start, aimDir, 42, new Color(4.8f, 2.4f, 0.60f, 0.96f), 13f, 0.028f);
|
||||
_volumetrics?.EmitMuzzleBreechPuff(start, end, sampleGroundTint(start.X, start.Z), wClass, isRecoilless: false);
|
||||
break;
|
||||
|
||||
case WeaponVisualClass.SwarmSmart:
|
||||
_gpuSparks?.EmitMuzzleStarburst(start, new Color(2.2f, 4.0f, 1.0f, 0.96f), 0.48f, 0.085f);
|
||||
_gpuSparks?.EmitMuzzleStarburst(start, new Color(2.8f, 3.8f, 1.2f, 0.96f), 0.48f, 0.085f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -572,7 +577,8 @@ public partial class ParticlePool : Node3D
|
|||
if (hit.IsAirburst || (wClass == WeaponVisualClass.KineticLight && string.Equals(hit.WeaponId, "pd_flak", StringComparison.Ordinal)))
|
||||
{
|
||||
_volumetrics?.EmitExplosiveHit(pos, normal, groundTint, wClass, isRecoilless: false, isAirburst: true);
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 10, new Color(4.5f, 2.6f, 0.75f, 0.98f), 14f, 0.042f);
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 76, new Color(5.0f, 2.7f, 0.70f, 0.98f), 14f, 0.026f);
|
||||
_gpuSparks?.EmitEmberBurst(pos, 28, new Color(4.0f, 1.8f, 0.35f, 0.95f), 4.5f, 0.030f);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -581,17 +587,17 @@ public partial class ParticlePool : Node3D
|
|||
case WeaponVisualClass.KineticLight:
|
||||
if (isTerrain)
|
||||
{
|
||||
_gpuSparks?.EmitDustMotes(pos, normal, 5, groundTint with { A = 0.72f }, 4.5f, 0.055f);
|
||||
_gpuSparks?.EmitDustMotes(pos, normal, 36, groundTint with { A = 0.76f }, 4.5f, 0.045f);
|
||||
}
|
||||
else
|
||||
{
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 7, new Color(4.4f, 3.2f, 1.2f, 0.96f), 11f, 0.036f);
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 62, new Color(4.8f, 3.0f, 0.95f, 0.96f), 11f, 0.024f);
|
||||
}
|
||||
break;
|
||||
|
||||
case WeaponVisualClass.Autocannon:
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 9, new Color(4.4f, 2.6f, 0.75f, 0.98f), 13.5f, 0.04f);
|
||||
_gpuSparks?.EmitDustMotes(pos, normal, 6, groundTint with { A = 0.75f }, 5.5f, 0.06f);
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 76, new Color(4.8f, 2.6f, 0.70f, 0.98f), 13.5f, 0.026f);
|
||||
_gpuSparks?.EmitDustMotes(pos, normal, 42, groundTint with { A = 0.78f }, 5.5f, 0.048f);
|
||||
_volumetrics?.EmitFootstepOrTirePuff(pos, groundTint, 1.0f);
|
||||
break;
|
||||
|
||||
|
|
@ -599,8 +605,9 @@ public partial class ParticlePool : Node3D
|
|||
{
|
||||
bool isRecoilless = string.Equals(hit.WeaponId, "recoilless", StringComparison.Ordinal);
|
||||
_volumetrics?.EmitExplosiveHit(pos, normal, groundTint, wClass, isRecoilless, isAirburst: false);
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, isRecoilless ? 16 : 10, new Color(4.8f, 2.5f, 0.7f, 0.98f), 17f, 0.044f);
|
||||
_gpuSparks?.EmitDustMotes(pos, normal, isRecoilless ? 10 : 6, groundTint with { A = 0.78f }, 7.5f, 0.068f);
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, isRecoilless ? 140 : 88, new Color(5.2f, 2.6f, 0.65f, 0.98f), 17f, 0.028f);
|
||||
_gpuSparks?.EmitEmberBurst(pos, isRecoilless ? 54 : 32, new Color(4.2f, 1.7f, 0.35f, 0.95f), 5.5f, 0.032f);
|
||||
_gpuSparks?.EmitDustMotes(pos, normal, isRecoilless ? 68 : 44, groundTint with { A = 0.80f }, 7.5f, 0.052f);
|
||||
if (!hasCam || pos.DistanceSquaredTo(camPos) <= 75f * 75f)
|
||||
{
|
||||
SpawnFlashLight(pos + normal * 0.45f, new Color(1.0f, 0.55f, 0.16f), isRecoilless ? 4.8f : 3.2f, isRecoilless ? 14.5f : 11f, 0.14f, priority: 7);
|
||||
|
|
@ -610,12 +617,12 @@ public partial class ParticlePool : Node3D
|
|||
|
||||
case WeaponVisualClass.ThermalBeam:
|
||||
_volumetrics?.EmitExplosiveHit(pos, normal, groundTint, wClass, isRecoilless: false, isAirburst: false);
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 10, new Color(1.6f, 3.8f, 4.6f, 0.98f), 13f, 0.04f);
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 68, new Color(4.6f, 2.8f, 1.4f, 0.98f), 13f, 0.026f);
|
||||
break;
|
||||
|
||||
case WeaponVisualClass.GaussRail:
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 16, new Color(1.0f, 3.6f, 4.8f, 0.98f), 20f, 0.042f);
|
||||
_gpuSparks?.EmitDustMotes(pos, normal, 8, groundTint with { A = 0.76f }, 6.5f, 0.06f);
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 96, new Color(4.2f, 3.0f, 1.8f, 0.98f), 20f, 0.026f);
|
||||
_gpuSparks?.EmitDustMotes(pos, normal, 48, groundTint with { A = 0.78f }, 6.5f, 0.048f);
|
||||
_volumetrics?.EmitFootstepOrTirePuff(pos, groundTint, 1.2f);
|
||||
if (!hasCam || pos.DistanceSquaredTo(camPos) <= 65f * 65f)
|
||||
{
|
||||
|
|
@ -625,14 +632,15 @@ public partial class ParticlePool : Node3D
|
|||
|
||||
case WeaponVisualClass.PlasmaPpc:
|
||||
_volumetrics?.EmitExplosiveHit(pos, normal, groundTint, wClass, isRecoilless: false, isAirburst: false);
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 14, new Color(0.95f, 3.8f, 4.6f, 0.98f), 15f, 0.044f);
|
||||
_gpuSparks?.EmitEmberBurst(pos, 6, new Color(0.75f, 3.2f, 4.0f, 0.92f), 4.5f, 0.05f);
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 84, new Color(4.0f, 2.8f, 1.6f, 0.98f), 15f, 0.028f);
|
||||
_gpuSparks?.EmitEmberBurst(pos, 40, new Color(3.6f, 2.0f, 0.85f, 0.92f), 4.5f, 0.032f);
|
||||
break;
|
||||
|
||||
case WeaponVisualClass.RocketSalvo:
|
||||
_volumetrics?.EmitExplosiveHit(pos, normal, groundTint, wClass, isRecoilless: false, isAirburst: false);
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 14, new Color(4.6f, 2.6f, 0.75f, 0.98f), 16f, 0.044f);
|
||||
_gpuSparks?.EmitDustMotes(pos, normal, 8, groundTint with { A = 0.78f }, 7.0f, 0.068f);
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 112, new Color(5.0f, 2.7f, 0.65f, 0.98f), 16f, 0.028f);
|
||||
_gpuSparks?.EmitEmberBurst(pos, 38, new Color(4.0f, 1.7f, 0.35f, 0.95f), 5.0f, 0.032f);
|
||||
_gpuSparks?.EmitDustMotes(pos, normal, 56, groundTint with { A = 0.80f }, 7.0f, 0.052f);
|
||||
if (!hasCam || pos.DistanceSquaredTo(camPos) <= 75f * 75f)
|
||||
{
|
||||
SpawnFlashLight(pos + normal * 0.45f, new Color(1.0f, 0.56f, 0.16f), 4.5f, 14f, 0.14f, priority: 7);
|
||||
|
|
@ -641,7 +649,7 @@ public partial class ParticlePool : Node3D
|
|||
|
||||
case WeaponVisualClass.SwarmSmart:
|
||||
_volumetrics?.EmitExplosiveHit(pos, normal, groundTint, wClass, isRecoilless: false, isAirburst: false);
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 10, new Color(2.2f, 4.2f, 1.0f, 0.98f), 13f, 0.04f);
|
||||
_gpuSparks?.EmitSparkBurst(pos, normal, 68, new Color(4.2f, 2.8f, 0.85f, 0.98f), 13f, 0.026f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -660,8 +668,9 @@ public partial class ParticlePool : Node3D
|
|||
|
||||
Color gTint = sampleGroundTint(pos.X, pos.Z);
|
||||
_volumetrics?.EmitChassisExplosion(pos, massKg, gTint);
|
||||
_gpuSparks?.EmitSparkBurst(pos, Vector3.Up, 32, new Color(5.0f, 2.8f, 0.75f, 0.98f), 22f, 0.046f);
|
||||
_gpuSparks?.EmitEmberBurst(pos, 16, new Color(4.0f, 1.8f, 0.45f, 0.95f), 7.0f, 0.055f);
|
||||
_gpuSparks?.EmitSparkBurst(pos, Vector3.Up, 260, new Color(5.6f, 2.9f, 0.70f, 0.98f), 22f, 0.028f);
|
||||
_gpuSparks?.EmitEmberBurst(pos, 140, new Color(4.4f, 1.8f, 0.35f, 0.95f), 7.5f, 0.034f);
|
||||
_gpuSparks?.EmitDustMotes(pos, Vector3.Up, 64, gTint with { A = 0.82f }, 9.0f, 0.056f);
|
||||
|
||||
if (!hasCam || pos.DistanceSquaredTo(camPos) <= 95f * 95f)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue