├── .gitignore ├── LICENSE ├── LICENSE.meta ├── MToon.meta ├── MToon ├── Editor.meta ├── Editor │ ├── EditorEnums.cs │ ├── EditorEnums.cs.meta │ ├── EditorUtils.cs │ ├── EditorUtils.cs.meta │ ├── MToon.Editor.asmdef │ ├── MToon.Editor.asmdef.meta │ ├── MToonInspector.cs │ └── MToonInspector.cs.meta ├── MToon.asmdef ├── MToon.asmdef.meta ├── Resources.meta ├── Resources │ ├── Shaders.meta │ └── Shaders │ │ ├── MToon.shader │ │ ├── MToon.shader.meta │ │ ├── MToonCore.cginc │ │ ├── MToonCore.cginc.meta │ │ ├── MToonSM3.cginc │ │ ├── MToonSM3.cginc.meta │ │ ├── MToonSM4.cginc │ │ └── MToonSM4.cginc.meta ├── Samples.meta ├── Samples │ ├── Materials.meta │ ├── Materials │ │ ├── Ex_OutlineWidth_Screen.mat │ │ ├── Ex_OutlineWidth_Screen.mat.meta │ │ ├── Ex_OutlineWidth_World.mat │ │ ├── Ex_OutlineWidth_World.mat.meta │ │ ├── Ground.mat │ │ ├── Ground.mat.meta │ │ ├── Toon.mat │ │ └── Toon.mat.meta │ ├── OutlineWidthModes.unity │ └── OutlineWidthModes.unity.meta ├── Scripts.meta └── Scripts │ ├── Enums.cs │ ├── Enums.cs.meta │ ├── MToonDefinition.cs │ ├── MToonDefinition.cs.meta │ ├── Utils.cs │ ├── Utils.cs.meta │ ├── UtilsGetter.cs │ ├── UtilsGetter.cs.meta │ ├── UtilsSetter.cs │ ├── UtilsSetter.cs.meta │ ├── UtilsVersion.cs │ └── UtilsVersion.cs.meta ├── README.md └── README.md.meta /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Visual Studio 2015 cache directory 9 | /.vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | 26 | # Unity3D generated meta files 27 | *.pidb.meta 28 | 29 | # Unity3D Generated File On Crash Reports 30 | sysinfo.txt 31 | 32 | # Builds 33 | *.apk 34 | *.unitypackage 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Masataka SUMI 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a5e8a5d481e3574b8274fa7ce4bdc2d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /MToon.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 029f110c597b25547ab35b6ed3fc049d 3 | folderAsset: yes 4 | timeCreated: 1520006778 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /MToon/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b669562c8ecaee4c98c808d3971271b 3 | folderAsset: yes 4 | timeCreated: 1514224760 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /MToon/Editor/EditorEnums.cs: -------------------------------------------------------------------------------- 1 | namespace MToon 2 | { 3 | public enum EditorRotationUnit 4 | { 5 | Rounds = 0, 6 | Degrees = 1, 7 | Radians = 2, 8 | } 9 | } -------------------------------------------------------------------------------- /MToon/Editor/EditorEnums.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 24156f9da0724eb5a159f36c69a7d90a 3 | timeCreated: 1560622066 -------------------------------------------------------------------------------- /MToon/Editor/EditorUtils.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Text.RegularExpressions; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | namespace MToon 7 | { 8 | public static class EditorUtils 9 | { 10 | private static string BasePath { get { return Path.Combine(Application.dataPath, "VRM/MToon"); } } 11 | 12 | private static string ShaderFilePath { get { return Path.Combine(BasePath, "MToon/Resources/Shaders/MToon.shader"); } } 13 | private static string ReadMeFilePath { get { return Path.Combine(BasePath, "README.md"); } } 14 | private static string VersionFilePath { get { return Path.Combine(BasePath, "MToon/Scripts/UtilsVersion.cs"); } } 15 | 16 | 17 | //[MenuItem("VRM/MToon Version Up")] 18 | private static void VerUp(string version) 19 | { 20 | UpdateShaderFile(version); 21 | UpdateReadMeFile(version); 22 | UpdateVersionFile(version); 23 | } 24 | 25 | private static void UpdateShaderFile(string version) 26 | { 27 | var file = File.ReadAllText(ShaderFilePath); 28 | file = Regex.Replace( 29 | file, 30 | "(_MToonVersion \\(\"_MToonVersion\", Float\\) = )(\\d+)", 31 | "${1}" + version 32 | ); 33 | File.WriteAllText(ShaderFilePath, file); 34 | } 35 | 36 | private static void UpdateReadMeFile(string version) 37 | { 38 | version = "v" + version.Substring(0, version.Length - 1) + "." + version[version.Length - 1]; 39 | 40 | var file = File.ReadAllText(ReadMeFilePath); 41 | file = Regex.Replace( 42 | file, 43 | "v(\\d+)\\.(\\d+)", 44 | version 45 | ); 46 | File.WriteAllText(ReadMeFilePath, file); 47 | } 48 | 49 | private static void UpdateVersionFile(string version) 50 | { 51 | var file = File.ReadAllText(VersionFilePath); 52 | file = Regex.Replace( 53 | file, 54 | "(public const int VersionNumber = )(\\d+)(;)", 55 | "${1}" + version + "${3}" 56 | ); 57 | File.WriteAllText(VersionFilePath, file); 58 | 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /MToon/Editor/EditorUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 531922bb16b74a00b81445116c49b09c 3 | timeCreated: 1559719559 -------------------------------------------------------------------------------- /MToon/Editor/MToon.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MToon.Editor", 3 | "references": [ 4 | "GUID:a9bc101fb0471f94a8f99fd242fdd934" 5 | ], 6 | "includePlatforms": [ 7 | "Editor" 8 | ], 9 | "excludePlatforms": [], 10 | "allowUnsafeCode": false, 11 | "overrideReferences": false, 12 | "precompiledReferences": [], 13 | "autoReferenced": false, 14 | "defineConstraints": [], 15 | "versionDefines": [], 16 | "noEngineReferences": false 17 | } -------------------------------------------------------------------------------- /MToon/Editor/MToon.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dddf8398e965f254cae2d7519d7f67d2 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /MToon/Editor/MToonInspector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using UnityEditor; 4 | using UnityEngine; 5 | using UnityEngine.Rendering; 6 | 7 | namespace MToon 8 | { 9 | public class MToonInspector : ShaderGUI 10 | { 11 | private const float RoundsToDegree = 360f; 12 | private const float RoundsToRadian = (float) Math.PI * 2f; 13 | 14 | private static bool isAdvancedLightingPanelFoldout = false; 15 | private static EditorRotationUnit editorRotationUnit = EditorRotationUnit.Rounds; 16 | 17 | private MaterialProperty _version; 18 | private MaterialProperty _blendMode; 19 | private MaterialProperty _bumpMap; 20 | private MaterialProperty _bumpScale; 21 | private MaterialProperty _color; 22 | private MaterialProperty _cullMode; 23 | // private MaterialProperty _outlineCullMode; 24 | private MaterialProperty _cutoff; 25 | 26 | private MaterialProperty _debugMode; 27 | private MaterialProperty _emissionColor; 28 | private MaterialProperty _emissionMap; 29 | private MaterialProperty _lightColorAttenuation; 30 | private MaterialProperty _indirectLightIntensity; 31 | private MaterialProperty _mainTex; 32 | private MaterialProperty _outlineColor; 33 | private MaterialProperty _outlineColorMode; 34 | private MaterialProperty _outlineLightingMix; 35 | private MaterialProperty _outlineWidth; 36 | private MaterialProperty _outlineScaledMaxDistance; 37 | private MaterialProperty _outlineWidthMode; 38 | private MaterialProperty _outlineWidthTexture; 39 | private MaterialProperty _receiveShadowRate; 40 | private MaterialProperty _receiveShadowTexture; 41 | private MaterialProperty _shadingGradeRate; 42 | private MaterialProperty _shadingGradeTexture; 43 | private MaterialProperty _shadeColor; 44 | private MaterialProperty _shadeShift; 45 | private MaterialProperty _shadeTexture; 46 | private MaterialProperty _shadeToony; 47 | private MaterialProperty _sphereAdd; 48 | private MaterialProperty _rimColor; 49 | private MaterialProperty _rimTexture; 50 | private MaterialProperty _rimLightingMix; 51 | private MaterialProperty _rimFresnelPower; 52 | private MaterialProperty _rimLift; 53 | private MaterialProperty _uvAnimMaskTexture; 54 | private MaterialProperty _uvAnimScrollX; 55 | private MaterialProperty _uvAnimScrollY; 56 | private MaterialProperty _uvAnimRotation; 57 | 58 | public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties) 59 | { 60 | _version = FindProperty(Utils.PropVersion, properties); 61 | _debugMode = FindProperty(Utils.PropDebugMode, properties); 62 | _outlineWidthMode = FindProperty(Utils.PropOutlineWidthMode, properties); 63 | _outlineColorMode = FindProperty(Utils.PropOutlineColorMode, properties); 64 | _blendMode = FindProperty(Utils.PropBlendMode, properties); 65 | _cullMode = FindProperty(Utils.PropCullMode, properties); 66 | // _outlineCullMode = FindProperty(Utils.PropOutlineCullMode, properties); 67 | _cutoff = FindProperty(Utils.PropCutoff, properties); 68 | _color = FindProperty(Utils.PropColor, properties); 69 | _shadeColor = FindProperty(Utils.PropShadeColor, properties); 70 | _mainTex = FindProperty(Utils.PropMainTex, properties); 71 | _shadeTexture = FindProperty(Utils.PropShadeTexture, properties); 72 | _bumpScale = FindProperty(Utils.PropBumpScale, properties); 73 | _bumpMap = FindProperty(Utils.PropBumpMap, properties); 74 | _receiveShadowRate = FindProperty(Utils.PropReceiveShadowRate, properties); 75 | _receiveShadowTexture = FindProperty(Utils.PropReceiveShadowTexture, properties); 76 | _shadingGradeRate = FindProperty(Utils.PropShadingGradeRate, properties); 77 | _shadingGradeTexture = FindProperty(Utils.PropShadingGradeTexture, properties); 78 | _shadeShift = FindProperty(Utils.PropShadeShift, properties); 79 | _shadeToony = FindProperty(Utils.PropShadeToony, properties); 80 | _lightColorAttenuation = FindProperty(Utils.PropLightColorAttenuation, properties); 81 | _indirectLightIntensity = FindProperty(Utils.PropIndirectLightIntensity, properties); 82 | _rimColor = FindProperty(Utils.PropRimColor, properties); 83 | _rimTexture = FindProperty(Utils.PropRimTexture, properties); 84 | _rimLightingMix = FindProperty(Utils.PropRimLightingMix, properties); 85 | _rimFresnelPower = FindProperty(Utils.PropRimFresnelPower, properties); 86 | _rimLift = FindProperty(Utils.PropRimLift, properties); 87 | _sphereAdd = FindProperty(Utils.PropSphereAdd, properties); 88 | _emissionColor = FindProperty(Utils.PropEmissionColor, properties); 89 | _emissionMap = FindProperty(Utils.PropEmissionMap, properties); 90 | _outlineWidthTexture = FindProperty(Utils.PropOutlineWidthTexture, properties); 91 | _outlineWidth = FindProperty(Utils.PropOutlineWidth, properties); 92 | _outlineScaledMaxDistance = FindProperty(Utils.PropOutlineScaledMaxDistance, properties); 93 | _outlineColor = FindProperty(Utils.PropOutlineColor, properties); 94 | _outlineLightingMix = FindProperty(Utils.PropOutlineLightingMix, properties); 95 | _uvAnimMaskTexture = FindProperty(Utils.PropUvAnimMaskTexture, properties); 96 | _uvAnimScrollX = FindProperty(Utils.PropUvAnimScrollX, properties); 97 | _uvAnimScrollY = FindProperty(Utils.PropUvAnimScrollY, properties); 98 | _uvAnimRotation = FindProperty(Utils.PropUvAnimRotation, properties); 99 | var materials = materialEditor.targets.Select(x => x as Material).ToArray(); 100 | Draw(materialEditor, materials); 101 | } 102 | 103 | private void Draw(MaterialEditor materialEditor, Material[] materials) 104 | { 105 | EditorGUI.BeginChangeCheck(); 106 | { 107 | _version.floatValue = Utils.VersionNumber; 108 | 109 | EditorGUILayout.LabelField("Rendering", EditorStyles.boldLabel); 110 | EditorGUILayout.BeginVertical(GUI.skin.box); 111 | { 112 | EditorGUILayout.LabelField("Mode", EditorStyles.boldLabel); 113 | if (PopupEnum("Rendering Type", _blendMode, materialEditor)) 114 | { 115 | ModeChanged(materials, isBlendModeChangedByUser: true); 116 | } 117 | 118 | if ((RenderMode) _blendMode.floatValue == RenderMode.TransparentWithZWrite) 119 | { 120 | EditorGUILayout.HelpBox("TransparentWithZWrite mode can cause problems with rendering.", MessageType.Warning); 121 | } 122 | 123 | if (PopupEnum("Cull Mode", _cullMode, materialEditor)) 124 | { 125 | ModeChanged(materials); 126 | } 127 | } 128 | EditorGUILayout.EndVertical(); 129 | EditorGUILayout.Space(); 130 | 131 | EditorGUILayout.LabelField("Color", EditorStyles.boldLabel); 132 | EditorGUILayout.BeginVertical(GUI.skin.box); 133 | { 134 | EditorGUILayout.LabelField("Texture", EditorStyles.boldLabel); 135 | { 136 | materialEditor.TexturePropertySingleLine(new GUIContent("Lit Color, Alpha", "Lit (RGB), Alpha (A)"), 137 | _mainTex, _color); 138 | 139 | materialEditor.TexturePropertySingleLine(new GUIContent("Shade Color", "Shade (RGB)"), _shadeTexture, 140 | _shadeColor); 141 | } 142 | var bm = (RenderMode) _blendMode.floatValue; 143 | if (bm == RenderMode.Cutout) 144 | { 145 | EditorGUILayout.Space(); 146 | EditorGUILayout.LabelField("Alpha", EditorStyles.boldLabel); 147 | { 148 | materialEditor.ShaderProperty(_cutoff, "Cutoff"); 149 | } 150 | } 151 | } 152 | EditorGUILayout.EndVertical(); 153 | EditorGUILayout.Space(); 154 | 155 | EditorGUILayout.LabelField("Lighting", EditorStyles.boldLabel); 156 | EditorGUILayout.BeginVertical(GUI.skin.box); 157 | { 158 | { 159 | materialEditor.ShaderProperty(_shadeToony, 160 | new GUIContent("Shading Toony", 161 | "0.0 is Lambert. Higher value get toony shading.")); 162 | 163 | // Normal 164 | EditorGUI.BeginChangeCheck(); 165 | materialEditor.TexturePropertySingleLine(new GUIContent("Normal Map [Normal]", "Normal Map (RGB)"), 166 | _bumpMap, 167 | _bumpScale); 168 | if (EditorGUI.EndChangeCheck()) 169 | { 170 | materialEditor.RegisterPropertyChangeUndo("BumpEnabledDisabled"); 171 | ModeChanged(materials); 172 | } 173 | } 174 | EditorGUILayout.Space(); 175 | 176 | EditorGUI.indentLevel++; 177 | { 178 | isAdvancedLightingPanelFoldout = EditorGUILayout.Foldout(isAdvancedLightingPanelFoldout, "Advanced Settings", EditorStyles.boldFont); 179 | 180 | if (isAdvancedLightingPanelFoldout) 181 | { 182 | EditorGUILayout.BeginHorizontal(); 183 | EditorGUILayout.HelpBox( 184 | "The default settings are suitable for Advanced Settings if you want to toony result.", 185 | MessageType.Info); 186 | if (GUILayout.Button("Use Default")) 187 | { 188 | _shadeShift.floatValue = 0; 189 | _receiveShadowTexture.textureValue = null; 190 | _receiveShadowRate.floatValue = 1; 191 | _shadingGradeTexture.textureValue = null; 192 | _shadingGradeRate.floatValue = 1; 193 | _lightColorAttenuation.floatValue = 0; 194 | _indirectLightIntensity.floatValue = 0.1f; 195 | } 196 | EditorGUILayout.EndHorizontal(); 197 | 198 | materialEditor.ShaderProperty(_shadeShift, 199 | new GUIContent("Shading Shift", 200 | "Zero is Default. Negative value increase lit area. Positive value increase shade area.")); 201 | materialEditor.TexturePropertySingleLine( 202 | new GUIContent("Shadow Receive Multiplier", 203 | "Texture (R) * Rate. White is Default. Black attenuates shadows."), 204 | _receiveShadowTexture, 205 | _receiveShadowRate); 206 | materialEditor.TexturePropertySingleLine( 207 | new GUIContent("Lit & Shade Mixing Multiplier", 208 | "Texture (R) * Rate. Compatible with UTS2 ShadingGradeMap. White is Default. Black amplifies shade."), 209 | _shadingGradeTexture, 210 | _shadingGradeRate); 211 | materialEditor.ShaderProperty(_lightColorAttenuation, "LightColor Attenuation"); 212 | materialEditor.ShaderProperty(_indirectLightIntensity, "GI Intensity"); 213 | } 214 | } 215 | EditorGUI.indentLevel--; 216 | } 217 | EditorGUILayout.EndVertical(); 218 | EditorGUILayout.Space(); 219 | 220 | EditorGUILayout.LabelField("Emission", EditorStyles.boldLabel); 221 | EditorGUILayout.BeginVertical(GUI.skin.box); 222 | { 223 | TextureWithHdrColor(materialEditor, "Emission", "Emission (RGB)", 224 | _emissionMap, _emissionColor); 225 | 226 | materialEditor.TexturePropertySingleLine(new GUIContent("MatCap", "MatCap Texture (RGB)"), 227 | _sphereAdd); 228 | } 229 | EditorGUILayout.EndVertical(); 230 | EditorGUILayout.Space(); 231 | 232 | EditorGUILayout.LabelField("Rim", EditorStyles.boldLabel); 233 | EditorGUILayout.BeginVertical(GUI.skin.box); 234 | { 235 | TextureWithHdrColor(materialEditor, "Color", "Rim Color (RGB)", 236 | _rimTexture, _rimColor); 237 | 238 | materialEditor.DefaultShaderProperty(_rimLightingMix, "Lighting Mix"); 239 | 240 | materialEditor.ShaderProperty(_rimFresnelPower, 241 | new GUIContent("Fresnel Power", 242 | "If you increase this value, you get sharpness rim light.")); 243 | 244 | materialEditor.ShaderProperty(_rimLift, 245 | new GUIContent("Lift", 246 | "If you increase this value, you can lift rim light.")); 247 | } 248 | EditorGUILayout.EndVertical(); 249 | EditorGUILayout.Space(); 250 | 251 | 252 | EditorGUILayout.LabelField("Outline", EditorStyles.boldLabel); 253 | EditorGUILayout.BeginVertical(GUI.skin.box); 254 | { 255 | // Outline 256 | EditorGUILayout.LabelField("Width", EditorStyles.boldLabel); 257 | { 258 | if (PopupEnum("Mode", _outlineWidthMode, materialEditor)) 259 | { 260 | ModeChanged(materials); 261 | } 262 | 263 | if ((RenderMode) _blendMode.floatValue == RenderMode.Transparent && 264 | (OutlineWidthMode) _outlineWidthMode.floatValue != OutlineWidthMode.None) 265 | { 266 | EditorGUILayout.HelpBox("Outline with Transparent material cause problem with rendering.", MessageType.Warning); 267 | } 268 | 269 | var widthMode = (OutlineWidthMode) _outlineWidthMode.floatValue; 270 | if (widthMode != OutlineWidthMode.None) 271 | { 272 | materialEditor.TexturePropertySingleLine( 273 | new GUIContent("Width", "Outline Width Texture (RGB)"), 274 | _outlineWidthTexture, _outlineWidth); 275 | } 276 | 277 | if (widthMode == OutlineWidthMode.ScreenCoordinates) 278 | { 279 | materialEditor.ShaderProperty(_outlineScaledMaxDistance, "Width Scaled Max Distance"); 280 | } 281 | } 282 | EditorGUILayout.Space(); 283 | 284 | EditorGUILayout.LabelField("Color", EditorStyles.boldLabel); 285 | { 286 | var widthMode = (OutlineWidthMode) _outlineWidthMode.floatValue; 287 | if (widthMode != OutlineWidthMode.None) 288 | { 289 | EditorGUI.BeginChangeCheck(); 290 | 291 | if (PopupEnum("Mode", _outlineColorMode, materialEditor)) 292 | { 293 | ModeChanged(materials); 294 | } 295 | 296 | var colorMode = (OutlineColorMode) _outlineColorMode.floatValue; 297 | 298 | materialEditor.ShaderProperty(_outlineColor, "Color"); 299 | if (colorMode == OutlineColorMode.MixedLighting) 300 | materialEditor.DefaultShaderProperty(_outlineLightingMix, "Lighting Mix"); 301 | } 302 | } 303 | } 304 | EditorGUILayout.EndVertical(); 305 | EditorGUILayout.Space(); 306 | 307 | 308 | EditorGUILayout.LabelField("UV Coordinates", EditorStyles.boldLabel); 309 | EditorGUILayout.BeginVertical(GUI.skin.box); 310 | { 311 | // UV 312 | EditorGUILayout.LabelField("Scale & Offset", EditorStyles.boldLabel); 313 | { 314 | materialEditor.TextureScaleOffsetProperty(_mainTex); 315 | } 316 | EditorGUILayout.Space(); 317 | 318 | EditorGUILayout.LabelField("Auto Animation", EditorStyles.boldLabel); 319 | { 320 | materialEditor.TexturePropertySingleLine(new GUIContent("Mask", "Auto Animation Mask Texture (R)"), _uvAnimMaskTexture); 321 | materialEditor.ShaderProperty(_uvAnimScrollX, "Scroll X (per second)"); 322 | materialEditor.ShaderProperty(_uvAnimScrollY, "Scroll Y (per second)"); 323 | 324 | { 325 | var control = EditorGUILayout.GetControlRect(hasLabel: true); 326 | const int popupMargin = 5; 327 | const int popupWidth = 80; 328 | 329 | var floatControl = new Rect(control); 330 | floatControl.width -= popupMargin + popupWidth; 331 | var popupControl = new Rect(control); 332 | popupControl.x = floatControl.x + floatControl.width + popupMargin; 333 | popupControl.width = popupWidth; 334 | 335 | EditorGUI.BeginChangeCheck(); 336 | var inspectorRotationValue = GetInspectorRotationValue(editorRotationUnit, _uvAnimRotation.floatValue); 337 | inspectorRotationValue = EditorGUI.FloatField(floatControl, "Rotation value (per second)", inspectorRotationValue); 338 | if (EditorGUI.EndChangeCheck()) 339 | { 340 | materialEditor.RegisterPropertyChangeUndo("UvAnimRotationValueChanged"); 341 | _uvAnimRotation.floatValue = GetRawRotationValue(editorRotationUnit, inspectorRotationValue); 342 | } 343 | editorRotationUnit = (EditorRotationUnit) EditorGUI.EnumPopup(popupControl, editorRotationUnit); 344 | } 345 | } 346 | } 347 | EditorGUILayout.EndVertical(); 348 | EditorGUILayout.Space(); 349 | 350 | 351 | EditorGUILayout.LabelField("Options", EditorStyles.boldLabel); 352 | EditorGUILayout.BeginVertical(GUI.skin.box); 353 | { 354 | EditorGUILayout.LabelField("Debugging Options", EditorStyles.boldLabel); 355 | { 356 | if (PopupEnum("Visualize", _debugMode, materialEditor)) 357 | { 358 | ModeChanged(materials); 359 | } 360 | } 361 | EditorGUILayout.Space(); 362 | 363 | EditorGUILayout.LabelField("Advanced Options", EditorStyles.boldLabel); 364 | { 365 | #if UNITY_5_6_OR_NEWER 366 | // materialEditor.EnableInstancingField(); 367 | materialEditor.DoubleSidedGIField(); 368 | #endif 369 | EditorGUI.BeginChangeCheck(); 370 | materialEditor.RenderQueueField(); 371 | if (EditorGUI.EndChangeCheck()) 372 | { 373 | ModeChanged(materials); 374 | } 375 | } 376 | } 377 | EditorGUILayout.EndVertical(); 378 | EditorGUILayout.Space(); 379 | } 380 | EditorGUI.EndChangeCheck(); 381 | } 382 | 383 | public override void AssignNewShaderToMaterial(Material material, Shader oldShader, Shader newShader) 384 | { 385 | base.AssignNewShaderToMaterial(material, oldShader, newShader); 386 | 387 | Utils.ValidateProperties(material, isBlendModeChangedByUser: true); 388 | } 389 | 390 | private static void ModeChanged(Material[] materials, bool isBlendModeChangedByUser = false) 391 | { 392 | foreach (var material in materials) 393 | { 394 | Utils.ValidateProperties(material, isBlendModeChangedByUser); 395 | } 396 | } 397 | 398 | private static bool PopupEnum(string name, MaterialProperty property, MaterialEditor editor) where T : struct 399 | { 400 | EditorGUI.showMixedValue = property.hasMixedValue; 401 | EditorGUI.BeginChangeCheck(); 402 | var ret = EditorGUILayout.Popup(name, (int) property.floatValue, Enum.GetNames(typeof(T))); 403 | var changed = EditorGUI.EndChangeCheck(); 404 | if (changed) 405 | { 406 | editor.RegisterPropertyChangeUndo("EnumPopUp"); 407 | property.floatValue = ret; 408 | } 409 | 410 | EditorGUI.showMixedValue = false; 411 | return changed; 412 | } 413 | 414 | private static void TextureWithHdrColor(MaterialEditor materialEditor, string label, string description, 415 | MaterialProperty texProp, MaterialProperty colorProp) 416 | { 417 | materialEditor.TexturePropertyWithHDRColor(new GUIContent(label, description), 418 | texProp, 419 | colorProp, 420 | #if UNITY_2018_1_OR_NEWER 421 | #else 422 | new ColorPickerHDRConfig(minBrightness: 0, maxBrightness: 10, minExposureValue: -10, 423 | maxExposureValue: 10), 424 | #endif 425 | showAlpha: false); 426 | 427 | } 428 | 429 | private static float GetRawRotationValue(EditorRotationUnit unit, float inspectorValue) 430 | { 431 | switch (unit) 432 | { 433 | case EditorRotationUnit.Rounds: 434 | return inspectorValue; 435 | case EditorRotationUnit.Degrees: 436 | return inspectorValue / RoundsToDegree; 437 | case EditorRotationUnit.Radians: 438 | return inspectorValue / RoundsToRadian; 439 | default: 440 | throw new ArgumentOutOfRangeException(); 441 | } 442 | } 443 | 444 | private static float GetInspectorRotationValue(EditorRotationUnit unit, float rawValue) 445 | { 446 | switch (unit) 447 | { 448 | case EditorRotationUnit.Rounds: 449 | return rawValue; 450 | case EditorRotationUnit.Degrees: 451 | return rawValue * RoundsToDegree; 452 | case EditorRotationUnit.Radians: 453 | return rawValue * RoundsToRadian; 454 | default: 455 | throw new ArgumentOutOfRangeException(); 456 | } 457 | } 458 | } 459 | } -------------------------------------------------------------------------------- /MToon/Editor/MToonInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b43baa9f62f04748bb167ad186f1b1a 3 | timeCreated: 1514224771 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /MToon/MToon.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MToon", 3 | "references": [], 4 | "optionalUnityReferences": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": false, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": false, 11 | "defineConstraints": [] 12 | } -------------------------------------------------------------------------------- /MToon/MToon.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9bc101fb0471f94a8f99fd242fdd934 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /MToon/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9491ac346386a2b4e9f3c801c6786818 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /MToon/Resources/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 221dcd8025c13ab42a51e886d7a7a92e 3 | folderAsset: yes 4 | timeCreated: 1516295202 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /MToon/Resources/Shaders/MToon.shader: -------------------------------------------------------------------------------- 1 | Shader "VRM/MToon" 2 | { 3 | Properties 4 | { 5 | _Cutoff ("Alpha Cutoff", Range(0, 1)) = 0.5 6 | _Color ("Lit Color + Alpha", Color) = (1,1,1,1) 7 | _ShadeColor ("Shade Color", Color) = (0.97, 0.81, 0.86, 1) 8 | [NoScaleOffset] _MainTex ("Lit Texture + Alpha", 2D) = "white" {} 9 | [NoScaleOffset] _ShadeTexture ("Shade Texture", 2D) = "white" {} 10 | _BumpScale ("Normal Scale", Float) = 1.0 11 | [Normal] _BumpMap ("Normal Texture", 2D) = "bump" {} 12 | _ReceiveShadowRate ("Receive Shadow", Range(0, 1)) = 1 13 | [NoScaleOffset] _ReceiveShadowTexture ("Receive Shadow Texture", 2D) = "white" {} 14 | _ShadingGradeRate ("Shading Grade", Range(0, 1)) = 1 15 | [NoScaleOffset] _ShadingGradeTexture ("Shading Grade Texture", 2D) = "white" {} 16 | _ShadeShift ("Shade Shift", Range(-1, 1)) = 0 17 | _ShadeToony ("Shade Toony", Range(0, 1)) = 0.9 18 | _LightColorAttenuation ("Light Color Attenuation", Range(0, 1)) = 0 19 | _IndirectLightIntensity ("Indirect Light Intensity", Range(0, 1)) = 0.1 20 | [HDR] _RimColor ("Rim Color", Color) = (0,0,0) 21 | [NoScaleOffset] _RimTexture ("Rim Texture", 2D) = "white" {} 22 | _RimLightingMix ("Rim Lighting Mix", Range(0, 1)) = 0 23 | [PowerSlider(4.0)] _RimFresnelPower ("Rim Fresnel Power", Range(0, 100)) = 1 24 | _RimLift ("Rim Lift", Range(0, 1)) = 0 25 | [NoScaleOffset] _SphereAdd ("Sphere Texture(Add)", 2D) = "black" {} 26 | [HDR] _EmissionColor ("Color", Color) = (0,0,0) 27 | [NoScaleOffset] _EmissionMap ("Emission", 2D) = "white" {} 28 | [NoScaleOffset] _OutlineWidthTexture ("Outline Width Tex", 2D) = "white" {} 29 | _OutlineWidth ("Outline Width", Range(0.01, 1)) = 0.5 30 | _OutlineScaledMaxDistance ("Outline Scaled Max Distance", Range(1, 10)) = 1 31 | _OutlineColor ("Outline Color", Color) = (0,0,0,1) 32 | _OutlineLightingMix ("Outline Lighting Mix", Range(0, 1)) = 1 33 | [NoScaleOffset] _UvAnimMaskTexture ("UV Animation Mask", 2D) = "white" {} 34 | _UvAnimScrollX ("UV Animation Scroll X", Float) = 0 35 | _UvAnimScrollY ("UV Animation Scroll Y", Float) = 0 36 | _UvAnimRotation ("UV Animation Rotation", Float) = 0 37 | 38 | [HideInInspector] _MToonVersion ("_MToonVersion", Float) = 39 39 | [HideInInspector] _DebugMode ("_DebugMode", Float) = 0.0 40 | [HideInInspector] _BlendMode ("_BlendMode", Float) = 0.0 41 | [HideInInspector] _OutlineWidthMode ("_OutlineWidthMode", Float) = 0.0 42 | [HideInInspector] _OutlineColorMode ("_OutlineColorMode", Float) = 0.0 43 | [HideInInspector] _CullMode ("_CullMode", Float) = 2.0 44 | [HideInInspector] _OutlineCullMode ("_OutlineCullMode", Float) = 1.0 45 | [HideInInspector] _SrcBlend ("_SrcBlend", Float) = 1.0 46 | [HideInInspector] _DstBlend ("_DstBlend", Float) = 0.0 47 | [HideInInspector] _ZWrite ("_ZWrite", Float) = 1.0 48 | [HideInInspector] _AlphaToMask ("_AlphaToMask", Float) = 0.0 49 | } 50 | 51 | // for SM 3.0 52 | SubShader 53 | { 54 | Tags { "RenderType" = "Opaque" "Queue" = "Geometry" } 55 | 56 | // Forward Base 57 | Pass 58 | { 59 | Name "FORWARD_BASE" 60 | Tags { "LightMode" = "ForwardBase" } 61 | 62 | Cull [_CullMode] 63 | Blend [_SrcBlend] [_DstBlend] 64 | ZWrite [_ZWrite] 65 | ZTest LEqual 66 | BlendOp Add, Max 67 | AlphaToMask [_AlphaToMask] 68 | 69 | CGPROGRAM 70 | #pragma target 3.0 71 | #pragma shader_feature _ MTOON_DEBUG_NORMAL MTOON_DEBUG_LITSHADERATE 72 | #pragma multi_compile _ _NORMALMAP 73 | #pragma multi_compile _ _ALPHATEST_ON _ALPHABLEND_ON 74 | #include "./MToonSM3.cginc" 75 | #pragma vertex vert_forward_base 76 | #pragma fragment frag_forward 77 | #pragma multi_compile_fwdbase 78 | #pragma multi_compile_fog 79 | // #pragma multi_compile_instancing 80 | ENDCG 81 | } 82 | 83 | 84 | // Forward Base Outline Pass 85 | Pass 86 | { 87 | Name "FORWARD_BASE_ONLY_OUTLINE" 88 | Tags { "LightMode" = "ForwardBase" } 89 | 90 | Cull [_OutlineCullMode] 91 | Blend [_SrcBlend] [_DstBlend] 92 | ZWrite [_ZWrite] 93 | ZTest LEqual 94 | Offset 1, 1 95 | BlendOp Add, Max 96 | AlphaToMask [_AlphaToMask] 97 | 98 | CGPROGRAM 99 | #pragma target 3.0 100 | #pragma shader_feature _ MTOON_DEBUG_NORMAL MTOON_DEBUG_LITSHADERATE 101 | #pragma multi_compile _ MTOON_OUTLINE_WIDTH_WORLD MTOON_OUTLINE_WIDTH_SCREEN 102 | #pragma multi_compile _ MTOON_OUTLINE_COLOR_FIXED MTOON_OUTLINE_COLOR_MIXED 103 | #pragma multi_compile _ _NORMALMAP 104 | #pragma multi_compile _ _ALPHATEST_ON _ALPHABLEND_ON 105 | #define MTOON_CLIP_IF_OUTLINE_IS_NONE 106 | #include "./MToonSM3.cginc" 107 | #pragma vertex vert_forward_base_outline 108 | #pragma fragment frag_forward 109 | #pragma multi_compile_fwdbase 110 | #pragma multi_compile_fog 111 | // #pragma multi_compile_instancing 112 | ENDCG 113 | } 114 | 115 | 116 | // Forward Add 117 | Pass 118 | { 119 | Name "FORWARD_ADD" 120 | Tags { "LightMode" = "ForwardAdd" } 121 | 122 | Cull [_CullMode] 123 | Blend [_SrcBlend] One 124 | ZWrite Off 125 | ZTest LEqual 126 | BlendOp Add, Max 127 | AlphaToMask [_AlphaToMask] 128 | 129 | CGPROGRAM 130 | #pragma target 3.0 131 | #pragma shader_feature _ MTOON_DEBUG_NORMAL MTOON_DEBUG_LITSHADERATE 132 | #pragma multi_compile _ _NORMALMAP 133 | #pragma multi_compile _ _ALPHATEST_ON _ALPHABLEND_ON 134 | #define MTOON_FORWARD_ADD 135 | #include "./MToonSM3.cginc" 136 | #pragma vertex vert_forward_add 137 | #pragma fragment frag_forward 138 | #pragma multi_compile_fwdadd_fullshadows 139 | #pragma multi_compile_fog 140 | ENDCG 141 | } 142 | 143 | // Shadow rendering pass 144 | Pass 145 | { 146 | Name "ShadowCaster" 147 | Tags { "LightMode" = "ShadowCaster" } 148 | 149 | Cull [_CullMode] 150 | ZWrite On 151 | ZTest LEqual 152 | 153 | CGPROGRAM 154 | #pragma target 3.0 155 | #pragma multi_compile _ _ALPHATEST_ON _ALPHABLEND_ON 156 | #pragma multi_compile_shadowcaster 157 | #pragma vertex vertShadowCaster 158 | #pragma fragment fragShadowCaster 159 | #include "UnityStandardShadow.cginc" 160 | ENDCG 161 | } 162 | } 163 | 164 | Fallback "Unlit/Texture" 165 | CustomEditor "MToon.MToonInspector" 166 | } 167 | -------------------------------------------------------------------------------- /MToon/Resources/Shaders/MToon.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a97144e4ad27a04aafd70f7b915cedb 3 | timeCreated: 1514111466 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /MToon/Resources/Shaders/MToonCore.cginc: -------------------------------------------------------------------------------- 1 | #ifndef MTOON_CORE_INCLUDED 2 | #define MTOON_CORE_INCLUDED 3 | 4 | #include "Lighting.cginc" 5 | #include "AutoLight.cginc" 6 | 7 | half _Cutoff; 8 | fixed4 _Color; 9 | fixed4 _ShadeColor; 10 | sampler2D _MainTex; float4 _MainTex_ST; 11 | sampler2D _ShadeTexture; 12 | half _BumpScale; 13 | sampler2D _BumpMap; 14 | sampler2D _ReceiveShadowTexture; 15 | half _ReceiveShadowRate; 16 | sampler2D _ShadingGradeTexture; 17 | half _ShadingGradeRate; 18 | half _ShadeShift; 19 | half _ShadeToony; 20 | half _LightColorAttenuation; 21 | half _IndirectLightIntensity; 22 | sampler2D _RimTexture; 23 | half4 _RimColor; 24 | half _RimLightingMix; 25 | half _RimFresnelPower; 26 | half _RimLift; 27 | sampler2D _SphereAdd; 28 | half4 _EmissionColor; 29 | sampler2D _EmissionMap; 30 | sampler2D _OutlineWidthTexture; 31 | half _OutlineWidth; 32 | half _OutlineScaledMaxDistance; 33 | fixed4 _OutlineColor; 34 | half _OutlineLightingMix; 35 | // NOTE: "tex2d() * _Time.y" returns mediump value if sampler is half precision in Android VR platform 36 | sampler2D_float _UvAnimMaskTexture; 37 | float _UvAnimScrollX; 38 | float _UvAnimScrollY; 39 | float _UvAnimRotation; 40 | 41 | //UNITY_INSTANCING_BUFFER_START(Props) 42 | //UNITY_INSTANCING_BUFFER_END(Props) 43 | 44 | struct v2f 45 | { 46 | float4 pos : SV_POSITION; 47 | float4 posWorld : TEXCOORD0; 48 | half3 tspace0 : TEXCOORD1; 49 | half3 tspace1 : TEXCOORD2; 50 | half3 tspace2 : TEXCOORD3; 51 | float2 uv0 : TEXCOORD4; 52 | float isOutline : TEXCOORD5; 53 | fixed4 color : TEXCOORD6; 54 | UNITY_FOG_COORDS(7) 55 | UNITY_SHADOW_COORDS(8) 56 | //UNITY_VERTEX_INPUT_INSTANCE_ID // necessary only if any instanced properties are going to be accessed in the fragment Shader. 57 | UNITY_VERTEX_OUTPUT_STEREO 58 | }; 59 | 60 | inline v2f InitializeV2F(appdata_full v, float4 projectedVertex, float isOutline) 61 | { 62 | v2f o; 63 | UNITY_INITIALIZE_OUTPUT(v2f, o); 64 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 65 | //UNITY_TRANSFER_INSTANCE_ID(v, o); 66 | 67 | o.pos = projectedVertex; 68 | o.posWorld = mul(unity_ObjectToWorld, v.vertex); 69 | o.uv0 = v.texcoord; 70 | half3 worldNormal = UnityObjectToWorldNormal(v.normal); 71 | half3 worldTangent = UnityObjectToWorldDir(v.tangent); 72 | half tangentSign = v.tangent.w * unity_WorldTransformParams.w; 73 | half3 worldBitangent = cross(worldNormal, worldTangent) * tangentSign; 74 | o.tspace0 = half3(worldTangent.x, worldBitangent.x, worldNormal.x); 75 | o.tspace1 = half3(worldTangent.y, worldBitangent.y, worldNormal.y); 76 | o.tspace2 = half3(worldTangent.z, worldBitangent.z, worldNormal.z); 77 | o.isOutline = isOutline; 78 | o.color = v.color; 79 | UNITY_TRANSFER_SHADOW(o, o._ShadowCoord); 80 | UNITY_TRANSFER_FOG(o, o.pos); 81 | return o; 82 | } 83 | 84 | inline float4 CalculateOutlineVertexClipPosition(appdata_full v) 85 | { 86 | float outlineTex = tex2Dlod(_OutlineWidthTexture, float4(TRANSFORM_TEX(v.texcoord, _MainTex), 0, 0)).r; 87 | 88 | #if defined(MTOON_OUTLINE_WIDTH_WORLD) 89 | float3 worldNormalLength = length(mul((float3x3)transpose(unity_WorldToObject), v.normal)); 90 | float3 outlineOffset = 0.01 * _OutlineWidth * outlineTex * worldNormalLength * v.normal; 91 | float4 vertex = UnityObjectToClipPos(v.vertex + outlineOffset); 92 | #elif defined(MTOON_OUTLINE_WIDTH_SCREEN) 93 | float4 nearUpperRight = mul(unity_CameraInvProjection, float4(1, 1, UNITY_NEAR_CLIP_VALUE, _ProjectionParams.y)); 94 | float aspect = abs(nearUpperRight.y / nearUpperRight.x); 95 | float4 vertex = UnityObjectToClipPos(v.vertex); 96 | float3 viewNormal = mul((float3x3)UNITY_MATRIX_IT_MV, v.normal.xyz); 97 | float3 clipNormal = TransformViewToProjection(viewNormal.xyz); 98 | float2 projectedNormal = normalize(clipNormal.xy); 99 | projectedNormal *= min(vertex.w, _OutlineScaledMaxDistance); 100 | projectedNormal.x *= aspect; 101 | vertex.xy += 0.01 * _OutlineWidth * outlineTex * projectedNormal.xy * saturate(1 - abs(normalize(viewNormal).z)); // ignore offset when normal toward camera 102 | #else 103 | float4 vertex = UnityObjectToClipPos(v.vertex); 104 | #endif 105 | return vertex; 106 | } 107 | 108 | float4 frag_forward(v2f i) : SV_TARGET 109 | { 110 | #ifdef MTOON_CLIP_IF_OUTLINE_IS_NONE 111 | #ifdef MTOON_OUTLINE_WIDTH_WORLD 112 | #elif MTOON_OUTLINE_WIDTH_SCREEN 113 | #else 114 | clip(-1); 115 | #endif 116 | #endif 117 | 118 | //UNITY_TRANSFER_INSTANCE_ID(v, o); 119 | UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); 120 | 121 | // const 122 | const float PI_2 = 6.28318530718; 123 | const float EPS_COL = 0.00001; 124 | 125 | // uv 126 | float2 mainUv = TRANSFORM_TEX(i.uv0, _MainTex); 127 | 128 | // uv anim 129 | float uvAnim = tex2D(_UvAnimMaskTexture, mainUv).r * _Time.y; 130 | // translate uv in bottom-left origin coordinates. 131 | mainUv += float2(_UvAnimScrollX, _UvAnimScrollY) * uvAnim; 132 | // rotate uv counter-clockwise around (0.5, 0.5) in bottom-left origin coordinates. 133 | float rotateRad = _UvAnimRotation * PI_2 * uvAnim; 134 | const float2 rotatePivot = float2(0.5, 0.5); 135 | mainUv = mul(float2x2(cos(rotateRad), -sin(rotateRad), sin(rotateRad), cos(rotateRad)), mainUv - rotatePivot) + rotatePivot; 136 | 137 | // main tex 138 | half4 mainTex = tex2D(_MainTex, mainUv); 139 | 140 | // alpha 141 | half alpha = 1; 142 | #ifdef _ALPHATEST_ON 143 | alpha = _Color.a * mainTex.a; 144 | alpha = (alpha - _Cutoff) / max(fwidth(alpha), EPS_COL) + 0.5; // Alpha to Coverage 145 | clip(alpha - _Cutoff); 146 | alpha = 1.0; // Discarded, otherwise it should be assumed to have full opacity 147 | #endif 148 | #ifdef _ALPHABLEND_ON 149 | alpha = _Color.a * mainTex.a; 150 | #if !_ALPHATEST_ON && SHADER_API_D3D11 // Only enable this on D3D11, where I tested it 151 | clip(alpha - 0.0001); // Slightly improves rendering with layered transparency 152 | #endif 153 | #endif 154 | 155 | // normal 156 | #ifdef _NORMALMAP 157 | half3 tangentNormal = UnpackScaleNormal(tex2D(_BumpMap, mainUv), _BumpScale); 158 | half3 worldNormal; 159 | worldNormal.x = dot(i.tspace0, tangentNormal); 160 | worldNormal.y = dot(i.tspace1, tangentNormal); 161 | worldNormal.z = dot(i.tspace2, tangentNormal); 162 | #else 163 | half3 worldNormal = half3(i.tspace0.z, i.tspace1.z, i.tspace2.z); 164 | #endif 165 | float3 worldView = normalize(lerp(_WorldSpaceCameraPos.xyz - i.posWorld.xyz, UNITY_MATRIX_V[2].xyz, unity_OrthoParams.w)); 166 | worldNormal *= step(0, dot(worldView, worldNormal)) * 2 - 1; // flip if projection matrix is flipped 167 | worldNormal *= lerp(+1.0, -1.0, i.isOutline); 168 | worldNormal = normalize(worldNormal); 169 | 170 | // Unity lighting 171 | UNITY_LIGHT_ATTENUATION(shadowAttenuation, i, i.posWorld.xyz); 172 | half3 lightDir = lerp(_WorldSpaceLightPos0.xyz, normalize(_WorldSpaceLightPos0.xyz - i.posWorld.xyz), _WorldSpaceLightPos0.w); 173 | half3 lightColor = _LightColor0.rgb * step(0.5, length(lightDir)); // length(lightDir) is zero if directional light is disabled. 174 | half dotNL = dot(lightDir, worldNormal); 175 | #ifdef MTOON_FORWARD_ADD 176 | half lightAttenuation = 1; 177 | #else 178 | half lightAttenuation = shadowAttenuation * lerp(1, shadowAttenuation, _ReceiveShadowRate * tex2D(_ReceiveShadowTexture, mainUv).r); 179 | #endif 180 | 181 | // Decide albedo color rate from Direct Light 182 | half shadingGrade = 1.0 - _ShadingGradeRate * (1.0 - tex2D(_ShadingGradeTexture, mainUv).r); 183 | half lightIntensity = dotNL; // [-1, +1] 184 | lightIntensity = lightIntensity * 0.5 + 0.5; // from [-1, +1] to [0, 1] 185 | lightIntensity = lightIntensity * lightAttenuation; // receive shadow 186 | lightIntensity = lightIntensity * shadingGrade; // darker 187 | lightIntensity = lightIntensity * 2.0 - 1.0; // from [0, 1] to [-1, +1] 188 | // tooned. mapping from [minIntensityThreshold, maxIntensityThreshold] to [0, 1] 189 | half maxIntensityThreshold = lerp(1, _ShadeShift, _ShadeToony); 190 | half minIntensityThreshold = _ShadeShift; 191 | lightIntensity = saturate((lightIntensity - minIntensityThreshold) / max(EPS_COL, (maxIntensityThreshold - minIntensityThreshold))); 192 | 193 | // Albedo color 194 | half4 shade = _ShadeColor * tex2D(_ShadeTexture, mainUv); 195 | half4 lit = _Color * mainTex; 196 | half3 col = lerp(shade.rgb, lit.rgb, lightIntensity); 197 | 198 | // Direct Light 199 | half3 lighting = lightColor; 200 | lighting = lerp(lighting, max(EPS_COL, max(lighting.x, max(lighting.y, lighting.z))), _LightColorAttenuation); // color atten 201 | #ifdef MTOON_FORWARD_ADD 202 | #ifdef _ALPHABLEND_ON 203 | lighting *= step(0, dotNL); // darken if transparent. Because Unity's transparent material can't receive shadowAttenuation. 204 | #endif 205 | lighting *= 0.5; // darken if additional light. 206 | lighting *= min(0, dotNL) + 1; // darken dotNL < 0 area by using half lambert 207 | lighting *= shadowAttenuation; // darken if receiving shadow 208 | #else 209 | // base light does not darken. 210 | #endif 211 | col *= lighting; 212 | 213 | // Indirect Light 214 | #ifdef MTOON_FORWARD_ADD 215 | #else 216 | half3 toonedGI = 0.5 * (ShadeSH9(half4(0, 1, 0, 1)) + ShadeSH9(half4(0, -1, 0, 1))); 217 | half3 indirectLighting = lerp(toonedGI, ShadeSH9(half4(worldNormal, 1)), _IndirectLightIntensity); 218 | indirectLighting = lerp(indirectLighting, max(EPS_COL, max(indirectLighting.x, max(indirectLighting.y, indirectLighting.z))), _LightColorAttenuation); // color atten 219 | col += indirectLighting * lit; 220 | 221 | col = min(col, lit); // comment out if you want to PBR absolutely. 222 | #endif 223 | 224 | // parametric rim lighting 225 | #ifdef MTOON_FORWARD_ADD 226 | half3 staticRimLighting = 0; 227 | half3 mixedRimLighting = lighting; 228 | #else 229 | half3 staticRimLighting = 1; 230 | half3 mixedRimLighting = lighting + indirectLighting; 231 | #endif 232 | half3 rimLighting = lerp(staticRimLighting, mixedRimLighting, _RimLightingMix); 233 | half3 rim = pow(saturate(1.0 - dot(worldNormal, worldView) + _RimLift), max(_RimFresnelPower, EPS_COL)) * _RimColor.rgb * tex2D(_RimTexture, mainUv).rgb; 234 | col += lerp(rim * rimLighting, half3(0, 0, 0), i.isOutline); 235 | 236 | // additive matcap 237 | #ifdef MTOON_FORWARD_ADD 238 | #else 239 | half3 worldCameraUp = normalize(UNITY_MATRIX_V[1].xyz); 240 | half3 worldViewUp = normalize(worldCameraUp - worldView * dot(worldView, worldCameraUp)); 241 | half3 worldViewRight = normalize(cross(worldView, worldViewUp)); 242 | half2 matcapUv = half2(dot(worldViewRight, worldNormal), dot(worldViewUp, worldNormal)) * 0.5 + 0.5; 243 | half3 matcapLighting = tex2D(_SphereAdd, matcapUv); 244 | col += lerp(matcapLighting, half3(0, 0, 0), i.isOutline); 245 | #endif 246 | 247 | // Emission 248 | #ifdef MTOON_FORWARD_ADD 249 | #else 250 | half3 emission = tex2D(_EmissionMap, mainUv).rgb * _EmissionColor.rgb; 251 | col += lerp(emission, half3(0, 0, 0), i.isOutline); 252 | #endif 253 | 254 | // outline 255 | #ifdef MTOON_OUTLINE_COLOR_FIXED 256 | col = lerp(col, _OutlineColor, i.isOutline); 257 | #elif MTOON_OUTLINE_COLOR_MIXED 258 | col = lerp(col, _OutlineColor * lerp(half3(1, 1, 1), col, _OutlineLightingMix), i.isOutline); 259 | #else 260 | #endif 261 | 262 | // debug 263 | #ifdef MTOON_DEBUG_NORMAL 264 | #ifdef MTOON_FORWARD_ADD 265 | return float4(0, 0, 0, 0); 266 | #else 267 | return float4(worldNormal * 0.5 + 0.5, alpha); 268 | #endif 269 | #elif MTOON_DEBUG_LITSHADERATE 270 | #ifdef MTOON_FORWARD_ADD 271 | return float4(0, 0, 0, 0); 272 | #else 273 | return float4(lightIntensity * lighting, alpha); 274 | #endif 275 | #endif 276 | 277 | 278 | half4 result = half4(col, alpha); 279 | UNITY_APPLY_FOG(i.fogCoord, result); 280 | return result; 281 | } 282 | 283 | #endif // MTOON_CORE_INCLUDED 284 | -------------------------------------------------------------------------------- /MToon/Resources/Shaders/MToonCore.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef6682d138947ed4fbc8fbecfe75cd28 3 | timeCreated: 1514120022 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /MToon/Resources/Shaders/MToonSM3.cginc: -------------------------------------------------------------------------------- 1 | #include "./MToonCore.cginc" 2 | 3 | v2f vert_forward_base(appdata_full v) 4 | { 5 | UNITY_SETUP_INSTANCE_ID(v); 6 | v.normal = normalize(v.normal); 7 | return InitializeV2F(v, UnityObjectToClipPos(v.vertex), 0); 8 | } 9 | 10 | v2f vert_forward_base_outline(appdata_full v) 11 | { 12 | UNITY_SETUP_INSTANCE_ID(v); 13 | v.normal = normalize(v.normal); 14 | return InitializeV2F(v, CalculateOutlineVertexClipPosition(v), 1); 15 | } 16 | 17 | v2f vert_forward_add(appdata_full v) 18 | { 19 | UNITY_SETUP_INSTANCE_ID(v); 20 | v.normal = normalize(v.normal); 21 | return InitializeV2F(v, UnityObjectToClipPos(v.vertex), 0); 22 | } 23 | -------------------------------------------------------------------------------- /MToon/Resources/Shaders/MToonSM3.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 084281ffd8b1b8e4a8605725d3b0760b 3 | timeCreated: 1514120022 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /MToon/Resources/Shaders/MToonSM4.cginc: -------------------------------------------------------------------------------- 1 | #include "./MToonCore.cginc" 2 | 3 | appdata_full vert_forward_base_with_outline(appdata_full v) 4 | { 5 | UNITY_SETUP_INSTANCE_ID(v); 6 | v.normal = normalize(v.normal); 7 | return v; 8 | } 9 | 10 | v2f vert_forward_add(appdata_full v) 11 | { 12 | UNITY_SETUP_INSTANCE_ID(v); 13 | v.normal = normalize(v.normal); 14 | return InitializeV2F(v, UnityObjectToClipPos(v.vertex), 0); 15 | } 16 | 17 | [maxvertexcount(6)] 18 | void geom_forward_base(triangle appdata_full IN[3], inout TriangleStream stream) 19 | { 20 | v2f o; 21 | 22 | #if defined(MTOON_OUTLINE_WIDTH_WORLD) || defined(MTOON_OUTLINE_WIDTH_SCREEN) 23 | for (int i = 2; i >= 0; --i) 24 | { 25 | appdata_full v = IN[i]; 26 | v2f o = InitializeV2F(v, CalculateOutlineVertexClipPosition(v), 1); 27 | stream.Append(o); 28 | } 29 | stream.RestartStrip(); 30 | #endif 31 | 32 | for (int j = 0; j < 3; ++j) 33 | { 34 | appdata_full v = IN[j]; 35 | v2f o = InitializeV2F(v, UnityObjectToClipPos(v.vertex), 0); 36 | stream.Append(o); 37 | } 38 | stream.RestartStrip(); 39 | } 40 | -------------------------------------------------------------------------------- /MToon/Resources/Shaders/MToonSM4.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17d4e0f990fbc794ab41e4fcc196d559 3 | timeCreated: 1514120022 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /MToon/Samples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e9b6e0377a19e54d9d9ff78f925aec6 3 | folderAsset: yes 4 | timeCreated: 1520007011 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /MToon/Samples/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a028698465d209d4e91f4935e23b138e 3 | folderAsset: yes 4 | timeCreated: 1520007030 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /MToon/Samples/Materials/Ex_OutlineWidth_Screen.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Ex_OutlineWidth_Screen 10 | m_Shader: {fileID: 4800000, guid: 1a97144e4ad27a04aafd70f7b915cedb, type: 3} 11 | m_ShaderKeywords: MTOON_OUTLINE_COLOR_FIXED MTOON_OUTLINE_WIDTH_SCREEN 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: 17 | RenderType: Opaque 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _OutlineWidthTexture: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _ParallaxMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _ReceiveShadowTexture: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _ShadeTexture: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | - _SphereAdd: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | m_Floats: 75 | - _BlendMode: 0 76 | - _BumpScale: 1 77 | - _CullMode: 2 78 | - _Cutoff: 0.5 79 | - _DebugMode: 0 80 | - _DetailNormalMapScale: 1 81 | - _DstBlend: 0 82 | - _GlossMapScale: 1 83 | - _Glossiness: 0.5 84 | - _GlossyReflections: 1 85 | - _IsFirstSetup: 0 86 | - _LightColorAttenuation: 0 87 | - _Metallic: 0 88 | - _Mode: 0 89 | - _OcclusionStrength: 1 90 | - _OutlineColorMode: 0 91 | - _OutlineLightingMix: 1 92 | - _OutlineScaledMaxDistance: 10 93 | - _OutlineWidth: 1 94 | - _OutlineWidthMode: 2 95 | - _Parallax: 0.02 96 | - _ReceiveShadowRate: 1 97 | - _ShadeShift: 0 98 | - _ShadeToony: 0.9 99 | - _SmoothnessTextureChannel: 0 100 | - _SpecularHighlights: 1 101 | - _SrcBlend: 1 102 | - _UVSec: 0 103 | - _ZWrite: 1 104 | m_Colors: 105 | - _Color: {r: 1, g: 1, b: 1, a: 1} 106 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 107 | - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} 108 | - _ShadeColor: {r: 0.97, g: 0.81, b: 0.86, a: 1} 109 | -------------------------------------------------------------------------------- /MToon/Samples/Materials/Ex_OutlineWidth_Screen.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f42a26097c877b40a7616aa60580c43 3 | timeCreated: 1521569501 4 | licenseType: Free 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 2100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /MToon/Samples/Materials/Ex_OutlineWidth_World.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Ex_OutlineWidth_World 10 | m_Shader: {fileID: 4800000, guid: 1a97144e4ad27a04aafd70f7b915cedb, type: 3} 11 | m_ShaderKeywords: MTOON_OUTLINE_COLOR_FIXED MTOON_OUTLINE_WIDTH_WORLD 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: 17 | RenderType: Opaque 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _OutlineWidthTexture: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _ParallaxMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _ReceiveShadowTexture: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _ShadeTexture: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | - _SphereAdd: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | m_Floats: 75 | - _BlendMode: 0 76 | - _BumpScale: 1 77 | - _CullMode: 2 78 | - _Cutoff: 0.5 79 | - _DebugMode: 0 80 | - _DetailNormalMapScale: 1 81 | - _DstBlend: 0 82 | - _GlossMapScale: 1 83 | - _Glossiness: 0.5 84 | - _GlossyReflections: 1 85 | - _IsFirstSetup: 0 86 | - _LightColorAttenuation: 0 87 | - _Metallic: 0 88 | - _Mode: 0 89 | - _OcclusionStrength: 1 90 | - _OutlineColorMode: 0 91 | - _OutlineLightingMix: 1 92 | - _OutlineScaledMaxDistance: 1 93 | - _OutlineWidth: 1 94 | - _OutlineWidthMode: 1 95 | - _Parallax: 0.02 96 | - _ReceiveShadowRate: 1 97 | - _ShadeShift: 0 98 | - _ShadeToony: 0.9 99 | - _SmoothnessTextureChannel: 0 100 | - _SpecularHighlights: 1 101 | - _SrcBlend: 1 102 | - _UVSec: 0 103 | - _ZWrite: 1 104 | m_Colors: 105 | - _Color: {r: 1, g: 1, b: 1, a: 1} 106 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 107 | - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} 108 | - _ShadeColor: {r: 0.97, g: 0.81, b: 0.86, a: 1} 109 | -------------------------------------------------------------------------------- /MToon/Samples/Materials/Ex_OutlineWidth_World.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e40a129e14e378c4db040df3fd4a6077 3 | timeCreated: 1521569501 4 | licenseType: Free 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 2100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /MToon/Samples/Materials/Ground.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Ground 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.35294116, g: 0.35294116, b: 0.35294116, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /MToon/Samples/Materials/Ground.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54da18ba3126f1343924588562df72e0 3 | timeCreated: 1520008460 4 | licenseType: Free 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 2100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /MToon/Samples/Materials/Toon.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Toon 10 | m_Shader: {fileID: 4800000, guid: 1a97144e4ad27a04aafd70f7b915cedb, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 1 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: 17 | RenderType: Opaque 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _AlphaTexture: 23 | m_Texture: {fileID: 2800000, guid: 92024733fdffba54db25f64b8c81a267, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _BumpMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailAlbedoMap: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailMask: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailNormalMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _LitTexture: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MainTex: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicGlossMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _NormalTexture: 59 | m_Texture: {fileID: 179082629, guid: 114e7de62fa527d458ae3774d145e045, type: 3} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _OcclusionMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _OutlineWidthTexture: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | - _ParallaxMap: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | - _ReceiveShadowTexture: 75 | m_Texture: {fileID: 0} 76 | m_Scale: {x: 1, y: 1} 77 | m_Offset: {x: 0, y: 0} 78 | - _ShadeTexture: 79 | m_Texture: {fileID: 0} 80 | m_Scale: {x: 1, y: 1} 81 | m_Offset: {x: 0, y: 0} 82 | - _SphereAdd: 83 | m_Texture: {fileID: 0} 84 | m_Scale: {x: 1, y: 1} 85 | m_Offset: {x: 0, y: 0} 86 | m_Floats: 87 | - _Alpha: 1 88 | - _BlendMode: 0 89 | - _BumpScale: 1 90 | - _CullMode: 2 91 | - _Cutoff: 0.611 92 | - _DebugMode: 0 93 | - _DetailNormalMapScale: 1 94 | - _DstBlend: 0 95 | - _GlossMapScale: 1 96 | - _Glossiness: 0 97 | - _GlossyReflections: 1 98 | - _IsFirstSetup: 0 99 | - _LightColorAttenuation: 0 100 | - _Metallic: 0 101 | - _Mode: 0 102 | - _NormalCylinderizeRate: 0 103 | - _NormalFromVColorRate: 0 104 | - _OcclusionStrength: 1 105 | - _OutlineColorMode: 0 106 | - _OutlineLightingMix: 1 107 | - _OutlineMode: 0 108 | - _OutlineScaledMaxDistance: 1 109 | - _OutlineWidth: 1 110 | - _OutlineWidthMode: 0 111 | - _Parallax: 0.02 112 | - _ReceiveShadowRate: 1 113 | - _ShadeShift: 0.5 114 | - _ShadeToony: 0.5 115 | - _SmoothnessTextureChannel: 0 116 | - _SpecularHighlights: 1 117 | - _SrcBlend: 1 118 | - _UVSec: 0 119 | - _ZWrite: 1 120 | m_Colors: 121 | - _Color: {r: 1, g: 0.93995947, b: 0.45588237, a: 1} 122 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 123 | - _LitColor: {r: 1, g: 1, b: 1, a: 1} 124 | - _NormalCylinderizeAxis: {r: 0, g: 1, b: 0, a: 0} 125 | - _NormalCylinderizePos: {r: 0, g: 0, b: 0, a: 0} 126 | - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} 127 | - _ShadeColor: {r: 1, g: 0.5147059, b: 0.80588233, a: 1} 128 | -------------------------------------------------------------------------------- /MToon/Samples/Materials/Toon.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9639e17dffc656345a70282f7f216672 3 | timeCreated: 1520007037 4 | licenseType: Free 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 2100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /MToon/Samples/OutlineWidthModes.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 8 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 1 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 1 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1 &258232875 117 | GameObject: 118 | m_ObjectHideFlags: 0 119 | m_PrefabParentObject: {fileID: 0} 120 | m_PrefabInternal: {fileID: 0} 121 | serializedVersion: 5 122 | m_Component: 123 | - component: {fileID: 258232876} 124 | m_Layer: 0 125 | m_Name: OutlineWidth_World 126 | m_TagString: Untagged 127 | m_Icon: {fileID: 0} 128 | m_NavMeshLayer: 0 129 | m_StaticEditorFlags: 0 130 | m_IsActive: 1 131 | --- !u!4 &258232876 132 | Transform: 133 | m_ObjectHideFlags: 0 134 | m_PrefabParentObject: {fileID: 0} 135 | m_PrefabInternal: {fileID: 0} 136 | m_GameObject: {fileID: 258232875} 137 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 138 | m_LocalPosition: {x: -1.24, y: 0, z: 0} 139 | m_LocalScale: {x: 1, y: 1, z: 1} 140 | m_Children: 141 | - {fileID: 785023941} 142 | - {fileID: 1884108470} 143 | - {fileID: 1151291098} 144 | - {fileID: 1122307219} 145 | - {fileID: 860725899} 146 | - {fileID: 513101434} 147 | - {fileID: 1258929826} 148 | - {fileID: 1515544977} 149 | m_Father: {fileID: 0} 150 | m_RootOrder: 3 151 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 152 | --- !u!1 &287894940 153 | GameObject: 154 | m_ObjectHideFlags: 0 155 | m_PrefabParentObject: {fileID: 0} 156 | m_PrefabInternal: {fileID: 0} 157 | serializedVersion: 5 158 | m_Component: 159 | - component: {fileID: 287894941} 160 | - component: {fileID: 287894943} 161 | - component: {fileID: 287894942} 162 | m_Layer: 0 163 | m_Name: Sphere (5) 164 | m_TagString: Untagged 165 | m_Icon: {fileID: 0} 166 | m_NavMeshLayer: 0 167 | m_StaticEditorFlags: 0 168 | m_IsActive: 1 169 | --- !u!4 &287894941 170 | Transform: 171 | m_ObjectHideFlags: 0 172 | m_PrefabParentObject: {fileID: 0} 173 | m_PrefabInternal: {fileID: 0} 174 | m_GameObject: {fileID: 287894940} 175 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 176 | m_LocalPosition: {x: 0, y: 0.5, z: 10} 177 | m_LocalScale: {x: 1, y: 1, z: 1} 178 | m_Children: [] 179 | m_Father: {fileID: 949706139} 180 | m_RootOrder: 5 181 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 182 | --- !u!23 &287894942 183 | MeshRenderer: 184 | m_ObjectHideFlags: 0 185 | m_PrefabParentObject: {fileID: 0} 186 | m_PrefabInternal: {fileID: 0} 187 | m_GameObject: {fileID: 287894940} 188 | m_Enabled: 1 189 | m_CastShadows: 1 190 | m_ReceiveShadows: 1 191 | m_DynamicOccludee: 1 192 | m_MotionVectors: 1 193 | m_LightProbeUsage: 1 194 | m_ReflectionProbeUsage: 1 195 | m_Materials: 196 | - {fileID: 2100000, guid: 4f42a26097c877b40a7616aa60580c43, type: 2} 197 | m_StaticBatchInfo: 198 | firstSubMesh: 0 199 | subMeshCount: 0 200 | m_StaticBatchRoot: {fileID: 0} 201 | m_ProbeAnchor: {fileID: 0} 202 | m_LightProbeVolumeOverride: {fileID: 0} 203 | m_ScaleInLightmap: 1 204 | m_PreserveUVs: 1 205 | m_IgnoreNormalsForChartDetection: 0 206 | m_ImportantGI: 0 207 | m_StitchLightmapSeams: 0 208 | m_SelectedEditorRenderState: 3 209 | m_MinimumChartSize: 4 210 | m_AutoUVMaxDistance: 0.5 211 | m_AutoUVMaxAngle: 89 212 | m_LightmapParameters: {fileID: 0} 213 | m_SortingLayerID: 0 214 | m_SortingLayer: 0 215 | m_SortingOrder: 0 216 | --- !u!33 &287894943 217 | MeshFilter: 218 | m_ObjectHideFlags: 0 219 | m_PrefabParentObject: {fileID: 0} 220 | m_PrefabInternal: {fileID: 0} 221 | m_GameObject: {fileID: 287894940} 222 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 223 | --- !u!1 &449049889 224 | GameObject: 225 | m_ObjectHideFlags: 0 226 | m_PrefabParentObject: {fileID: 0} 227 | m_PrefabInternal: {fileID: 0} 228 | serializedVersion: 5 229 | m_Component: 230 | - component: {fileID: 449049892} 231 | - component: {fileID: 449049891} 232 | - component: {fileID: 449049890} 233 | m_Layer: 0 234 | m_Name: New Text (3) 235 | m_TagString: Untagged 236 | m_Icon: {fileID: 0} 237 | m_NavMeshLayer: 0 238 | m_StaticEditorFlags: 0 239 | m_IsActive: 1 240 | --- !u!102 &449049890 241 | TextMesh: 242 | serializedVersion: 3 243 | m_ObjectHideFlags: 0 244 | m_PrefabParentObject: {fileID: 0} 245 | m_PrefabInternal: {fileID: 0} 246 | m_GameObject: {fileID: 449049889} 247 | m_Text: 'Fixed length 248 | 249 | in World coords' 250 | m_OffsetZ: 0 251 | m_CharacterSize: 1 252 | m_LineSpacing: 1 253 | m_Anchor: 0 254 | m_Alignment: 0 255 | m_TabSize: 4 256 | m_FontSize: 0 257 | m_FontStyle: 0 258 | m_RichText: 1 259 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 260 | m_Color: 261 | serializedVersion: 2 262 | rgba: 4294967295 263 | --- !u!23 &449049891 264 | MeshRenderer: 265 | m_ObjectHideFlags: 0 266 | m_PrefabParentObject: {fileID: 0} 267 | m_PrefabInternal: {fileID: 0} 268 | m_GameObject: {fileID: 449049889} 269 | m_Enabled: 1 270 | m_CastShadows: 1 271 | m_ReceiveShadows: 1 272 | m_DynamicOccludee: 1 273 | m_MotionVectors: 1 274 | m_LightProbeUsage: 1 275 | m_ReflectionProbeUsage: 1 276 | m_Materials: 277 | - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} 278 | m_StaticBatchInfo: 279 | firstSubMesh: 0 280 | subMeshCount: 0 281 | m_StaticBatchRoot: {fileID: 0} 282 | m_ProbeAnchor: {fileID: 0} 283 | m_LightProbeVolumeOverride: {fileID: 0} 284 | m_ScaleInLightmap: 1 285 | m_PreserveUVs: 0 286 | m_IgnoreNormalsForChartDetection: 0 287 | m_ImportantGI: 0 288 | m_StitchLightmapSeams: 0 289 | m_SelectedEditorRenderState: 3 290 | m_MinimumChartSize: 4 291 | m_AutoUVMaxDistance: 0.5 292 | m_AutoUVMaxAngle: 89 293 | m_LightmapParameters: {fileID: 0} 294 | m_SortingLayerID: 0 295 | m_SortingLayer: 0 296 | m_SortingOrder: 0 297 | --- !u!4 &449049892 298 | Transform: 299 | m_ObjectHideFlags: 0 300 | m_PrefabParentObject: {fileID: 0} 301 | m_PrefabInternal: {fileID: 0} 302 | m_GameObject: {fileID: 449049889} 303 | m_LocalRotation: {x: 0.0000014603138, y: -0, z: -0, w: 1} 304 | m_LocalPosition: {x: -6.67, y: 0.31272152, z: 7.78} 305 | m_LocalScale: {x: 0.29944235, y: 0.29944223, z: 0.29944223} 306 | m_Children: [] 307 | m_Father: {fileID: 0} 308 | m_RootOrder: 8 309 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 310 | --- !u!1 &473362767 311 | GameObject: 312 | m_ObjectHideFlags: 0 313 | m_PrefabParentObject: {fileID: 0} 314 | m_PrefabInternal: {fileID: 0} 315 | serializedVersion: 5 316 | m_Component: 317 | - component: {fileID: 473362770} 318 | - component: {fileID: 473362769} 319 | - component: {fileID: 473362768} 320 | m_Layer: 0 321 | m_Name: New Text (4) 322 | m_TagString: Untagged 323 | m_Icon: {fileID: 0} 324 | m_NavMeshLayer: 0 325 | m_StaticEditorFlags: 0 326 | m_IsActive: 1 327 | --- !u!102 &473362768 328 | TextMesh: 329 | serializedVersion: 3 330 | m_ObjectHideFlags: 0 331 | m_PrefabParentObject: {fileID: 0} 332 | m_PrefabInternal: {fileID: 0} 333 | m_GameObject: {fileID: 473362767} 334 | m_Text: Outline Width Mode 335 | m_OffsetZ: 0 336 | m_CharacterSize: 1 337 | m_LineSpacing: 1 338 | m_Anchor: 0 339 | m_Alignment: 0 340 | m_TabSize: 4 341 | m_FontSize: 0 342 | m_FontStyle: 0 343 | m_RichText: 1 344 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 345 | m_Color: 346 | serializedVersion: 2 347 | rgba: 4294967295 348 | --- !u!23 &473362769 349 | MeshRenderer: 350 | m_ObjectHideFlags: 0 351 | m_PrefabParentObject: {fileID: 0} 352 | m_PrefabInternal: {fileID: 0} 353 | m_GameObject: {fileID: 473362767} 354 | m_Enabled: 1 355 | m_CastShadows: 1 356 | m_ReceiveShadows: 1 357 | m_DynamicOccludee: 1 358 | m_MotionVectors: 1 359 | m_LightProbeUsage: 1 360 | m_ReflectionProbeUsage: 1 361 | m_Materials: 362 | - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} 363 | m_StaticBatchInfo: 364 | firstSubMesh: 0 365 | subMeshCount: 0 366 | m_StaticBatchRoot: {fileID: 0} 367 | m_ProbeAnchor: {fileID: 0} 368 | m_LightProbeVolumeOverride: {fileID: 0} 369 | m_ScaleInLightmap: 1 370 | m_PreserveUVs: 0 371 | m_IgnoreNormalsForChartDetection: 0 372 | m_ImportantGI: 0 373 | m_StitchLightmapSeams: 0 374 | m_SelectedEditorRenderState: 3 375 | m_MinimumChartSize: 4 376 | m_AutoUVMaxDistance: 0.5 377 | m_AutoUVMaxAngle: 89 378 | m_LightmapParameters: {fileID: 0} 379 | m_SortingLayerID: 0 380 | m_SortingLayer: 0 381 | m_SortingOrder: 0 382 | --- !u!4 &473362770 383 | Transform: 384 | m_ObjectHideFlags: 0 385 | m_PrefabParentObject: {fileID: 0} 386 | m_PrefabInternal: {fileID: 0} 387 | m_GameObject: {fileID: 473362767} 388 | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} 389 | m_LocalPosition: {x: -0.819, y: 0.095275, z: -0.299} 390 | m_LocalScale: {x: 0.13751951, y: 0.13751945, z: 0.13751945} 391 | m_Children: [] 392 | m_Father: {fileID: 0} 393 | m_RootOrder: 9 394 | m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} 395 | --- !u!1 &513101433 396 | GameObject: 397 | m_ObjectHideFlags: 0 398 | m_PrefabParentObject: {fileID: 0} 399 | m_PrefabInternal: {fileID: 0} 400 | serializedVersion: 5 401 | m_Component: 402 | - component: {fileID: 513101434} 403 | - component: {fileID: 513101436} 404 | - component: {fileID: 513101435} 405 | m_Layer: 0 406 | m_Name: Sphere (5) 407 | m_TagString: Untagged 408 | m_Icon: {fileID: 0} 409 | m_NavMeshLayer: 0 410 | m_StaticEditorFlags: 0 411 | m_IsActive: 1 412 | --- !u!4 &513101434 413 | Transform: 414 | m_ObjectHideFlags: 0 415 | m_PrefabParentObject: {fileID: 0} 416 | m_PrefabInternal: {fileID: 0} 417 | m_GameObject: {fileID: 513101433} 418 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 419 | m_LocalPosition: {x: 0, y: 0.5, z: 10} 420 | m_LocalScale: {x: 1, y: 1, z: 1} 421 | m_Children: [] 422 | m_Father: {fileID: 258232876} 423 | m_RootOrder: 5 424 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 425 | --- !u!23 &513101435 426 | MeshRenderer: 427 | m_ObjectHideFlags: 0 428 | m_PrefabParentObject: {fileID: 0} 429 | m_PrefabInternal: {fileID: 0} 430 | m_GameObject: {fileID: 513101433} 431 | m_Enabled: 1 432 | m_CastShadows: 1 433 | m_ReceiveShadows: 1 434 | m_DynamicOccludee: 1 435 | m_MotionVectors: 1 436 | m_LightProbeUsage: 1 437 | m_ReflectionProbeUsage: 1 438 | m_Materials: 439 | - {fileID: 2100000, guid: e40a129e14e378c4db040df3fd4a6077, type: 2} 440 | m_StaticBatchInfo: 441 | firstSubMesh: 0 442 | subMeshCount: 0 443 | m_StaticBatchRoot: {fileID: 0} 444 | m_ProbeAnchor: {fileID: 0} 445 | m_LightProbeVolumeOverride: {fileID: 0} 446 | m_ScaleInLightmap: 1 447 | m_PreserveUVs: 1 448 | m_IgnoreNormalsForChartDetection: 0 449 | m_ImportantGI: 0 450 | m_StitchLightmapSeams: 0 451 | m_SelectedEditorRenderState: 3 452 | m_MinimumChartSize: 4 453 | m_AutoUVMaxDistance: 0.5 454 | m_AutoUVMaxAngle: 89 455 | m_LightmapParameters: {fileID: 0} 456 | m_SortingLayerID: 0 457 | m_SortingLayer: 0 458 | m_SortingOrder: 0 459 | --- !u!33 &513101436 460 | MeshFilter: 461 | m_ObjectHideFlags: 0 462 | m_PrefabParentObject: {fileID: 0} 463 | m_PrefabInternal: {fileID: 0} 464 | m_GameObject: {fileID: 513101433} 465 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 466 | --- !u!1 &562432354 467 | GameObject: 468 | m_ObjectHideFlags: 0 469 | m_PrefabParentObject: {fileID: 0} 470 | m_PrefabInternal: {fileID: 0} 471 | serializedVersion: 5 472 | m_Component: 473 | - component: {fileID: 562432355} 474 | - component: {fileID: 562432357} 475 | - component: {fileID: 562432356} 476 | m_Layer: 0 477 | m_Name: Sphere (1) 478 | m_TagString: Untagged 479 | m_Icon: {fileID: 0} 480 | m_NavMeshLayer: 0 481 | m_StaticEditorFlags: 0 482 | m_IsActive: 1 483 | --- !u!4 &562432355 484 | Transform: 485 | m_ObjectHideFlags: 0 486 | m_PrefabParentObject: {fileID: 0} 487 | m_PrefabInternal: {fileID: 0} 488 | m_GameObject: {fileID: 562432354} 489 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 490 | m_LocalPosition: {x: 0, y: 0.5, z: 2} 491 | m_LocalScale: {x: 1, y: 1, z: 1} 492 | m_Children: [] 493 | m_Father: {fileID: 949706139} 494 | m_RootOrder: 1 495 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 496 | --- !u!23 &562432356 497 | MeshRenderer: 498 | m_ObjectHideFlags: 0 499 | m_PrefabParentObject: {fileID: 0} 500 | m_PrefabInternal: {fileID: 0} 501 | m_GameObject: {fileID: 562432354} 502 | m_Enabled: 1 503 | m_CastShadows: 1 504 | m_ReceiveShadows: 1 505 | m_DynamicOccludee: 1 506 | m_MotionVectors: 1 507 | m_LightProbeUsage: 1 508 | m_ReflectionProbeUsage: 1 509 | m_Materials: 510 | - {fileID: 2100000, guid: 4f42a26097c877b40a7616aa60580c43, type: 2} 511 | m_StaticBatchInfo: 512 | firstSubMesh: 0 513 | subMeshCount: 0 514 | m_StaticBatchRoot: {fileID: 0} 515 | m_ProbeAnchor: {fileID: 0} 516 | m_LightProbeVolumeOverride: {fileID: 0} 517 | m_ScaleInLightmap: 1 518 | m_PreserveUVs: 1 519 | m_IgnoreNormalsForChartDetection: 0 520 | m_ImportantGI: 0 521 | m_StitchLightmapSeams: 0 522 | m_SelectedEditorRenderState: 3 523 | m_MinimumChartSize: 4 524 | m_AutoUVMaxDistance: 0.5 525 | m_AutoUVMaxAngle: 89 526 | m_LightmapParameters: {fileID: 0} 527 | m_SortingLayerID: 0 528 | m_SortingLayer: 0 529 | m_SortingOrder: 0 530 | --- !u!33 &562432357 531 | MeshFilter: 532 | m_ObjectHideFlags: 0 533 | m_PrefabParentObject: {fileID: 0} 534 | m_PrefabInternal: {fileID: 0} 535 | m_GameObject: {fileID: 562432354} 536 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 537 | --- !u!1 &569565535 538 | GameObject: 539 | m_ObjectHideFlags: 0 540 | m_PrefabParentObject: {fileID: 0} 541 | m_PrefabInternal: {fileID: 0} 542 | serializedVersion: 5 543 | m_Component: 544 | - component: {fileID: 569565538} 545 | - component: {fileID: 569565537} 546 | - component: {fileID: 569565536} 547 | m_Layer: 0 548 | m_Name: New Text (2) 549 | m_TagString: Untagged 550 | m_Icon: {fileID: 0} 551 | m_NavMeshLayer: 0 552 | m_StaticEditorFlags: 0 553 | m_IsActive: 1 554 | --- !u!102 &569565536 555 | TextMesh: 556 | serializedVersion: 3 557 | m_ObjectHideFlags: 0 558 | m_PrefabParentObject: {fileID: 0} 559 | m_PrefabInternal: {fileID: 0} 560 | m_GameObject: {fileID: 569565535} 561 | m_Text: 'Fixed length 562 | 563 | in Screen coords' 564 | m_OffsetZ: 0 565 | m_CharacterSize: 1 566 | m_LineSpacing: 1 567 | m_Anchor: 0 568 | m_Alignment: 0 569 | m_TabSize: 4 570 | m_FontSize: 0 571 | m_FontStyle: 0 572 | m_RichText: 1 573 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 574 | m_Color: 575 | serializedVersion: 2 576 | rgba: 4294967295 577 | --- !u!23 &569565537 578 | MeshRenderer: 579 | m_ObjectHideFlags: 0 580 | m_PrefabParentObject: {fileID: 0} 581 | m_PrefabInternal: {fileID: 0} 582 | m_GameObject: {fileID: 569565535} 583 | m_Enabled: 1 584 | m_CastShadows: 1 585 | m_ReceiveShadows: 1 586 | m_DynamicOccludee: 1 587 | m_MotionVectors: 1 588 | m_LightProbeUsage: 1 589 | m_ReflectionProbeUsage: 1 590 | m_Materials: 591 | - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} 592 | m_StaticBatchInfo: 593 | firstSubMesh: 0 594 | subMeshCount: 0 595 | m_StaticBatchRoot: {fileID: 0} 596 | m_ProbeAnchor: {fileID: 0} 597 | m_LightProbeVolumeOverride: {fileID: 0} 598 | m_ScaleInLightmap: 1 599 | m_PreserveUVs: 0 600 | m_IgnoreNormalsForChartDetection: 0 601 | m_ImportantGI: 0 602 | m_StitchLightmapSeams: 0 603 | m_SelectedEditorRenderState: 3 604 | m_MinimumChartSize: 4 605 | m_AutoUVMaxDistance: 0.5 606 | m_AutoUVMaxAngle: 89 607 | m_LightmapParameters: {fileID: 0} 608 | m_SortingLayerID: 0 609 | m_SortingLayer: 0 610 | m_SortingOrder: 0 611 | --- !u!4 &569565538 612 | Transform: 613 | m_ObjectHideFlags: 0 614 | m_PrefabParentObject: {fileID: 0} 615 | m_PrefabInternal: {fileID: 0} 616 | m_GameObject: {fileID: 569565535} 617 | m_LocalRotation: {x: 0.0000014603138, y: -0, z: -0, w: 1} 618 | m_LocalPosition: {x: 3.96, y: 0.31272152, z: 7.78} 619 | m_LocalScale: {x: 0.29944235, y: 0.29944223, z: 0.29944223} 620 | m_Children: [] 621 | m_Father: {fileID: 0} 622 | m_RootOrder: 7 623 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 624 | --- !u!1 &570198665 625 | GameObject: 626 | m_ObjectHideFlags: 0 627 | m_PrefabParentObject: {fileID: 0} 628 | m_PrefabInternal: {fileID: 0} 629 | serializedVersion: 5 630 | m_Component: 631 | - component: {fileID: 570198666} 632 | - component: {fileID: 570198668} 633 | - component: {fileID: 570198667} 634 | m_Layer: 0 635 | m_Name: Sphere (7) 636 | m_TagString: Untagged 637 | m_Icon: {fileID: 0} 638 | m_NavMeshLayer: 0 639 | m_StaticEditorFlags: 0 640 | m_IsActive: 1 641 | --- !u!4 &570198666 642 | Transform: 643 | m_ObjectHideFlags: 0 644 | m_PrefabParentObject: {fileID: 0} 645 | m_PrefabInternal: {fileID: 0} 646 | m_GameObject: {fileID: 570198665} 647 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 648 | m_LocalPosition: {x: 0, y: 0.5, z: 14} 649 | m_LocalScale: {x: 1, y: 1, z: 1} 650 | m_Children: [] 651 | m_Father: {fileID: 949706139} 652 | m_RootOrder: 7 653 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 654 | --- !u!23 &570198667 655 | MeshRenderer: 656 | m_ObjectHideFlags: 0 657 | m_PrefabParentObject: {fileID: 0} 658 | m_PrefabInternal: {fileID: 0} 659 | m_GameObject: {fileID: 570198665} 660 | m_Enabled: 1 661 | m_CastShadows: 1 662 | m_ReceiveShadows: 1 663 | m_DynamicOccludee: 1 664 | m_MotionVectors: 1 665 | m_LightProbeUsage: 1 666 | m_ReflectionProbeUsage: 1 667 | m_Materials: 668 | - {fileID: 2100000, guid: 4f42a26097c877b40a7616aa60580c43, type: 2} 669 | m_StaticBatchInfo: 670 | firstSubMesh: 0 671 | subMeshCount: 0 672 | m_StaticBatchRoot: {fileID: 0} 673 | m_ProbeAnchor: {fileID: 0} 674 | m_LightProbeVolumeOverride: {fileID: 0} 675 | m_ScaleInLightmap: 1 676 | m_PreserveUVs: 1 677 | m_IgnoreNormalsForChartDetection: 0 678 | m_ImportantGI: 0 679 | m_StitchLightmapSeams: 0 680 | m_SelectedEditorRenderState: 3 681 | m_MinimumChartSize: 4 682 | m_AutoUVMaxDistance: 0.5 683 | m_AutoUVMaxAngle: 89 684 | m_LightmapParameters: {fileID: 0} 685 | m_SortingLayerID: 0 686 | m_SortingLayer: 0 687 | m_SortingOrder: 0 688 | --- !u!33 &570198668 689 | MeshFilter: 690 | m_ObjectHideFlags: 0 691 | m_PrefabParentObject: {fileID: 0} 692 | m_PrefabInternal: {fileID: 0} 693 | m_GameObject: {fileID: 570198665} 694 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 695 | --- !u!1 &785023940 696 | GameObject: 697 | m_ObjectHideFlags: 0 698 | m_PrefabParentObject: {fileID: 0} 699 | m_PrefabInternal: {fileID: 0} 700 | serializedVersion: 5 701 | m_Component: 702 | - component: {fileID: 785023941} 703 | - component: {fileID: 785023943} 704 | - component: {fileID: 785023942} 705 | m_Layer: 0 706 | m_Name: Sphere 707 | m_TagString: Untagged 708 | m_Icon: {fileID: 0} 709 | m_NavMeshLayer: 0 710 | m_StaticEditorFlags: 0 711 | m_IsActive: 1 712 | --- !u!4 &785023941 713 | Transform: 714 | m_ObjectHideFlags: 0 715 | m_PrefabParentObject: {fileID: 0} 716 | m_PrefabInternal: {fileID: 0} 717 | m_GameObject: {fileID: 785023940} 718 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 719 | m_LocalPosition: {x: 0, y: 0.5, z: 0} 720 | m_LocalScale: {x: 1, y: 1, z: 1} 721 | m_Children: [] 722 | m_Father: {fileID: 258232876} 723 | m_RootOrder: 0 724 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 725 | --- !u!23 &785023942 726 | MeshRenderer: 727 | m_ObjectHideFlags: 0 728 | m_PrefabParentObject: {fileID: 0} 729 | m_PrefabInternal: {fileID: 0} 730 | m_GameObject: {fileID: 785023940} 731 | m_Enabled: 1 732 | m_CastShadows: 1 733 | m_ReceiveShadows: 1 734 | m_DynamicOccludee: 1 735 | m_MotionVectors: 1 736 | m_LightProbeUsage: 1 737 | m_ReflectionProbeUsage: 1 738 | m_Materials: 739 | - {fileID: 2100000, guid: e40a129e14e378c4db040df3fd4a6077, type: 2} 740 | m_StaticBatchInfo: 741 | firstSubMesh: 0 742 | subMeshCount: 0 743 | m_StaticBatchRoot: {fileID: 0} 744 | m_ProbeAnchor: {fileID: 0} 745 | m_LightProbeVolumeOverride: {fileID: 0} 746 | m_ScaleInLightmap: 1 747 | m_PreserveUVs: 1 748 | m_IgnoreNormalsForChartDetection: 0 749 | m_ImportantGI: 0 750 | m_StitchLightmapSeams: 0 751 | m_SelectedEditorRenderState: 3 752 | m_MinimumChartSize: 4 753 | m_AutoUVMaxDistance: 0.5 754 | m_AutoUVMaxAngle: 89 755 | m_LightmapParameters: {fileID: 0} 756 | m_SortingLayerID: 0 757 | m_SortingLayer: 0 758 | m_SortingOrder: 0 759 | --- !u!33 &785023943 760 | MeshFilter: 761 | m_ObjectHideFlags: 0 762 | m_PrefabParentObject: {fileID: 0} 763 | m_PrefabInternal: {fileID: 0} 764 | m_GameObject: {fileID: 785023940} 765 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 766 | --- !u!1 &860725898 767 | GameObject: 768 | m_ObjectHideFlags: 0 769 | m_PrefabParentObject: {fileID: 0} 770 | m_PrefabInternal: {fileID: 0} 771 | serializedVersion: 5 772 | m_Component: 773 | - component: {fileID: 860725899} 774 | - component: {fileID: 860725901} 775 | - component: {fileID: 860725900} 776 | m_Layer: 0 777 | m_Name: Sphere (4) 778 | m_TagString: Untagged 779 | m_Icon: {fileID: 0} 780 | m_NavMeshLayer: 0 781 | m_StaticEditorFlags: 0 782 | m_IsActive: 1 783 | --- !u!4 &860725899 784 | Transform: 785 | m_ObjectHideFlags: 0 786 | m_PrefabParentObject: {fileID: 0} 787 | m_PrefabInternal: {fileID: 0} 788 | m_GameObject: {fileID: 860725898} 789 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 790 | m_LocalPosition: {x: 0, y: 0.5, z: 8} 791 | m_LocalScale: {x: 1, y: 1, z: 1} 792 | m_Children: [] 793 | m_Father: {fileID: 258232876} 794 | m_RootOrder: 4 795 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 796 | --- !u!23 &860725900 797 | MeshRenderer: 798 | m_ObjectHideFlags: 0 799 | m_PrefabParentObject: {fileID: 0} 800 | m_PrefabInternal: {fileID: 0} 801 | m_GameObject: {fileID: 860725898} 802 | m_Enabled: 1 803 | m_CastShadows: 1 804 | m_ReceiveShadows: 1 805 | m_DynamicOccludee: 1 806 | m_MotionVectors: 1 807 | m_LightProbeUsage: 1 808 | m_ReflectionProbeUsage: 1 809 | m_Materials: 810 | - {fileID: 2100000, guid: e40a129e14e378c4db040df3fd4a6077, type: 2} 811 | m_StaticBatchInfo: 812 | firstSubMesh: 0 813 | subMeshCount: 0 814 | m_StaticBatchRoot: {fileID: 0} 815 | m_ProbeAnchor: {fileID: 0} 816 | m_LightProbeVolumeOverride: {fileID: 0} 817 | m_ScaleInLightmap: 1 818 | m_PreserveUVs: 1 819 | m_IgnoreNormalsForChartDetection: 0 820 | m_ImportantGI: 0 821 | m_StitchLightmapSeams: 0 822 | m_SelectedEditorRenderState: 3 823 | m_MinimumChartSize: 4 824 | m_AutoUVMaxDistance: 0.5 825 | m_AutoUVMaxAngle: 89 826 | m_LightmapParameters: {fileID: 0} 827 | m_SortingLayerID: 0 828 | m_SortingLayer: 0 829 | m_SortingOrder: 0 830 | --- !u!33 &860725901 831 | MeshFilter: 832 | m_ObjectHideFlags: 0 833 | m_PrefabParentObject: {fileID: 0} 834 | m_PrefabInternal: {fileID: 0} 835 | m_GameObject: {fileID: 860725898} 836 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 837 | --- !u!1 &911241602 838 | GameObject: 839 | m_ObjectHideFlags: 0 840 | m_PrefabParentObject: {fileID: 0} 841 | m_PrefabInternal: {fileID: 0} 842 | serializedVersion: 5 843 | m_Component: 844 | - component: {fileID: 911241603} 845 | - component: {fileID: 911241605} 846 | - component: {fileID: 911241604} 847 | m_Layer: 0 848 | m_Name: Sphere (3) 849 | m_TagString: Untagged 850 | m_Icon: {fileID: 0} 851 | m_NavMeshLayer: 0 852 | m_StaticEditorFlags: 0 853 | m_IsActive: 1 854 | --- !u!4 &911241603 855 | Transform: 856 | m_ObjectHideFlags: 0 857 | m_PrefabParentObject: {fileID: 0} 858 | m_PrefabInternal: {fileID: 0} 859 | m_GameObject: {fileID: 911241602} 860 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 861 | m_LocalPosition: {x: 0, y: 0.5, z: 6} 862 | m_LocalScale: {x: 1, y: 1, z: 1} 863 | m_Children: [] 864 | m_Father: {fileID: 949706139} 865 | m_RootOrder: 3 866 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 867 | --- !u!23 &911241604 868 | MeshRenderer: 869 | m_ObjectHideFlags: 0 870 | m_PrefabParentObject: {fileID: 0} 871 | m_PrefabInternal: {fileID: 0} 872 | m_GameObject: {fileID: 911241602} 873 | m_Enabled: 1 874 | m_CastShadows: 1 875 | m_ReceiveShadows: 1 876 | m_DynamicOccludee: 1 877 | m_MotionVectors: 1 878 | m_LightProbeUsage: 1 879 | m_ReflectionProbeUsage: 1 880 | m_Materials: 881 | - {fileID: 2100000, guid: 4f42a26097c877b40a7616aa60580c43, type: 2} 882 | m_StaticBatchInfo: 883 | firstSubMesh: 0 884 | subMeshCount: 0 885 | m_StaticBatchRoot: {fileID: 0} 886 | m_ProbeAnchor: {fileID: 0} 887 | m_LightProbeVolumeOverride: {fileID: 0} 888 | m_ScaleInLightmap: 1 889 | m_PreserveUVs: 1 890 | m_IgnoreNormalsForChartDetection: 0 891 | m_ImportantGI: 0 892 | m_StitchLightmapSeams: 0 893 | m_SelectedEditorRenderState: 3 894 | m_MinimumChartSize: 4 895 | m_AutoUVMaxDistance: 0.5 896 | m_AutoUVMaxAngle: 89 897 | m_LightmapParameters: {fileID: 0} 898 | m_SortingLayerID: 0 899 | m_SortingLayer: 0 900 | m_SortingOrder: 0 901 | --- !u!33 &911241605 902 | MeshFilter: 903 | m_ObjectHideFlags: 0 904 | m_PrefabParentObject: {fileID: 0} 905 | m_PrefabInternal: {fileID: 0} 906 | m_GameObject: {fileID: 911241602} 907 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 908 | --- !u!1 &949706138 909 | GameObject: 910 | m_ObjectHideFlags: 0 911 | m_PrefabParentObject: {fileID: 0} 912 | m_PrefabInternal: {fileID: 0} 913 | serializedVersion: 5 914 | m_Component: 915 | - component: {fileID: 949706139} 916 | m_Layer: 0 917 | m_Name: OutlineWidth_Screen 918 | m_TagString: Untagged 919 | m_Icon: {fileID: 0} 920 | m_NavMeshLayer: 0 921 | m_StaticEditorFlags: 0 922 | m_IsActive: 1 923 | --- !u!4 &949706139 924 | Transform: 925 | m_ObjectHideFlags: 0 926 | m_PrefabParentObject: {fileID: 0} 927 | m_PrefabInternal: {fileID: 0} 928 | m_GameObject: {fileID: 949706138} 929 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 930 | m_LocalPosition: {x: 1.24, y: 0, z: 0} 931 | m_LocalScale: {x: 1, y: 1, z: 1} 932 | m_Children: 933 | - {fileID: 982378650} 934 | - {fileID: 562432355} 935 | - {fileID: 2006212098} 936 | - {fileID: 911241603} 937 | - {fileID: 1933383087} 938 | - {fileID: 287894941} 939 | - {fileID: 1361188086} 940 | - {fileID: 570198666} 941 | m_Father: {fileID: 0} 942 | m_RootOrder: 4 943 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 944 | --- !u!1 &982378649 945 | GameObject: 946 | m_ObjectHideFlags: 0 947 | m_PrefabParentObject: {fileID: 0} 948 | m_PrefabInternal: {fileID: 0} 949 | serializedVersion: 5 950 | m_Component: 951 | - component: {fileID: 982378650} 952 | - component: {fileID: 982378652} 953 | - component: {fileID: 982378651} 954 | m_Layer: 0 955 | m_Name: Sphere 956 | m_TagString: Untagged 957 | m_Icon: {fileID: 0} 958 | m_NavMeshLayer: 0 959 | m_StaticEditorFlags: 0 960 | m_IsActive: 1 961 | --- !u!4 &982378650 962 | Transform: 963 | m_ObjectHideFlags: 0 964 | m_PrefabParentObject: {fileID: 0} 965 | m_PrefabInternal: {fileID: 0} 966 | m_GameObject: {fileID: 982378649} 967 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 968 | m_LocalPosition: {x: 0, y: 0.5, z: 0} 969 | m_LocalScale: {x: 1, y: 1, z: 1} 970 | m_Children: [] 971 | m_Father: {fileID: 949706139} 972 | m_RootOrder: 0 973 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 974 | --- !u!23 &982378651 975 | MeshRenderer: 976 | m_ObjectHideFlags: 0 977 | m_PrefabParentObject: {fileID: 0} 978 | m_PrefabInternal: {fileID: 0} 979 | m_GameObject: {fileID: 982378649} 980 | m_Enabled: 1 981 | m_CastShadows: 1 982 | m_ReceiveShadows: 1 983 | m_DynamicOccludee: 1 984 | m_MotionVectors: 1 985 | m_LightProbeUsage: 1 986 | m_ReflectionProbeUsage: 1 987 | m_Materials: 988 | - {fileID: 2100000, guid: 4f42a26097c877b40a7616aa60580c43, type: 2} 989 | m_StaticBatchInfo: 990 | firstSubMesh: 0 991 | subMeshCount: 0 992 | m_StaticBatchRoot: {fileID: 0} 993 | m_ProbeAnchor: {fileID: 0} 994 | m_LightProbeVolumeOverride: {fileID: 0} 995 | m_ScaleInLightmap: 1 996 | m_PreserveUVs: 1 997 | m_IgnoreNormalsForChartDetection: 0 998 | m_ImportantGI: 0 999 | m_StitchLightmapSeams: 0 1000 | m_SelectedEditorRenderState: 3 1001 | m_MinimumChartSize: 4 1002 | m_AutoUVMaxDistance: 0.5 1003 | m_AutoUVMaxAngle: 89 1004 | m_LightmapParameters: {fileID: 0} 1005 | m_SortingLayerID: 0 1006 | m_SortingLayer: 0 1007 | m_SortingOrder: 0 1008 | --- !u!33 &982378652 1009 | MeshFilter: 1010 | m_ObjectHideFlags: 0 1011 | m_PrefabParentObject: {fileID: 0} 1012 | m_PrefabInternal: {fileID: 0} 1013 | m_GameObject: {fileID: 982378649} 1014 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 1015 | --- !u!1 &1122307218 1016 | GameObject: 1017 | m_ObjectHideFlags: 0 1018 | m_PrefabParentObject: {fileID: 0} 1019 | m_PrefabInternal: {fileID: 0} 1020 | serializedVersion: 5 1021 | m_Component: 1022 | - component: {fileID: 1122307219} 1023 | - component: {fileID: 1122307221} 1024 | - component: {fileID: 1122307220} 1025 | m_Layer: 0 1026 | m_Name: Sphere (3) 1027 | m_TagString: Untagged 1028 | m_Icon: {fileID: 0} 1029 | m_NavMeshLayer: 0 1030 | m_StaticEditorFlags: 0 1031 | m_IsActive: 1 1032 | --- !u!4 &1122307219 1033 | Transform: 1034 | m_ObjectHideFlags: 0 1035 | m_PrefabParentObject: {fileID: 0} 1036 | m_PrefabInternal: {fileID: 0} 1037 | m_GameObject: {fileID: 1122307218} 1038 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 1039 | m_LocalPosition: {x: 0, y: 0.5, z: 6} 1040 | m_LocalScale: {x: 1, y: 1, z: 1} 1041 | m_Children: [] 1042 | m_Father: {fileID: 258232876} 1043 | m_RootOrder: 3 1044 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1045 | --- !u!23 &1122307220 1046 | MeshRenderer: 1047 | m_ObjectHideFlags: 0 1048 | m_PrefabParentObject: {fileID: 0} 1049 | m_PrefabInternal: {fileID: 0} 1050 | m_GameObject: {fileID: 1122307218} 1051 | m_Enabled: 1 1052 | m_CastShadows: 1 1053 | m_ReceiveShadows: 1 1054 | m_DynamicOccludee: 1 1055 | m_MotionVectors: 1 1056 | m_LightProbeUsage: 1 1057 | m_ReflectionProbeUsage: 1 1058 | m_Materials: 1059 | - {fileID: 2100000, guid: e40a129e14e378c4db040df3fd4a6077, type: 2} 1060 | m_StaticBatchInfo: 1061 | firstSubMesh: 0 1062 | subMeshCount: 0 1063 | m_StaticBatchRoot: {fileID: 0} 1064 | m_ProbeAnchor: {fileID: 0} 1065 | m_LightProbeVolumeOverride: {fileID: 0} 1066 | m_ScaleInLightmap: 1 1067 | m_PreserveUVs: 1 1068 | m_IgnoreNormalsForChartDetection: 0 1069 | m_ImportantGI: 0 1070 | m_StitchLightmapSeams: 0 1071 | m_SelectedEditorRenderState: 3 1072 | m_MinimumChartSize: 4 1073 | m_AutoUVMaxDistance: 0.5 1074 | m_AutoUVMaxAngle: 89 1075 | m_LightmapParameters: {fileID: 0} 1076 | m_SortingLayerID: 0 1077 | m_SortingLayer: 0 1078 | m_SortingOrder: 0 1079 | --- !u!33 &1122307221 1080 | MeshFilter: 1081 | m_ObjectHideFlags: 0 1082 | m_PrefabParentObject: {fileID: 0} 1083 | m_PrefabInternal: {fileID: 0} 1084 | m_GameObject: {fileID: 1122307218} 1085 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 1086 | --- !u!1 &1143053075 1087 | GameObject: 1088 | m_ObjectHideFlags: 0 1089 | m_PrefabParentObject: {fileID: 0} 1090 | m_PrefabInternal: {fileID: 0} 1091 | serializedVersion: 5 1092 | m_Component: 1093 | - component: {fileID: 1143053079} 1094 | - component: {fileID: 1143053078} 1095 | - component: {fileID: 1143053077} 1096 | - component: {fileID: 1143053076} 1097 | m_Layer: 0 1098 | m_Name: Plane 1099 | m_TagString: Untagged 1100 | m_Icon: {fileID: 0} 1101 | m_NavMeshLayer: 0 1102 | m_StaticEditorFlags: 0 1103 | m_IsActive: 1 1104 | --- !u!23 &1143053076 1105 | MeshRenderer: 1106 | m_ObjectHideFlags: 0 1107 | m_PrefabParentObject: {fileID: 0} 1108 | m_PrefabInternal: {fileID: 0} 1109 | m_GameObject: {fileID: 1143053075} 1110 | m_Enabled: 1 1111 | m_CastShadows: 1 1112 | m_ReceiveShadows: 1 1113 | m_DynamicOccludee: 1 1114 | m_MotionVectors: 1 1115 | m_LightProbeUsage: 1 1116 | m_ReflectionProbeUsage: 1 1117 | m_Materials: 1118 | - {fileID: 2100000, guid: 54da18ba3126f1343924588562df72e0, type: 2} 1119 | m_StaticBatchInfo: 1120 | firstSubMesh: 0 1121 | subMeshCount: 0 1122 | m_StaticBatchRoot: {fileID: 0} 1123 | m_ProbeAnchor: {fileID: 0} 1124 | m_LightProbeVolumeOverride: {fileID: 0} 1125 | m_ScaleInLightmap: 1 1126 | m_PreserveUVs: 1 1127 | m_IgnoreNormalsForChartDetection: 0 1128 | m_ImportantGI: 0 1129 | m_StitchLightmapSeams: 0 1130 | m_SelectedEditorRenderState: 3 1131 | m_MinimumChartSize: 4 1132 | m_AutoUVMaxDistance: 0.5 1133 | m_AutoUVMaxAngle: 89 1134 | m_LightmapParameters: {fileID: 0} 1135 | m_SortingLayerID: 0 1136 | m_SortingLayer: 0 1137 | m_SortingOrder: 0 1138 | --- !u!64 &1143053077 1139 | MeshCollider: 1140 | m_ObjectHideFlags: 0 1141 | m_PrefabParentObject: {fileID: 0} 1142 | m_PrefabInternal: {fileID: 0} 1143 | m_GameObject: {fileID: 1143053075} 1144 | m_Material: {fileID: 0} 1145 | m_IsTrigger: 0 1146 | m_Enabled: 1 1147 | serializedVersion: 3 1148 | m_Convex: 0 1149 | m_CookingOptions: 14 1150 | m_SkinWidth: 0.01 1151 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 1152 | --- !u!33 &1143053078 1153 | MeshFilter: 1154 | m_ObjectHideFlags: 0 1155 | m_PrefabParentObject: {fileID: 0} 1156 | m_PrefabInternal: {fileID: 0} 1157 | m_GameObject: {fileID: 1143053075} 1158 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 1159 | --- !u!4 &1143053079 1160 | Transform: 1161 | m_ObjectHideFlags: 0 1162 | m_PrefabParentObject: {fileID: 0} 1163 | m_PrefabInternal: {fileID: 0} 1164 | m_GameObject: {fileID: 1143053075} 1165 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1166 | m_LocalPosition: {x: 0, y: 0, z: 0} 1167 | m_LocalScale: {x: 10, y: 10, z: 10} 1168 | m_Children: [] 1169 | m_Father: {fileID: 0} 1170 | m_RootOrder: 2 1171 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1172 | --- !u!1 &1151291097 1173 | GameObject: 1174 | m_ObjectHideFlags: 0 1175 | m_PrefabParentObject: {fileID: 0} 1176 | m_PrefabInternal: {fileID: 0} 1177 | serializedVersion: 5 1178 | m_Component: 1179 | - component: {fileID: 1151291098} 1180 | - component: {fileID: 1151291100} 1181 | - component: {fileID: 1151291099} 1182 | m_Layer: 0 1183 | m_Name: Sphere (2) 1184 | m_TagString: Untagged 1185 | m_Icon: {fileID: 0} 1186 | m_NavMeshLayer: 0 1187 | m_StaticEditorFlags: 0 1188 | m_IsActive: 1 1189 | --- !u!4 &1151291098 1190 | Transform: 1191 | m_ObjectHideFlags: 0 1192 | m_PrefabParentObject: {fileID: 0} 1193 | m_PrefabInternal: {fileID: 0} 1194 | m_GameObject: {fileID: 1151291097} 1195 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 1196 | m_LocalPosition: {x: 0, y: 0.5, z: 4} 1197 | m_LocalScale: {x: 1, y: 1, z: 1} 1198 | m_Children: [] 1199 | m_Father: {fileID: 258232876} 1200 | m_RootOrder: 2 1201 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1202 | --- !u!23 &1151291099 1203 | MeshRenderer: 1204 | m_ObjectHideFlags: 0 1205 | m_PrefabParentObject: {fileID: 0} 1206 | m_PrefabInternal: {fileID: 0} 1207 | m_GameObject: {fileID: 1151291097} 1208 | m_Enabled: 1 1209 | m_CastShadows: 1 1210 | m_ReceiveShadows: 1 1211 | m_DynamicOccludee: 1 1212 | m_MotionVectors: 1 1213 | m_LightProbeUsage: 1 1214 | m_ReflectionProbeUsage: 1 1215 | m_Materials: 1216 | - {fileID: 2100000, guid: e40a129e14e378c4db040df3fd4a6077, type: 2} 1217 | m_StaticBatchInfo: 1218 | firstSubMesh: 0 1219 | subMeshCount: 0 1220 | m_StaticBatchRoot: {fileID: 0} 1221 | m_ProbeAnchor: {fileID: 0} 1222 | m_LightProbeVolumeOverride: {fileID: 0} 1223 | m_ScaleInLightmap: 1 1224 | m_PreserveUVs: 1 1225 | m_IgnoreNormalsForChartDetection: 0 1226 | m_ImportantGI: 0 1227 | m_StitchLightmapSeams: 0 1228 | m_SelectedEditorRenderState: 3 1229 | m_MinimumChartSize: 4 1230 | m_AutoUVMaxDistance: 0.5 1231 | m_AutoUVMaxAngle: 89 1232 | m_LightmapParameters: {fileID: 0} 1233 | m_SortingLayerID: 0 1234 | m_SortingLayer: 0 1235 | m_SortingOrder: 0 1236 | --- !u!33 &1151291100 1237 | MeshFilter: 1238 | m_ObjectHideFlags: 0 1239 | m_PrefabParentObject: {fileID: 0} 1240 | m_PrefabInternal: {fileID: 0} 1241 | m_GameObject: {fileID: 1151291097} 1242 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 1243 | --- !u!1 &1258929825 1244 | GameObject: 1245 | m_ObjectHideFlags: 0 1246 | m_PrefabParentObject: {fileID: 0} 1247 | m_PrefabInternal: {fileID: 0} 1248 | serializedVersion: 5 1249 | m_Component: 1250 | - component: {fileID: 1258929826} 1251 | - component: {fileID: 1258929828} 1252 | - component: {fileID: 1258929827} 1253 | m_Layer: 0 1254 | m_Name: Sphere (6) 1255 | m_TagString: Untagged 1256 | m_Icon: {fileID: 0} 1257 | m_NavMeshLayer: 0 1258 | m_StaticEditorFlags: 0 1259 | m_IsActive: 1 1260 | --- !u!4 &1258929826 1261 | Transform: 1262 | m_ObjectHideFlags: 0 1263 | m_PrefabParentObject: {fileID: 0} 1264 | m_PrefabInternal: {fileID: 0} 1265 | m_GameObject: {fileID: 1258929825} 1266 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 1267 | m_LocalPosition: {x: 0, y: 0.5, z: 12} 1268 | m_LocalScale: {x: 1, y: 1, z: 1} 1269 | m_Children: [] 1270 | m_Father: {fileID: 258232876} 1271 | m_RootOrder: 6 1272 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1273 | --- !u!23 &1258929827 1274 | MeshRenderer: 1275 | m_ObjectHideFlags: 0 1276 | m_PrefabParentObject: {fileID: 0} 1277 | m_PrefabInternal: {fileID: 0} 1278 | m_GameObject: {fileID: 1258929825} 1279 | m_Enabled: 1 1280 | m_CastShadows: 1 1281 | m_ReceiveShadows: 1 1282 | m_DynamicOccludee: 1 1283 | m_MotionVectors: 1 1284 | m_LightProbeUsage: 1 1285 | m_ReflectionProbeUsage: 1 1286 | m_Materials: 1287 | - {fileID: 2100000, guid: e40a129e14e378c4db040df3fd4a6077, type: 2} 1288 | m_StaticBatchInfo: 1289 | firstSubMesh: 0 1290 | subMeshCount: 0 1291 | m_StaticBatchRoot: {fileID: 0} 1292 | m_ProbeAnchor: {fileID: 0} 1293 | m_LightProbeVolumeOverride: {fileID: 0} 1294 | m_ScaleInLightmap: 1 1295 | m_PreserveUVs: 1 1296 | m_IgnoreNormalsForChartDetection: 0 1297 | m_ImportantGI: 0 1298 | m_StitchLightmapSeams: 0 1299 | m_SelectedEditorRenderState: 3 1300 | m_MinimumChartSize: 4 1301 | m_AutoUVMaxDistance: 0.5 1302 | m_AutoUVMaxAngle: 89 1303 | m_LightmapParameters: {fileID: 0} 1304 | m_SortingLayerID: 0 1305 | m_SortingLayer: 0 1306 | m_SortingOrder: 0 1307 | --- !u!33 &1258929828 1308 | MeshFilter: 1309 | m_ObjectHideFlags: 0 1310 | m_PrefabParentObject: {fileID: 0} 1311 | m_PrefabInternal: {fileID: 0} 1312 | m_GameObject: {fileID: 1258929825} 1313 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 1314 | --- !u!1 &1344602170 1315 | GameObject: 1316 | m_ObjectHideFlags: 0 1317 | m_PrefabParentObject: {fileID: 0} 1318 | m_PrefabInternal: {fileID: 0} 1319 | serializedVersion: 5 1320 | m_Component: 1321 | - component: {fileID: 1344602173} 1322 | - component: {fileID: 1344602172} 1323 | - component: {fileID: 1344602171} 1324 | m_Layer: 0 1325 | m_Name: New Text (1) 1326 | m_TagString: Untagged 1327 | m_Icon: {fileID: 0} 1328 | m_NavMeshLayer: 0 1329 | m_StaticEditorFlags: 0 1330 | m_IsActive: 1 1331 | --- !u!102 &1344602171 1332 | TextMesh: 1333 | serializedVersion: 3 1334 | m_ObjectHideFlags: 0 1335 | m_PrefabParentObject: {fileID: 0} 1336 | m_PrefabInternal: {fileID: 0} 1337 | m_GameObject: {fileID: 1344602170} 1338 | m_Text: Screen 1339 | m_OffsetZ: 0 1340 | m_CharacterSize: 1 1341 | m_LineSpacing: 1 1342 | m_Anchor: 0 1343 | m_Alignment: 0 1344 | m_TabSize: 4 1345 | m_FontSize: 0 1346 | m_FontStyle: 0 1347 | m_RichText: 1 1348 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1349 | m_Color: 1350 | serializedVersion: 2 1351 | rgba: 4294967295 1352 | --- !u!23 &1344602172 1353 | MeshRenderer: 1354 | m_ObjectHideFlags: 0 1355 | m_PrefabParentObject: {fileID: 0} 1356 | m_PrefabInternal: {fileID: 0} 1357 | m_GameObject: {fileID: 1344602170} 1358 | m_Enabled: 1 1359 | m_CastShadows: 1 1360 | m_ReceiveShadows: 1 1361 | m_DynamicOccludee: 1 1362 | m_MotionVectors: 1 1363 | m_LightProbeUsage: 1 1364 | m_ReflectionProbeUsage: 1 1365 | m_Materials: 1366 | - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} 1367 | m_StaticBatchInfo: 1368 | firstSubMesh: 0 1369 | subMeshCount: 0 1370 | m_StaticBatchRoot: {fileID: 0} 1371 | m_ProbeAnchor: {fileID: 0} 1372 | m_LightProbeVolumeOverride: {fileID: 0} 1373 | m_ScaleInLightmap: 1 1374 | m_PreserveUVs: 0 1375 | m_IgnoreNormalsForChartDetection: 0 1376 | m_ImportantGI: 0 1377 | m_StitchLightmapSeams: 0 1378 | m_SelectedEditorRenderState: 3 1379 | m_MinimumChartSize: 4 1380 | m_AutoUVMaxDistance: 0.5 1381 | m_AutoUVMaxAngle: 89 1382 | m_LightmapParameters: {fileID: 0} 1383 | m_SortingLayerID: 0 1384 | m_SortingLayer: 0 1385 | m_SortingOrder: 0 1386 | --- !u!4 &1344602173 1387 | Transform: 1388 | m_ObjectHideFlags: 0 1389 | m_PrefabParentObject: {fileID: 0} 1390 | m_PrefabInternal: {fileID: 0} 1391 | m_GameObject: {fileID: 1344602170} 1392 | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} 1393 | m_LocalPosition: {x: 0.85066, y: 0.095275, z: -0.43498} 1394 | m_LocalScale: {x: 0.1727766, y: 0.17277655, z: 0.17277655} 1395 | m_Children: [] 1396 | m_Father: {fileID: 0} 1397 | m_RootOrder: 6 1398 | m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} 1399 | --- !u!1 &1361188085 1400 | GameObject: 1401 | m_ObjectHideFlags: 0 1402 | m_PrefabParentObject: {fileID: 0} 1403 | m_PrefabInternal: {fileID: 0} 1404 | serializedVersion: 5 1405 | m_Component: 1406 | - component: {fileID: 1361188086} 1407 | - component: {fileID: 1361188088} 1408 | - component: {fileID: 1361188087} 1409 | m_Layer: 0 1410 | m_Name: Sphere (6) 1411 | m_TagString: Untagged 1412 | m_Icon: {fileID: 0} 1413 | m_NavMeshLayer: 0 1414 | m_StaticEditorFlags: 0 1415 | m_IsActive: 1 1416 | --- !u!4 &1361188086 1417 | Transform: 1418 | m_ObjectHideFlags: 0 1419 | m_PrefabParentObject: {fileID: 0} 1420 | m_PrefabInternal: {fileID: 0} 1421 | m_GameObject: {fileID: 1361188085} 1422 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 1423 | m_LocalPosition: {x: 0, y: 0.5, z: 12} 1424 | m_LocalScale: {x: 1, y: 1, z: 1} 1425 | m_Children: [] 1426 | m_Father: {fileID: 949706139} 1427 | m_RootOrder: 6 1428 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1429 | --- !u!23 &1361188087 1430 | MeshRenderer: 1431 | m_ObjectHideFlags: 0 1432 | m_PrefabParentObject: {fileID: 0} 1433 | m_PrefabInternal: {fileID: 0} 1434 | m_GameObject: {fileID: 1361188085} 1435 | m_Enabled: 1 1436 | m_CastShadows: 1 1437 | m_ReceiveShadows: 1 1438 | m_DynamicOccludee: 1 1439 | m_MotionVectors: 1 1440 | m_LightProbeUsage: 1 1441 | m_ReflectionProbeUsage: 1 1442 | m_Materials: 1443 | - {fileID: 2100000, guid: 4f42a26097c877b40a7616aa60580c43, type: 2} 1444 | m_StaticBatchInfo: 1445 | firstSubMesh: 0 1446 | subMeshCount: 0 1447 | m_StaticBatchRoot: {fileID: 0} 1448 | m_ProbeAnchor: {fileID: 0} 1449 | m_LightProbeVolumeOverride: {fileID: 0} 1450 | m_ScaleInLightmap: 1 1451 | m_PreserveUVs: 1 1452 | m_IgnoreNormalsForChartDetection: 0 1453 | m_ImportantGI: 0 1454 | m_StitchLightmapSeams: 0 1455 | m_SelectedEditorRenderState: 3 1456 | m_MinimumChartSize: 4 1457 | m_AutoUVMaxDistance: 0.5 1458 | m_AutoUVMaxAngle: 89 1459 | m_LightmapParameters: {fileID: 0} 1460 | m_SortingLayerID: 0 1461 | m_SortingLayer: 0 1462 | m_SortingOrder: 0 1463 | --- !u!33 &1361188088 1464 | MeshFilter: 1465 | m_ObjectHideFlags: 0 1466 | m_PrefabParentObject: {fileID: 0} 1467 | m_PrefabInternal: {fileID: 0} 1468 | m_GameObject: {fileID: 1361188085} 1469 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 1470 | --- !u!1 &1515544976 1471 | GameObject: 1472 | m_ObjectHideFlags: 0 1473 | m_PrefabParentObject: {fileID: 0} 1474 | m_PrefabInternal: {fileID: 0} 1475 | serializedVersion: 5 1476 | m_Component: 1477 | - component: {fileID: 1515544977} 1478 | - component: {fileID: 1515544979} 1479 | - component: {fileID: 1515544978} 1480 | m_Layer: 0 1481 | m_Name: Sphere (7) 1482 | m_TagString: Untagged 1483 | m_Icon: {fileID: 0} 1484 | m_NavMeshLayer: 0 1485 | m_StaticEditorFlags: 0 1486 | m_IsActive: 1 1487 | --- !u!4 &1515544977 1488 | Transform: 1489 | m_ObjectHideFlags: 0 1490 | m_PrefabParentObject: {fileID: 0} 1491 | m_PrefabInternal: {fileID: 0} 1492 | m_GameObject: {fileID: 1515544976} 1493 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 1494 | m_LocalPosition: {x: 0, y: 0.5, z: 14} 1495 | m_LocalScale: {x: 1, y: 1, z: 1} 1496 | m_Children: [] 1497 | m_Father: {fileID: 258232876} 1498 | m_RootOrder: 7 1499 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1500 | --- !u!23 &1515544978 1501 | MeshRenderer: 1502 | m_ObjectHideFlags: 0 1503 | m_PrefabParentObject: {fileID: 0} 1504 | m_PrefabInternal: {fileID: 0} 1505 | m_GameObject: {fileID: 1515544976} 1506 | m_Enabled: 1 1507 | m_CastShadows: 1 1508 | m_ReceiveShadows: 1 1509 | m_DynamicOccludee: 1 1510 | m_MotionVectors: 1 1511 | m_LightProbeUsage: 1 1512 | m_ReflectionProbeUsage: 1 1513 | m_Materials: 1514 | - {fileID: 2100000, guid: e40a129e14e378c4db040df3fd4a6077, type: 2} 1515 | m_StaticBatchInfo: 1516 | firstSubMesh: 0 1517 | subMeshCount: 0 1518 | m_StaticBatchRoot: {fileID: 0} 1519 | m_ProbeAnchor: {fileID: 0} 1520 | m_LightProbeVolumeOverride: {fileID: 0} 1521 | m_ScaleInLightmap: 1 1522 | m_PreserveUVs: 1 1523 | m_IgnoreNormalsForChartDetection: 0 1524 | m_ImportantGI: 0 1525 | m_StitchLightmapSeams: 0 1526 | m_SelectedEditorRenderState: 3 1527 | m_MinimumChartSize: 4 1528 | m_AutoUVMaxDistance: 0.5 1529 | m_AutoUVMaxAngle: 89 1530 | m_LightmapParameters: {fileID: 0} 1531 | m_SortingLayerID: 0 1532 | m_SortingLayer: 0 1533 | m_SortingOrder: 0 1534 | --- !u!33 &1515544979 1535 | MeshFilter: 1536 | m_ObjectHideFlags: 0 1537 | m_PrefabParentObject: {fileID: 0} 1538 | m_PrefabInternal: {fileID: 0} 1539 | m_GameObject: {fileID: 1515544976} 1540 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 1541 | --- !u!1 &1670878653 1542 | GameObject: 1543 | m_ObjectHideFlags: 0 1544 | m_PrefabParentObject: {fileID: 0} 1545 | m_PrefabInternal: {fileID: 0} 1546 | serializedVersion: 5 1547 | m_Component: 1548 | - component: {fileID: 1670878657} 1549 | - component: {fileID: 1670878656} 1550 | - component: {fileID: 1670878655} 1551 | - component: {fileID: 1670878654} 1552 | m_Layer: 0 1553 | m_Name: Main Camera 1554 | m_TagString: MainCamera 1555 | m_Icon: {fileID: 0} 1556 | m_NavMeshLayer: 0 1557 | m_StaticEditorFlags: 0 1558 | m_IsActive: 1 1559 | --- !u!81 &1670878654 1560 | AudioListener: 1561 | m_ObjectHideFlags: 0 1562 | m_PrefabParentObject: {fileID: 0} 1563 | m_PrefabInternal: {fileID: 0} 1564 | m_GameObject: {fileID: 1670878653} 1565 | m_Enabled: 1 1566 | --- !u!124 &1670878655 1567 | Behaviour: 1568 | m_ObjectHideFlags: 0 1569 | m_PrefabParentObject: {fileID: 0} 1570 | m_PrefabInternal: {fileID: 0} 1571 | m_GameObject: {fileID: 1670878653} 1572 | m_Enabled: 1 1573 | --- !u!20 &1670878656 1574 | Camera: 1575 | m_ObjectHideFlags: 0 1576 | m_PrefabParentObject: {fileID: 0} 1577 | m_PrefabInternal: {fileID: 0} 1578 | m_GameObject: {fileID: 1670878653} 1579 | m_Enabled: 1 1580 | serializedVersion: 2 1581 | m_ClearFlags: 1 1582 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 1583 | m_NormalizedViewPortRect: 1584 | serializedVersion: 2 1585 | x: 0 1586 | y: 0 1587 | width: 1 1588 | height: 1 1589 | near clip plane: 0.3 1590 | far clip plane: 1000 1591 | field of view: 45 1592 | orthographic: 0 1593 | orthographic size: 5 1594 | m_Depth: -1 1595 | m_CullingMask: 1596 | serializedVersion: 2 1597 | m_Bits: 4294967295 1598 | m_RenderingPath: -1 1599 | m_TargetTexture: {fileID: 0} 1600 | m_TargetDisplay: 0 1601 | m_TargetEye: 3 1602 | m_HDR: 1 1603 | m_AllowMSAA: 1 1604 | m_AllowDynamicResolution: 0 1605 | m_ForceIntoRT: 0 1606 | m_OcclusionCulling: 1 1607 | m_StereoConvergence: 10 1608 | m_StereoSeparation: 0.022 1609 | --- !u!4 &1670878657 1610 | Transform: 1611 | m_ObjectHideFlags: 0 1612 | m_PrefabParentObject: {fileID: 0} 1613 | m_PrefabInternal: {fileID: 0} 1614 | m_GameObject: {fileID: 1670878653} 1615 | m_LocalRotation: {x: 0.21979502, y: -0, z: -0, w: 0.97554606} 1616 | m_LocalPosition: {x: 0, y: 2.09, z: -2.67} 1617 | m_LocalScale: {x: 1, y: 1, z: 1} 1618 | m_Children: [] 1619 | m_Father: {fileID: 0} 1620 | m_RootOrder: 0 1621 | m_LocalEulerAnglesHint: {x: 25.394001, y: 0, z: 0} 1622 | --- !u!1 &1884108469 1623 | GameObject: 1624 | m_ObjectHideFlags: 0 1625 | m_PrefabParentObject: {fileID: 0} 1626 | m_PrefabInternal: {fileID: 0} 1627 | serializedVersion: 5 1628 | m_Component: 1629 | - component: {fileID: 1884108470} 1630 | - component: {fileID: 1884108472} 1631 | - component: {fileID: 1884108471} 1632 | m_Layer: 0 1633 | m_Name: Sphere (1) 1634 | m_TagString: Untagged 1635 | m_Icon: {fileID: 0} 1636 | m_NavMeshLayer: 0 1637 | m_StaticEditorFlags: 0 1638 | m_IsActive: 1 1639 | --- !u!4 &1884108470 1640 | Transform: 1641 | m_ObjectHideFlags: 0 1642 | m_PrefabParentObject: {fileID: 0} 1643 | m_PrefabInternal: {fileID: 0} 1644 | m_GameObject: {fileID: 1884108469} 1645 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 1646 | m_LocalPosition: {x: 0, y: 0.5, z: 2} 1647 | m_LocalScale: {x: 1, y: 1, z: 1} 1648 | m_Children: [] 1649 | m_Father: {fileID: 258232876} 1650 | m_RootOrder: 1 1651 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1652 | --- !u!23 &1884108471 1653 | MeshRenderer: 1654 | m_ObjectHideFlags: 0 1655 | m_PrefabParentObject: {fileID: 0} 1656 | m_PrefabInternal: {fileID: 0} 1657 | m_GameObject: {fileID: 1884108469} 1658 | m_Enabled: 1 1659 | m_CastShadows: 1 1660 | m_ReceiveShadows: 1 1661 | m_DynamicOccludee: 1 1662 | m_MotionVectors: 1 1663 | m_LightProbeUsage: 1 1664 | m_ReflectionProbeUsage: 1 1665 | m_Materials: 1666 | - {fileID: 2100000, guid: e40a129e14e378c4db040df3fd4a6077, type: 2} 1667 | m_StaticBatchInfo: 1668 | firstSubMesh: 0 1669 | subMeshCount: 0 1670 | m_StaticBatchRoot: {fileID: 0} 1671 | m_ProbeAnchor: {fileID: 0} 1672 | m_LightProbeVolumeOverride: {fileID: 0} 1673 | m_ScaleInLightmap: 1 1674 | m_PreserveUVs: 1 1675 | m_IgnoreNormalsForChartDetection: 0 1676 | m_ImportantGI: 0 1677 | m_StitchLightmapSeams: 0 1678 | m_SelectedEditorRenderState: 3 1679 | m_MinimumChartSize: 4 1680 | m_AutoUVMaxDistance: 0.5 1681 | m_AutoUVMaxAngle: 89 1682 | m_LightmapParameters: {fileID: 0} 1683 | m_SortingLayerID: 0 1684 | m_SortingLayer: 0 1685 | m_SortingOrder: 0 1686 | --- !u!33 &1884108472 1687 | MeshFilter: 1688 | m_ObjectHideFlags: 0 1689 | m_PrefabParentObject: {fileID: 0} 1690 | m_PrefabInternal: {fileID: 0} 1691 | m_GameObject: {fileID: 1884108469} 1692 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 1693 | --- !u!1 &1912481823 1694 | GameObject: 1695 | m_ObjectHideFlags: 0 1696 | m_PrefabParentObject: {fileID: 0} 1697 | m_PrefabInternal: {fileID: 0} 1698 | serializedVersion: 5 1699 | m_Component: 1700 | - component: {fileID: 1912481826} 1701 | - component: {fileID: 1912481825} 1702 | - component: {fileID: 1912481824} 1703 | m_Layer: 0 1704 | m_Name: New Text 1705 | m_TagString: Untagged 1706 | m_Icon: {fileID: 0} 1707 | m_NavMeshLayer: 0 1708 | m_StaticEditorFlags: 0 1709 | m_IsActive: 1 1710 | --- !u!102 &1912481824 1711 | TextMesh: 1712 | serializedVersion: 3 1713 | m_ObjectHideFlags: 0 1714 | m_PrefabParentObject: {fileID: 0} 1715 | m_PrefabInternal: {fileID: 0} 1716 | m_GameObject: {fileID: 1912481823} 1717 | m_Text: World 1718 | m_OffsetZ: 0 1719 | m_CharacterSize: 1 1720 | m_LineSpacing: 1 1721 | m_Anchor: 0 1722 | m_Alignment: 0 1723 | m_TabSize: 4 1724 | m_FontSize: 0 1725 | m_FontStyle: 0 1726 | m_RichText: 1 1727 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1728 | m_Color: 1729 | serializedVersion: 2 1730 | rgba: 4294967295 1731 | --- !u!23 &1912481825 1732 | MeshRenderer: 1733 | m_ObjectHideFlags: 0 1734 | m_PrefabParentObject: {fileID: 0} 1735 | m_PrefabInternal: {fileID: 0} 1736 | m_GameObject: {fileID: 1912481823} 1737 | m_Enabled: 1 1738 | m_CastShadows: 1 1739 | m_ReceiveShadows: 1 1740 | m_DynamicOccludee: 1 1741 | m_MotionVectors: 1 1742 | m_LightProbeUsage: 1 1743 | m_ReflectionProbeUsage: 1 1744 | m_Materials: 1745 | - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} 1746 | m_StaticBatchInfo: 1747 | firstSubMesh: 0 1748 | subMeshCount: 0 1749 | m_StaticBatchRoot: {fileID: 0} 1750 | m_ProbeAnchor: {fileID: 0} 1751 | m_LightProbeVolumeOverride: {fileID: 0} 1752 | m_ScaleInLightmap: 1 1753 | m_PreserveUVs: 0 1754 | m_IgnoreNormalsForChartDetection: 0 1755 | m_ImportantGI: 0 1756 | m_StitchLightmapSeams: 0 1757 | m_SelectedEditorRenderState: 3 1758 | m_MinimumChartSize: 4 1759 | m_AutoUVMaxDistance: 0.5 1760 | m_AutoUVMaxAngle: 89 1761 | m_LightmapParameters: {fileID: 0} 1762 | m_SortingLayerID: 0 1763 | m_SortingLayer: 0 1764 | m_SortingOrder: 0 1765 | --- !u!4 &1912481826 1766 | Transform: 1767 | m_ObjectHideFlags: 0 1768 | m_PrefabParentObject: {fileID: 0} 1769 | m_PrefabInternal: {fileID: 0} 1770 | m_GameObject: {fileID: 1912481823} 1771 | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} 1772 | m_LocalPosition: {x: -1.5655, y: 0.095275, z: -0.4374} 1773 | m_LocalScale: {x: 0.16944185, y: 0.16944179, z: 0.16944179} 1774 | m_Children: [] 1775 | m_Father: {fileID: 0} 1776 | m_RootOrder: 5 1777 | m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} 1778 | --- !u!1 &1933383086 1779 | GameObject: 1780 | m_ObjectHideFlags: 0 1781 | m_PrefabParentObject: {fileID: 0} 1782 | m_PrefabInternal: {fileID: 0} 1783 | serializedVersion: 5 1784 | m_Component: 1785 | - component: {fileID: 1933383087} 1786 | - component: {fileID: 1933383089} 1787 | - component: {fileID: 1933383088} 1788 | m_Layer: 0 1789 | m_Name: Sphere (4) 1790 | m_TagString: Untagged 1791 | m_Icon: {fileID: 0} 1792 | m_NavMeshLayer: 0 1793 | m_StaticEditorFlags: 0 1794 | m_IsActive: 1 1795 | --- !u!4 &1933383087 1796 | Transform: 1797 | m_ObjectHideFlags: 0 1798 | m_PrefabParentObject: {fileID: 0} 1799 | m_PrefabInternal: {fileID: 0} 1800 | m_GameObject: {fileID: 1933383086} 1801 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 1802 | m_LocalPosition: {x: 0, y: 0.5, z: 8} 1803 | m_LocalScale: {x: 1, y: 1, z: 1} 1804 | m_Children: [] 1805 | m_Father: {fileID: 949706139} 1806 | m_RootOrder: 4 1807 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1808 | --- !u!23 &1933383088 1809 | MeshRenderer: 1810 | m_ObjectHideFlags: 0 1811 | m_PrefabParentObject: {fileID: 0} 1812 | m_PrefabInternal: {fileID: 0} 1813 | m_GameObject: {fileID: 1933383086} 1814 | m_Enabled: 1 1815 | m_CastShadows: 1 1816 | m_ReceiveShadows: 1 1817 | m_DynamicOccludee: 1 1818 | m_MotionVectors: 1 1819 | m_LightProbeUsage: 1 1820 | m_ReflectionProbeUsage: 1 1821 | m_Materials: 1822 | - {fileID: 2100000, guid: 4f42a26097c877b40a7616aa60580c43, type: 2} 1823 | m_StaticBatchInfo: 1824 | firstSubMesh: 0 1825 | subMeshCount: 0 1826 | m_StaticBatchRoot: {fileID: 0} 1827 | m_ProbeAnchor: {fileID: 0} 1828 | m_LightProbeVolumeOverride: {fileID: 0} 1829 | m_ScaleInLightmap: 1 1830 | m_PreserveUVs: 1 1831 | m_IgnoreNormalsForChartDetection: 0 1832 | m_ImportantGI: 0 1833 | m_StitchLightmapSeams: 0 1834 | m_SelectedEditorRenderState: 3 1835 | m_MinimumChartSize: 4 1836 | m_AutoUVMaxDistance: 0.5 1837 | m_AutoUVMaxAngle: 89 1838 | m_LightmapParameters: {fileID: 0} 1839 | m_SortingLayerID: 0 1840 | m_SortingLayer: 0 1841 | m_SortingOrder: 0 1842 | --- !u!33 &1933383089 1843 | MeshFilter: 1844 | m_ObjectHideFlags: 0 1845 | m_PrefabParentObject: {fileID: 0} 1846 | m_PrefabInternal: {fileID: 0} 1847 | m_GameObject: {fileID: 1933383086} 1848 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 1849 | --- !u!1 &2006212097 1850 | GameObject: 1851 | m_ObjectHideFlags: 0 1852 | m_PrefabParentObject: {fileID: 0} 1853 | m_PrefabInternal: {fileID: 0} 1854 | serializedVersion: 5 1855 | m_Component: 1856 | - component: {fileID: 2006212098} 1857 | - component: {fileID: 2006212100} 1858 | - component: {fileID: 2006212099} 1859 | m_Layer: 0 1860 | m_Name: Sphere (2) 1861 | m_TagString: Untagged 1862 | m_Icon: {fileID: 0} 1863 | m_NavMeshLayer: 0 1864 | m_StaticEditorFlags: 0 1865 | m_IsActive: 1 1866 | --- !u!4 &2006212098 1867 | Transform: 1868 | m_ObjectHideFlags: 0 1869 | m_PrefabParentObject: {fileID: 0} 1870 | m_PrefabInternal: {fileID: 0} 1871 | m_GameObject: {fileID: 2006212097} 1872 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 1873 | m_LocalPosition: {x: 0, y: 0.5, z: 4} 1874 | m_LocalScale: {x: 1, y: 1, z: 1} 1875 | m_Children: [] 1876 | m_Father: {fileID: 949706139} 1877 | m_RootOrder: 2 1878 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1879 | --- !u!23 &2006212099 1880 | MeshRenderer: 1881 | m_ObjectHideFlags: 0 1882 | m_PrefabParentObject: {fileID: 0} 1883 | m_PrefabInternal: {fileID: 0} 1884 | m_GameObject: {fileID: 2006212097} 1885 | m_Enabled: 1 1886 | m_CastShadows: 1 1887 | m_ReceiveShadows: 1 1888 | m_DynamicOccludee: 1 1889 | m_MotionVectors: 1 1890 | m_LightProbeUsage: 1 1891 | m_ReflectionProbeUsage: 1 1892 | m_Materials: 1893 | - {fileID: 2100000, guid: 4f42a26097c877b40a7616aa60580c43, type: 2} 1894 | m_StaticBatchInfo: 1895 | firstSubMesh: 0 1896 | subMeshCount: 0 1897 | m_StaticBatchRoot: {fileID: 0} 1898 | m_ProbeAnchor: {fileID: 0} 1899 | m_LightProbeVolumeOverride: {fileID: 0} 1900 | m_ScaleInLightmap: 1 1901 | m_PreserveUVs: 1 1902 | m_IgnoreNormalsForChartDetection: 0 1903 | m_ImportantGI: 0 1904 | m_StitchLightmapSeams: 0 1905 | m_SelectedEditorRenderState: 3 1906 | m_MinimumChartSize: 4 1907 | m_AutoUVMaxDistance: 0.5 1908 | m_AutoUVMaxAngle: 89 1909 | m_LightmapParameters: {fileID: 0} 1910 | m_SortingLayerID: 0 1911 | m_SortingLayer: 0 1912 | m_SortingOrder: 0 1913 | --- !u!33 &2006212100 1914 | MeshFilter: 1915 | m_ObjectHideFlags: 0 1916 | m_PrefabParentObject: {fileID: 0} 1917 | m_PrefabInternal: {fileID: 0} 1918 | m_GameObject: {fileID: 2006212097} 1919 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 1920 | --- !u!1 &2063006920 1921 | GameObject: 1922 | m_ObjectHideFlags: 0 1923 | m_PrefabParentObject: {fileID: 0} 1924 | m_PrefabInternal: {fileID: 0} 1925 | serializedVersion: 5 1926 | m_Component: 1927 | - component: {fileID: 2063006922} 1928 | - component: {fileID: 2063006921} 1929 | m_Layer: 0 1930 | m_Name: Directional Light 1931 | m_TagString: Untagged 1932 | m_Icon: {fileID: 0} 1933 | m_NavMeshLayer: 0 1934 | m_StaticEditorFlags: 0 1935 | m_IsActive: 1 1936 | --- !u!108 &2063006921 1937 | Light: 1938 | m_ObjectHideFlags: 0 1939 | m_PrefabParentObject: {fileID: 0} 1940 | m_PrefabInternal: {fileID: 0} 1941 | m_GameObject: {fileID: 2063006920} 1942 | m_Enabled: 1 1943 | serializedVersion: 8 1944 | m_Type: 1 1945 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 1946 | m_Intensity: 1 1947 | m_Range: 10 1948 | m_SpotAngle: 30 1949 | m_CookieSize: 10 1950 | m_Shadows: 1951 | m_Type: 2 1952 | m_Resolution: -1 1953 | m_CustomResolution: -1 1954 | m_Strength: 1 1955 | m_Bias: 0.05 1956 | m_NormalBias: 0.4 1957 | m_NearPlane: 0.2 1958 | m_Cookie: {fileID: 0} 1959 | m_DrawHalo: 0 1960 | m_Flare: {fileID: 0} 1961 | m_RenderMode: 0 1962 | m_CullingMask: 1963 | serializedVersion: 2 1964 | m_Bits: 4294967295 1965 | m_Lightmapping: 4 1966 | m_AreaSize: {x: 1, y: 1} 1967 | m_BounceIntensity: 1 1968 | m_ColorTemperature: 6570 1969 | m_UseColorTemperature: 0 1970 | m_ShadowRadius: 0 1971 | m_ShadowAngle: 0 1972 | --- !u!4 &2063006922 1973 | Transform: 1974 | m_ObjectHideFlags: 0 1975 | m_PrefabParentObject: {fileID: 0} 1976 | m_PrefabInternal: {fileID: 0} 1977 | m_GameObject: {fileID: 2063006920} 1978 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 1979 | m_LocalPosition: {x: 0, y: 3, z: 0} 1980 | m_LocalScale: {x: 1, y: 1, z: 1} 1981 | m_Children: [] 1982 | m_Father: {fileID: 0} 1983 | m_RootOrder: 1 1984 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 1985 | -------------------------------------------------------------------------------- /MToon/Samples/OutlineWidthModes.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b731264e8acd0f4b8f56986e5eb2531 3 | timeCreated: 1521569785 4 | licenseType: Free 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /MToon/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 88551f898b0043c41b202eeb79752973 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /MToon/Scripts/Enums.cs: -------------------------------------------------------------------------------- 1 | namespace MToon 2 | { 3 | public enum DebugMode 4 | { 5 | None = 0, 6 | Normal = 1, 7 | LitShadeRate = 2, 8 | } 9 | 10 | public enum OutlineColorMode 11 | { 12 | FixedColor = 0, 13 | MixedLighting = 1, 14 | } 15 | 16 | public enum OutlineWidthMode 17 | { 18 | None = 0, 19 | WorldCoordinates = 1, 20 | ScreenCoordinates = 2, 21 | } 22 | 23 | public enum RenderMode 24 | { 25 | Opaque = 0, 26 | Cutout = 1, 27 | Transparent = 2, 28 | TransparentWithZWrite = 3, 29 | } 30 | 31 | public enum CullMode 32 | { 33 | Off = 0, 34 | Front = 1, 35 | Back = 2, 36 | } 37 | 38 | public struct RenderQueueRequirement 39 | { 40 | public int DefaultValue; 41 | public int MinValue; 42 | public int MaxValue; 43 | } 44 | } -------------------------------------------------------------------------------- /MToon/Scripts/Enums.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a3fb070d7eb4114b5cf387e2cd60391 3 | timeCreated: 1548858571 -------------------------------------------------------------------------------- /MToon/Scripts/MToonDefinition.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace MToon 4 | { 5 | public class MToonDefinition 6 | { 7 | public MetaDefinition Meta; 8 | public RenderingDefinition Rendering; 9 | public ColorDefinition Color; 10 | public LightingDefinition Lighting; 11 | public EmissionDefinition Emission; 12 | public MatCapDefinition MatCap; 13 | public RimDefinition Rim; 14 | public OutlineDefinition Outline; 15 | public TextureUvCoordsDefinition TextureOption; 16 | } 17 | 18 | public class MetaDefinition 19 | { 20 | public string Implementation; 21 | public int VersionNumber; 22 | } 23 | 24 | public class RenderingDefinition 25 | { 26 | public RenderMode RenderMode; 27 | public CullMode CullMode; 28 | public int RenderQueueOffsetNumber; 29 | } 30 | 31 | public class ColorDefinition 32 | { 33 | public Color LitColor; 34 | public Texture2D LitMultiplyTexture; 35 | public Color ShadeColor; 36 | public Texture2D ShadeMultiplyTexture; 37 | public float CutoutThresholdValue; 38 | } 39 | 40 | public class LightingDefinition 41 | { 42 | public LitAndShadeMixingDefinition LitAndShadeMixing; 43 | public LightingInfluenceDefinition LightingInfluence; 44 | public NormalDefinition Normal; 45 | } 46 | 47 | public class LitAndShadeMixingDefinition 48 | { 49 | public float ShadingShiftValue; 50 | public float ShadingToonyValue; 51 | public float ShadowReceiveMultiplierValue; 52 | public Texture2D ShadowReceiveMultiplierMultiplyTexture; 53 | public float LitAndShadeMixingMultiplierValue; 54 | public Texture2D LitAndShadeMixingMultiplierMultiplyTexture; 55 | } 56 | 57 | public class LightingInfluenceDefinition 58 | { 59 | public float LightColorAttenuationValue; 60 | public float GiIntensityValue; 61 | } 62 | 63 | public class EmissionDefinition 64 | { 65 | public Color EmissionColor; 66 | public Texture2D EmissionMultiplyTexture; 67 | } 68 | 69 | public class MatCapDefinition 70 | { 71 | public Texture2D AdditiveTexture; 72 | } 73 | 74 | public class RimDefinition 75 | { 76 | public Color RimColor; 77 | public Texture2D RimMultiplyTexture; 78 | public float RimLightingMixValue; 79 | public float RimFresnelPowerValue; 80 | public float RimLiftValue; 81 | } 82 | 83 | public class NormalDefinition 84 | { 85 | public Texture2D NormalTexture; 86 | public float NormalScaleValue; 87 | } 88 | 89 | public class OutlineDefinition 90 | { 91 | public OutlineWidthMode OutlineWidthMode; 92 | public float OutlineWidthValue; 93 | public Texture2D OutlineWidthMultiplyTexture; 94 | public float OutlineScaledMaxDistanceValue; 95 | public OutlineColorMode OutlineColorMode; 96 | public Color OutlineColor; 97 | public float OutlineLightingMixValue; 98 | } 99 | 100 | public class TextureUvCoordsDefinition 101 | { 102 | public Vector2 MainTextureLeftBottomOriginScale; 103 | public Vector2 MainTextureLeftBottomOriginOffset; 104 | public Texture2D UvAnimationMaskTexture; 105 | public float UvAnimationScrollXSpeedValue; 106 | public float UvAnimationScrollYSpeedValue; 107 | public float UvAnimationRotationSpeedValue; 108 | } 109 | } -------------------------------------------------------------------------------- /MToon/Scripts/MToonDefinition.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2849b99d94074fcf9e10c5ca3eab15a8 3 | timeCreated: 1548857282 -------------------------------------------------------------------------------- /MToon/Scripts/Utils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Rendering; 4 | 5 | namespace MToon 6 | { 7 | public static partial class Utils 8 | { 9 | public const string ShaderName = "VRM/MToon"; 10 | 11 | public const string PropVersion = "_MToonVersion"; 12 | public const string PropDebugMode = "_DebugMode"; 13 | public const string PropOutlineWidthMode = "_OutlineWidthMode"; 14 | public const string PropOutlineColorMode = "_OutlineColorMode"; 15 | public const string PropBlendMode = "_BlendMode"; 16 | public const string PropCullMode = "_CullMode"; 17 | public const string PropOutlineCullMode = "_OutlineCullMode"; 18 | public const string PropCutoff = "_Cutoff"; 19 | public const string PropColor = "_Color"; 20 | public const string PropShadeColor = "_ShadeColor"; 21 | public const string PropMainTex = "_MainTex"; 22 | public const string PropShadeTexture = "_ShadeTexture"; 23 | public const string PropBumpScale = "_BumpScale"; 24 | public const string PropBumpMap = "_BumpMap"; 25 | public const string PropReceiveShadowRate = "_ReceiveShadowRate"; 26 | public const string PropReceiveShadowTexture = "_ReceiveShadowTexture"; 27 | public const string PropShadingGradeRate = "_ShadingGradeRate"; 28 | public const string PropShadingGradeTexture = "_ShadingGradeTexture"; 29 | public const string PropShadeShift = "_ShadeShift"; 30 | public const string PropShadeToony = "_ShadeToony"; 31 | public const string PropLightColorAttenuation = "_LightColorAttenuation"; 32 | public const string PropIndirectLightIntensity = "_IndirectLightIntensity"; 33 | public const string PropRimColor = "_RimColor"; 34 | public const string PropRimTexture = "_RimTexture"; 35 | public const string PropRimLightingMix = "_RimLightingMix"; 36 | public const string PropRimFresnelPower = "_RimFresnelPower"; 37 | public const string PropRimLift = "_RimLift"; 38 | public const string PropSphereAdd = "_SphereAdd"; 39 | public const string PropEmissionColor = "_EmissionColor"; 40 | public const string PropEmissionMap = "_EmissionMap"; 41 | public const string PropOutlineWidthTexture = "_OutlineWidthTexture"; 42 | public const string PropOutlineWidth = "_OutlineWidth"; 43 | public const string PropOutlineScaledMaxDistance = "_OutlineScaledMaxDistance"; 44 | public const string PropOutlineColor = "_OutlineColor"; 45 | public const string PropOutlineLightingMix = "_OutlineLightingMix"; 46 | public const string PropUvAnimMaskTexture = "_UvAnimMaskTexture"; 47 | public const string PropUvAnimScrollX = "_UvAnimScrollX"; 48 | public const string PropUvAnimScrollY = "_UvAnimScrollY"; 49 | public const string PropUvAnimRotation = "_UvAnimRotation"; 50 | public const string PropSrcBlend = "_SrcBlend"; 51 | public const string PropDstBlend = "_DstBlend"; 52 | public const string PropZWrite = "_ZWrite"; 53 | public const string PropAlphaToMask = "_AlphaToMask"; 54 | 55 | public const string KeyNormalMap = "_NORMALMAP"; 56 | public const string KeyAlphaTestOn = "_ALPHATEST_ON"; 57 | public const string KeyAlphaBlendOn = "_ALPHABLEND_ON"; 58 | public const string KeyAlphaPremultiplyOn = "_ALPHAPREMULTIPLY_ON"; 59 | public const string KeyOutlineWidthWorld = "MTOON_OUTLINE_WIDTH_WORLD"; 60 | public const string KeyOutlineWidthScreen = "MTOON_OUTLINE_WIDTH_SCREEN"; 61 | public const string KeyOutlineColorFixed = "MTOON_OUTLINE_COLOR_FIXED"; 62 | public const string KeyOutlineColorMixed = "MTOON_OUTLINE_COLOR_MIXED"; 63 | public const string KeyDebugNormal = "MTOON_DEBUG_NORMAL"; 64 | public const string KeyDebugLitShadeRate = "MTOON_DEBUG_LITSHADERATE"; 65 | 66 | public const string TagRenderTypeKey = "RenderType"; 67 | public const string TagRenderTypeValueOpaque = "Opaque"; 68 | public const string TagRenderTypeValueTransparentCutout = "TransparentCutout"; 69 | public const string TagRenderTypeValueTransparent = "Transparent"; 70 | 71 | public const int DisabledIntValue = 0; 72 | public const int EnabledIntValue = 1; 73 | 74 | public static RenderQueueRequirement GetRenderQueueRequirement(RenderMode renderMode) 75 | { 76 | const int shaderDefaultQueue = -1; 77 | const int firstTransparentQueue = 2501; 78 | const int spanOfQueue = 50; 79 | 80 | switch (renderMode) 81 | { 82 | case RenderMode.Opaque: 83 | return new RenderQueueRequirement() 84 | { 85 | DefaultValue = shaderDefaultQueue, 86 | MinValue = shaderDefaultQueue, 87 | MaxValue = shaderDefaultQueue, 88 | }; 89 | case RenderMode.Cutout: 90 | return new RenderQueueRequirement() 91 | { 92 | DefaultValue = (int) RenderQueue.AlphaTest, 93 | MinValue = (int) RenderQueue.AlphaTest, 94 | MaxValue = (int) RenderQueue.AlphaTest, 95 | }; 96 | case RenderMode.Transparent: 97 | return new RenderQueueRequirement() 98 | { 99 | DefaultValue = (int) RenderQueue.Transparent, 100 | MinValue = (int) RenderQueue.Transparent - spanOfQueue + 1, 101 | MaxValue = (int) RenderQueue.Transparent, 102 | }; 103 | case RenderMode.TransparentWithZWrite: 104 | return new RenderQueueRequirement() 105 | { 106 | DefaultValue = firstTransparentQueue, 107 | MinValue = firstTransparentQueue, 108 | MaxValue = firstTransparentQueue + spanOfQueue - 1, 109 | }; 110 | default: 111 | throw new ArgumentOutOfRangeException("renderMode", renderMode, null); 112 | } 113 | } 114 | 115 | } 116 | } -------------------------------------------------------------------------------- /MToon/Scripts/Utils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d2012c170a74b3db0002f7ecda53622 3 | timeCreated: 1537557325 -------------------------------------------------------------------------------- /MToon/Scripts/UtilsGetter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace MToon 5 | { 6 | public static partial class Utils 7 | { 8 | public static MToonDefinition GetMToonParametersFromMaterial(Material material) 9 | { 10 | return new MToonDefinition 11 | { 12 | Meta = new MetaDefinition 13 | { 14 | Implementation = Implementation, 15 | VersionNumber = material.GetInt(PropVersion), 16 | }, 17 | Rendering = new RenderingDefinition 18 | { 19 | RenderMode = GetBlendMode(material), 20 | CullMode = GetCullMode(material), 21 | RenderQueueOffsetNumber = GetRenderQueueOffset(material, GetRenderQueueOriginMode(material)), 22 | }, 23 | Color = new ColorDefinition 24 | { 25 | LitColor = GetColor(material, PropColor), 26 | LitMultiplyTexture = GetTexture(material, PropMainTex), 27 | ShadeColor = GetColor(material, PropShadeColor), 28 | ShadeMultiplyTexture = GetTexture(material, PropShadeTexture), 29 | CutoutThresholdValue = GetValue(material, PropCutoff), 30 | }, 31 | Lighting = new LightingDefinition 32 | { 33 | LitAndShadeMixing = new LitAndShadeMixingDefinition 34 | { 35 | ShadingShiftValue = GetValue(material, PropShadeShift), 36 | ShadingToonyValue = GetValue(material, PropShadeToony), 37 | ShadowReceiveMultiplierValue = GetValue(material, PropReceiveShadowRate), 38 | ShadowReceiveMultiplierMultiplyTexture = GetTexture(material, PropReceiveShadowTexture), 39 | LitAndShadeMixingMultiplierValue = GetValue(material, PropShadingGradeRate), 40 | LitAndShadeMixingMultiplierMultiplyTexture = GetTexture(material, PropShadingGradeTexture), 41 | }, 42 | LightingInfluence = new LightingInfluenceDefinition 43 | { 44 | LightColorAttenuationValue = GetValue(material, PropLightColorAttenuation), 45 | GiIntensityValue = GetValue(material, PropIndirectLightIntensity), 46 | }, 47 | Normal = new NormalDefinition 48 | { 49 | NormalTexture = GetTexture(material, PropBumpMap), 50 | NormalScaleValue = GetValue(material, PropBumpScale), 51 | }, 52 | }, 53 | Emission = new EmissionDefinition 54 | { 55 | EmissionColor = GetColor(material, PropEmissionColor), 56 | EmissionMultiplyTexture = GetTexture(material, PropEmissionMap), 57 | }, 58 | MatCap = new MatCapDefinition 59 | { 60 | AdditiveTexture = GetTexture(material, PropSphereAdd), 61 | }, 62 | Rim = new RimDefinition 63 | { 64 | RimColor = GetColor(material, PropRimColor), 65 | RimMultiplyTexture = GetTexture(material, PropRimTexture), 66 | RimLightingMixValue = GetValue(material, PropRimLightingMix), 67 | RimFresnelPowerValue = GetValue(material, PropRimFresnelPower), 68 | RimLiftValue = GetValue(material, PropRimLift), 69 | }, 70 | Outline = new OutlineDefinition 71 | { 72 | OutlineWidthMode = GetOutlineWidthMode(material), 73 | OutlineWidthValue = GetValue(material, PropOutlineWidth), 74 | OutlineWidthMultiplyTexture = GetTexture(material, PropOutlineWidthTexture), 75 | OutlineScaledMaxDistanceValue = GetValue(material, PropOutlineScaledMaxDistance), 76 | OutlineColorMode = GetOutlineColorMode(material), 77 | OutlineColor = GetColor(material, PropOutlineColor), 78 | OutlineLightingMixValue = GetValue(material, PropOutlineLightingMix), 79 | }, 80 | TextureOption = new TextureUvCoordsDefinition 81 | { 82 | MainTextureLeftBottomOriginScale = material.GetTextureScale(PropMainTex), 83 | MainTextureLeftBottomOriginOffset = material.GetTextureOffset(PropMainTex), 84 | UvAnimationMaskTexture = GetTexture(material, PropUvAnimMaskTexture), 85 | UvAnimationScrollXSpeedValue = GetValue(material, PropUvAnimScrollX), 86 | UvAnimationScrollYSpeedValue = GetValue(material, PropUvAnimScrollY), 87 | UvAnimationRotationSpeedValue = GetValue(material, PropUvAnimRotation), 88 | }, 89 | }; 90 | } 91 | 92 | private static float GetValue(Material material, string propertyName) 93 | { 94 | return material.GetFloat(propertyName); 95 | } 96 | 97 | private static Color GetColor(Material material, string propertyName) 98 | { 99 | return material.GetColor(propertyName); 100 | } 101 | 102 | private static Texture2D GetTexture(Material material, string propertyName) 103 | { 104 | return (Texture2D) material.GetTexture(propertyName); 105 | } 106 | 107 | private static RenderMode GetBlendMode(Material material) 108 | { 109 | if (material.IsKeywordEnabled(KeyAlphaTestOn)) 110 | { 111 | return RenderMode.Cutout; 112 | } 113 | else if (material.IsKeywordEnabled(KeyAlphaBlendOn)) 114 | { 115 | switch (material.GetInt(PropZWrite)) 116 | { 117 | case EnabledIntValue: 118 | return RenderMode.TransparentWithZWrite; 119 | case DisabledIntValue: 120 | return RenderMode.Transparent; 121 | default: 122 | Debug.LogWarning("Invalid ZWrite Int Value."); 123 | return RenderMode.Transparent; 124 | } 125 | } 126 | else 127 | { 128 | return RenderMode.Opaque; 129 | } 130 | } 131 | 132 | private static CullMode GetCullMode(Material material) 133 | { 134 | switch ((CullMode) material.GetInt(PropCullMode)) 135 | { 136 | case CullMode.Off: 137 | return CullMode.Off; 138 | case CullMode.Front: 139 | return CullMode.Front; 140 | case CullMode.Back: 141 | return CullMode.Back; 142 | default: 143 | Debug.LogWarning("Invalid CullMode."); 144 | return CullMode.Back; 145 | } 146 | } 147 | 148 | private static OutlineWidthMode GetOutlineWidthMode(Material material) 149 | { 150 | if (material.IsKeywordEnabled(KeyOutlineWidthWorld)) return OutlineWidthMode.WorldCoordinates; 151 | if (material.IsKeywordEnabled(KeyOutlineWidthScreen)) return OutlineWidthMode.ScreenCoordinates; 152 | 153 | return OutlineWidthMode.None; 154 | } 155 | 156 | private static OutlineColorMode GetOutlineColorMode(Material material) 157 | { 158 | if (material.IsKeywordEnabled(KeyOutlineColorFixed)) return OutlineColorMode.FixedColor; 159 | if (material.IsKeywordEnabled(KeyOutlineColorMixed)) return OutlineColorMode.MixedLighting; 160 | 161 | return OutlineColorMode.FixedColor; 162 | } 163 | 164 | private static RenderMode GetRenderQueueOriginMode(Material material) 165 | { 166 | return GetBlendMode(material); 167 | } 168 | 169 | private static int GetRenderQueueOffset(Material material, RenderMode originMode) 170 | { 171 | var rawValue = material.renderQueue; 172 | var requirement = GetRenderQueueRequirement(originMode); 173 | if (rawValue < requirement.MinValue || rawValue > requirement.MaxValue) 174 | { 175 | return 0; 176 | } 177 | return rawValue - requirement.DefaultValue; 178 | } 179 | } 180 | } -------------------------------------------------------------------------------- /MToon/Scripts/UtilsGetter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6724aa45c8c349fabd5954a531301aa8 3 | timeCreated: 1557229569 -------------------------------------------------------------------------------- /MToon/Scripts/UtilsSetter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Rendering; 4 | 5 | namespace MToon 6 | { 7 | public static partial class Utils 8 | { 9 | public static void SetMToonParametersToMaterial(Material material, MToonDefinition parameters) 10 | { 11 | { 12 | var meta = parameters.Meta; 13 | SetValue(material, PropVersion, meta.VersionNumber); 14 | } 15 | { 16 | var rendering = parameters.Rendering; 17 | SetRenderMode(material, rendering.RenderMode, rendering.RenderQueueOffsetNumber, 18 | useDefaultRenderQueue: false); 19 | SetCullMode(material, rendering.CullMode); 20 | } 21 | { 22 | var color = parameters.Color; 23 | SetColor(material, PropColor, color.LitColor); 24 | SetTexture(material, PropMainTex, color.LitMultiplyTexture); 25 | SetColor(material, PropShadeColor, color.ShadeColor); 26 | SetTexture(material, PropShadeTexture, color.ShadeMultiplyTexture); 27 | SetValue(material, PropCutoff, color.CutoutThresholdValue); 28 | } 29 | { 30 | var lighting = parameters.Lighting; 31 | { 32 | var prop = lighting.LitAndShadeMixing; 33 | SetValue(material, PropShadeShift, prop.ShadingShiftValue); 34 | SetValue(material, PropShadeToony, prop.ShadingToonyValue); 35 | SetValue(material, PropReceiveShadowRate, prop.ShadowReceiveMultiplierValue); 36 | SetTexture(material, PropReceiveShadowTexture, prop.ShadowReceiveMultiplierMultiplyTexture); 37 | SetValue(material, PropShadingGradeRate, prop.LitAndShadeMixingMultiplierValue); 38 | SetTexture(material, PropShadingGradeTexture, prop.LitAndShadeMixingMultiplierMultiplyTexture); 39 | } 40 | { 41 | var prop = lighting.LightingInfluence; 42 | SetValue(material, PropLightColorAttenuation, prop.LightColorAttenuationValue); 43 | SetValue(material, PropIndirectLightIntensity, prop.GiIntensityValue); 44 | } 45 | { 46 | var prop = lighting.Normal; 47 | SetNormalMapping(material, prop.NormalTexture, prop.NormalScaleValue); 48 | } 49 | } 50 | { 51 | var emission = parameters.Emission; 52 | SetColor(material, PropEmissionColor, emission.EmissionColor); 53 | SetTexture(material, PropEmissionMap, emission.EmissionMultiplyTexture); 54 | } 55 | { 56 | var matcap = parameters.MatCap; 57 | SetTexture(material, PropSphereAdd, matcap.AdditiveTexture); 58 | } 59 | { 60 | var rim = parameters.Rim; 61 | SetColor(material, PropRimColor, rim.RimColor); 62 | SetTexture(material, PropRimTexture, rim.RimMultiplyTexture); 63 | SetValue(material, PropRimLightingMix, rim.RimLightingMixValue); 64 | SetValue(material, PropRimFresnelPower, rim.RimFresnelPowerValue); 65 | SetValue(material, PropRimLift, rim.RimLiftValue); 66 | } 67 | { 68 | var outline = parameters.Outline; 69 | SetValue(material, PropOutlineWidth, outline.OutlineWidthValue); 70 | SetTexture(material, PropOutlineWidthTexture, outline.OutlineWidthMultiplyTexture); 71 | SetValue(material, PropOutlineScaledMaxDistance, outline.OutlineScaledMaxDistanceValue); 72 | SetColor(material, PropOutlineColor, outline.OutlineColor); 73 | SetValue(material, PropOutlineLightingMix, outline.OutlineLightingMixValue); 74 | SetOutlineMode(material, outline.OutlineWidthMode, outline.OutlineColorMode); 75 | } 76 | { 77 | var textureOptions = parameters.TextureOption; 78 | material.SetTextureScale(PropMainTex, textureOptions.MainTextureLeftBottomOriginScale); 79 | material.SetTextureOffset(PropMainTex, textureOptions.MainTextureLeftBottomOriginOffset); 80 | material.SetTexture(PropUvAnimMaskTexture, textureOptions.UvAnimationMaskTexture); 81 | material.SetFloat(PropUvAnimScrollX, textureOptions.UvAnimationScrollXSpeedValue); 82 | material.SetFloat(PropUvAnimScrollY, textureOptions.UvAnimationScrollYSpeedValue); 83 | material.SetFloat(PropUvAnimRotation, textureOptions.UvAnimationRotationSpeedValue); 84 | } 85 | 86 | ValidateProperties(material, isBlendModeChangedByUser: false); 87 | } 88 | 89 | /// 90 | /// Validate properties and Set hidden properties, keywords. 91 | /// if isBlendModeChangedByUser is true, renderQueue will set specified render mode's default value. 92 | /// 93 | /// 94 | /// 95 | public static void ValidateProperties(Material material, bool isBlendModeChangedByUser = false) 96 | { 97 | SetRenderMode(material, 98 | (RenderMode) material.GetFloat(PropBlendMode), 99 | material.renderQueue - GetRenderQueueRequirement((RenderMode) material.GetFloat(PropBlendMode)).DefaultValue, 100 | useDefaultRenderQueue: isBlendModeChangedByUser); 101 | SetNormalMapping(material, material.GetTexture(PropBumpMap), material.GetFloat(PropBumpScale)); 102 | SetOutlineMode(material, 103 | (OutlineWidthMode) material.GetFloat(PropOutlineWidthMode), 104 | (OutlineColorMode) material.GetFloat(PropOutlineColorMode)); 105 | SetDebugMode(material, (DebugMode) material.GetFloat(PropDebugMode)); 106 | SetCullMode(material, (CullMode) material.GetFloat(PropCullMode)); 107 | 108 | var mainTex = material.GetTexture(PropMainTex); 109 | var shadeTex = material.GetTexture(PropShadeTexture); 110 | if (mainTex != null && shadeTex == null) 111 | { 112 | material.SetTexture(PropShadeTexture, mainTex); 113 | } 114 | } 115 | 116 | private static void SetDebugMode(Material material, DebugMode debugMode) 117 | { 118 | SetValue(material, PropDebugMode, (int) debugMode); 119 | 120 | switch (debugMode) 121 | { 122 | case DebugMode.None: 123 | SetKeyword(material, KeyDebugNormal, false); 124 | SetKeyword(material, KeyDebugLitShadeRate, false); 125 | break; 126 | case DebugMode.Normal: 127 | SetKeyword(material, KeyDebugNormal, true); 128 | SetKeyword(material, KeyDebugLitShadeRate, false); 129 | break; 130 | case DebugMode.LitShadeRate: 131 | SetKeyword(material, KeyDebugNormal, false); 132 | SetKeyword(material, KeyDebugLitShadeRate, true); 133 | break; 134 | } 135 | } 136 | 137 | private static void SetRenderMode(Material material, RenderMode renderMode, int renderQueueOffset, 138 | bool useDefaultRenderQueue) 139 | { 140 | SetValue(material, PropBlendMode, (int) renderMode); 141 | 142 | switch (renderMode) 143 | { 144 | case RenderMode.Opaque: 145 | material.SetOverrideTag(TagRenderTypeKey, TagRenderTypeValueOpaque); 146 | material.SetInt(PropSrcBlend, (int) BlendMode.One); 147 | material.SetInt(PropDstBlend, (int) BlendMode.Zero); 148 | material.SetInt(PropZWrite, EnabledIntValue); 149 | material.SetInt(PropAlphaToMask, DisabledIntValue); 150 | SetKeyword(material, KeyAlphaTestOn, false); 151 | SetKeyword(material, KeyAlphaBlendOn, false); 152 | SetKeyword(material, KeyAlphaPremultiplyOn, false); 153 | break; 154 | case RenderMode.Cutout: 155 | material.SetOverrideTag(TagRenderTypeKey, TagRenderTypeValueTransparentCutout); 156 | material.SetInt(PropSrcBlend, (int) BlendMode.One); 157 | material.SetInt(PropDstBlend, (int) BlendMode.Zero); 158 | material.SetInt(PropZWrite, EnabledIntValue); 159 | material.SetInt(PropAlphaToMask, EnabledIntValue); 160 | SetKeyword(material, KeyAlphaTestOn, true); 161 | SetKeyword(material, KeyAlphaBlendOn, false); 162 | SetKeyword(material, KeyAlphaPremultiplyOn, false); 163 | break; 164 | case RenderMode.Transparent: 165 | material.SetOverrideTag(TagRenderTypeKey, TagRenderTypeValueTransparent); 166 | material.SetInt(PropSrcBlend, (int) BlendMode.SrcAlpha); 167 | material.SetInt(PropDstBlend, (int) BlendMode.OneMinusSrcAlpha); 168 | material.SetInt(PropZWrite, DisabledIntValue); 169 | material.SetInt(PropAlphaToMask, DisabledIntValue); 170 | SetKeyword(material, KeyAlphaTestOn, false); 171 | SetKeyword(material, KeyAlphaBlendOn, true); 172 | SetKeyword(material, KeyAlphaPremultiplyOn, false); 173 | break; 174 | case RenderMode.TransparentWithZWrite: 175 | material.SetOverrideTag(TagRenderTypeKey, TagRenderTypeValueTransparent); 176 | material.SetInt(PropSrcBlend, (int) BlendMode.SrcAlpha); 177 | material.SetInt(PropDstBlend, (int) BlendMode.OneMinusSrcAlpha); 178 | material.SetInt(PropZWrite, EnabledIntValue); 179 | material.SetInt(PropAlphaToMask, DisabledIntValue); 180 | SetKeyword(material, KeyAlphaTestOn, false); 181 | SetKeyword(material, KeyAlphaBlendOn, true); 182 | SetKeyword(material, KeyAlphaPremultiplyOn, false); 183 | break; 184 | } 185 | 186 | if (useDefaultRenderQueue) 187 | { 188 | var requirement = GetRenderQueueRequirement(renderMode); 189 | material.renderQueue = requirement.DefaultValue; 190 | } 191 | else 192 | { 193 | var requirement = GetRenderQueueRequirement(renderMode); 194 | material.renderQueue = Mathf.Clamp( 195 | requirement.DefaultValue + renderQueueOffset, requirement.MinValue, requirement.MaxValue); 196 | } 197 | } 198 | 199 | private static void SetOutlineMode(Material material, OutlineWidthMode outlineWidthMode, 200 | OutlineColorMode outlineColorMode) 201 | { 202 | SetValue(material, PropOutlineWidthMode, (int) outlineWidthMode); 203 | SetValue(material, PropOutlineColorMode, (int) outlineColorMode); 204 | 205 | var isFixed = outlineColorMode == OutlineColorMode.FixedColor; 206 | var isMixed = outlineColorMode == OutlineColorMode.MixedLighting; 207 | 208 | switch (outlineWidthMode) 209 | { 210 | case OutlineWidthMode.None: 211 | SetKeyword(material, KeyOutlineWidthWorld, false); 212 | SetKeyword(material, KeyOutlineWidthScreen, false); 213 | SetKeyword(material, KeyOutlineColorFixed, false); 214 | SetKeyword(material, KeyOutlineColorMixed, false); 215 | break; 216 | case OutlineWidthMode.WorldCoordinates: 217 | SetKeyword(material, KeyOutlineWidthWorld, true); 218 | SetKeyword(material, KeyOutlineWidthScreen, false); 219 | SetKeyword(material, KeyOutlineColorFixed, isFixed); 220 | SetKeyword(material, KeyOutlineColorMixed, isMixed); 221 | break; 222 | case OutlineWidthMode.ScreenCoordinates: 223 | SetKeyword(material, KeyOutlineWidthWorld, false); 224 | SetKeyword(material, KeyOutlineWidthScreen, true); 225 | SetKeyword(material, KeyOutlineColorFixed, isFixed); 226 | SetKeyword(material, KeyOutlineColorMixed, isMixed); 227 | break; 228 | } 229 | } 230 | 231 | private static void SetNormalMapping(Material material, Texture bumpMap, float bumpScale) 232 | { 233 | SetTexture(material, PropBumpMap, bumpMap); 234 | SetValue(material, PropBumpScale, bumpScale); 235 | 236 | SetKeyword(material, KeyNormalMap, bumpMap != null); 237 | } 238 | 239 | private static void SetCullMode(Material material, CullMode cullMode) 240 | { 241 | SetValue(material, PropCullMode, (int) cullMode); 242 | 243 | switch (cullMode) 244 | { 245 | case CullMode.Back: 246 | material.SetInt(PropCullMode, (int) CullMode.Back); 247 | material.SetInt(PropOutlineCullMode, (int) CullMode.Front); 248 | break; 249 | case CullMode.Front: 250 | material.SetInt(PropCullMode, (int) CullMode.Front); 251 | material.SetInt(PropOutlineCullMode, (int) CullMode.Back); 252 | break; 253 | case CullMode.Off: 254 | material.SetInt(PropCullMode, (int) CullMode.Off); 255 | material.SetInt(PropOutlineCullMode, (int) CullMode.Front); 256 | break; 257 | } 258 | } 259 | 260 | private static void SetValue(Material material, string propertyName, float val) 261 | { 262 | material.SetFloat(propertyName, val); 263 | } 264 | 265 | private static void SetColor(Material material, string propertyName, Color color) 266 | { 267 | material.SetColor(propertyName, color); 268 | } 269 | 270 | private static void SetTexture(Material material, string propertyName, Texture texture) 271 | { 272 | material.SetTexture(propertyName, texture); 273 | } 274 | 275 | private static void SetKeyword(Material mat, string keyword, bool required) 276 | { 277 | if (required) 278 | mat.EnableKeyword(keyword); 279 | else 280 | mat.DisableKeyword(keyword); 281 | } 282 | } 283 | } -------------------------------------------------------------------------------- /MToon/Scripts/UtilsSetter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b24a672e82874c9fbfef9c2b2dfdab42 3 | timeCreated: 1557304397 -------------------------------------------------------------------------------- /MToon/Scripts/UtilsVersion.cs: -------------------------------------------------------------------------------- 1 | namespace MToon 2 | { 3 | public static partial class Utils 4 | { 5 | public const string Implementation = "Santarh/MToon"; 6 | public const int VersionNumber = 39; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /MToon/Scripts/UtilsVersion.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4702d4b2c1414cc08b4382c3762eebab 3 | timeCreated: 1557306172 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MToon 2 | Toon Shader with Unity Global Illumination 3 | 4 | ## Tutorial 5 | https://www.slideshare.net/VirtualCast/vrm-mtoon 6 | 7 | ## Version 8 | v3.9 9 | 10 | ## Release Note 11 | https://github.com/Santarh/MToon/releases 12 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1021e7e6d453b9f4fb2f46a130425deb 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------