This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Linq; | |
using UnityEngine; | |
using UnityEditor; | |
using UnityEditor.EditorTools; | |
// Tagging a class with the EditorTool attribute and no target type registers a global tool. Global tools are valid for any selection, and are accessible through the top left toolbar in the editor. | |
[EditorTool("Moving Particle Context")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static const float3x3 lrgb2cone = { | |
0.412165612, 0.211859107, 0.0883097947, | |
0.536275208, 0.6807189584, 0.2818474174, | |
0.0514575653, 0.107406579, 0.6302613616, | |
}; | |
static const float3x3 cone2lab = { | |
+0.2104542553, +1.9779984951, +0.0259040371, | |
+0.7936177850, -2.4285922050, +0.7827717662, | |
+0.0040720468, +0.4505937099, -0.8086757660, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
public class MaterialGradientDrawer : MaterialPropertyDrawer { | |
private int resolution; |