From e15319a46eb6565b4909843f1bec954b3d7d9472 Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Wed, 9 Jun 2021 01:32:28 +0900 Subject: [PATCH] change: remove color space modifier --- Scripts/UIParticleUpdater.cs | 12 ++++++------ Scripts/Utils.cs | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Scripts/UIParticleUpdater.cs b/Scripts/UIParticleUpdater.cs index e5ca8ff..129965e 100755 --- a/Scripts/UIParticleUpdater.cs +++ b/Scripts/UIParticleUpdater.cs @@ -74,12 +74,12 @@ namespace Coffee.UIExtensions BakeMesh(particle); Profiler.EndSample(); - if (QualitySettings.activeColorSpace == ColorSpace.Linear) - { - Profiler.BeginSample("[UIParticle] Modify color space to linear"); - particle.bakedMesh.ModifyColorSpaceToLinear(); - Profiler.EndSample(); - } + // if (QualitySettings.activeColorSpace == ColorSpace.Linear) + // { + // Profiler.BeginSample("[UIParticle] Modify color space to linear"); + // particle.bakedMesh.ModifyColorSpaceToLinear(); + // Profiler.EndSample(); + // } Profiler.BeginSample("[UIParticle] Set mesh to CanvasRenderer"); particle.canvasRenderer.SetMesh(particle.bakedMesh); diff --git a/Scripts/Utils.cs b/Scripts/Utils.cs index fda7084..7d7b802 100644 --- a/Scripts/Utils.cs +++ b/Scripts/Utils.cs @@ -79,18 +79,18 @@ namespace Coffee.UIParticleExtensions internal static class MeshExtensions { - static readonly List s_Colors = new List(); + // static readonly List s_Colors = new List(); - public static void ModifyColorSpaceToLinear(this Mesh self) - { - self.GetColors(s_Colors); - - for (var i = 0; i < s_Colors.Count; i++) - s_Colors[i] = ((Color) s_Colors[i]).gamma; - - self.SetColors(s_Colors); - s_Colors.Clear(); - } + // public static void ModifyColorSpaceToLinear(this Mesh self) + // { + // self.GetColors(s_Colors); + // + // for (var i = 0; i < s_Colors.Count; i++) + // s_Colors[i] = ((Color) s_Colors[i]).gamma; + // + // self.SetColors(s_Colors); + // s_Colors.Clear(); + // } public static void Clear(this CombineInstance[] self) {