change: remove color space modifier
parent
e352d153ce
commit
e15319a46e
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue