From e8dd5d4fd406e6e6b710cbe85309f6870bccc37a Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 3 Nov 2019 18:31:04 -0500 Subject: Remove everything --- .../Scripts/Shader/G_GraphShader.cs | 154 --------------------- .../Scripts/Shader/G_GraphShader.cs.meta | 12 -- 2 files changed, 166 deletions(-) delete mode 100644 Assets/Packages/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Shader/G_GraphShader.cs delete mode 100644 Assets/Packages/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Shader/G_GraphShader.cs.meta (limited to 'Assets/Packages/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Shader') diff --git a/Assets/Packages/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Shader/G_GraphShader.cs b/Assets/Packages/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Shader/G_GraphShader.cs deleted file mode 100644 index 02ff3dc..0000000 --- a/Assets/Packages/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Shader/G_GraphShader.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* --------------------------------------- - * Author: Martin Pane (martintayx@gmail.com) (@tayx94) - * Collaborators: Lars Aalbertsen (@Rockylars) - * Project: Graphy - Ultimate Stats Monitor - * Date: 22-Nov-17 - * Studio: Tayx - * - * This project is released under the MIT license. - * Attribution is not required, but it is always welcomed! - * -------------------------------------*/ - -using UnityEngine; -using UnityEngine.UI; - -namespace Tayx.Graphy -{ - /// - /// This class communicates directly with the shader to draw the graphs. Performance here is of upmost importance - /// to reduce as much overhead as possible, as we are updating hundreds of values every frame. - /// - public class G_GraphShader - { - /* ----- TODO: ---------------------------- - * Add summaries to the variables. - * --------------------------------------*/ - - #region Variables -> Array - - public const int ArrayMaxSizeFull = 512; - public const int ArrayMaxSizeLight = 128; - - public int ArrayMaxSize = 128; - - public float[] Array; // The values - - #endregion - - #region Variables -> Image - - public Image Image = null; - - #endregion - - #region Variables -> Name - - private string Name = "GraphValues"; // The name of the array - private string Name_Length = "GraphValues_Length"; - - #endregion - - #region Variables -> Average - - public float Average = 0; - private int averagePropertyId = 0; - - #endregion - - #region Variables -> Thresholds - - public float GoodThreshold = 0; - public float CautionThreshold = 0; - - private int goodThresholdPropertyId = 0; - private int cautionThresholdPropertyId = 0; - - #endregion - - #region Variables -> Color - - public Color GoodColor = Color.white; - public Color CautionColor = Color.white; - public Color CriticalColor = Color.white; - - private int goodColorPropertyId = 0; - private int cautionColorPropertyId = 0; - private int criticalColorPropertyId = 0; - - #endregion - - #region Methods -> Public - - /// - /// This is done to avoid a design problem that arrays in shaders have, - /// and should be called before initializing any shader graph. - /// The first time that you use initialize an array, the size of the array in the shader is fixed. - /// This is why sometimes you will get a warning saying that the array size will be capped. - /// It shouldn't generate any issues, but in the worst case scenario just reset the Unity Editor - /// (if for some reason the shaders reload). - /// I also cache the Property IDs, that make access faster to modify shader parameters. - /// - public void InitializeShader() - { - Image.material.SetFloatArray(Name, new float[ArrayMaxSize]); - - averagePropertyId = Shader.PropertyToID("Average"); - - goodThresholdPropertyId = Shader.PropertyToID("_GoodThreshold"); - cautionThresholdPropertyId = Shader.PropertyToID("_CautionThreshold"); - - goodColorPropertyId = Shader.PropertyToID("_GoodColor"); - cautionColorPropertyId = Shader.PropertyToID("_CautionColor"); - criticalColorPropertyId = Shader.PropertyToID("_CriticalColor"); - } - - /// - /// Updates the material linked with this shader graph with the values in the float[] array. - /// - public void UpdateArray() - { - Image.material.SetInt(Name_Length, Array.Length); - } - - /// - /// Updates the average parameter in the material. - /// - public void UpdateAverage() - { - Image.material.SetFloat(averagePropertyId, Average); - } - - /// - /// Updates the thresholds in the material. - /// - public void UpdateThresholds() - { - Image.material.SetFloat(goodThresholdPropertyId, GoodThreshold); - Image.material.SetFloat(cautionThresholdPropertyId, CautionThreshold); - } - - /// - /// Updates the colors in the material. - /// - public void UpdateColors() - { - Image.material.SetColor(goodColorPropertyId, GoodColor); - Image.material.SetColor(cautionColorPropertyId, CautionColor); - Image.material.SetColor(criticalColorPropertyId, CriticalColor); - } - - /// - /// Updates the points in the graph with the set array of values. - /// - public void UpdatePoints() - { - // Requires an array called "name" - // and another one called "name_Length" - - Image.material.SetFloatArray(Name, Array); - } - - #endregion - } -} - diff --git a/Assets/Packages/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Shader/G_GraphShader.cs.meta b/Assets/Packages/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Shader/G_GraphShader.cs.meta deleted file mode 100644 index da0b0db..0000000 --- a/Assets/Packages/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Shader/G_GraphShader.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 0ddb605ced1369e409812b4f405221cd -timeCreated: 1511903341 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: -- cgit v1.2.3