change: remove color space modifier
parent
e352d153ce
commit
e15319a46e
|
@ -74,12 +74,12 @@ namespace Coffee.UIExtensions
|
||||||
BakeMesh(particle);
|
BakeMesh(particle);
|
||||||
Profiler.EndSample();
|
Profiler.EndSample();
|
||||||
|
|
||||||
if (QualitySettings.activeColorSpace == ColorSpace.Linear)
|
// if (QualitySettings.activeColorSpace == ColorSpace.Linear)
|
||||||
{
|
// {
|
||||||
Profiler.BeginSample("[UIParticle] Modify color space to linear");
|
// Profiler.BeginSample("[UIParticle] Modify color space to linear");
|
||||||
particle.bakedMesh.ModifyColorSpaceToLinear();
|
// particle.bakedMesh.ModifyColorSpaceToLinear();
|
||||||
Profiler.EndSample();
|
// Profiler.EndSample();
|
||||||
}
|
// }
|
||||||
|
|
||||||
Profiler.BeginSample("[UIParticle] Set mesh to CanvasRenderer");
|
Profiler.BeginSample("[UIParticle] Set mesh to CanvasRenderer");
|
||||||
particle.canvasRenderer.SetMesh(particle.bakedMesh);
|
particle.canvasRenderer.SetMesh(particle.bakedMesh);
|
||||||
|
|
|
@ -79,18 +79,18 @@ namespace Coffee.UIParticleExtensions
|
||||||
|
|
||||||
internal static class MeshExtensions
|
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)
|
// public static void ModifyColorSpaceToLinear(this Mesh self)
|
||||||
{
|
// {
|
||||||
self.GetColors(s_Colors);
|
// self.GetColors(s_Colors);
|
||||||
|
//
|
||||||
for (var i = 0; i < s_Colors.Count; i++)
|
// for (var i = 0; i < s_Colors.Count; i++)
|
||||||
s_Colors[i] = ((Color) s_Colors[i]).gamma;
|
// s_Colors[i] = ((Color) s_Colors[i]).gamma;
|
||||||
|
//
|
||||||
self.SetColors(s_Colors);
|
// self.SetColors(s_Colors);
|
||||||
s_Colors.Clear();
|
// s_Colors.Clear();
|
||||||
}
|
// }
|
||||||
|
|
||||||
public static void Clear(this CombineInstance[] self)
|
public static void Clear(this CombineInstance[] self)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue