├── .gitignore ├── Assets ├── Colour.meta ├── Colour │ ├── Materials.meta │ ├── Materials │ │ ├── UnlitHDR.mat │ │ ├── UnlitHDR.mat.meta │ │ ├── UnlitLDR.mat │ │ └── UnlitLDR.mat.meta │ ├── Models.meta │ ├── Models │ │ ├── ImagePlane.fbx │ │ ├── ImagePlane.fbx.meta │ │ ├── Materials.meta │ │ └── Materials │ │ │ ├── lambert1.mat │ │ │ └── lambert1.mat.meta │ ├── Notebooks.meta │ ├── Notebooks │ │ ├── CIECAM02_Unity.ipynb │ │ └── CIECAM02_Unity.ipynb.meta │ ├── Scenes.meta │ ├── Scenes │ │ ├── CIECAM02Tonemapper.unity │ │ ├── CIECAM02Tonemapper.unity.meta │ │ ├── FunctionPlotter.unity │ │ └── FunctionPlotter.unity.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── CIECAM02Tonemapper.cs │ │ ├── CIECAM02Tonemapper.cs.meta │ │ ├── CIECAM02UI.cs │ │ ├── CIECAM02UI.cs.meta │ │ ├── FunctionPlotter.cs │ │ ├── FunctionPlotter.cs.meta │ │ ├── Utilities.meta │ │ └── Utilities │ │ │ ├── DragPanel.cs │ │ │ ├── DragPanel.cs.meta │ │ │ ├── FitToCamera.cs │ │ │ ├── FitToCamera.cs.meta │ │ │ ├── SliderInputField.cs │ │ │ └── SliderInputField.cs.meta │ ├── Shaders.meta │ ├── Shaders │ │ ├── AdaptationCAT.cginc │ │ ├── AdaptationCAT.cginc.meta │ │ ├── AppearanceCIECAM02.cginc │ │ ├── AppearanceCIECAM02.cginc.meta │ │ ├── CIECAM02Tonemapper.shader │ │ ├── CIECAM02Tonemapper.shader.meta │ │ ├── ColorimetryDatasetIlluminants.cginc │ │ ├── ColorimetryDatasetIlluminants.cginc.meta │ │ ├── FunctionPlotter.shader │ │ ├── FunctionPlotter.shader.meta │ │ ├── ModelsRGB.cginc │ │ ├── ModelsRGB.cginc.meta │ │ ├── TonemappingGlobalOperators.cginc │ │ ├── TonemappingGlobalOperators.cginc.meta │ │ ├── UnlitHDRTexture.shader │ │ ├── UnlitHDRTexture.shader.meta │ │ ├── UnlitLDRTexture.shader │ │ ├── UnlitLDRTexture.shader.meta │ │ ├── UtilitiesCommon.cginc │ │ └── UtilitiesCommon.cginc.meta │ ├── Textures.meta │ └── Textures │ │ ├── DigitalLAD2048x1556HDR.exr │ │ ├── DigitalLAD2048x1556HDR.exr.meta │ │ ├── DigitalLAD2048x1556LDR.png │ │ ├── DigitalLAD2048x1556LDR.png.meta │ │ ├── Others.meta │ │ ├── Others │ │ ├── ColourLogoSmallSquare_001.png │ │ └── ColourLogoSmallSquare_001.png.meta │ │ ├── RGBBandsHDR.exr │ │ └── RGBBandsHDR.exr.meta ├── Standard Assets.meta └── Standard Assets │ ├── Effects.meta │ └── Effects │ ├── ImageEffects.meta │ └── ImageEffects │ ├── Scripts.meta │ └── Scripts │ ├── ImageEffectBase.cs │ ├── ImageEffectBase.cs.meta │ ├── PostEffectsBase.cs │ ├── PostEffectsBase.cs.meta │ ├── PostEffectsHelper.cs │ └── PostEffectsHelper.cs.meta └── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NavMeshProjectSettings.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityAdsSettings.asset └── UnityConnectSettings.asset /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | ExportedObj/ 9 | .consulo/ 10 | *.csproj 11 | *.unityproj 12 | *.sln 13 | *.suo 14 | *.tmp 15 | *.user 16 | *.userprefs 17 | *.pidb 18 | *.booproj 19 | *.svd 20 | 21 | *.pidb.meta 22 | 23 | sysinfo.txt 24 | 25 | *.apk 26 | *.unitypackage 27 | Assets/Colour/Notebooks/.ipynb_checkpoints 28 | -------------------------------------------------------------------------------- /Assets/Colour.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4155ff1fb83214e39a8d37e34b8ca9e9 3 | folderAsset: yes 4 | timeCreated: 1474704098 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Colour/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02a3395e10eb94db29a59a150927019e 3 | folderAsset: yes 4 | timeCreated: 1474868724 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Colour/Materials/UnlitHDR.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/Assets/Colour/Materials/UnlitHDR.mat -------------------------------------------------------------------------------- /Assets/Colour/Materials/UnlitHDR.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b6879b4a72664ef7ac0bcf590f2f693 3 | timeCreated: 1475355968 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Colour/Materials/UnlitLDR.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/Assets/Colour/Materials/UnlitLDR.mat -------------------------------------------------------------------------------- /Assets/Colour/Materials/UnlitLDR.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5207c293d232a4008ab244368c53d70e 3 | timeCreated: 1475656065 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Colour/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3003dae8847a149b6908082a76dd3db3 3 | folderAsset: yes 4 | timeCreated: 1474871654 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Colour/Models/ImagePlane.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/Assets/Colour/Models/ImagePlane.fbx -------------------------------------------------------------------------------- /Assets/Colour/Models/ImagePlane.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b604f133f0fbd4adab9471eabcace892 3 | timeCreated: 1474871761 4 | licenseType: Free 5 | ModelImporter: 6 | serializedVersion: 19 7 | fileIDToRecycleName: 8 | 100000: //RootNode 9 | 400000: //RootNode 10 | 2300000: //RootNode 11 | 3300000: //RootNode 12 | 4300000: ImagePlane 13 | 9500000: //RootNode 14 | materials: 15 | importMaterials: 1 16 | materialName: 0 17 | materialSearch: 1 18 | animations: 19 | legacyGenerateAnimations: 4 20 | bakeSimulation: 0 21 | resampleCurves: 1 22 | optimizeGameObjects: 0 23 | motionNodeName: 24 | animationImportErrors: 25 | animationImportWarnings: 26 | animationRetargetingWarnings: 27 | animationDoRetargetingWarnings: 0 28 | animationCompression: 1 29 | animationRotationError: 0.5 30 | animationPositionError: 0.5 31 | animationScaleError: 0.5 32 | animationWrapMode: 0 33 | extraExposedTransformPaths: [] 34 | clipAnimations: [] 35 | isReadable: 1 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | importBlendShapes: 1 42 | swapUVChannels: 0 43 | generateSecondaryUV: 0 44 | useFileUnits: 1 45 | optimizeMeshForGPU: 1 46 | keepQuads: 0 47 | weldVertices: 1 48 | secondaryUVAngleDistortion: 8 49 | secondaryUVAreaDistortion: 15.000001 50 | secondaryUVHardAngle: 88 51 | secondaryUVPackMargin: 4 52 | useFileScale: 1 53 | tangentSpace: 54 | normalSmoothAngle: 60 55 | normalImportMode: 0 56 | tangentImportMode: 3 57 | importAnimation: 1 58 | copyAvatar: 0 59 | humanDescription: 60 | human: [] 61 | skeleton: [] 62 | armTwist: 0.5 63 | foreArmTwist: 0.5 64 | upperLegTwist: 0.5 65 | legTwist: 0.5 66 | armStretch: 0.05 67 | legStretch: 0.05 68 | feetSpacing: 0 69 | rootMotionBoneName: 70 | hasTranslationDoF: 0 71 | lastHumanDescriptionAvatarSource: {instanceID: 0} 72 | animationType: 2 73 | humanoidOversampling: 1 74 | additionalBone: 0 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/Colour/Models/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2dafc9349ac44269ba431d1c5eb509c 3 | folderAsset: yes 4 | timeCreated: 1476254834 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Colour/Models/Materials/lambert1.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/Assets/Colour/Models/Materials/lambert1.mat -------------------------------------------------------------------------------- /Assets/Colour/Models/Materials/lambert1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0d96d03ce8c6467980d85c2cd3380d8 3 | timeCreated: 1476254834 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Colour/Notebooks.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 621a5b8446b06498999e767361342aad 3 | folderAsset: yes 4 | timeCreated: 1476688532 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Colour/Notebooks/CIECAM02_Unity.ipynb.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6f79a5a0999f4404b158cff38aa197d 3 | timeCreated: 1476688533 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Colour/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 902a9a5a176664426b28759ec6dd1251 3 | folderAsset: yes 4 | timeCreated: 1474961900 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Colour/Scenes/CIECAM02Tonemapper.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/Assets/Colour/Scenes/CIECAM02Tonemapper.unity -------------------------------------------------------------------------------- /Assets/Colour/Scenes/CIECAM02Tonemapper.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b61dec8bdef14d73a0c029631097be6 3 | timeCreated: 1474706876 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Colour/Scenes/FunctionPlotter.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/Assets/Colour/Scenes/FunctionPlotter.unity -------------------------------------------------------------------------------- /Assets/Colour/Scenes/FunctionPlotter.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2aad4583f15c54fefa5a3e2837bc12df 3 | timeCreated: 1474706876 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Colour/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bccb69a69c0f246e8a95b15b096388ea 3 | folderAsset: yes 4 | timeCreated: 1474872272 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Colour/Scripts/CIECAM02Tonemapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | #if UNITY_5_4_OR_NEWER 7 | [ImageEffectAllowedInSceneView] 8 | #endif 9 | [ExecuteInEditMode] 10 | [RequireComponent(typeof (Camera))] 11 | [AddComponentMenu("Image Effects/Color Adjustments/CIECAM02 Tonemapper")] 12 | public class CIECAM02Tonemapper : PostEffectsBase 13 | { 14 | 15 | public Shader shader = null; 16 | public Material material = null; 17 | 18 | public override bool CheckResources() 19 | { 20 | CheckSupport(false, true); 21 | 22 | material = CheckShaderAndCreateMaterial(shader, material); 23 | 24 | if (!isSupported) 25 | ReportAutoDisable(); 26 | return isSupported; 27 | } 28 | 29 | 30 | private void OnDisable() 31 | { 32 | if (material) 33 | { 34 | DestroyImmediate(material); 35 | material = null; 36 | } 37 | } 38 | 39 | [ImageEffectTransformsToLDR] 40 | private void OnRenderImage(RenderTexture source, RenderTexture destination) 41 | { 42 | if (CheckResources() == false) 43 | { 44 | Graphics.Blit(source, destination); 45 | return; 46 | } 47 | 48 | Graphics.Blit(source, destination, material, 0); 49 | return; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Assets/Colour/Scripts/CIECAM02Tonemapper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e50e925fb93c78246bf995d9dc3a2330 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - shader: {fileID: 4800000, guid: 003377fc2620a44939dadde6fe3f8190, type: 3} 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | -------------------------------------------------------------------------------- /Assets/Colour/Scripts/CIECAM02UI.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | using UnityStandardAssets.ImageEffects; 5 | 6 | public class CIECAM02UI : MonoBehaviour { 7 | 8 | // for name, illuminant in sorted(colour.ILLUMINANTS_RELATIVE_SPDS.items()): 9 | // XYZ = colour.spectral_to_XYZ(illuminant) 10 | // XYZ /= XYZ[1] 11 | // 12 | // print(name, XYZ * 100) 13 | private Vector3[] ILLUMINANTS_CIE_1931_2_DEGREE_STANDARD_OBSERVER = new [] { 14 | new Vector3(109.849538150881216f, 100.000000000000000f, 35.585111923478621f), // A 15 | new Vector3(99.087202067314152f, 100.000000000000000f, 85.312962145590404f), // B 16 | new Vector3(98.073307155429347f, 100.000000000000000f, 118.232536627931253f), // C 17 | new Vector3(96.421502084547555f, 100.000000000000000f, 82.520985375992566f), // D50 18 | new Vector3(95.681426099564220f, 100.000000000000000f, 92.147962290032964f), // D55 19 | new Vector3(95.294997332277291f, 100.000000000000000f, 101.014391334369861f), // D60 20 | new Vector3(95.046505745082385f, 100.000000000000000f, 108.897024100442707f), // D65 21 | new Vector3(94.972113762765247f, 100.000000000000000f, 122.636685419611922f), // D75 22 | new Vector3(100.007817123511899f, 100.000000000000000f, 100.034116792412121f), // E 23 | new Vector3(92.868465011895594f, 100.000000000000000f, 103.779175860702267f), // F1 24 | new Vector3(99.186352232104866f, 100.000000000000000f, 67.396642595906826f), // F10 25 | new Vector3(103.799511305231277f, 100.000000000000000f, 49.934562835111066f), // F11 26 | new Vector3(109.201789599129867f, 100.000000000000000f, 38.883008781504842f), // F12 27 | new Vector3(90.902773955559979f, 100.000000000000000f, 98.822853596156691f), // F2 28 | new Vector3(97.342998428219460f, 100.000000000000000f, 60.263133140897317f), // F3 29 | new Vector3(95.042910379275526f, 100.000000000000000f, 108.755100837555460f), // F4 30 | new Vector3(96.428049077366168f, 100.000000000000000f, 82.424058155658315f), // F5 31 | new Vector3(100.380151065504947f, 100.000000000000000f, 67.946175244894121f), // F6 32 | new Vector3(96.385300268362172f, 100.000000000000000f, 82.357429709808471f), // F7 33 | new Vector3(100.961462998902533f, 100.000000000000000f, 64.352789474327935f), // F8 34 | new Vector3(108.117286947434792f, 100.000000000000000f, 39.278619333875362f), // F9 35 | new Vector3(109.268024755194261f, 100.000000000000000f, 38.688833552235195f), // FL3.1 36 | new Vector3(101.987737110923533f, 100.000000000000000f, 65.856581570389167f), // FL3.10 37 | new Vector3(91.690051369716784f, 100.000000000000000f, 99.130565992750192f), // FL3.11 38 | new Vector3(109.543586891396245f, 100.000000000000000f, 37.785063683967948f), // FL3.12 39 | new Vector3(102.108942976638374f, 100.000000000000000f, 70.256710182921097f), // FL3.13 40 | new Vector3(96.890460954473042f, 100.000000000000000f, 80.890035628396532f), // FL3.14 41 | new Vector3(108.379073050999438f, 100.000000000000000f, 38.822957666511513f), // FL3.15 42 | new Vector3(99.686744199286963f, 100.000000000000000f, 61.290104379236169f), // FL3.2 43 | new Vector3(97.429684691340611f, 100.000000000000000f, 81.055778516353186f), // FL3.3 44 | new Vector3(97.065155755808092f, 100.000000000000000f, 83.872768392911055f), // FL3.4 45 | new Vector3(94.507820097352308f, 100.000000000000000f, 96.725642993117333f), // FL3.5 46 | new Vector3(108.424950824036628f, 100.000000000000000f, 39.305193050462876f), // FL3.6 47 | new Vector3(102.848672164390194f, 100.000000000000000f, 65.649936132023271f), // FL3.7 48 | new Vector3(95.507872788826432f, 100.000000000000000f, 81.550450355281967f), // FL3.8 49 | new Vector3(95.112037985200288f, 100.000000000000000f, 109.091895185021485f), // FL3.9 50 | new Vector3(128.448596304793540f, 100.000000000000000f, 12.543527278927098f), // HP1 51 | new Vector3(114.898193380482240f, 100.000000000000000f, 25.580194713734816f), // HP2 52 | new Vector3(105.574166892301776f, 100.000000000000000f, 39.816207398446231f), // HP3 53 | new Vector3(100.381607243405028f, 100.000000000000000f, 62.971511921253956f), // HP4 54 | new Vector3(101.679116009809363f, 100.000000000000000f, 67.610286897183414f), // HP5 55 | }; 56 | 57 | void Start () { 58 | SetDefaults (); 59 | } 60 | 61 | void Update () { 62 | 63 | } 64 | 65 | public void SetDefaults () { 66 | GameObject.Find("Tonemapper Dropdown").GetComponent().value = 0; 67 | GameObject.Find("Exposure Slider").GetComponent().value = 0.0f; 68 | GameObject.Find("Exposure InputField").GetComponent().text = "0.0"; 69 | 70 | // Moroney, N. (n.d.). Usage guidelines for CIECAM97s. Defaults for *sRGB* viewing conditions, 71 | // assuming 64 lux ambient / 80 cd/m2 CRT and D65 as whitepoint. 72 | GameObject.Find("Illuminant Dropdown").GetComponent().value = 6; 73 | GameObject.Find("XYZ_w_Scale Slider").GetComponent().value = 1.0f; 74 | GameObject.Find("XYZ_w_Scale InputField").GetComponent().text = "1.0"; 75 | GameObject.Find("L_A Slider").GetComponent().value = 4.0f; 76 | GameObject.Find("L_A InputField").GetComponent().text = "4.0"; 77 | GameObject.Find("Y_b Slider").GetComponent().value = 20.0f; 78 | GameObject.Find("Y_b InputField").GetComponent().text = "20.0"; 79 | GameObject.Find("Surround Dropdown").GetComponent().value = 0; 80 | GameObject.Find("DiscountIlluminant Toggle").GetComponent().isOn = true; 81 | 82 | GameObject.Find("Illuminant_v Dropdown").GetComponent().value = 6; 83 | GameObject.Find("XYZ_w_v_Scale Slider").GetComponent().value = 1.0f; 84 | GameObject.Find("XYZ_w_v_Scale InputField").GetComponent().text = "1.0"; 85 | GameObject.Find("L_A_v Slider").GetComponent().value = 4.0f; 86 | GameObject.Find("L_A_v InputField").GetComponent().text = "4.0"; 87 | GameObject.Find("Y_b_v Slider").GetComponent().value = 20.0f; 88 | GameObject.Find("Y_b_v InputField").GetComponent().text = "20.0"; 89 | GameObject.Find("Surround_v Dropdown").GetComponent().value = 0; 90 | GameObject.Find("DiscountIlluminant_v Toggle").GetComponent().isOn = true; 91 | } 92 | 93 | private Material _GetCIECAM02Material() { 94 | if (Camera.main.GetComponent() != null) 95 | return Camera.main.GetComponent().material; 96 | else 97 | return null; 98 | } 99 | 100 | public void Set_tonemapper(int value) { 101 | Material material = _GetCIECAM02Material(); 102 | if (material == null) 103 | return; 104 | 105 | material.SetInt("_tonemapper", value); 106 | } 107 | 108 | public void Set_exposure(float value) { 109 | Material material = _GetCIECAM02Material(); 110 | if (material == null) 111 | return; 112 | 113 | material.SetFloat("_exposure", value); 114 | } 115 | 116 | public void SetIlluminant(int value) { 117 | Material material = _GetCIECAM02Material(); 118 | if (material == null) 119 | return; 120 | 121 | Vector3 XYZ = ILLUMINANTS_CIE_1931_2_DEGREE_STANDARD_OBSERVER [value]; 122 | material.SetFloat("_X_w", XYZ[0]); 123 | material.SetFloat("_Y_w", XYZ[1]); 124 | material.SetFloat("_Z_w", XYZ[2]); 125 | } 126 | 127 | public void Set_XYZ_w_scale(float value) { 128 | Material material = _GetCIECAM02Material(); 129 | if (material == null) 130 | return; 131 | 132 | material.SetFloat("_XYZ_w_scale", value); 133 | } 134 | 135 | public void Set_L_A(float value) { 136 | Material material = _GetCIECAM02Material(); 137 | if (material == null) 138 | return; 139 | 140 | material.SetFloat("_L_A", value); 141 | } 142 | 143 | public void Set_Y_b(float value) { 144 | Material material = _GetCIECAM02Material(); 145 | if (material == null) 146 | return; 147 | 148 | material.SetFloat("_Y_b", value); 149 | } 150 | 151 | public void Set_surround(int value) { 152 | Material material = _GetCIECAM02Material(); 153 | if (material == null) 154 | return; 155 | 156 | material.SetInt("_surround", value); 157 | } 158 | 159 | public void Set_discount_illuminant(bool value) { 160 | Material material = _GetCIECAM02Material(); 161 | if (material == null) 162 | return; 163 | 164 | material.SetInt("_discount_illuminant", value ? 1 : 0); 165 | } 166 | 167 | public void SetIlluminant_v(int value) { 168 | Material material = _GetCIECAM02Material(); 169 | if (material == null) 170 | return; 171 | 172 | Vector3 XYZ = ILLUMINANTS_CIE_1931_2_DEGREE_STANDARD_OBSERVER [value]; 173 | material.SetFloat("_X_w_v", XYZ[0]); 174 | material.SetFloat("_Y_w_v", XYZ[1]); 175 | material.SetFloat("_Z_w_v", XYZ[2]); 176 | } 177 | 178 | public void Set_XYZ_w_v_scale(float value) { 179 | Material material = _GetCIECAM02Material(); 180 | if (material == null) 181 | return; 182 | 183 | material.SetFloat("_XYZ_w_v_scale", value); 184 | } 185 | 186 | public void Set_L_A_v(float value) { 187 | Material material = _GetCIECAM02Material(); 188 | if (material == null) 189 | return; 190 | 191 | material.SetFloat("_L_A_v", value); 192 | } 193 | 194 | public void Set_Y_b_v(float value) { 195 | Material material = _GetCIECAM02Material(); 196 | if (material == null) 197 | return; 198 | 199 | material.SetFloat("_Y_b_v", value); 200 | } 201 | 202 | public void Set_surround_v(int value) { 203 | Material material = _GetCIECAM02Material(); 204 | if (material == null) 205 | return; 206 | 207 | material.SetInt("_surround_v", value); 208 | } 209 | 210 | public void Set_discount_illuminant_v(bool value) { 211 | Material material = _GetCIECAM02Material(); 212 | if (material == null) 213 | return; 214 | 215 | material.SetInt("_discount_illuminant_v", value ? 1 : 0); 216 | } 217 | } 218 | -------------------------------------------------------------------------------- /Assets/Colour/Scripts/CIECAM02UI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a74c7fc2cf28248979b1e08d1c023ea7 3 | timeCreated: 1474884275 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Colour/Scripts/FunctionPlotter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [ExecuteInEditMode] 7 | [AddComponentMenu("Image Effects/Function Plotter")] 8 | public class FunctionPlotter : ImageEffectBase 9 | { 10 | 11 | public enum graphs {linearLinear, linearLog, logLinear, logLog}; 12 | 13 | [Header("Graph")] 14 | public graphs graph; 15 | 16 | [Range(1, 10)] 17 | public int logBase; 18 | 19 | [Header("Axes (Domain - Range)")] 20 | public float minX; 21 | public float maxX; 22 | public float minY; 23 | public float maxY; 24 | 25 | [Header("Axes (Visual)")] 26 | [Range(1, 100)] 27 | public int ticksX; 28 | [Range(1, 100)] 29 | public int ticksY; 30 | [Range(1.0f, 40f)] 31 | public float axisThickness; 32 | [Range(1.0f, 40f)] 33 | public float ticksThickness; 34 | [Range(0.0f, 1.0f)] 35 | public float axisOpacity; 36 | [Range(0.0f, 1.0f)] 37 | public float ticksOpacity; 38 | 39 | [Header("Function (Visual)")] 40 | [Range(1.0f, 40f)] 41 | public float functionThickness; 42 | [Range(0.0f, 1.0f)] 43 | public float functionOpacity; 44 | 45 | [Header("Function (Controls)")] 46 | [Range(-10.0f, 10.0f)] 47 | public float a; 48 | [Range(-10.0f, 10.0f)] 49 | public float b; 50 | [Range(-10.0f, 10.0f)] 51 | public float c; 52 | [Range(-10.0f, 10.0f)] 53 | public float d; 54 | [Range(-10.0f, 10.0f)] 55 | public float e; 56 | 57 | [Header("Image (Visual)")] 58 | [Range(0.0f, 1.0f)] 59 | public float imageOpacity; 60 | 61 | // Called by camera to apply image effect 62 | void OnRenderImage (RenderTexture source, RenderTexture destination) 63 | { 64 | material.SetInt("_graph", (int)graph); 65 | material.SetInt("_log_base", logBase); 66 | 67 | material.SetFloat("_min_x", minX); 68 | material.SetFloat("_max_x", maxX); 69 | material.SetFloat("_min_y", minY); 70 | material.SetFloat("_max_y", maxY); 71 | 72 | material.SetInt("_ticks_x", ticksX); 73 | material.SetInt("_ticks_y", ticksY); 74 | material.SetFloat("_axis_thickness", axisThickness); 75 | material.SetFloat("_ticks_thickness", ticksThickness); 76 | material.SetFloat("_axis_opacity", axisOpacity); 77 | material.SetFloat("_ticks_opacity", ticksOpacity); 78 | 79 | material.SetFloat("_function_thickness", functionThickness); 80 | material.SetFloat("_function_opacity", functionOpacity); 81 | 82 | material.SetFloat("_a", a); 83 | material.SetFloat("_b", b); 84 | material.SetFloat("_c", c); 85 | material.SetFloat("_d", d); 86 | material.SetFloat("_e", e); 87 | 88 | material.SetFloat("_image_opacity", imageOpacity); 89 | 90 | Graphics.Blit (source, destination, material); 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Assets/Colour/Scripts/FunctionPlotter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e13634ba0a0e64d488ae6fa768631490 3 | timeCreated: 1489393234 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Colour/Scripts/Utilities.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ab72fe2988a94d5387549f0a9a1faec 3 | folderAsset: yes 4 | timeCreated: 1489394402 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Colour/Scripts/Utilities/DragPanel.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using UnityEngine.EventSystems; 4 | using System.Collections; 5 | 6 | public class DragPanel : MonoBehaviour, IPointerDownHandler, IDragHandler { 7 | 8 | private Vector2 originalLocalPointerPosition; 9 | private Vector3 originalPanelLocalPosition; 10 | private RectTransform panelRectTransform; 11 | private RectTransform parentRectTransform; 12 | 13 | void Awake () { 14 | panelRectTransform = transform.parent as RectTransform; 15 | parentRectTransform = panelRectTransform.parent as RectTransform; 16 | } 17 | 18 | public void OnPointerDown (PointerEventData data) { 19 | originalPanelLocalPosition = panelRectTransform.localPosition; 20 | RectTransformUtility.ScreenPointToLocalPointInRectangle ( 21 | parentRectTransform, data.position, data.pressEventCamera, out originalLocalPointerPosition); 22 | } 23 | 24 | public void OnDrag (PointerEventData data) { 25 | if (panelRectTransform == null || parentRectTransform == null) 26 | return; 27 | 28 | Vector2 localPointerPosition; 29 | if (RectTransformUtility.ScreenPointToLocalPointInRectangle ( 30 | parentRectTransform, data.position, data.pressEventCamera, out localPointerPosition)) { 31 | Vector3 offsetToOriginal = localPointerPosition - originalLocalPointerPosition; 32 | panelRectTransform.localPosition = originalPanelLocalPosition + offsetToOriginal; 33 | } 34 | 35 | ClampToWindow (); 36 | } 37 | 38 | // Clamp panel to area of parent 39 | void ClampToWindow () { 40 | Vector3 pos = panelRectTransform.localPosition; 41 | 42 | Vector3 minPosition = parentRectTransform.rect.min - panelRectTransform.rect.min; 43 | Vector3 maxPosition = parentRectTransform.rect.max - panelRectTransform.rect.max; 44 | 45 | pos.x = Mathf.Clamp (panelRectTransform.localPosition.x, minPosition.x, maxPosition.x); 46 | pos.y = Mathf.Clamp (panelRectTransform.localPosition.y, minPosition.y, maxPosition.y); 47 | 48 | panelRectTransform.localPosition = pos; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Assets/Colour/Scripts/Utilities/DragPanel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5e505bd02248430faf1fbaa1bb9a4d1 3 | timeCreated: 1474950386 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Colour/Scripts/Utilities/FitToCamera.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class FitToCamera : MonoBehaviour { 5 | void Update () { 6 | transform.localScale = Vector3.one; 7 | 8 | Vector3 size = GetComponent().bounds.size; 9 | float distance = Vector3.Distance(Camera.main.transform.position, transform.position); 10 | float diameter = Mathf.Tan(Mathf.Deg2Rad * Camera.main.fieldOfView / 2.0f) * (2.0f * (float)distance); 11 | 12 | Material material = GetComponent().material; 13 | Texture image = material.GetTexture ("_MainTex"); 14 | 15 | transform.localScale = new Vector3(diameter * (1.0f / size[0]) * 16 | ((float)image.width / (float)image.height), 1.0f, diameter * (1.0f / size[1])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Assets/Colour/Scripts/Utilities/FitToCamera.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b92c0db39295c44658074f838ebfed2c 3 | timeCreated: 1474872259 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Colour/Scripts/Utilities/SliderInputField.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | 5 | public class SliderInputField : MonoBehaviour { 6 | 7 | private Slider slider; 8 | private InputField field; 9 | 10 | void Start() { 11 | slider = gameObject.GetComponent(); 12 | field = gameObject.GetComponent(); 13 | } 14 | 15 | public void UpdateValueFromFloat(float value) { 16 | if (slider) { 17 | slider.value = value; 18 | } 19 | if (field) { 20 | field.text = value.ToString(); 21 | } 22 | } 23 | 24 | public void UpdateValueFromString(string value) { 25 | if (slider) { 26 | slider.value = float.Parse(value); 27 | } 28 | 29 | if (field) { 30 | field.text = value; 31 | } 32 | } 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Assets/Colour/Scripts/Utilities/SliderInputField.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd77878781e96445d826284981d2c9e4 3 | timeCreated: 1474953717 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Colour/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa93a5f36ae904a70a57068409d25875 3 | folderAsset: yes 4 | timeCreated: 1474964600 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Colour/Shaders/AdaptationCAT.cginc: -------------------------------------------------------------------------------- 1 | // *CAT02* chromatic adaptation transform. 2 | static const float3x3 CAT02_CAT = { 3 | 0.7328, 0.4296, -0.1624, 4 | -0.7036, 1.6975, 0.0061, 5 | 0.0030, 0.0136, 0.9834 6 | }; 7 | 8 | // *CAT02* inverse chromatic adaptation transform. 9 | static const float3x3 CAT02_INVERSE_CAT = { 10 | 1.096123820835514, -0.278869000218287, 0.182745179382773, 11 | 0.454369041975359, 0.473533154307412, 0.072097803717229, 12 | -0.009627608738429, -0.005698031216113, 1.015325639954543 13 | }; 14 | -------------------------------------------------------------------------------- /Assets/Colour/Shaders/AdaptationCAT.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a357f060dab7249e186b5fa4b0d33929 3 | timeCreated: 1474704294 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Colour/Shaders/AppearanceCIECAM02.cginc: -------------------------------------------------------------------------------- 1 | #include "AdaptationCAT.cginc" 2 | #include "UtilitiesCommon.cginc" 3 | 4 | struct CIECAM02_InductionFactors 5 | { 6 | float F; 7 | float c; 8 | float N_c; 9 | }; 10 | 11 | static const CIECAM02_InductionFactors CIECAM02_VIEWING_CONDITIONS_AVERAGE = { 12 | 1, 0.69, 1 13 | }; 14 | 15 | static const CIECAM02_InductionFactors CIECAM02_VIEWING_CONDITIONS_DIM = { 16 | 0.9, 0.59, 0.9 17 | }; 18 | 19 | static const CIECAM02_InductionFactors CIECAM02_VIEWING_CONDITIONS_DARK = { 20 | 0.8, 0.525, 0.8 21 | }; 22 | 23 | struct CIECAM02_Specification 24 | { 25 | float J; 26 | float C; 27 | float h; 28 | float s; 29 | float Q; 30 | float M; 31 | float H; 32 | float HC; 33 | }; 34 | 35 | static const float3x3 XYZ_TO_HPE_MATRIX = { 36 | 0.38971, 0.68898, -0.07868, 37 | -0.22981, 1.18340, 0.04641, 38 | 0.00000, 0.00000, 1.00000 39 | }; 40 | 41 | static const float3x3 HPE_TO_XYZ_MATRIX = { 42 | 1.910196834052035, -1.112123892787875, 0.201907956767499, 43 | 0.370950088248689, 0.629054257392613, -0.000008055142184, 44 | 0.000000000000000, 0.000000000000000, 1.000000000000000 45 | }; 46 | 47 | float luminance_level_adaptation_factor(float L_A) { 48 | 49 | float k = 1.0 / (5.0 * L_A + 1.0); 50 | float k4 = pow(k, 4.0); 51 | 52 | float F_L = (0.2 * k4 * (5.0 * L_A) + 0.1 * pow((1.0 - k4), 2.0) * 53 | pow((5.0 * L_A), (1.0 / 3.0))); 54 | 55 | return F_L; 56 | } 57 | 58 | float2 chromatic_induction_factors(float n) { 59 | float N_bbcb = 0.725 * pow((1.0 / n), 0.2); 60 | 61 | return N_bbcb; 62 | } 63 | 64 | float base_exponential_non_linearity(float n) { 65 | float z = 1.48 + sqrt(n); 66 | 67 | return z; 68 | } 69 | 70 | float4 viewing_condition_dependent_parameters(float Y_b, float Y_w, float L_A) { 71 | 72 | float n = Y_b / Y_w; 73 | float F_L = luminance_level_adaptation_factor(L_A); 74 | // NOTE: We deviate from reference implementation to fit return data into a float4. 75 | float2 N_bbcb = chromatic_induction_factors(n); 76 | float z = base_exponential_non_linearity(n); 77 | 78 | return float4(n, F_L, N_bbcb.r, z); 79 | } 80 | 81 | float degree_of_adaptation(float F, float L_A) { 82 | float D = F * (1.0 - (1.0 / 3.6) * exp((-L_A - 42.0) / 92.0)); 83 | 84 | return D; 85 | } 86 | 87 | float3 full_chromatic_adaptation_forward(float3 RGB, float3 RGB_w, float Y_w, float D) { 88 | float3 RGB_c = ((Y_w * D / RGB_w) + 1.0 - D) * RGB; 89 | 90 | return RGB_c; 91 | } 92 | 93 | float3 full_chromatic_adaptation_reverse(float3 RGB, float3 RGB_w, float Y_w, float D) { 94 | float3 RGB_c = RGB / (Y_w * (D / RGB_w) + 1.0 - D); 95 | 96 | return RGB_c; 97 | } 98 | 99 | float3 RGB_to_rgb(float3 RGB) { 100 | return mul(mul(XYZ_TO_HPE_MATRIX, CAT02_INVERSE_CAT), RGB); 101 | } 102 | 103 | float3 rgb_to_RGB(float3 rgb) { 104 | return mul(mul(CAT02_CAT, HPE_TO_XYZ_MATRIX), rgb); 105 | } 106 | 107 | float3 post_adaptation_non_linear_response_compression_forward(float3 RGB, float F_L) { 108 | float3 RGB_c = (((400.0 * pow((F_L * RGB / 100.0), 0.42)) / 109 | (27.13 + pow((F_L * RGB / 100.0), 0.42)))) + 0.1; 110 | 111 | return RGB_c; 112 | } 113 | 114 | float3 post_adaptation_non_linear_response_compression_reverse(float3 RGB, float F_L) { 115 | float3 RGB_p = (sign(RGB - 0.1) * (100.0 / F_L) * pow((27.13 * abs(RGB - 0.1)) / 116 | (400.0 - abs(RGB - 0.1)), 1.0 / 0.42)); 117 | 118 | return RGB_p; 119 | } 120 | 121 | float2 opponent_colour_dimensions_forward(float3 RGB) { 122 | float a = RGB.r - (12.0 * RGB.g / 11.0) + (RGB.b / 11.0); 123 | float b = (RGB.r + RGB.g - 2.0 * RGB.b) / 9.0; 124 | 125 | return float2(a, b); 126 | } 127 | 128 | float2 opponent_colour_dimensions_reverse(float3 P_n, float h) { 129 | float P_1 = P_n.r; 130 | float P_2 = P_n.g; 131 | float P_3 = P_n.b; 132 | float hr = radians(h); 133 | 134 | float sin_hr = sin(hr); 135 | float cos_hr = cos(hr); 136 | 137 | float P_4 = P_1 / sin_hr; 138 | float P_5 = P_1 / cos_hr; 139 | float n = P_2 * (2.0 + P_3) * (460.0 / 1403.0); 140 | 141 | float a = hr * 0.0; 142 | float b = hr * 0.0; 143 | 144 | if (abs(sin_hr) >= abs(cos_hr)) 145 | b = (n / (P_4 + (2.0 + P_3) * (220.0 / 1403.0) * (cos_hr / sin_hr) - 146 | (27.0 / 1403.0) + P_3 * (6300.0 / 1403.0))); 147 | 148 | if (abs(sin_hr) >= abs(cos_hr)) 149 | a = b * (cos_hr / sin_hr); 150 | 151 | if (abs(sin_hr) < abs(cos_hr)) 152 | a = (n / (P_5 + (2.0 + P_3) * (220.0 / 1403.0) - 153 | ((27.0 / 1403.0) - P_3 * (6300.0 / 1403.0)) * (sin_hr / cos_hr))); 154 | 155 | if (abs(sin_hr) < abs(cos_hr)) 156 | b = a * (sin_hr / cos_hr); 157 | 158 | return float2(a, b); 159 | } 160 | 161 | float hue_angle(float2 ab) { 162 | float h = degrees(atan2(ab.g, ab.r)) % 360; 163 | if (h < 0) h += 360; 164 | 165 | return h; 166 | } 167 | 168 | float hue_quadrature(float h) { 169 | float t = ((h - 237.53)/1.2) + ((360.0 - h + 20.14)/0.8); 170 | float H = 300.0 + ((100 * ((h - 237.53) / 1.2)) / t); 171 | 172 | if (h < 20.14) { 173 | t = ((h + 122.47) / 1.2) + ((20.14 - h) / 0.8); 174 | H = 300.0 + (100.0 * ((h + 122.47) / 1.2)) / t; 175 | } 176 | 177 | if (h < 90.0) { 178 | t = ((h - 20.14) / 0.8) + ((90.00 - h) / 0.7); 179 | H = (100.0 * ((h - 20.14) / 0.8)) / t; 180 | } 181 | 182 | if (h < 164.25) { 183 | t = ((h - 90.00) / 0.7) + ((164.25 - h) / 1.0); 184 | H = 100.0 + ((100.0 * ((h - 90.00) / 0.7)) / t); 185 | } 186 | 187 | if (h < 237.53) { 188 | t = ((h - 164.25) / 1.0) + ((237.53 - h) / 1.2); 189 | H = 200.0 + ((100.0 * ((h - 164.25) / 1.0)) / t); 190 | } 191 | 192 | return H; 193 | } 194 | 195 | float eccentricity_factor(float h) { 196 | float e_t = 1.0 / 4.0 * (cos(2.0 + h * PI / 180.0) + 3.8); 197 | 198 | return e_t; 199 | } 200 | 201 | float achromatic_response_forward(float3 RGB, float N_bb) { 202 | float A = (2.0 * RGB.r + RGB.g + (1.0 / 20.0) * RGB.b - 0.305) * N_bb; 203 | 204 | return A; 205 | } 206 | 207 | float achromatic_response_reverse(float A_w, float J, float c, float z) { 208 | float A = A_w * pow(J / 100.0, 1.0 / (c * z)); 209 | 210 | return A; 211 | } 212 | 213 | float lightness_correlate(float A, float A_w, float c, float z) { 214 | float J = 100.0 * pow(A / A_w, c * z); 215 | 216 | return J; 217 | } 218 | 219 | float brightness_correlate(float c, float J, float A_w, float F_L) { 220 | float Q = (4.0 / c) * sqrt(J / 100.0) * (A_w + 4.0) * pow(F_L, 0.25); 221 | 222 | return Q; 223 | } 224 | 225 | float temporary_magnitude_quantity_forward(float N_c, float N_cb, float e_t, float2 ab, float3 RGB_a) { 226 | float t = (((50000.0 / 13.0) * N_c * N_cb) * (e_t * pow(pow(ab.r, 2.0) + pow(ab.g, 2.0), 0.5)) / 227 | (RGB_a.r + RGB_a.g + 21.0 * RGB_a.b / 20.0)); 228 | 229 | return t; 230 | } 231 | 232 | float temporary_magnitude_quantity_reverse(float C, float J, float n) { 233 | float t = pow(C / (sqrt(J / 100.0) * pow(1.64 - pow(0.29, n), 0.73)), 1.0 / 0.9); 234 | 235 | return t; 236 | } 237 | 238 | float chroma_correlate(float J, float n, float N_c, float N_cb, float e_t, float2 ab, float3 RGB_a) { 239 | float t = temporary_magnitude_quantity_forward(N_c, N_cb, e_t, ab, RGB_a); 240 | float C = pow(t, 0.9) * pow(J / 100.0, 0.5) * pow(1.64 - pow(0.29, n), 0.73); 241 | 242 | return C; 243 | } 244 | 245 | float colourfulness_correlate(float C, float F_L) { 246 | float M = C * pow(F_L, 0.25); 247 | 248 | return M; 249 | } 250 | 251 | float saturation_correlate(float M, float Q) { 252 | float s = 100.0 * pow(M / Q, 0.5); 253 | 254 | return s; 255 | } 256 | 257 | float3 P(float N_c, float N_cb, float e_t, float t, float A, float N_bb) { 258 | 259 | float P_1 = ((50000.0 / 13.0) * N_c * N_cb * e_t) / t; 260 | float P_2 = A / N_bb + 0.305; 261 | float P_3 = (P_1 * 0.0 + 1.0) * (21.0 / 20.0); 262 | 263 | return float3(P_1, P_2, P_3); 264 | } 265 | 266 | float3 post_adaptation_non_linear_response_compression_matrix(float P_2, float2 ab) { 267 | 268 | float R_a = (460.0 * P_2 + 451.0 * ab.r + 288.0 * ab.g) / 1403.0; 269 | float G_a = (460.0 * P_2 - 891.0 * ab.r - 261.0 * ab.g) / 1403.0; 270 | float B_a = (460.0 * P_2 - 220.0 * ab.r - 6300.0 * ab.g) / 1403.0; 271 | 272 | return float3(R_a, G_a, B_a); 273 | } 274 | 275 | CIECAM02_Specification XYZ_to_CIECAM02(float3 XYZ, 276 | float3 XYZ_w, 277 | float L_A, 278 | float Y_b, 279 | CIECAM02_InductionFactors surround, 280 | bool discount_illuminant) { 281 | 282 | float Y_w = XYZ_w.g; 283 | 284 | float4 vcdp = viewing_condition_dependent_parameters(Y_b, Y_w, L_A); 285 | float n = vcdp.r; 286 | float F_L = vcdp.g; 287 | float N_bb = vcdp.b; 288 | float N_cb = vcdp.b; 289 | float z = vcdp.a; 290 | 291 | // Converting *CIE XYZ* tristimulus values to CMCCAT2000 transform 292 | // sharpened *RGB* values. 293 | float3 RGB = mul(CAT02_CAT, XYZ); 294 | float3 RGB_w = mul(CAT02_CAT, XYZ_w); 295 | 296 | // Computing degree of adaptation :math:`D`. 297 | float D = 1.0; 298 | if (discount_illuminant == false) 299 | D = degree_of_adaptation(surround.F, L_A); 300 | 301 | // Computing full chromatic adaptation. 302 | float3 RGB_c = full_chromatic_adaptation_forward( 303 | RGB, RGB_w, Y_w, D); 304 | float3 RGB_wc = full_chromatic_adaptation_forward( 305 | RGB_w, RGB_w, Y_w, D); 306 | 307 | // Converting to *Hunt-Pointer-Estevez* colourspace. 308 | float3 RGB_p = RGB_to_rgb(RGB_c); 309 | float3 RGB_pw = RGB_to_rgb(RGB_wc); 310 | 311 | // Applying forward post-adaptation non linear response compression. 312 | float3 RGB_a = post_adaptation_non_linear_response_compression_forward( 313 | RGB_p, F_L); 314 | float3 RGB_aw = post_adaptation_non_linear_response_compression_forward( 315 | RGB_pw, F_L); 316 | 317 | // Converting to preliminary cartesian coordinates. 318 | float2 ab = opponent_colour_dimensions_forward(RGB_a); 319 | 320 | // Computing the *hue* angle :math:`h`. 321 | float h = hue_angle(ab); 322 | 323 | // Computing hue :math:`h` quadrature :math:`H`. 324 | float H = hue_quadrature(h); 325 | // TODO: Compute hue composition. 326 | 327 | // Computing eccentricity factor *e_t*. 328 | float e_t = eccentricity_factor(h); 329 | 330 | // Computing achromatic responses for the stimulus and the whitepoint. 331 | float A = achromatic_response_forward(RGB_a, N_bb); 332 | float A_w = achromatic_response_forward(RGB_aw, N_bb); 333 | 334 | // Computing the correlate of *Lightness* :math:`J`. 335 | float J = lightness_correlate(A, A_w, surround.c, z); 336 | 337 | // Computing the correlate of *brightness* :math:`Q`. 338 | float Q = brightness_correlate(surround.c, J, A_w, F_L); 339 | 340 | // Computing the correlate of *chroma* :math:`C`. 341 | float C = chroma_correlate(J, n, surround.N_c, N_cb, e_t, ab, RGB_a); 342 | 343 | // Computing the correlate of *colourfulness* :math:`M`. 344 | float M = colourfulness_correlate(C, F_L); 345 | 346 | // Computing the correlate of *saturation* :math:`s`. 347 | float s = saturation_correlate(M, Q); 348 | 349 | CIECAM02_Specification specification = {J, C, h, s, Q, M, H, 0}; 350 | 351 | return specification; 352 | } 353 | 354 | float3 CIECAM02_to_XYZ(float J, 355 | float C, 356 | float h, 357 | float3 XYZ_w, 358 | float L_A, 359 | float Y_b, 360 | CIECAM02_InductionFactors surround, 361 | bool discount_illuminant) { 362 | 363 | float Y_w = XYZ_w.g; 364 | 365 | float4 vcdp = viewing_condition_dependent_parameters(Y_b, Y_w, L_A); 366 | float n = vcdp.r; 367 | float F_L = vcdp.g; 368 | float N_bb = vcdp.b; 369 | float N_cb = vcdp.b; 370 | float z = vcdp.a; 371 | 372 | // Converting *CIE XYZ* tristimulus values to CMCCAT2000 transform 373 | // sharpened *RGB* values. 374 | float3 RGB_w = mul(CAT02_CAT, XYZ_w); 375 | 376 | // Computing degree of adaptation :math:`D`. 377 | float D = 1.0; 378 | if (discount_illuminant == false) 379 | D = degree_of_adaptation(surround.F, L_A); 380 | 381 | // Computing full chromatic adaptation. 382 | float3 RGB_wc = full_chromatic_adaptation_forward( 383 | RGB_w, RGB_w, Y_w, D); 384 | 385 | // Converting to *Hunt-Pointer-Estevez* colourspace. 386 | float3 RGB_pw = RGB_to_rgb(RGB_wc); 387 | 388 | // Applying forward post-adaptation non linear response compression. 389 | float3 RGB_aw = post_adaptation_non_linear_response_compression_forward( 390 | RGB_pw, F_L); 391 | 392 | // Computing achromatic response for the whitepoint. 393 | float A_w = achromatic_response_forward(RGB_aw, N_bb); 394 | 395 | // Computing temporary magnitude quantity :math:`t`. 396 | float t = temporary_magnitude_quantity_reverse(C, J, n); 397 | 398 | // Computing eccentricity factor *e_t*. 399 | float e_t = eccentricity_factor(h); 400 | 401 | // Computing achromatic response :math:`A` for the stimulus. 402 | float A = achromatic_response_reverse(A_w, J, surround.c, z); 403 | 404 | // Computing *P_1* to *P_3*. 405 | float3 P_n = P(surround.N_c, N_cb, e_t, t, A, N_bb); 406 | 407 | // Computing opponent colour dimensions :math:`a` and :math:`b`. 408 | float2 ab = opponent_colour_dimensions_reverse(P_n, h); 409 | 410 | // Computing post-adaptation non linear response compression matrix. 411 | float3 RGB_a = post_adaptation_non_linear_response_compression_matrix( 412 | P_n.g, ab); 413 | 414 | // Applying reverse post-adaptation non linear response compression. 415 | float3 RGB_p = post_adaptation_non_linear_response_compression_reverse( 416 | RGB_a, F_L); 417 | 418 | // Converting to *Hunt-Pointer-Estevez* colourspace. 419 | float3 RGB_c = rgb_to_RGB(RGB_p); 420 | 421 | // Applying reverse full chromatic adaptation. 422 | float3 RGB = full_chromatic_adaptation_reverse(RGB_c, RGB_w, Y_w, D); 423 | 424 | // Converting CMCCAT2000 transform sharpened *RGB* values to *CIE XYZ* 425 | // tristimulus values. 426 | float3 XYZ = mul(CAT02_INVERSE_CAT, RGB); 427 | 428 | return XYZ; 429 | } -------------------------------------------------------------------------------- /Assets/Colour/Shaders/AppearanceCIECAM02.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e676dfd0481d46149fad67e8a3e89a2 3 | timeCreated: 1474704294 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Colour/Shaders/CIECAM02Tonemapper.shader: -------------------------------------------------------------------------------- 1 | Shader "Camera/CIECAM02 Tonemapper" { 2 | Properties { 3 | _MainTex ("", 2D) = "black" {} 4 | 5 | [Header(Tonemapper)] [KeywordEnum(Passthrough, Simple)] _tonemapper("Tonemapper", Int) = 0 6 | _exposure ("Exposure", Range (-10, 10)) = 0.0 7 | _crosstalk ("Crosstalk", Range (0, 1)) = 1.0 8 | _saturation ("Saturation", Range (0, 1)) = 1.0 9 | _crosstalk_saturation ("Crosstalk Saturation", Range (0, 1)) = 1.0 10 | 11 | // Moroney, N. (n.d.). Usage guidelines for CIECAM97s. Defaults for *sRGB* viewing conditions, 12 | // assuming 64 lux ambient / 80 cd/m2 CRT and D65 as whitepoint. 13 | // NOTE: *[HDR] Color* seems to be clamping / messing with input, using *Range* instead. 14 | [Header(Reference Viewing Conditions)] _X_w ("XYZ_w (X))", Range (50, 150)) = 95.046505745082385 15 | _Y_w ("XYZ_w (Y)", Range (50, 150)) = 100.000000000000000 16 | _Z_w ("XYZ_w (Z)", Range (50, 150)) = 108.897024100442707 17 | _XYZ_w_scale ("XYZ_w Scale", Range (0.1, 100)) = 1.0 18 | _L_A ("L_A", Range (0.01, 1000)) = 4.0 19 | _Y_b ("Y_b", Range (0.01, 100)) = 20.0 20 | [KeywordEnum(Average, Dim, Dark)] _surround("Surround", Int) = 0 21 | [Toggle] _discount_illuminant("Discount Illuminant", Int) = 0 22 | 23 | // NOTE: *[HDR] Color* seems to be clamping / messing with input, using *Range* instead. 24 | [Header(Test Viewing Conditions)] _X_w_v ("XYZ_w (X)", Range (50, 150)) = 95.046505745082385 25 | _Y_w_v ("XYZ_w (Y)", Range (50, 150)) = 100.000000000000000 26 | _Z_w_v ("XYZ_w (Z)", Range (50, 150)) = 108.897024100442707 27 | _XYZ_w_v_scale ("XYZ_w Scale", Range (0.1, 100)) = 1.0 28 | _L_A_v ("L_A", Range (0.01, 1000)) = 4.0 29 | _Y_b_v ("Y_b", Range (0.01, 100)) = 20.0 30 | [KeywordEnum(Average, Dim, Dark)] _surround_v("Surround", Int) = 0 31 | [Toggle] _discount_illuminant_v("Discount Illuminant", Int) = 0 32 | } 33 | 34 | CGINCLUDE 35 | 36 | #include "UnityCG.cginc" 37 | #include "AppearanceCIECAM02.cginc" 38 | #include "TonemappingGlobalOperators.cginc" 39 | 40 | struct v2f { 41 | float4 pos : SV_POSITION; 42 | float2 uv : TEXCOORD0; 43 | }; 44 | 45 | sampler2D _MainTex; 46 | float4 _MainTex_ST; 47 | 48 | int _tonemapper; 49 | float _exposure; 50 | 51 | float _X_w; 52 | float _Y_w; 53 | float _Z_w; 54 | float _XYZ_w_scale; 55 | float _L_A; 56 | float _Y_b; 57 | int _surround; 58 | int _discount_illuminant; 59 | 60 | float _X_w_v; 61 | float _Y_w_v; 62 | float _Z_w_v; 63 | float _XYZ_w_v_scale; 64 | float _L_A_v; 65 | float _Y_b_v; 66 | int _surround_v; 67 | int _discount_illuminant_v; 68 | 69 | v2f vert(appdata_img v) 70 | { 71 | v2f o; 72 | o.pos = mul(UNITY_MATRIX_MVP, v.vertex); 73 | o.uv = v.texcoord.xy; 74 | return o; 75 | } 76 | 77 | float4 CIECAM02_tonemapper(v2f i) : SV_Target 78 | { 79 | float4 RGBA = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); 80 | 81 | // Exposure adjustment. 82 | float3 RGB = RGBA.rgb * pow(2, _exposure); 83 | 84 | // Apply tonemapper. 85 | if (_tonemapper == 1) 86 | RGB = tonemapping_operator_simple(RGB); 87 | if (_tonemapper == 2) 88 | RGB = tonemapping_operator_simple_max(RGB); 89 | if (_tonemapper == 3) 90 | RGB = tonemapping_operator_pseudo_ACES_ODT_monitor_100nits_dim(RGB); 91 | if (_tonemapper == 4) 92 | RGB = tonemapping_operator_pseudo_ACES_ODT_Rec2020_ST2084_1000nits(RGB); 93 | 94 | float3 XYZ = mul(sRGB_TO_XYZ_MATRIX, RGB) * 100.0; 95 | 96 | // CIECAM02 forward model. 97 | CIECAM02_InductionFactors I_F = CIECAM02_VIEWING_CONDITIONS_AVERAGE; 98 | if (_surround == 1) 99 | I_F = CIECAM02_VIEWING_CONDITIONS_DIM; 100 | if (_surround == 2) 101 | I_F = CIECAM02_VIEWING_CONDITIONS_DARK; 102 | 103 | CIECAM02_Specification specification = XYZ_to_CIECAM02( 104 | XYZ, float3(_X_w, _Y_w, _Z_w) * _XYZ_w_scale, _L_A, _Y_b, I_F, 105 | bool(_discount_illuminant)); 106 | 107 | // CIECAM02 reverse model. 108 | CIECAM02_InductionFactors I_F_v = CIECAM02_VIEWING_CONDITIONS_AVERAGE; 109 | if (_surround_v == 1) 110 | I_F_v = CIECAM02_VIEWING_CONDITIONS_DIM; 111 | if (_surround_v == 2) 112 | I_F_v = CIECAM02_VIEWING_CONDITIONS_DARK; 113 | 114 | float3 XYZ_v = CIECAM02_to_XYZ( 115 | specification.J, specification.C, specification.h, 116 | float3(_X_w_v, _Y_w_v, _Z_w_v) * _XYZ_w_v_scale, _L_A_v, _Y_b_v, I_F_v, 117 | bool(_discount_illuminant_v)); 118 | 119 | float3 RGB_v = mul(XYZ_TO_sRGB_MATRIX, XYZ_v / 100.0); 120 | 121 | if (_tonemapper == 4) 122 | // Unity does not expose any mechanism to deactivate the framebuffer *sRGB* 123 | // conversion, thus we compensate for it here. 124 | RGB_v = eotf_sRGB(eotf_reverse_ST2084(mul(sRGB_TO_REC2020_MATRIX, RGB_v), 10000.0)); 125 | 126 | return float4(RGB_v, 1.0); 127 | } 128 | ENDCG 129 | 130 | Subshader { 131 | Pass { 132 | ZTest Always Cull Off ZWrite Off 133 | 134 | CGPROGRAM 135 | #pragma vertex vert 136 | #pragma fragment CIECAM02_tonemapper 137 | ENDCG 138 | } 139 | } 140 | 141 | Fallback off 142 | 143 | } // shader 144 | -------------------------------------------------------------------------------- /Assets/Colour/Shaders/CIECAM02Tonemapper.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 003377fc2620a44939dadde6fe3f8190 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Colour/Shaders/ColorimetryDatasetIlluminants.cginc: -------------------------------------------------------------------------------- 1 | struct Illuminants { 2 | float3 A; 3 | float3 B; 4 | float3 C; 5 | float3 D50; 6 | float3 D55; 7 | float3 D60; 8 | float3 D65; 9 | float3 D75; 10 | float3 E; 11 | float3 F1; 12 | float3 F2; 13 | float3 F3; 14 | float3 F4; 15 | float3 F5; 16 | float3 F6; 17 | float3 F7; 18 | float3 F8; 19 | float3 F9; 20 | float3 F10; 21 | float3 F11; 22 | float3 F12; 23 | float3 FL3_1; 24 | float3 FL3_2; 25 | float3 FL3_3; 26 | float3 FL3_4; 27 | float3 FL3_5; 28 | float3 FL3_6; 29 | float3 FL3_7; 30 | float3 FL3_8; 31 | float3 FL3_9; 32 | float3 FL3_10; 33 | float3 FL3_11; 34 | float3 FL3_12; 35 | float3 FL3_13; 36 | float3 FL3_14; 37 | float3 FL3_15; 38 | float3 HP1; 39 | float3 HP2; 40 | float3 HP3; 41 | float3 HP4; 42 | float3 HP5; 43 | }; 44 | 45 | static const Illuminants ILLUMINANTS_CIE_1931_2_DEGREE_STANDARD_OBSERVER = { 46 | {109.849538150881216, 100.000000000000000, 35.585111923478621}, 47 | {99.087202067314152, 100.000000000000000, 85.312962145590404}, 48 | {98.073307155429347, 100.000000000000000, 118.232536627931253}, 49 | {96.421502084547555, 100.000000000000000, 82.520985375992566}, 50 | {95.681426099564220, 100.000000000000000, 92.147962290032964}, 51 | {95.294997332277291, 100.000000000000000, 101.014391334369861}, 52 | {95.046505745082385, 100.000000000000000, 108.897024100442707}, 53 | {94.972113762765247, 100.000000000000000, 122.636685419611922}, 54 | {100.007817123511899, 100.000000000000000, 100.034116792412121}, 55 | {92.868465011895594, 100.000000000000000, 103.779175860702267}, 56 | {99.186352232104866, 100.000000000000000, 67.396642595906826}, 57 | {103.799511305231277, 100.000000000000000, 49.934562835111066}, 58 | {109.201789599129867, 100.000000000000000, 38.883008781504842}, 59 | {90.902773955559979, 100.000000000000000, 98.822853596156691}, 60 | {97.342998428219460, 100.000000000000000, 60.263133140897317}, 61 | {95.042910379275526, 100.000000000000000, 108.755100837555460}, 62 | {96.428049077366168, 100.000000000000000, 82.424058155658315}, 63 | {100.380151065504947, 100.000000000000000, 67.946175244894121}, 64 | {96.385300268362172, 100.000000000000000, 82.357429709808471}, 65 | {100.961462998902533, 100.000000000000000, 64.352789474327935}, 66 | {108.117286947434792, 100.000000000000000, 39.278619333875362}, 67 | {109.268024755194261, 100.000000000000000, 38.688833552235195}, 68 | {101.987737110923533, 100.000000000000000, 65.856581570389167}, 69 | {91.690051369716784, 100.000000000000000, 99.130565992750192}, 70 | {109.543586891396245, 100.000000000000000, 37.785063683967948}, 71 | {102.108942976638374, 100.000000000000000, 70.256710182921097}, 72 | {96.890460954473042, 100.000000000000000, 80.890035628396532}, 73 | {108.379073050999438, 100.000000000000000, 38.822957666511513}, 74 | {99.686744199286963, 100.000000000000000, 61.290104379236169}, 75 | {97.429684691340611, 100.000000000000000, 81.055778516353186}, 76 | {97.065155755808092, 100.000000000000000, 83.872768392911055}, 77 | {94.507820097352308, 100.000000000000000, 96.725642993117333}, 78 | {108.424950824036628, 100.000000000000000, 39.305193050462876}, 79 | {102.848672164390194, 100.000000000000000, 65.649936132023271}, 80 | {95.507872788826432, 100.000000000000000, 81.550450355281967}, 81 | {95.112037985200288, 100.000000000000000, 109.091895185021485}, 82 | {128.448596304793540, 100.000000000000000, 12.543527278927098}, 83 | {114.898193380482240, 100.000000000000000, 25.580194713734816}, 84 | {105.574166892301776, 100.000000000000000, 39.816207398446231}, 85 | {100.381607243405028, 100.000000000000000, 62.971511921253956}, 86 | {101.679116009809363, 100.000000000000000, 67.610286897183414} 87 | }; -------------------------------------------------------------------------------- /Assets/Colour/Shaders/ColorimetryDatasetIlluminants.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ea3de0c2a2b743b2a33a873b58a41f9 3 | timeCreated: 1474704294 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Colour/Shaders/FunctionPlotter.shader: -------------------------------------------------------------------------------- 1 | Shader "Camera/Function Plotter" { 2 | Properties { 3 | _MainTex ("", 2D) = "black" {} 4 | [Header(Grid)] _graph ("Graph", Range (0, 3)) = 0.0 5 | _log_base ("Log Base", Range (1, 10)) = 1.0 6 | _min_x ("Min X", Range (-65535, 65535)) = 0.0 7 | _max_x ("Max X", Range (-65535, 65535)) = 10.0 8 | _min_y ("Min Y", Range (-65535, 65535)) = 0.0 9 | _max_y ("Max Y", Range (-65535, 65535)) = 10.0 10 | _ticks_x ("Ticks X", Range (0, 65535)) = 10 11 | _ticks_y ("Ticks Y", Range (9, 65535)) = 10 12 | _axis_thickness ("Axis Thickness", Range (1, 40)) = 10.0 13 | _ticks_thickness ("Ticks Thickness", Range (1, 40)) = 5.0 14 | _axis_opacity ("Axis Opacity", Range (0, 1)) = 0.5 15 | _ticks_opacity ("Ticks Opacity", Range (0, 1)) = 0.05 16 | _function_thickness ("Function Thickness", Range (1, 40)) = 0.05 17 | _function_opacity ("Function Opacity", Range (0, 1)) = 1.0 18 | _a ("a", Range (-65535, 65535)) = 1.0 19 | _b ("b", Range (-65535, 65535)) = 1.0 20 | _c ("c", Range (-10000, 65535)) = 1.0 21 | _d ("d", Range (-65535, 65535)) = 1.0 22 | _e ("e", Range (-65535, 65535)) = 1.0 23 | _image_opacity ("Image Opacity", Range (0, 1)) = 1.0 24 | 25 | } 26 | 27 | CGINCLUDE 28 | 29 | #include "UnityCG.cginc" 30 | #include "TonemappingGlobalOperators.cginc" 31 | #include "UtilitiesCommon.cginc" 32 | 33 | struct v2f { 34 | float4 pos : SV_POSITION; 35 | float2 uv : TEXCOORD0; 36 | }; 37 | 38 | sampler2D _MainTex; 39 | float4 _MainTex_ST; 40 | 41 | float _graph; 42 | float _log_base; 43 | float _min_x; 44 | float _max_x; 45 | float _min_y; 46 | float _max_y; 47 | int _ticks_x; 48 | int _ticks_y; 49 | float _axis_thickness; 50 | float _ticks_thickness; 51 | float _axis_opacity; 52 | float _ticks_opacity; 53 | float _function_thickness; 54 | float _function_opacity; 55 | float _a; 56 | float _b; 57 | float _c; 58 | float _d; 59 | float _e; 60 | float _image_opacity; 61 | 62 | v2f vert( appdata_img v ) 63 | { 64 | v2f o; 65 | o.pos = mul(UNITY_MATRIX_MVP, v.vertex); 66 | o.uv = v.texcoord.xy; 67 | return o; 68 | } 69 | 70 | float graph_forward(float x) 71 | { 72 | if (_log_base == 1) 73 | return log(x); 74 | else 75 | return log(x) / log(_log_base); 76 | } 77 | 78 | float2 graph_forward(float2 x) 79 | { 80 | if (_graph == 1) 81 | return float2(x.x, graph_forward(x.y)); 82 | if (_graph == 2) 83 | return float2(graph_forward(x.x), x.y); 84 | if (_graph == 3) 85 | return float2(graph_forward(x.x), graph_forward(x.y)); 86 | else 87 | return x; 88 | 89 | } 90 | 91 | float graph_reverse(float x) 92 | { 93 | if (_log_base == 1) 94 | return exp(x); 95 | else 96 | return pow(_log_base, x); 97 | } 98 | 99 | float2 graph_reverse(float2 x) 100 | { 101 | if (_graph == 1) 102 | return float2(x.x, graph_reverse(x.y)); 103 | if (_graph == 2) 104 | return float2(graph_reverse(x.x), x.y); 105 | if (_graph == 3) 106 | return float2(graph_reverse(x.x), graph_reverse(x.y)); 107 | else 108 | return x; 109 | } 110 | 111 | float axes( 112 | float2 uv, 113 | float range_x, 114 | float range_y, 115 | int ticks_x, 116 | int ticks_y, 117 | float axis_thickness, 118 | float ticks_thickness, 119 | float axis_luminance, 120 | float ticks_luminance) 121 | { 122 | float range_x_h = range_x / 2.0; 123 | float range_y_h = range_y / 2.0; 124 | float ticks_x_r = range_x / float(ticks_x); 125 | float ticks_y_r = range_y / float(ticks_y); 126 | 127 | float2 one_pixel = float2(1.0, 1.0) / _ScreenParams; 128 | 129 | float axis_t_x = axis_thickness * one_pixel.x * range_x_h; 130 | float axis_t_y = axis_thickness * one_pixel.y * range_y_h; 131 | float axis_t_x_h = axis_t_x / 2.0; 132 | float axis_t_y_h = axis_t_y / 2.0; 133 | float ticks_t_x = ticks_thickness * one_pixel.x * range_x_h; 134 | float ticks_t_y = ticks_thickness * one_pixel.y * range_y_h; 135 | float ticks_t_x_h = ticks_t_x / 2.0; 136 | float ticks_t_y_h = ticks_t_y / 2.0; 137 | 138 | float axes_c = step(uv.x + axis_t_x_h, axis_t_x) * axis_luminance; 139 | axes_c = max(step(uv.y + axis_t_y_h, axis_t_y) * axis_luminance, axes_c); 140 | axes_c = max(step(frac((uv.x + ticks_t_x_h) / ticks_x_r), ticks_t_x / ticks_x_r) * ticks_luminance, axes_c); 141 | axes_c = max(step(frac((uv.y + ticks_t_y_h) / ticks_y_r), ticks_t_y / ticks_y_r) * ticks_luminance, axes_c); 142 | 143 | return axes_c; 144 | } 145 | 146 | float3 FUNCTION(float3 x) 147 | { 148 | // return _a * x + _b; 149 | // return sin(x * _a * _b * _c); 150 | return tonemapping_operator_filmic(x, _a, _b, _c, _d, _e); 151 | } 152 | 153 | float function_sample( 154 | float2 uv, 155 | float range_x, 156 | float range_y, 157 | float thickness, 158 | float function_luminance, 159 | int samples) 160 | { 161 | // https://www.shadertoy.com/view/4sB3zz 162 | 163 | float2 one_pixel = float2(1.0, 1.0) / _ScreenParams; 164 | const float samples_f = float(samples); 165 | float thickness_t = linear_conversion(thickness, 1.0, 40.0, 0.5, 3.0); 166 | float2 max_distance = float2(thickness_t, thickness_t) * one_pixel * float2(range_x, range_y); 167 | float2 max_distance_h = float2(thickness_t, thickness_t) * max_distance; 168 | float step_size = max_distance.x / samples_f; 169 | float initial_offset_x = -0.5 * samples_f * step_size; 170 | uv.x += initial_offset_x; 171 | float accumulate = 0.0; 172 | for(int i=0; i createdMaterials = new List (); 16 | 17 | protected Material CheckShaderAndCreateMaterial ( Shader s, Material m2Create) 18 | { 19 | if (!s) 20 | { 21 | Debug.Log("Missing shader in " + ToString ()); 22 | enabled = false; 23 | return null; 24 | } 25 | 26 | if (s.isSupported && m2Create && m2Create.shader == s) 27 | return m2Create; 28 | 29 | if (!s.isSupported) 30 | { 31 | NotSupported (); 32 | Debug.Log("The shader " + s.ToString() + " on effect "+ToString()+" is not supported on this platform!"); 33 | return null; 34 | } 35 | 36 | m2Create = new Material (s); 37 | createdMaterials.Add (m2Create); 38 | m2Create.hideFlags = HideFlags.DontSave; 39 | 40 | return m2Create; 41 | } 42 | 43 | 44 | protected Material CreateMaterial (Shader s, Material m2Create) 45 | { 46 | if (!s) 47 | { 48 | Debug.Log ("Missing shader in " + ToString ()); 49 | return null; 50 | } 51 | 52 | if (m2Create && (m2Create.shader == s) && (s.isSupported)) 53 | return m2Create; 54 | 55 | if (!s.isSupported) 56 | { 57 | return null; 58 | } 59 | 60 | m2Create = new Material (s); 61 | createdMaterials.Add (m2Create); 62 | m2Create.hideFlags = HideFlags.DontSave; 63 | 64 | return m2Create; 65 | } 66 | 67 | void OnEnable () 68 | { 69 | isSupported = true; 70 | } 71 | 72 | void OnDestroy () 73 | { 74 | RemoveCreatedMaterials (); 75 | } 76 | 77 | private void RemoveCreatedMaterials () 78 | { 79 | while (createdMaterials.Count > 0) 80 | { 81 | Material mat = createdMaterials[0]; 82 | createdMaterials.RemoveAt (0); 83 | #if UNITY_EDITOR 84 | DestroyImmediate (mat); 85 | #else 86 | Destroy(mat); 87 | #endif 88 | } 89 | } 90 | 91 | protected bool CheckSupport () 92 | { 93 | return CheckSupport (false); 94 | } 95 | 96 | 97 | public virtual bool CheckResources () 98 | { 99 | Debug.LogWarning ("CheckResources () for " + ToString() + " should be overwritten."); 100 | return isSupported; 101 | } 102 | 103 | 104 | protected void Start () 105 | { 106 | CheckResources (); 107 | } 108 | 109 | protected bool CheckSupport (bool needDepth) 110 | { 111 | isSupported = true; 112 | supportHDRTextures = SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBHalf); 113 | supportDX11 = SystemInfo.graphicsShaderLevel >= 50 && SystemInfo.supportsComputeShaders; 114 | 115 | if (!SystemInfo.supportsImageEffects || !SystemInfo.supportsRenderTextures) 116 | { 117 | NotSupported (); 118 | return false; 119 | } 120 | 121 | if (needDepth && !SystemInfo.SupportsRenderTextureFormat (RenderTextureFormat.Depth)) 122 | { 123 | NotSupported (); 124 | return false; 125 | } 126 | 127 | if (needDepth) 128 | GetComponent().depthTextureMode |= DepthTextureMode.Depth; 129 | 130 | return true; 131 | } 132 | 133 | protected bool CheckSupport (bool needDepth, bool needHdr) 134 | { 135 | if (!CheckSupport(needDepth)) 136 | return false; 137 | 138 | if (needHdr && !supportHDRTextures) 139 | { 140 | NotSupported (); 141 | return false; 142 | } 143 | 144 | return true; 145 | } 146 | 147 | 148 | public bool Dx11Support () 149 | { 150 | return supportDX11; 151 | } 152 | 153 | 154 | protected void ReportAutoDisable () 155 | { 156 | Debug.LogWarning ("The image effect " + ToString() + " has been disabled as it's not supported on the current platform."); 157 | } 158 | 159 | // deprecated but needed for old effects to survive upgrading 160 | bool CheckShader (Shader s) 161 | { 162 | Debug.Log("The shader " + s.ToString () + " on effect "+ ToString () + " is not part of the Unity 3.2+ effects suite anymore. For best performance and quality, please ensure you are using the latest Standard Assets Image Effects (Pro only) package."); 163 | if (!s.isSupported) 164 | { 165 | NotSupported (); 166 | return false; 167 | } 168 | else 169 | { 170 | return false; 171 | } 172 | } 173 | 174 | 175 | protected void NotSupported () 176 | { 177 | enabled = false; 178 | isSupported = false; 179 | return; 180 | } 181 | 182 | 183 | protected void DrawBorder (RenderTexture dest, Material material) 184 | { 185 | float x1; 186 | float x2; 187 | float y1; 188 | float y2; 189 | 190 | RenderTexture.active = dest; 191 | bool invertY = true; // source.texelSize.y < 0.0ff; 192 | // Set up the simple Matrix 193 | GL.PushMatrix(); 194 | GL.LoadOrtho(); 195 | 196 | for (int i = 0; i < material.passCount; i++) 197 | { 198 | material.SetPass(i); 199 | 200 | float y1_; float y2_; 201 | if (invertY) 202 | { 203 | y1_ = 1.0f; y2_ = 0.0f; 204 | } 205 | else 206 | { 207 | y1_ = 0.0f; y2_ = 1.0f; 208 | } 209 | 210 | // left 211 | x1 = 0.0f; 212 | x2 = 0.0f + 1.0f/(dest.width*1.0f); 213 | y1 = 0.0f; 214 | y2 = 1.0f; 215 | GL.Begin(GL.QUADS); 216 | 217 | GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); 218 | GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); 219 | GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); 220 | GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); 221 | 222 | // right 223 | x1 = 1.0f - 1.0f/(dest.width*1.0f); 224 | x2 = 1.0f; 225 | y1 = 0.0f; 226 | y2 = 1.0f; 227 | 228 | GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); 229 | GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); 230 | GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); 231 | GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); 232 | 233 | // top 234 | x1 = 0.0f; 235 | x2 = 1.0f; 236 | y1 = 0.0f; 237 | y2 = 0.0f + 1.0f/(dest.height*1.0f); 238 | 239 | GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); 240 | GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); 241 | GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); 242 | GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); 243 | 244 | // bottom 245 | x1 = 0.0f; 246 | x2 = 1.0f; 247 | y1 = 1.0f - 1.0f/(dest.height*1.0f); 248 | y2 = 1.0f; 249 | 250 | GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); 251 | GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); 252 | GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); 253 | GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); 254 | 255 | GL.End(); 256 | } 257 | 258 | GL.PopMatrix(); 259 | } 260 | } 261 | } 262 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6f4318ec6c2bf643a0f9edfeeaba0ec 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [ExecuteInEditMode] 7 | [RequireComponent (typeof(Camera))] 8 | class PostEffectsHelper : MonoBehaviour 9 | { 10 | void OnRenderImage (RenderTexture source, RenderTexture destination) 11 | { 12 | Debug.Log("OnRenderImage in Helper called ..."); 13 | } 14 | 15 | static void DrawLowLevelPlaneAlignedWithCamera ( 16 | float dist , 17 | RenderTexture source, RenderTexture dest , 18 | Material material , 19 | Camera cameraForProjectionMatrix ) 20 | { 21 | // Make the destination texture the target for all rendering 22 | RenderTexture.active = dest; 23 | // Assign the source texture to a property from a shader 24 | material.SetTexture("_MainTex", source); 25 | bool invertY = true; // source.texelSize.y < 0.0f; 26 | // Set up the simple Matrix 27 | GL.PushMatrix(); 28 | GL.LoadIdentity(); 29 | GL.LoadProjectionMatrix(cameraForProjectionMatrix.projectionMatrix); 30 | 31 | float fovYHalfRad = cameraForProjectionMatrix.fieldOfView * 0.5f * Mathf.Deg2Rad; 32 | float cotangent = Mathf.Cos(fovYHalfRad) / Mathf.Sin(fovYHalfRad); 33 | float asp = cameraForProjectionMatrix.aspect; 34 | 35 | float x1 = asp/-cotangent; 36 | float x2 = asp/cotangent; 37 | float y1 = 1.0f/-cotangent; 38 | float y2 = 1.0f/cotangent; 39 | 40 | float sc = 1.0f; // magic constant (for now) 41 | 42 | x1 *= dist * sc; 43 | x2 *= dist * sc; 44 | y1 *= dist * sc; 45 | y2 *= dist * sc; 46 | 47 | float z1 = -dist; 48 | 49 | for (int i = 0; i < material.passCount; i++) 50 | { 51 | material.SetPass(i); 52 | 53 | GL.Begin(GL.QUADS); 54 | float y1_; float y2_; 55 | if (invertY) 56 | { 57 | y1_ = 1.0f; y2_ = 0.0f; 58 | } 59 | else 60 | { 61 | y1_ = 0.0f; y2_ = 1.0f; 62 | } 63 | GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, z1); 64 | GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, z1); 65 | GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, z1); 66 | GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, z1); 67 | GL.End(); 68 | } 69 | 70 | GL.PopMatrix(); 71 | } 72 | 73 | static void DrawBorder ( 74 | RenderTexture dest , 75 | Material material ) 76 | { 77 | float x1; 78 | float x2; 79 | float y1; 80 | float y2; 81 | 82 | RenderTexture.active = dest; 83 | bool invertY = true; // source.texelSize.y < 0.0ff; 84 | // Set up the simple Matrix 85 | GL.PushMatrix(); 86 | GL.LoadOrtho(); 87 | 88 | for (int i = 0; i < material.passCount; i++) 89 | { 90 | material.SetPass(i); 91 | 92 | float y1_; float y2_; 93 | if (invertY) 94 | { 95 | y1_ = 1.0f; y2_ = 0.0f; 96 | } 97 | else 98 | { 99 | y1_ = 0.0f; y2_ = 1.0f; 100 | } 101 | 102 | // left 103 | x1 = 0.0f; 104 | x2 = 0.0f + 1.0f/(dest.width*1.0f); 105 | y1 = 0.0f; 106 | y2 = 1.0f; 107 | GL.Begin(GL.QUADS); 108 | 109 | GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); 110 | GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); 111 | GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); 112 | GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); 113 | 114 | // right 115 | x1 = 1.0f - 1.0f/(dest.width*1.0f); 116 | x2 = 1.0f; 117 | y1 = 0.0f; 118 | y2 = 1.0f; 119 | 120 | GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); 121 | GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); 122 | GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); 123 | GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); 124 | 125 | // top 126 | x1 = 0.0f; 127 | x2 = 1.0f; 128 | y1 = 0.0f; 129 | y2 = 0.0f + 1.0f/(dest.height*1.0f); 130 | 131 | GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); 132 | GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); 133 | GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); 134 | GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); 135 | 136 | // bottom 137 | x1 = 0.0f; 138 | x2 = 1.0f; 139 | y1 = 1.0f - 1.0f/(dest.height*1.0f); 140 | y2 = 1.0f; 141 | 142 | GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); 143 | GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); 144 | GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); 145 | GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); 146 | 147 | GL.End(); 148 | } 149 | 150 | GL.PopMatrix(); 151 | } 152 | 153 | static void DrawLowLevelQuad ( float x1, float x2, float y1, float y2, RenderTexture source, RenderTexture dest, Material material ) 154 | { 155 | // Make the destination texture the target for all rendering 156 | RenderTexture.active = dest; 157 | // Assign the source texture to a property from a shader 158 | material.SetTexture("_MainTex", source); 159 | bool invertY = true; // source.texelSize.y < 0.0f; 160 | // Set up the simple Matrix 161 | GL.PushMatrix(); 162 | GL.LoadOrtho(); 163 | 164 | for (int i = 0; i < material.passCount; i++) 165 | { 166 | material.SetPass(i); 167 | 168 | GL.Begin(GL.QUADS); 169 | float y1_; float y2_; 170 | if (invertY) 171 | { 172 | y1_ = 1.0f; y2_ = 0.0f; 173 | } 174 | else 175 | { 176 | y1_ = 0.0f; y2_ = 1.0f; 177 | } 178 | GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f); 179 | GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f); 180 | GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f); 181 | GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f); 182 | GL.End(); 183 | } 184 | 185 | GL.PopMatrix(); 186 | } 187 | } 188 | } 189 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50b03df8f04b5c441aaac5b7fccb4734 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/NavMeshProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.5.2f1 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityAdsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/UnityAdsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colour-science/colour-unity/cf4bf14b44dce7f3e008283a7ffb5c32c0ee1983/ProjectSettings/UnityConnectSettings.asset --------------------------------------------------------------------------------