From 84e2297e48d0bd0b0b82f4ecc07fc3200361d93a Mon Sep 17 00:00:00 2001 From: Dunbaratu Date: Wed, 20 Mar 2019 17:13:38 -0500 Subject: [PATCH] Fixes #2463 by just changing which shader Fixes #2463 The Shader chosen from KSP's pre-made shaders was one that was additive-only and would never darken colors. That's all that was wrong. --- src/kOS/Suffixed/VectorRenderer.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/kOS/Suffixed/VectorRenderer.cs b/src/kOS/Suffixed/VectorRenderer.cs index 865be221b..2a1ac8964 100644 --- a/src/kOS/Suffixed/VectorRenderer.cs +++ b/src/kOS/Suffixed/VectorRenderer.cs @@ -1,4 +1,4 @@ -using kOS.Safe; +using kOS.Safe; using kOS.Safe.Encapsulation; using kOS.Safe.Encapsulation.Suffixes; using kOS.Safe.Execution; @@ -340,7 +340,6 @@ public void SetShow(BooleanValue newShowVal) line = lineObj.AddComponent(); hat = hatObj.AddComponent(); - //TODO: 1.1 TODO label = labelObj.GetComponent(); line.useWorldSpace = false; @@ -348,8 +347,11 @@ public void SetShow(BooleanValue newShowVal) GetShipCenterCoords(); - line.material = new Material(Shader.Find("Particles/Additive")); - hat.material = new Material(Shader.Find("Particles/Additive")); + // Note the Shader name string below comes from Kerbal's packaged shaders the + // game ships with - there's many to choose from but they're not documented what + // they are. This was settled upon via trial and error: + line.material = new Material(Shader.Find("Particles/Alpha Blended")); + hat.material = new Material(Shader.Find("Particles/Alpha Blended")); // This is how font loading would work if other fonts were available in KSP: // Font lblFont = (Font)Resources.Load( "Arial", typeof(Font) );