change: remove color space modifier

pull/169/head
mob-sakai 2021-06-09 01:32:28 +09:00
parent e352d153ce
commit e15319a46e
2 changed files with 17 additions and 17 deletions

View File

@ -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);

View File

@ -79,18 +79,18 @@ namespace Coffee.UIParticleExtensions
internal static class MeshExtensions
{
static readonly List<Color32> s_Colors = new List<Color32>();
// static readonly List<Color32> s_Colors = new List<Color32>();
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)
{