├── .github └── FUNDING.yml ├── LICENSE ├── README.md ├── SH ├── .img │ ├── SHDemo.png │ └── SHDemoRGB.png ├── README.md ├── SHDebug.cs ├── SHDebug.cs.meta ├── SHTester.prefab ├── SHTester.prefab.meta ├── _Scene.unity ├── _Scene.unity.meta ├── m_RT_wrap.mat ├── m_RT_wrap.mat.meta ├── m_RT_wrap_eq.mat ├── m_RT_wrap_eq.mat.meta ├── m_SH_Geom.mat ├── m_SH_Geom.mat.meta ├── m_SH_Geom_eq.mat ├── m_SH_Geom_eq.mat.meta ├── m_SH_stock.mat ├── m_SH_stock.mat.meta ├── m_SH_stock_eq.mat ├── m_SH_stock_eq.mat.meta ├── m_SH_wrap0.mat ├── m_SH_wrap0.mat.meta ├── m_SH_wrap0_eq.mat ├── m_SH_wrap0_eq.mat.meta ├── m_SH_wrap1.mat ├── m_SH_wrap1.mat.meta ├── m_SH_wrap1_eq.mat ├── m_SH_wrap1_eq.mat.meta ├── m_SH_wrap2.mat ├── m_SH_wrap2.mat.meta ├── m_SH_wrap2_eq.mat ├── m_SH_wrap2_eq.mat.meta ├── s_Light0_Wrapped.shader ├── s_Light0_Wrapped.shader.meta ├── s_SH_Wrapped.shader ├── s_SH_Wrapped.shader.meta ├── skbox.mat └── skbox.mat.meta ├── Scripts └── Editor │ ├── .img │ ├── AnimatorExtensions_Context.png │ ├── AnimatorExtensions_Labels.png │ ├── MaterialCleaner.png │ └── PointMeshCreator.jpg │ ├── AnimatorExtensions.cs │ ├── AnimatorExtensions.cs.meta │ ├── MaterialCleaner.cs │ ├── MaterialCleaner.cs.meta │ ├── MaterialInspectorLocator.cs │ ├── MaterialInspectorLocator.cs.meta │ ├── MeshAssetSaver.cs │ ├── MeshAssetSaver.cs.meta │ ├── MeshBoundsInspector.cs │ ├── MeshBoundsInspector.cs.meta │ ├── PointMeshCreator.cs │ ├── PointMeshCreator.cs.meta │ └── README.md ├── Shaders └── DJL │ ├── .img │ └── A2CDemo.gif │ ├── A2C-Custom.shader │ ├── Overlays │ └── WorldPosOblique.shader │ ├── README.md │ └── StageFX │ ├── ColorFuncs.cginc │ ├── LScreen_Processing_Lite.shader │ ├── LScreen_Screen.shader │ └── README.md └── UNLICENSE /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | ko_fi: lukis101 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Dj Lukis.LT 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # VRChat/Unity Stuffs 2 | Collection of Unity shaders, scripts and prefabs oriented for usage in VRChat or general workflow 3 | 4 | ### Available things/assets and their descriptions can be found in sub-categories: 5 | 6 | * ## [Editor scripts](Scripts/Editor) 7 | * ## [Shaders](Shaders/DJL) 8 | * ## [Wrap Shading with Unitys SH](SH) 9 | 10 | ### Licensing 11 | Most of the stuff here, unless otherwise stated in the source files, is released under "The Unlicense", see UNLICENSE file for details. 12 | Some scripts and shaders, where stated so, are under MIT license, for such cases see LICENSE file for details 13 | 14 | TL;DR: Use this however you like and wherever, just don't discard the copyright notice when using or redistributing MIT-licensed parts. 15 | No need for such notice inside games or VRChat worlds, but a simple mention is appreciated ;) 16 | -------------------------------------------------------------------------------- /SH/.img/SHDemo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukis101/VRCUnityStuffs/b12bbca118cf0460d69193f26f8b8a51b49d1a9c/SH/.img/SHDemo.png -------------------------------------------------------------------------------- /SH/.img/SHDemoRGB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukis101/VRCUnityStuffs/b12bbca118cf0460d69193f26f8b8a51b49d1a9c/SH/.img/SHDemoRGB.png -------------------------------------------------------------------------------- /SH/README.md: -------------------------------------------------------------------------------- 1 | # Wrap shading with support for Unity SH 2 | 3 | A personal case study of wrap shading and a usable implementation that supports Unitys spherical harmonics. 4 | Multiple methods are implemented for easy comparison, including down-sampled cubemap when using skybox as the ambient source, see screenshots below. 5 | Also includes editor script to check how each of the SH coefficients are composed into the shader parameters. 6 | 7 | Original intended use case was for achieving semi-realistic toon shading with baked lighting. Experiments shown some wrap configurations with >1 wrap factor give nice and and highly softened results that work well even in most harsh light conditions! 8 | 9 | All used publications and code sources are in comments and linked down in shader and script source code. 10 | 11 | ![SH testing prefab and shader inspector](.img/SHDemo.png) 12 | ![SH testing prefab and shader inspector](.img/SHDemoRGB.png) -------------------------------------------------------------------------------- /SH/SHDebug.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UnityEngine.Rendering; 6 | 7 | [ExecuteAlways] 8 | public class SHDebug : MonoBehaviour 9 | { 10 | public Transform anchor; 11 | public Vector3[] SH; 12 | 13 | public Vector3 L0; 14 | 15 | public Vector4 unity_SHAr; 16 | public Vector4 unity_SHAg; 17 | public Vector4 unity_SHAb; 18 | public Vector4 unity_SHBr; 19 | public Vector4 unity_SHBg; 20 | public Vector4 unity_SHBb; 21 | public Vector4 unity_SHC; 22 | 23 | // Based on https://github.com/keijiro/LightProbeUtility 24 | // SHB.yz were fixed according to findings at https://forum.unity.com/threads/sampling-lightprobes-from-a-script.418945/ 25 | // Native way would be to use MaterialPropertyBlock.CopySHCoefficientArraysFrom 26 | void pupulateSHvars(SphericalHarmonicsL2 sh, int i, ref Vector4 SHA, ref Vector4 SHB, ref Vector4 SHC) 27 | { 28 | // Linear and Constant 29 | SHA = new Vector4( 30 | sh[i, 3], sh[i, 1], sh[i, 2], sh[i, 0] - sh[i, 6] 31 | ); 32 | 33 | // Quadratic polynomials 34 | SHB = new Vector4( 35 | sh[i, 4], sh[i, 5], sh[i, 6] * 3, sh[i, 7] 36 | ); 37 | 38 | // Final quadratic polynomial 39 | SHC[i] = sh[i, 8]; 40 | SHC.w = 1; 41 | } 42 | 43 | void Update() 44 | { 45 | SphericalHarmonicsL2 sh; 46 | Vector3 pos = (anchor) ? anchor.position : transform.position; 47 | LightProbes.GetInterpolatedProbe(pos, null, out sh); 48 | if (SH.Length != 9) 49 | SH = new Vector3[9]; 50 | for (int i=0; i<9; i++) 51 | { 52 | SH[i] = new Vector3(sh[0, i], sh[1, i], sh[2, i]); 53 | } 54 | 55 | pupulateSHvars(sh, 0, ref unity_SHAr, ref unity_SHBr, ref unity_SHC); 56 | pupulateSHvars(sh, 1, ref unity_SHAg, ref unity_SHBg, ref unity_SHC); 57 | pupulateSHvars(sh, 2, ref unity_SHAb, ref unity_SHBb, ref unity_SHC); 58 | 59 | L0 = new Vector3(sh[0, 0] - sh[0, 6], sh[1, 0] - sh[1, 6], sh[2, 0] - sh[2, 6]); 60 | } 61 | } -------------------------------------------------------------------------------- /SH/SHDebug.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ecfdb6dd2e454f47918676c371c1b0c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /SH/SHTester.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &250753570101327941 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 7747176614047181591} 12 | - component: {fileID: 6451928805601762996} 13 | - component: {fileID: 7598810935304199715} 14 | m_Layer: 0 15 | m_Name: Sphere_stock 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &7747176614047181591 22 | Transform: 23 | m_ObjectHideFlags: 0 24 | m_CorrespondingSourceObject: {fileID: 0} 25 | m_PrefabInstance: {fileID: 0} 26 | m_PrefabAsset: {fileID: 0} 27 | m_GameObject: {fileID: 250753570101327941} 28 | m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071067} 29 | m_LocalPosition: {x: -0.12518103, y: 0.906, z: 0} 30 | m_LocalScale: {x: 0.27579, y: 0.2757899, z: 0.2757899} 31 | m_Children: [] 32 | m_Father: {fileID: 8126587651428850846} 33 | m_RootOrder: 0 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!33 &6451928805601762996 36 | MeshFilter: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 250753570101327941} 42 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 43 | --- !u!23 &7598810935304199715 44 | MeshRenderer: 45 | m_ObjectHideFlags: 0 46 | m_CorrespondingSourceObject: {fileID: 0} 47 | m_PrefabInstance: {fileID: 0} 48 | m_PrefabAsset: {fileID: 0} 49 | m_GameObject: {fileID: 250753570101327941} 50 | m_Enabled: 1 51 | m_CastShadows: 1 52 | m_ReceiveShadows: 1 53 | m_DynamicOccludee: 1 54 | m_MotionVectors: 1 55 | m_LightProbeUsage: 1 56 | m_ReflectionProbeUsage: 1 57 | m_RenderingLayerMask: 1 58 | m_RendererPriority: 0 59 | m_Materials: 60 | - {fileID: 2100000, guid: 0657541492213cb4a8d73ea949468304, type: 2} 61 | m_StaticBatchInfo: 62 | firstSubMesh: 0 63 | subMeshCount: 0 64 | m_StaticBatchRoot: {fileID: 0} 65 | m_ProbeAnchor: {fileID: 7530920997909027560} 66 | m_LightProbeVolumeOverride: {fileID: 0} 67 | m_ScaleInLightmap: 1 68 | m_PreserveUVs: 0 69 | m_IgnoreNormalsForChartDetection: 0 70 | m_ImportantGI: 0 71 | m_StitchLightmapSeams: 0 72 | m_SelectedEditorRenderState: 3 73 | m_MinimumChartSize: 4 74 | m_AutoUVMaxDistance: 0.5 75 | m_AutoUVMaxAngle: 89 76 | m_LightmapParameters: {fileID: 0} 77 | m_SortingLayerID: 0 78 | m_SortingLayer: 0 79 | m_SortingOrder: 0 80 | --- !u!1 &427584872647920986 81 | GameObject: 82 | m_ObjectHideFlags: 0 83 | m_CorrespondingSourceObject: {fileID: 0} 84 | m_PrefabInstance: {fileID: 0} 85 | m_PrefabAsset: {fileID: 0} 86 | serializedVersion: 6 87 | m_Component: 88 | - component: {fileID: 6273204826613228105} 89 | - component: {fileID: 8083701483357251753} 90 | - component: {fileID: 6436791290392149146} 91 | m_Layer: 0 92 | m_Name: Quad_Stock 93 | m_TagString: Untagged 94 | m_Icon: {fileID: 0} 95 | m_NavMeshLayer: 0 96 | m_StaticEditorFlags: 0 97 | m_IsActive: 1 98 | --- !u!4 &6273204826613228105 99 | Transform: 100 | m_ObjectHideFlags: 0 101 | m_CorrespondingSourceObject: {fileID: 0} 102 | m_PrefabInstance: {fileID: 0} 103 | m_PrefabAsset: {fileID: 0} 104 | m_GameObject: {fileID: 427584872647920986} 105 | m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000004371139} 106 | m_LocalPosition: {x: -0.13300005, y: 0.638, z: 0} 107 | m_LocalScale: {x: 0.27021942, y: 0.17505097, z: 0.3045} 108 | m_Children: [] 109 | m_Father: {fileID: 8126587651428850846} 110 | m_RootOrder: 1 111 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 112 | --- !u!33 &8083701483357251753 113 | MeshFilter: 114 | m_ObjectHideFlags: 0 115 | m_CorrespondingSourceObject: {fileID: 0} 116 | m_PrefabInstance: {fileID: 0} 117 | m_PrefabAsset: {fileID: 0} 118 | m_GameObject: {fileID: 427584872647920986} 119 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 120 | --- !u!23 &6436791290392149146 121 | MeshRenderer: 122 | m_ObjectHideFlags: 0 123 | m_CorrespondingSourceObject: {fileID: 0} 124 | m_PrefabInstance: {fileID: 0} 125 | m_PrefabAsset: {fileID: 0} 126 | m_GameObject: {fileID: 427584872647920986} 127 | m_Enabled: 1 128 | m_CastShadows: 1 129 | m_ReceiveShadows: 1 130 | m_DynamicOccludee: 1 131 | m_MotionVectors: 1 132 | m_LightProbeUsage: 1 133 | m_ReflectionProbeUsage: 1 134 | m_RenderingLayerMask: 1 135 | m_RendererPriority: 0 136 | m_Materials: 137 | - {fileID: 2100000, guid: c7777b755c961e4448f8cb94728118c1, type: 2} 138 | m_StaticBatchInfo: 139 | firstSubMesh: 0 140 | subMeshCount: 0 141 | m_StaticBatchRoot: {fileID: 0} 142 | m_ProbeAnchor: {fileID: 7530920997909027560} 143 | m_LightProbeVolumeOverride: {fileID: 0} 144 | m_ScaleInLightmap: 1 145 | m_PreserveUVs: 0 146 | m_IgnoreNormalsForChartDetection: 0 147 | m_ImportantGI: 0 148 | m_StitchLightmapSeams: 0 149 | m_SelectedEditorRenderState: 3 150 | m_MinimumChartSize: 4 151 | m_AutoUVMaxDistance: 0.5 152 | m_AutoUVMaxAngle: 89 153 | m_LightmapParameters: {fileID: 0} 154 | m_SortingLayerID: 0 155 | m_SortingLayer: 0 156 | m_SortingOrder: 0 157 | --- !u!1 &1172728408534919769 158 | GameObject: 159 | m_ObjectHideFlags: 0 160 | m_CorrespondingSourceObject: {fileID: 0} 161 | m_PrefabInstance: {fileID: 0} 162 | m_PrefabAsset: {fileID: 0} 163 | serializedVersion: 6 164 | m_Component: 165 | - component: {fileID: 7854035356078915502} 166 | - component: {fileID: 2226997068837382895} 167 | - component: {fileID: 7392074276895728464} 168 | m_Layer: 0 169 | m_Name: Quad_Wrap2 170 | m_TagString: Untagged 171 | m_Icon: {fileID: 0} 172 | m_NavMeshLayer: 0 173 | m_StaticEditorFlags: 0 174 | m_IsActive: 1 175 | --- !u!4 &7854035356078915502 176 | Transform: 177 | m_ObjectHideFlags: 0 178 | m_CorrespondingSourceObject: {fileID: 0} 179 | m_PrefabInstance: {fileID: 0} 180 | m_PrefabAsset: {fileID: 0} 181 | m_GameObject: {fileID: 1172728408534919769} 182 | m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000004371139} 183 | m_LocalPosition: {x: -0.754, y: 0.10899997, z: 0} 184 | m_LocalScale: {x: 0.27021942, y: 0.17505097, z: 0.3045} 185 | m_Children: [] 186 | m_Father: {fileID: 8126587651428850846} 187 | m_RootOrder: 9 188 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 189 | --- !u!33 &2226997068837382895 190 | MeshFilter: 191 | m_ObjectHideFlags: 0 192 | m_CorrespondingSourceObject: {fileID: 0} 193 | m_PrefabInstance: {fileID: 0} 194 | m_PrefabAsset: {fileID: 0} 195 | m_GameObject: {fileID: 1172728408534919769} 196 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 197 | --- !u!23 &7392074276895728464 198 | MeshRenderer: 199 | m_ObjectHideFlags: 0 200 | m_CorrespondingSourceObject: {fileID: 0} 201 | m_PrefabInstance: {fileID: 0} 202 | m_PrefabAsset: {fileID: 0} 203 | m_GameObject: {fileID: 1172728408534919769} 204 | m_Enabled: 1 205 | m_CastShadows: 1 206 | m_ReceiveShadows: 1 207 | m_DynamicOccludee: 1 208 | m_MotionVectors: 1 209 | m_LightProbeUsage: 1 210 | m_ReflectionProbeUsage: 1 211 | m_RenderingLayerMask: 1 212 | m_RendererPriority: 0 213 | m_Materials: 214 | - {fileID: 2100000, guid: 6892a6ca51ee4d3409a7c69bb1ca3f6b, type: 2} 215 | m_StaticBatchInfo: 216 | firstSubMesh: 0 217 | subMeshCount: 0 218 | m_StaticBatchRoot: {fileID: 0} 219 | m_ProbeAnchor: {fileID: 7530920997909027560} 220 | m_LightProbeVolumeOverride: {fileID: 0} 221 | m_ScaleInLightmap: 1 222 | m_PreserveUVs: 0 223 | m_IgnoreNormalsForChartDetection: 0 224 | m_ImportantGI: 0 225 | m_StitchLightmapSeams: 0 226 | m_SelectedEditorRenderState: 3 227 | m_MinimumChartSize: 4 228 | m_AutoUVMaxDistance: 0.5 229 | m_AutoUVMaxAngle: 89 230 | m_LightmapParameters: {fileID: 0} 231 | m_SortingLayerID: 0 232 | m_SortingLayer: 0 233 | m_SortingOrder: 0 234 | --- !u!1 &2950328963486005541 235 | GameObject: 236 | m_ObjectHideFlags: 0 237 | m_CorrespondingSourceObject: {fileID: 0} 238 | m_PrefabInstance: {fileID: 0} 239 | m_PrefabAsset: {fileID: 0} 240 | serializedVersion: 6 241 | m_Component: 242 | - component: {fileID: 7919926707769003366} 243 | - component: {fileID: 3027278542945513919} 244 | - component: {fileID: 647363174583386468} 245 | m_Layer: 0 246 | m_Name: Quad_RT 247 | m_TagString: Untagged 248 | m_Icon: {fileID: 0} 249 | m_NavMeshLayer: 0 250 | m_StaticEditorFlags: 0 251 | m_IsActive: 1 252 | --- !u!4 &7919926707769003366 253 | Transform: 254 | m_ObjectHideFlags: 0 255 | m_CorrespondingSourceObject: {fileID: 0} 256 | m_PrefabInstance: {fileID: 0} 257 | m_PrefabAsset: {fileID: 0} 258 | m_GameObject: {fileID: 2950328963486005541} 259 | m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000004371139} 260 | m_LocalPosition: {x: -0.756, y: 0.638, z: 0} 261 | m_LocalScale: {x: 0.27021942, y: 0.17505097, z: 0.3045} 262 | m_Children: [] 263 | m_Father: {fileID: 8126587651428850846} 264 | m_RootOrder: 11 265 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 266 | --- !u!33 &3027278542945513919 267 | MeshFilter: 268 | m_ObjectHideFlags: 0 269 | m_CorrespondingSourceObject: {fileID: 0} 270 | m_PrefabInstance: {fileID: 0} 271 | m_PrefabAsset: {fileID: 0} 272 | m_GameObject: {fileID: 2950328963486005541} 273 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 274 | --- !u!23 &647363174583386468 275 | MeshRenderer: 276 | m_ObjectHideFlags: 0 277 | m_CorrespondingSourceObject: {fileID: 0} 278 | m_PrefabInstance: {fileID: 0} 279 | m_PrefabAsset: {fileID: 0} 280 | m_GameObject: {fileID: 2950328963486005541} 281 | m_Enabled: 1 282 | m_CastShadows: 1 283 | m_ReceiveShadows: 1 284 | m_DynamicOccludee: 1 285 | m_MotionVectors: 1 286 | m_LightProbeUsage: 1 287 | m_ReflectionProbeUsage: 1 288 | m_RenderingLayerMask: 1 289 | m_RendererPriority: 0 290 | m_Materials: 291 | - {fileID: 2100000, guid: 45c3e48ea112df8408bce6204743e413, type: 2} 292 | m_StaticBatchInfo: 293 | firstSubMesh: 0 294 | subMeshCount: 0 295 | m_StaticBatchRoot: {fileID: 0} 296 | m_ProbeAnchor: {fileID: 7530920997909027560} 297 | m_LightProbeVolumeOverride: {fileID: 0} 298 | m_ScaleInLightmap: 1 299 | m_PreserveUVs: 0 300 | m_IgnoreNormalsForChartDetection: 0 301 | m_ImportantGI: 0 302 | m_StitchLightmapSeams: 0 303 | m_SelectedEditorRenderState: 3 304 | m_MinimumChartSize: 4 305 | m_AutoUVMaxDistance: 0.5 306 | m_AutoUVMaxAngle: 89 307 | m_LightmapParameters: {fileID: 0} 308 | m_SortingLayerID: 0 309 | m_SortingLayer: 0 310 | m_SortingOrder: 0 311 | --- !u!1 &4221590045069982373 312 | GameObject: 313 | m_ObjectHideFlags: 0 314 | m_CorrespondingSourceObject: {fileID: 0} 315 | m_PrefabInstance: {fileID: 0} 316 | m_PrefabAsset: {fileID: 0} 317 | serializedVersion: 6 318 | m_Component: 319 | - component: {fileID: 3483213369458452198} 320 | - component: {fileID: 4729912582111228269} 321 | - component: {fileID: 7913763629519494173} 322 | m_Layer: 0 323 | m_Name: Quad_Geo 324 | m_TagString: Untagged 325 | m_Icon: {fileID: 0} 326 | m_NavMeshLayer: 0 327 | m_StaticEditorFlags: 0 328 | m_IsActive: 1 329 | --- !u!4 &3483213369458452198 330 | Transform: 331 | m_ObjectHideFlags: 0 332 | m_CorrespondingSourceObject: {fileID: 0} 333 | m_PrefabInstance: {fileID: 0} 334 | m_PrefabAsset: {fileID: 0} 335 | m_GameObject: {fileID: 4221590045069982373} 336 | m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000004371139} 337 | m_LocalPosition: {x: -0.44618103, y: 0.638, z: 0} 338 | m_LocalScale: {x: 0.27021942, y: 0.17505097, z: 0.3045} 339 | m_Children: [] 340 | m_Father: {fileID: 8126587651428850846} 341 | m_RootOrder: 3 342 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 343 | --- !u!33 &4729912582111228269 344 | MeshFilter: 345 | m_ObjectHideFlags: 0 346 | m_CorrespondingSourceObject: {fileID: 0} 347 | m_PrefabInstance: {fileID: 0} 348 | m_PrefabAsset: {fileID: 0} 349 | m_GameObject: {fileID: 4221590045069982373} 350 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 351 | --- !u!23 &7913763629519494173 352 | MeshRenderer: 353 | m_ObjectHideFlags: 0 354 | m_CorrespondingSourceObject: {fileID: 0} 355 | m_PrefabInstance: {fileID: 0} 356 | m_PrefabAsset: {fileID: 0} 357 | m_GameObject: {fileID: 4221590045069982373} 358 | m_Enabled: 1 359 | m_CastShadows: 1 360 | m_ReceiveShadows: 1 361 | m_DynamicOccludee: 1 362 | m_MotionVectors: 1 363 | m_LightProbeUsage: 1 364 | m_ReflectionProbeUsage: 1 365 | m_RenderingLayerMask: 1 366 | m_RendererPriority: 0 367 | m_Materials: 368 | - {fileID: 2100000, guid: f7b79ec766ae5044896178289e8dbecc, type: 2} 369 | m_StaticBatchInfo: 370 | firstSubMesh: 0 371 | subMeshCount: 0 372 | m_StaticBatchRoot: {fileID: 0} 373 | m_ProbeAnchor: {fileID: 7530920997909027560} 374 | m_LightProbeVolumeOverride: {fileID: 0} 375 | m_ScaleInLightmap: 1 376 | m_PreserveUVs: 0 377 | m_IgnoreNormalsForChartDetection: 0 378 | m_ImportantGI: 0 379 | m_StitchLightmapSeams: 0 380 | m_SelectedEditorRenderState: 3 381 | m_MinimumChartSize: 4 382 | m_AutoUVMaxDistance: 0.5 383 | m_AutoUVMaxAngle: 89 384 | m_LightmapParameters: {fileID: 0} 385 | m_SortingLayerID: 0 386 | m_SortingLayer: 0 387 | m_SortingOrder: 0 388 | --- !u!1 &4439427585521970980 389 | GameObject: 390 | m_ObjectHideFlags: 0 391 | m_CorrespondingSourceObject: {fileID: 0} 392 | m_PrefabInstance: {fileID: 0} 393 | m_PrefabAsset: {fileID: 0} 394 | serializedVersion: 6 395 | m_Component: 396 | - component: {fileID: 5236043830652489148} 397 | - component: {fileID: 1672442795245013585} 398 | - component: {fileID: 7232408453816617777} 399 | m_Layer: 0 400 | m_Name: Sphere_Wrap0 401 | m_TagString: Untagged 402 | m_Icon: {fileID: 0} 403 | m_NavMeshLayer: 0 404 | m_StaticEditorFlags: 0 405 | m_IsActive: 1 406 | --- !u!4 &5236043830652489148 407 | Transform: 408 | m_ObjectHideFlags: 0 409 | m_CorrespondingSourceObject: {fileID: 0} 410 | m_PrefabInstance: {fileID: 0} 411 | m_PrefabAsset: {fileID: 0} 412 | m_GameObject: {fileID: 4439427585521970980} 413 | m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071067} 414 | m_LocalPosition: {x: -0.13836193, y: 0.37699997, z: 0} 415 | m_LocalScale: {x: 0.27579, y: 0.2757899, z: 0.2757899} 416 | m_Children: [] 417 | m_Father: {fileID: 8126587651428850846} 418 | m_RootOrder: 4 419 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 420 | --- !u!33 &1672442795245013585 421 | MeshFilter: 422 | m_ObjectHideFlags: 0 423 | m_CorrespondingSourceObject: {fileID: 0} 424 | m_PrefabInstance: {fileID: 0} 425 | m_PrefabAsset: {fileID: 0} 426 | m_GameObject: {fileID: 4439427585521970980} 427 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 428 | --- !u!23 &7232408453816617777 429 | MeshRenderer: 430 | m_ObjectHideFlags: 0 431 | m_CorrespondingSourceObject: {fileID: 0} 432 | m_PrefabInstance: {fileID: 0} 433 | m_PrefabAsset: {fileID: 0} 434 | m_GameObject: {fileID: 4439427585521970980} 435 | m_Enabled: 1 436 | m_CastShadows: 1 437 | m_ReceiveShadows: 1 438 | m_DynamicOccludee: 1 439 | m_MotionVectors: 1 440 | m_LightProbeUsage: 1 441 | m_ReflectionProbeUsage: 1 442 | m_RenderingLayerMask: 1 443 | m_RendererPriority: 0 444 | m_Materials: 445 | - {fileID: 2100000, guid: 45946d8b647302544916caeb0a068f1c, type: 2} 446 | m_StaticBatchInfo: 447 | firstSubMesh: 0 448 | subMeshCount: 0 449 | m_StaticBatchRoot: {fileID: 0} 450 | m_ProbeAnchor: {fileID: 7530920997909027560} 451 | m_LightProbeVolumeOverride: {fileID: 0} 452 | m_ScaleInLightmap: 1 453 | m_PreserveUVs: 0 454 | m_IgnoreNormalsForChartDetection: 0 455 | m_ImportantGI: 0 456 | m_StitchLightmapSeams: 0 457 | m_SelectedEditorRenderState: 3 458 | m_MinimumChartSize: 4 459 | m_AutoUVMaxDistance: 0.5 460 | m_AutoUVMaxAngle: 89 461 | m_LightmapParameters: {fileID: 0} 462 | m_SortingLayerID: 0 463 | m_SortingLayer: 0 464 | m_SortingOrder: 0 465 | --- !u!1 &4820059624518102975 466 | GameObject: 467 | m_ObjectHideFlags: 0 468 | m_CorrespondingSourceObject: {fileID: 0} 469 | m_PrefabInstance: {fileID: 0} 470 | m_PrefabAsset: {fileID: 0} 471 | serializedVersion: 6 472 | m_Component: 473 | - component: {fileID: 4772820624675725415} 474 | - component: {fileID: 8549267863545096175} 475 | - component: {fileID: 5864190370159787777} 476 | m_Layer: 0 477 | m_Name: Sphere_Geo 478 | m_TagString: Untagged 479 | m_Icon: {fileID: 0} 480 | m_NavMeshLayer: 0 481 | m_StaticEditorFlags: 0 482 | m_IsActive: 1 483 | --- !u!4 &4772820624675725415 484 | Transform: 485 | m_ObjectHideFlags: 0 486 | m_CorrespondingSourceObject: {fileID: 0} 487 | m_PrefabInstance: {fileID: 0} 488 | m_PrefabAsset: {fileID: 0} 489 | m_GameObject: {fileID: 4820059624518102975} 490 | m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071067} 491 | m_LocalPosition: {x: -0.43836194, y: 0.906, z: 0} 492 | m_LocalScale: {x: 0.27579, y: 0.2757899, z: 0.2757899} 493 | m_Children: [] 494 | m_Father: {fileID: 8126587651428850846} 495 | m_RootOrder: 2 496 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 497 | --- !u!33 &8549267863545096175 498 | MeshFilter: 499 | m_ObjectHideFlags: 0 500 | m_CorrespondingSourceObject: {fileID: 0} 501 | m_PrefabInstance: {fileID: 0} 502 | m_PrefabAsset: {fileID: 0} 503 | m_GameObject: {fileID: 4820059624518102975} 504 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 505 | --- !u!23 &5864190370159787777 506 | MeshRenderer: 507 | m_ObjectHideFlags: 0 508 | m_CorrespondingSourceObject: {fileID: 0} 509 | m_PrefabInstance: {fileID: 0} 510 | m_PrefabAsset: {fileID: 0} 511 | m_GameObject: {fileID: 4820059624518102975} 512 | m_Enabled: 1 513 | m_CastShadows: 1 514 | m_ReceiveShadows: 1 515 | m_DynamicOccludee: 1 516 | m_MotionVectors: 1 517 | m_LightProbeUsage: 1 518 | m_ReflectionProbeUsage: 1 519 | m_RenderingLayerMask: 1 520 | m_RendererPriority: 0 521 | m_Materials: 522 | - {fileID: 2100000, guid: d9f7b0dd13fb29e43815d69d04a5ee9b, type: 2} 523 | m_StaticBatchInfo: 524 | firstSubMesh: 0 525 | subMeshCount: 0 526 | m_StaticBatchRoot: {fileID: 0} 527 | m_ProbeAnchor: {fileID: 7530920997909027560} 528 | m_LightProbeVolumeOverride: {fileID: 0} 529 | m_ScaleInLightmap: 1 530 | m_PreserveUVs: 0 531 | m_IgnoreNormalsForChartDetection: 0 532 | m_ImportantGI: 0 533 | m_StitchLightmapSeams: 0 534 | m_SelectedEditorRenderState: 3 535 | m_MinimumChartSize: 4 536 | m_AutoUVMaxDistance: 0.5 537 | m_AutoUVMaxAngle: 89 538 | m_LightmapParameters: {fileID: 0} 539 | m_SortingLayerID: 0 540 | m_SortingLayer: 0 541 | m_SortingOrder: 0 542 | --- !u!1 &6028581811040421313 543 | GameObject: 544 | m_ObjectHideFlags: 0 545 | m_CorrespondingSourceObject: {fileID: 0} 546 | m_PrefabInstance: {fileID: 0} 547 | m_PrefabAsset: {fileID: 0} 548 | serializedVersion: 6 549 | m_Component: 550 | - component: {fileID: 3772828071018878239} 551 | - component: {fileID: 3899707388251393082} 552 | - component: {fileID: 3366512669058560650} 553 | m_Layer: 0 554 | m_Name: LabelsTop 555 | m_TagString: Untagged 556 | m_Icon: {fileID: 0} 557 | m_NavMeshLayer: 0 558 | m_StaticEditorFlags: 0 559 | m_IsActive: 1 560 | --- !u!4 &3772828071018878239 561 | Transform: 562 | m_ObjectHideFlags: 0 563 | m_CorrespondingSourceObject: {fileID: 0} 564 | m_PrefabInstance: {fileID: 0} 565 | m_PrefabAsset: {fileID: 0} 566 | m_GameObject: {fileID: 6028581811040421313} 567 | m_LocalRotation: {x: -0, y: -1, z: -0, w: -0.00000004371139} 568 | m_LocalPosition: {x: 0, y: 0.777, z: 0} 569 | m_LocalScale: {x: 0.039020736, y: 0.039020736, z: 0.039020736} 570 | m_Children: [] 571 | m_Father: {fileID: 8126587651428850846} 572 | m_RootOrder: 13 573 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 574 | --- !u!23 &3899707388251393082 575 | MeshRenderer: 576 | m_ObjectHideFlags: 0 577 | m_CorrespondingSourceObject: {fileID: 0} 578 | m_PrefabInstance: {fileID: 0} 579 | m_PrefabAsset: {fileID: 0} 580 | m_GameObject: {fileID: 6028581811040421313} 581 | m_Enabled: 1 582 | m_CastShadows: 1 583 | m_ReceiveShadows: 1 584 | m_DynamicOccludee: 1 585 | m_MotionVectors: 1 586 | m_LightProbeUsage: 1 587 | m_ReflectionProbeUsage: 1 588 | m_RenderingLayerMask: 1 589 | m_RendererPriority: 0 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!102 &3366512669058560650 612 | TextMesh: 613 | serializedVersion: 3 614 | m_ObjectHideFlags: 0 615 | m_CorrespondingSourceObject: {fileID: 0} 616 | m_PrefabInstance: {fileID: 0} 617 | m_PrefabAsset: {fileID: 0} 618 | m_GameObject: {fileID: 6028581811040421313} 619 | m_Text: ' Standard Geomerics Realtime' 620 | m_OffsetZ: 0 621 | m_CharacterSize: 1 622 | m_LineSpacing: 1 623 | m_Anchor: 0 624 | m_Alignment: 0 625 | m_TabSize: 4 626 | m_FontSize: 0 627 | m_FontStyle: 0 628 | m_RichText: 1 629 | m_Font: {fileID: 0} 630 | m_Color: 631 | serializedVersion: 2 632 | rgba: 4294967295 633 | --- !u!1 &6355900300329308752 634 | GameObject: 635 | m_ObjectHideFlags: 0 636 | m_CorrespondingSourceObject: {fileID: 0} 637 | m_PrefabInstance: {fileID: 0} 638 | m_PrefabAsset: {fileID: 0} 639 | serializedVersion: 6 640 | m_Component: 641 | - component: {fileID: 894193907313232186} 642 | - component: {fileID: 35314874779487036} 643 | - component: {fileID: 5485955346938029941} 644 | m_Layer: 0 645 | m_Name: Sphere_Wrap2 646 | m_TagString: Untagged 647 | m_Icon: {fileID: 0} 648 | m_NavMeshLayer: 0 649 | m_StaticEditorFlags: 0 650 | m_IsActive: 1 651 | --- !u!4 &894193907313232186 652 | Transform: 653 | m_ObjectHideFlags: 0 654 | m_CorrespondingSourceObject: {fileID: 0} 655 | m_PrefabInstance: {fileID: 0} 656 | m_PrefabAsset: {fileID: 0} 657 | m_GameObject: {fileID: 6355900300329308752} 658 | m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071067} 659 | m_LocalPosition: {x: -0.76118106, y: 0.37700003, z: 0} 660 | m_LocalScale: {x: 0.27579, y: 0.2757899, z: 0.2757899} 661 | m_Children: [] 662 | m_Father: {fileID: 8126587651428850846} 663 | m_RootOrder: 8 664 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 665 | --- !u!33 &35314874779487036 666 | MeshFilter: 667 | m_ObjectHideFlags: 0 668 | m_CorrespondingSourceObject: {fileID: 0} 669 | m_PrefabInstance: {fileID: 0} 670 | m_PrefabAsset: {fileID: 0} 671 | m_GameObject: {fileID: 6355900300329308752} 672 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 673 | --- !u!23 &5485955346938029941 674 | MeshRenderer: 675 | m_ObjectHideFlags: 0 676 | m_CorrespondingSourceObject: {fileID: 0} 677 | m_PrefabInstance: {fileID: 0} 678 | m_PrefabAsset: {fileID: 0} 679 | m_GameObject: {fileID: 6355900300329308752} 680 | m_Enabled: 1 681 | m_CastShadows: 1 682 | m_ReceiveShadows: 1 683 | m_DynamicOccludee: 1 684 | m_MotionVectors: 1 685 | m_LightProbeUsage: 1 686 | m_ReflectionProbeUsage: 1 687 | m_RenderingLayerMask: 1 688 | m_RendererPriority: 0 689 | m_Materials: 690 | - {fileID: 2100000, guid: c4f6c421bece8f44290f0d3986acf850, type: 2} 691 | m_StaticBatchInfo: 692 | firstSubMesh: 0 693 | subMeshCount: 0 694 | m_StaticBatchRoot: {fileID: 0} 695 | m_ProbeAnchor: {fileID: 7530920997909027560} 696 | m_LightProbeVolumeOverride: {fileID: 0} 697 | m_ScaleInLightmap: 1 698 | m_PreserveUVs: 0 699 | m_IgnoreNormalsForChartDetection: 0 700 | m_ImportantGI: 0 701 | m_StitchLightmapSeams: 0 702 | m_SelectedEditorRenderState: 3 703 | m_MinimumChartSize: 4 704 | m_AutoUVMaxDistance: 0.5 705 | m_AutoUVMaxAngle: 89 706 | m_LightmapParameters: {fileID: 0} 707 | m_SortingLayerID: 0 708 | m_SortingLayer: 0 709 | m_SortingOrder: 0 710 | --- !u!1 &6495809783245762289 711 | GameObject: 712 | m_ObjectHideFlags: 0 713 | m_CorrespondingSourceObject: {fileID: 0} 714 | m_PrefabInstance: {fileID: 0} 715 | m_PrefabAsset: {fileID: 0} 716 | serializedVersion: 6 717 | m_Component: 718 | - component: {fileID: 7530920997909027560} 719 | m_Layer: 0 720 | m_Name: Anchor 721 | m_TagString: Untagged 722 | m_Icon: {fileID: 0} 723 | m_NavMeshLayer: 0 724 | m_StaticEditorFlags: 0 725 | m_IsActive: 1 726 | --- !u!4 &7530920997909027560 727 | Transform: 728 | m_ObjectHideFlags: 0 729 | m_CorrespondingSourceObject: {fileID: 0} 730 | m_PrefabInstance: {fileID: 0} 731 | m_PrefabAsset: {fileID: 0} 732 | m_GameObject: {fileID: 6495809783245762289} 733 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 734 | m_LocalPosition: {x: -0.458, y: 0.45, z: 0} 735 | m_LocalScale: {x: 1, y: 1, z: 1} 736 | m_Children: [] 737 | m_Father: {fileID: 8126587651428850846} 738 | m_RootOrder: 12 739 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 740 | --- !u!1 &7144427064884266960 741 | GameObject: 742 | m_ObjectHideFlags: 0 743 | m_CorrespondingSourceObject: {fileID: 0} 744 | m_PrefabInstance: {fileID: 0} 745 | m_PrefabAsset: {fileID: 0} 746 | serializedVersion: 6 747 | m_Component: 748 | - component: {fileID: 8268162982686450949} 749 | - component: {fileID: 5417282855836037948} 750 | - component: {fileID: 3208632141747529270} 751 | m_Layer: 0 752 | m_Name: Sphere_Wrap1 753 | m_TagString: Untagged 754 | m_Icon: {fileID: 0} 755 | m_NavMeshLayer: 0 756 | m_StaticEditorFlags: 0 757 | m_IsActive: 1 758 | --- !u!4 &8268162982686450949 759 | Transform: 760 | m_ObjectHideFlags: 0 761 | m_CorrespondingSourceObject: {fileID: 0} 762 | m_PrefabInstance: {fileID: 0} 763 | m_PrefabAsset: {fileID: 0} 764 | m_GameObject: {fileID: 7144427064884266960} 765 | m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071067} 766 | m_LocalPosition: {x: -0.45136213, y: 0.37700003, z: 0} 767 | m_LocalScale: {x: 0.27579, y: 0.2757899, z: 0.2757899} 768 | m_Children: [] 769 | m_Father: {fileID: 8126587651428850846} 770 | m_RootOrder: 6 771 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 772 | --- !u!33 &5417282855836037948 773 | MeshFilter: 774 | m_ObjectHideFlags: 0 775 | m_CorrespondingSourceObject: {fileID: 0} 776 | m_PrefabInstance: {fileID: 0} 777 | m_PrefabAsset: {fileID: 0} 778 | m_GameObject: {fileID: 7144427064884266960} 779 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 780 | --- !u!23 &3208632141747529270 781 | MeshRenderer: 782 | m_ObjectHideFlags: 0 783 | m_CorrespondingSourceObject: {fileID: 0} 784 | m_PrefabInstance: {fileID: 0} 785 | m_PrefabAsset: {fileID: 0} 786 | m_GameObject: {fileID: 7144427064884266960} 787 | m_Enabled: 1 788 | m_CastShadows: 1 789 | m_ReceiveShadows: 1 790 | m_DynamicOccludee: 1 791 | m_MotionVectors: 1 792 | m_LightProbeUsage: 1 793 | m_ReflectionProbeUsage: 1 794 | m_RenderingLayerMask: 1 795 | m_RendererPriority: 0 796 | m_Materials: 797 | - {fileID: 2100000, guid: bc4639d626b58474491d451fc09565e4, type: 2} 798 | m_StaticBatchInfo: 799 | firstSubMesh: 0 800 | subMeshCount: 0 801 | m_StaticBatchRoot: {fileID: 0} 802 | m_ProbeAnchor: {fileID: 7530920997909027560} 803 | m_LightProbeVolumeOverride: {fileID: 0} 804 | m_ScaleInLightmap: 1 805 | m_PreserveUVs: 0 806 | m_IgnoreNormalsForChartDetection: 0 807 | m_ImportantGI: 0 808 | m_StitchLightmapSeams: 0 809 | m_SelectedEditorRenderState: 3 810 | m_MinimumChartSize: 4 811 | m_AutoUVMaxDistance: 0.5 812 | m_AutoUVMaxAngle: 89 813 | m_LightmapParameters: {fileID: 0} 814 | m_SortingLayerID: 0 815 | m_SortingLayer: 0 816 | m_SortingOrder: 0 817 | --- !u!1 &8249025029357360189 818 | GameObject: 819 | m_ObjectHideFlags: 0 820 | m_CorrespondingSourceObject: {fileID: 0} 821 | m_PrefabInstance: {fileID: 0} 822 | m_PrefabAsset: {fileID: 0} 823 | serializedVersion: 6 824 | m_Component: 825 | - component: {fileID: 5988052399374064254} 826 | - component: {fileID: 4621498912418131907} 827 | - component: {fileID: 8152202631950080873} 828 | m_Layer: 0 829 | m_Name: Sphere_RT 830 | m_TagString: Untagged 831 | m_Icon: {fileID: 0} 832 | m_NavMeshLayer: 0 833 | m_StaticEditorFlags: 0 834 | m_IsActive: 1 835 | --- !u!4 &5988052399374064254 836 | Transform: 837 | m_ObjectHideFlags: 0 838 | m_CorrespondingSourceObject: {fileID: 0} 839 | m_PrefabInstance: {fileID: 0} 840 | m_PrefabAsset: {fileID: 0} 841 | m_GameObject: {fileID: 8249025029357360189} 842 | m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071067} 843 | m_LocalPosition: {x: -0.76318103, y: 0.9060001, z: 0} 844 | m_LocalScale: {x: 0.27579, y: 0.2757899, z: 0.2757899} 845 | m_Children: [] 846 | m_Father: {fileID: 8126587651428850846} 847 | m_RootOrder: 10 848 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 849 | --- !u!33 &4621498912418131907 850 | MeshFilter: 851 | m_ObjectHideFlags: 0 852 | m_CorrespondingSourceObject: {fileID: 0} 853 | m_PrefabInstance: {fileID: 0} 854 | m_PrefabAsset: {fileID: 0} 855 | m_GameObject: {fileID: 8249025029357360189} 856 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 857 | --- !u!23 &8152202631950080873 858 | MeshRenderer: 859 | m_ObjectHideFlags: 0 860 | m_CorrespondingSourceObject: {fileID: 0} 861 | m_PrefabInstance: {fileID: 0} 862 | m_PrefabAsset: {fileID: 0} 863 | m_GameObject: {fileID: 8249025029357360189} 864 | m_Enabled: 1 865 | m_CastShadows: 1 866 | m_ReceiveShadows: 1 867 | m_DynamicOccludee: 1 868 | m_MotionVectors: 1 869 | m_LightProbeUsage: 1 870 | m_ReflectionProbeUsage: 1 871 | m_RenderingLayerMask: 1 872 | m_RendererPriority: 0 873 | m_Materials: 874 | - {fileID: 2100000, guid: a72540f7c92e7a342a8aaa0fe210e230, type: 2} 875 | m_StaticBatchInfo: 876 | firstSubMesh: 0 877 | subMeshCount: 0 878 | m_StaticBatchRoot: {fileID: 0} 879 | m_ProbeAnchor: {fileID: 7530920997909027560} 880 | m_LightProbeVolumeOverride: {fileID: 0} 881 | m_ScaleInLightmap: 1 882 | m_PreserveUVs: 0 883 | m_IgnoreNormalsForChartDetection: 0 884 | m_ImportantGI: 0 885 | m_StitchLightmapSeams: 0 886 | m_SelectedEditorRenderState: 3 887 | m_MinimumChartSize: 4 888 | m_AutoUVMaxDistance: 0.5 889 | m_AutoUVMaxAngle: 89 890 | m_LightmapParameters: {fileID: 0} 891 | m_SortingLayerID: 0 892 | m_SortingLayer: 0 893 | m_SortingOrder: 0 894 | --- !u!1 &8366755412556431567 895 | GameObject: 896 | m_ObjectHideFlags: 0 897 | m_CorrespondingSourceObject: {fileID: 0} 898 | m_PrefabInstance: {fileID: 0} 899 | m_PrefabAsset: {fileID: 0} 900 | serializedVersion: 6 901 | m_Component: 902 | - component: {fileID: 8580568087338286461} 903 | - component: {fileID: 2425722425500585971} 904 | - component: {fileID: 8215088869038420709} 905 | m_Layer: 0 906 | m_Name: Quad_Wrap0 907 | m_TagString: Untagged 908 | m_Icon: {fileID: 0} 909 | m_NavMeshLayer: 0 910 | m_StaticEditorFlags: 0 911 | m_IsActive: 1 912 | --- !u!4 &8580568087338286461 913 | Transform: 914 | m_ObjectHideFlags: 0 915 | m_CorrespondingSourceObject: {fileID: 0} 916 | m_PrefabInstance: {fileID: 0} 917 | m_PrefabAsset: {fileID: 0} 918 | m_GameObject: {fileID: 8366755412556431567} 919 | m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000004371139} 920 | m_LocalPosition: {x: -0.13636208, y: 0.109, z: 0} 921 | m_LocalScale: {x: 0.27021942, y: 0.17505097, z: 0.3045} 922 | m_Children: [] 923 | m_Father: {fileID: 8126587651428850846} 924 | m_RootOrder: 5 925 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 926 | --- !u!33 &2425722425500585971 927 | MeshFilter: 928 | m_ObjectHideFlags: 0 929 | m_CorrespondingSourceObject: {fileID: 0} 930 | m_PrefabInstance: {fileID: 0} 931 | m_PrefabAsset: {fileID: 0} 932 | m_GameObject: {fileID: 8366755412556431567} 933 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 934 | --- !u!23 &8215088869038420709 935 | MeshRenderer: 936 | m_ObjectHideFlags: 0 937 | m_CorrespondingSourceObject: {fileID: 0} 938 | m_PrefabInstance: {fileID: 0} 939 | m_PrefabAsset: {fileID: 0} 940 | m_GameObject: {fileID: 8366755412556431567} 941 | m_Enabled: 1 942 | m_CastShadows: 1 943 | m_ReceiveShadows: 1 944 | m_DynamicOccludee: 1 945 | m_MotionVectors: 1 946 | m_LightProbeUsage: 1 947 | m_ReflectionProbeUsage: 1 948 | m_RenderingLayerMask: 1 949 | m_RendererPriority: 0 950 | m_Materials: 951 | - {fileID: 2100000, guid: 940b4c42da544c04e8af303d08bd6a72, type: 2} 952 | m_StaticBatchInfo: 953 | firstSubMesh: 0 954 | subMeshCount: 0 955 | m_StaticBatchRoot: {fileID: 0} 956 | m_ProbeAnchor: {fileID: 7530920997909027560} 957 | m_LightProbeVolumeOverride: {fileID: 0} 958 | m_ScaleInLightmap: 1 959 | m_PreserveUVs: 0 960 | m_IgnoreNormalsForChartDetection: 0 961 | m_ImportantGI: 0 962 | m_StitchLightmapSeams: 0 963 | m_SelectedEditorRenderState: 3 964 | m_MinimumChartSize: 4 965 | m_AutoUVMaxDistance: 0.5 966 | m_AutoUVMaxAngle: 89 967 | m_LightmapParameters: {fileID: 0} 968 | m_SortingLayerID: 0 969 | m_SortingLayer: 0 970 | m_SortingOrder: 0 971 | --- !u!1 &8369411858488373333 972 | GameObject: 973 | m_ObjectHideFlags: 0 974 | m_CorrespondingSourceObject: {fileID: 0} 975 | m_PrefabInstance: {fileID: 0} 976 | m_PrefabAsset: {fileID: 0} 977 | serializedVersion: 6 978 | m_Component: 979 | - component: {fileID: 1367494592946907113} 980 | - component: {fileID: 18325711257478630} 981 | - component: {fileID: 7345567434660917393} 982 | m_Layer: 0 983 | m_Name: Quad_Wrap1 984 | m_TagString: Untagged 985 | m_Icon: {fileID: 0} 986 | m_NavMeshLayer: 0 987 | m_StaticEditorFlags: 0 988 | m_IsActive: 1 989 | --- !u!4 &1367494592946907113 990 | Transform: 991 | m_ObjectHideFlags: 0 992 | m_CorrespondingSourceObject: {fileID: 0} 993 | m_PrefabInstance: {fileID: 0} 994 | m_PrefabAsset: {fileID: 0} 995 | m_GameObject: {fileID: 8369411858488373333} 996 | m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000004371139} 997 | m_LocalPosition: {x: -0.44418103, y: 0.10899997, z: 0} 998 | m_LocalScale: {x: 0.27021942, y: 0.17505097, z: 0.3045} 999 | m_Children: [] 1000 | m_Father: {fileID: 8126587651428850846} 1001 | m_RootOrder: 7 1002 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1003 | --- !u!33 &18325711257478630 1004 | MeshFilter: 1005 | m_ObjectHideFlags: 0 1006 | m_CorrespondingSourceObject: {fileID: 0} 1007 | m_PrefabInstance: {fileID: 0} 1008 | m_PrefabAsset: {fileID: 0} 1009 | m_GameObject: {fileID: 8369411858488373333} 1010 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 1011 | --- !u!23 &7345567434660917393 1012 | MeshRenderer: 1013 | m_ObjectHideFlags: 0 1014 | m_CorrespondingSourceObject: {fileID: 0} 1015 | m_PrefabInstance: {fileID: 0} 1016 | m_PrefabAsset: {fileID: 0} 1017 | m_GameObject: {fileID: 8369411858488373333} 1018 | m_Enabled: 1 1019 | m_CastShadows: 1 1020 | m_ReceiveShadows: 1 1021 | m_DynamicOccludee: 1 1022 | m_MotionVectors: 1 1023 | m_LightProbeUsage: 1 1024 | m_ReflectionProbeUsage: 1 1025 | m_RenderingLayerMask: 1 1026 | m_RendererPriority: 0 1027 | m_Materials: 1028 | - {fileID: 2100000, guid: 8bab33338d3075a4db098b1940ff9a03, type: 2} 1029 | m_StaticBatchInfo: 1030 | firstSubMesh: 0 1031 | subMeshCount: 0 1032 | m_StaticBatchRoot: {fileID: 0} 1033 | m_ProbeAnchor: {fileID: 7530920997909027560} 1034 | m_LightProbeVolumeOverride: {fileID: 0} 1035 | m_ScaleInLightmap: 1 1036 | m_PreserveUVs: 0 1037 | m_IgnoreNormalsForChartDetection: 0 1038 | m_ImportantGI: 0 1039 | m_StitchLightmapSeams: 0 1040 | m_SelectedEditorRenderState: 3 1041 | m_MinimumChartSize: 4 1042 | m_AutoUVMaxDistance: 0.5 1043 | m_AutoUVMaxAngle: 89 1044 | m_LightmapParameters: {fileID: 0} 1045 | m_SortingLayerID: 0 1046 | m_SortingLayer: 0 1047 | m_SortingOrder: 0 1048 | --- !u!1 &9077773363998754303 1049 | GameObject: 1050 | m_ObjectHideFlags: 0 1051 | m_CorrespondingSourceObject: {fileID: 0} 1052 | m_PrefabInstance: {fileID: 0} 1053 | m_PrefabAsset: {fileID: 0} 1054 | serializedVersion: 6 1055 | m_Component: 1056 | - component: {fileID: 7607565912405472538} 1057 | - component: {fileID: 3371185761972501069} 1058 | - component: {fileID: 2582978002108924170} 1059 | m_Layer: 0 1060 | m_Name: LabelsBottom 1061 | m_TagString: Untagged 1062 | m_Icon: {fileID: 0} 1063 | m_NavMeshLayer: 0 1064 | m_StaticEditorFlags: 0 1065 | m_IsActive: 1 1066 | --- !u!4 &7607565912405472538 1067 | Transform: 1068 | m_ObjectHideFlags: 0 1069 | m_CorrespondingSourceObject: {fileID: 0} 1070 | m_PrefabInstance: {fileID: 0} 1071 | m_PrefabAsset: {fileID: 0} 1072 | m_GameObject: {fileID: 9077773363998754303} 1073 | m_LocalRotation: {x: -0, y: -1, z: -0, w: -0.00000004371139} 1074 | m_LocalPosition: {x: 0, y: 0.249, z: 0} 1075 | m_LocalScale: {x: 0.035, y: 0.035, z: 0.035} 1076 | m_Children: [] 1077 | m_Father: {fileID: 8126587651428850846} 1078 | m_RootOrder: 14 1079 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1080 | --- !u!23 &3371185761972501069 1081 | MeshRenderer: 1082 | m_ObjectHideFlags: 0 1083 | m_CorrespondingSourceObject: {fileID: 0} 1084 | m_PrefabInstance: {fileID: 0} 1085 | m_PrefabAsset: {fileID: 0} 1086 | m_GameObject: {fileID: 9077773363998754303} 1087 | m_Enabled: 1 1088 | m_CastShadows: 1 1089 | m_ReceiveShadows: 1 1090 | m_DynamicOccludee: 1 1091 | m_MotionVectors: 1 1092 | m_LightProbeUsage: 1 1093 | m_ReflectionProbeUsage: 1 1094 | m_RenderingLayerMask: 1 1095 | m_RendererPriority: 0 1096 | m_Materials: 1097 | - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} 1098 | m_StaticBatchInfo: 1099 | firstSubMesh: 0 1100 | subMeshCount: 0 1101 | m_StaticBatchRoot: {fileID: 0} 1102 | m_ProbeAnchor: {fileID: 0} 1103 | m_LightProbeVolumeOverride: {fileID: 0} 1104 | m_ScaleInLightmap: 1 1105 | m_PreserveUVs: 0 1106 | m_IgnoreNormalsForChartDetection: 0 1107 | m_ImportantGI: 0 1108 | m_StitchLightmapSeams: 0 1109 | m_SelectedEditorRenderState: 3 1110 | m_MinimumChartSize: 4 1111 | m_AutoUVMaxDistance: 0.5 1112 | m_AutoUVMaxAngle: 89 1113 | m_LightmapParameters: {fileID: 0} 1114 | m_SortingLayerID: 0 1115 | m_SortingLayer: 0 1116 | m_SortingOrder: 0 1117 | --- !u!102 &2582978002108924170 1118 | TextMesh: 1119 | serializedVersion: 3 1120 | m_ObjectHideFlags: 0 1121 | m_CorrespondingSourceObject: {fileID: 0} 1122 | m_PrefabInstance: {fileID: 0} 1123 | m_PrefabAsset: {fileID: 0} 1124 | m_GameObject: {fileID: 9077773363998754303} 1125 | m_Text: ' Green`s Green`s Correct Generalised' 1126 | m_OffsetZ: 0 1127 | m_CharacterSize: 1 1128 | m_LineSpacing: 1 1129 | m_Anchor: 0 1130 | m_Alignment: 0 1131 | m_TabSize: 4 1132 | m_FontSize: 0 1133 | m_FontStyle: 0 1134 | m_RichText: 1 1135 | m_Font: {fileID: 0} 1136 | m_Color: 1137 | serializedVersion: 2 1138 | rgba: 4294967295 1139 | --- !u!1 &9078480317570080455 1140 | GameObject: 1141 | m_ObjectHideFlags: 0 1142 | m_CorrespondingSourceObject: {fileID: 0} 1143 | m_PrefabInstance: {fileID: 0} 1144 | m_PrefabAsset: {fileID: 0} 1145 | serializedVersion: 6 1146 | m_Component: 1147 | - component: {fileID: 8126587651428850846} 1148 | - component: {fileID: 2211515587113960104} 1149 | m_Layer: 0 1150 | m_Name: SHTester 1151 | m_TagString: Untagged 1152 | m_Icon: {fileID: 0} 1153 | m_NavMeshLayer: 0 1154 | m_StaticEditorFlags: 0 1155 | m_IsActive: 1 1156 | --- !u!4 &8126587651428850846 1157 | Transform: 1158 | m_ObjectHideFlags: 0 1159 | m_CorrespondingSourceObject: {fileID: 0} 1160 | m_PrefabInstance: {fileID: 0} 1161 | m_PrefabAsset: {fileID: 0} 1162 | m_GameObject: {fileID: 9078480317570080455} 1163 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1164 | m_LocalPosition: {x: 0, y: 0, z: 0} 1165 | m_LocalScale: {x: 1, y: 1, z: 1} 1166 | m_Children: 1167 | - {fileID: 7747176614047181591} 1168 | - {fileID: 6273204826613228105} 1169 | - {fileID: 4772820624675725415} 1170 | - {fileID: 3483213369458452198} 1171 | - {fileID: 5236043830652489148} 1172 | - {fileID: 8580568087338286461} 1173 | - {fileID: 8268162982686450949} 1174 | - {fileID: 1367494592946907113} 1175 | - {fileID: 894193907313232186} 1176 | - {fileID: 7854035356078915502} 1177 | - {fileID: 5988052399374064254} 1178 | - {fileID: 7919926707769003366} 1179 | - {fileID: 7530920997909027560} 1180 | - {fileID: 3772828071018878239} 1181 | - {fileID: 7607565912405472538} 1182 | m_Father: {fileID: 0} 1183 | m_RootOrder: 0 1184 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1185 | --- !u!114 &2211515587113960104 1186 | MonoBehaviour: 1187 | m_ObjectHideFlags: 0 1188 | m_CorrespondingSourceObject: {fileID: 0} 1189 | m_PrefabInstance: {fileID: 0} 1190 | m_PrefabAsset: {fileID: 0} 1191 | m_GameObject: {fileID: 9078480317570080455} 1192 | m_Enabled: 1 1193 | m_EditorHideFlags: 0 1194 | m_Script: {fileID: 11500000, guid: 7ecfdb6dd2e454f47918676c371c1b0c, type: 3} 1195 | m_Name: 1196 | m_EditorClassIdentifier: 1197 | anchor: {fileID: 7530920997909027560} 1198 | SH: 1199 | - {x: 0, y: 0, z: 0} 1200 | - {x: 0, y: 0, z: 0} 1201 | - {x: 0, y: 0, z: 0} 1202 | - {x: 0, y: 0, z: 0} 1203 | - {x: 0, y: 0, z: 0} 1204 | - {x: 0, y: 0, z: 0} 1205 | - {x: 0, y: 0, z: 0} 1206 | - {x: 0, y: 0, z: 0} 1207 | - {x: 0, y: 0, z: 0} 1208 | L0: {x: 0, y: 0, z: 0} 1209 | unity_SHAr: {x: 0, y: 0, z: 0, w: 0} 1210 | unity_SHAg: {x: 0, y: 0, z: 0, w: 0} 1211 | unity_SHAb: {x: 0, y: 0, z: 0, w: 0} 1212 | unity_SHBr: {x: 0, y: 0, z: 0, w: 0} 1213 | unity_SHBg: {x: 0, y: 0, z: 0, w: 0} 1214 | unity_SHBb: {x: 0, y: 0, z: 0, w: 0} 1215 | unity_SHC: {x: 0, y: 0, z: 0, w: 1} 1216 | -------------------------------------------------------------------------------- /SH/SHTester.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3972933c81df5c408bf2bcb45317cd0 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /SH/_Scene.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: 9 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, g: 0, b: 0, 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: 3 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 2100000, guid: a22cbc3f3fa3fca4683e9767a9ead424, type: 2} 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.2139894, g: 0.2139894, b: 0.2139894, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 10 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_FinalGather: 0 70 | m_FinalGatherFiltering: 1 71 | m_FinalGatherRayCount: 256 72 | m_ReflectionCompression: 2 73 | m_MixedBakeMode: 2 74 | m_BakeBackend: 1 75 | m_PVRSampling: 1 76 | m_PVRDirectSampleCount: 32 77 | m_PVRSampleCount: 500 78 | m_PVRBounces: 2 79 | m_PVRFilterTypeDirect: 0 80 | m_PVRFilterTypeIndirect: 0 81 | m_PVRFilterTypeAO: 0 82 | m_PVRFilteringMode: 1 83 | m_PVRCulling: 1 84 | m_PVRFilteringGaussRadiusDirect: 1 85 | m_PVRFilteringGaussRadiusIndirect: 5 86 | m_PVRFilteringGaussRadiusAO: 2 87 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 88 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 89 | m_PVRFilteringAtrousPositionSigmaAO: 1 90 | m_ShowResolutionOverlay: 1 91 | m_LightingDataAsset: {fileID: 0} 92 | m_UseShadowmask: 1 93 | --- !u!196 &4 94 | NavMeshSettings: 95 | serializedVersion: 2 96 | m_ObjectHideFlags: 0 97 | m_BuildSettings: 98 | serializedVersion: 2 99 | agentTypeID: 0 100 | agentRadius: 0.5 101 | agentHeight: 2 102 | agentSlope: 45 103 | agentClimb: 0.4 104 | ledgeDropHeight: 0 105 | maxJumpAcrossDistance: 0 106 | minRegionArea: 2 107 | manualCellSize: 0 108 | cellSize: 0.16666667 109 | manualTileSize: 0 110 | tileSize: 256 111 | accuratePlacement: 0 112 | debug: 113 | m_Flags: 0 114 | m_NavMeshData: {fileID: 0} 115 | --- !u!1 &345954912 116 | GameObject: 117 | m_ObjectHideFlags: 0 118 | m_CorrespondingSourceObject: {fileID: 0} 119 | m_PrefabInstance: {fileID: 0} 120 | m_PrefabAsset: {fileID: 0} 121 | serializedVersion: 6 122 | m_Component: 123 | - component: {fileID: 345954914} 124 | - component: {fileID: 345954913} 125 | m_Layer: 0 126 | m_Name: DirLight_Baked-Z 127 | m_TagString: Untagged 128 | m_Icon: {fileID: 0} 129 | m_NavMeshLayer: 0 130 | m_StaticEditorFlags: 0 131 | m_IsActive: 0 132 | --- !u!108 &345954913 133 | Light: 134 | m_ObjectHideFlags: 0 135 | m_CorrespondingSourceObject: {fileID: 0} 136 | m_PrefabInstance: {fileID: 0} 137 | m_PrefabAsset: {fileID: 0} 138 | m_GameObject: {fileID: 345954912} 139 | m_Enabled: 1 140 | serializedVersion: 8 141 | m_Type: 1 142 | m_Color: {r: 0, g: 0, b: 1, a: 1} 143 | m_Intensity: 1 144 | m_Range: 10 145 | m_SpotAngle: 30 146 | m_CookieSize: 10 147 | m_Shadows: 148 | m_Type: 0 149 | m_Resolution: -1 150 | m_CustomResolution: -1 151 | m_Strength: 1 152 | m_Bias: 0.05 153 | m_NormalBias: 0.4 154 | m_NearPlane: 0.2 155 | m_Cookie: {fileID: 0} 156 | m_DrawHalo: 0 157 | m_Flare: {fileID: 0} 158 | m_RenderMode: 0 159 | m_CullingMask: 160 | serializedVersion: 2 161 | m_Bits: 4294967295 162 | m_Lightmapping: 2 163 | m_LightShadowCasterMode: 0 164 | m_AreaSize: {x: 1, y: 1} 165 | m_BounceIntensity: 1 166 | m_ColorTemperature: 6570 167 | m_UseColorTemperature: 0 168 | m_ShadowRadius: 0 169 | m_ShadowAngle: 0 170 | --- !u!4 &345954914 171 | Transform: 172 | m_ObjectHideFlags: 0 173 | m_CorrespondingSourceObject: {fileID: 0} 174 | m_PrefabInstance: {fileID: 0} 175 | m_PrefabAsset: {fileID: 0} 176 | m_GameObject: {fileID: 345954912} 177 | m_LocalRotation: {x: 1, y: 0, z: 0, w: -0.00000004371139} 178 | m_LocalPosition: {x: 0, y: 0, z: 0} 179 | m_LocalScale: {x: 1, y: 1, z: 1} 180 | m_Children: [] 181 | m_Father: {fileID: 0} 182 | m_RootOrder: 6 183 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 184 | --- !u!1 &426194438 185 | GameObject: 186 | m_ObjectHideFlags: 0 187 | m_CorrespondingSourceObject: {fileID: 0} 188 | m_PrefabInstance: {fileID: 0} 189 | m_PrefabAsset: {fileID: 0} 190 | serializedVersion: 6 191 | m_Component: 192 | - component: {fileID: 426194440} 193 | - component: {fileID: 426194439} 194 | m_Layer: 0 195 | m_Name: DirLight_Baked-X 196 | m_TagString: Untagged 197 | m_Icon: {fileID: 0} 198 | m_NavMeshLayer: 0 199 | m_StaticEditorFlags: 0 200 | m_IsActive: 0 201 | --- !u!108 &426194439 202 | Light: 203 | m_ObjectHideFlags: 0 204 | m_CorrespondingSourceObject: {fileID: 0} 205 | m_PrefabInstance: {fileID: 0} 206 | m_PrefabAsset: {fileID: 0} 207 | m_GameObject: {fileID: 426194438} 208 | m_Enabled: 1 209 | serializedVersion: 8 210 | m_Type: 1 211 | m_Color: {r: 1, g: 0, b: 0, a: 1} 212 | m_Intensity: 1 213 | m_Range: 10 214 | m_SpotAngle: 30 215 | m_CookieSize: 10 216 | m_Shadows: 217 | m_Type: 0 218 | m_Resolution: -1 219 | m_CustomResolution: -1 220 | m_Strength: 1 221 | m_Bias: 0.05 222 | m_NormalBias: 0.4 223 | m_NearPlane: 0.2 224 | m_Cookie: {fileID: 0} 225 | m_DrawHalo: 0 226 | m_Flare: {fileID: 0} 227 | m_RenderMode: 0 228 | m_CullingMask: 229 | serializedVersion: 2 230 | m_Bits: 4294967295 231 | m_Lightmapping: 2 232 | m_LightShadowCasterMode: 0 233 | m_AreaSize: {x: 1, y: 1} 234 | m_BounceIntensity: 1 235 | m_ColorTemperature: 6570 236 | m_UseColorTemperature: 0 237 | m_ShadowRadius: 0 238 | m_ShadowAngle: 0 239 | --- !u!4 &426194440 240 | Transform: 241 | m_ObjectHideFlags: 0 242 | m_CorrespondingSourceObject: {fileID: 0} 243 | m_PrefabInstance: {fileID: 0} 244 | m_PrefabAsset: {fileID: 0} 245 | m_GameObject: {fileID: 426194438} 246 | m_LocalRotation: {x: 0, y: -0.7071068, z: 0, w: 0.7071068} 247 | m_LocalPosition: {x: 0, y: 0, z: 0} 248 | m_LocalScale: {x: 1, y: 1, z: 1} 249 | m_Children: [] 250 | m_Father: {fileID: 0} 251 | m_RootOrder: 4 252 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 253 | --- !u!1 &434829963 254 | GameObject: 255 | m_ObjectHideFlags: 0 256 | m_CorrespondingSourceObject: {fileID: 0} 257 | m_PrefabInstance: {fileID: 0} 258 | m_PrefabAsset: {fileID: 0} 259 | serializedVersion: 6 260 | m_Component: 261 | - component: {fileID: 434829966} 262 | - component: {fileID: 434829965} 263 | - component: {fileID: 434829964} 264 | m_Layer: 0 265 | m_Name: Main Camera 266 | m_TagString: MainCamera 267 | m_Icon: {fileID: 0} 268 | m_NavMeshLayer: 0 269 | m_StaticEditorFlags: 0 270 | m_IsActive: 1 271 | --- !u!81 &434829964 272 | AudioListener: 273 | m_ObjectHideFlags: 0 274 | m_CorrespondingSourceObject: {fileID: 0} 275 | m_PrefabInstance: {fileID: 0} 276 | m_PrefabAsset: {fileID: 0} 277 | m_GameObject: {fileID: 434829963} 278 | m_Enabled: 1 279 | --- !u!20 &434829965 280 | Camera: 281 | m_ObjectHideFlags: 0 282 | m_CorrespondingSourceObject: {fileID: 0} 283 | m_PrefabInstance: {fileID: 0} 284 | m_PrefabAsset: {fileID: 0} 285 | m_GameObject: {fileID: 434829963} 286 | m_Enabled: 1 287 | serializedVersion: 2 288 | m_ClearFlags: 1 289 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 290 | m_projectionMatrixMode: 1 291 | m_SensorSize: {x: 36, y: 24} 292 | m_LensShift: {x: 0, y: 0} 293 | m_GateFitMode: 2 294 | m_FocalLength: 50 295 | m_NormalizedViewPortRect: 296 | serializedVersion: 2 297 | x: 0 298 | y: 0 299 | width: 1 300 | height: 1 301 | near clip plane: 0.3 302 | far clip plane: 1000 303 | field of view: 60 304 | orthographic: 0 305 | orthographic size: 5 306 | m_Depth: -1 307 | m_CullingMask: 308 | serializedVersion: 2 309 | m_Bits: 4294967295 310 | m_RenderingPath: -1 311 | m_TargetTexture: {fileID: 0} 312 | m_TargetDisplay: 0 313 | m_TargetEye: 3 314 | m_HDR: 1 315 | m_AllowMSAA: 1 316 | m_AllowDynamicResolution: 0 317 | m_ForceIntoRT: 0 318 | m_OcclusionCulling: 1 319 | m_StereoConvergence: 10 320 | m_StereoSeparation: 0.022 321 | --- !u!4 &434829966 322 | Transform: 323 | m_ObjectHideFlags: 0 324 | m_CorrespondingSourceObject: {fileID: 0} 325 | m_PrefabInstance: {fileID: 0} 326 | m_PrefabAsset: {fileID: 0} 327 | m_GameObject: {fileID: 434829963} 328 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 329 | m_LocalPosition: {x: 0, y: 0.55, z: -1.43} 330 | m_LocalScale: {x: 1, y: 1, z: 1} 331 | m_Children: [] 332 | m_Father: {fileID: 0} 333 | m_RootOrder: 0 334 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 335 | --- !u!1 &791186328 336 | GameObject: 337 | m_ObjectHideFlags: 0 338 | m_CorrespondingSourceObject: {fileID: 0} 339 | m_PrefabInstance: {fileID: 0} 340 | m_PrefabAsset: {fileID: 0} 341 | serializedVersion: 6 342 | m_Component: 343 | - component: {fileID: 791186330} 344 | - component: {fileID: 791186329} 345 | m_Layer: 0 346 | m_Name: DirLight_Baked_W 347 | m_TagString: Untagged 348 | m_Icon: {fileID: 0} 349 | m_NavMeshLayer: 0 350 | m_StaticEditorFlags: 0 351 | m_IsActive: 1 352 | --- !u!108 &791186329 353 | Light: 354 | m_ObjectHideFlags: 0 355 | m_CorrespondingSourceObject: {fileID: 0} 356 | m_PrefabInstance: {fileID: 0} 357 | m_PrefabAsset: {fileID: 0} 358 | m_GameObject: {fileID: 791186328} 359 | m_Enabled: 1 360 | serializedVersion: 8 361 | m_Type: 1 362 | m_Color: {r: 1, g: 1, b: 1, a: 1} 363 | m_Intensity: 1 364 | m_Range: 10 365 | m_SpotAngle: 30 366 | m_CookieSize: 10 367 | m_Shadows: 368 | m_Type: 0 369 | m_Resolution: -1 370 | m_CustomResolution: -1 371 | m_Strength: 1 372 | m_Bias: 0.05 373 | m_NormalBias: 0.4 374 | m_NearPlane: 0.2 375 | m_Cookie: {fileID: 0} 376 | m_DrawHalo: 0 377 | m_Flare: {fileID: 0} 378 | m_RenderMode: 0 379 | m_CullingMask: 380 | serializedVersion: 2 381 | m_Bits: 4294967295 382 | m_Lightmapping: 2 383 | m_LightShadowCasterMode: 0 384 | m_AreaSize: {x: 1, y: 1} 385 | m_BounceIntensity: 1 386 | m_ColorTemperature: 6570 387 | m_UseColorTemperature: 0 388 | m_ShadowRadius: 0 389 | m_ShadowAngle: 0 390 | --- !u!4 &791186330 391 | Transform: 392 | m_ObjectHideFlags: 0 393 | m_CorrespondingSourceObject: {fileID: 0} 394 | m_PrefabInstance: {fileID: 0} 395 | m_PrefabAsset: {fileID: 0} 396 | m_GameObject: {fileID: 791186328} 397 | m_LocalRotation: {x: -0.08016472, y: 0.8758733, z: -0.23259881, w: -0.41511124} 398 | m_LocalPosition: {x: 0, y: 0, z: 0} 399 | m_LocalScale: {x: 1, y: 1, z: 1} 400 | m_Children: [] 401 | m_Father: {fileID: 0} 402 | m_RootOrder: 3 403 | m_LocalEulerAnglesHint: {x: 28.295002, y: -128.419, z: 3.43} 404 | --- !u!1 &1140085954 405 | GameObject: 406 | m_ObjectHideFlags: 0 407 | m_CorrespondingSourceObject: {fileID: 0} 408 | m_PrefabInstance: {fileID: 0} 409 | m_PrefabAsset: {fileID: 0} 410 | serializedVersion: 6 411 | m_Component: 412 | - component: {fileID: 1140085956} 413 | - component: {fileID: 1140085955} 414 | m_Layer: 0 415 | m_Name: DirLight_Realtime 416 | m_TagString: Untagged 417 | m_Icon: {fileID: 0} 418 | m_NavMeshLayer: 0 419 | m_StaticEditorFlags: 0 420 | m_IsActive: 1 421 | --- !u!108 &1140085955 422 | Light: 423 | m_ObjectHideFlags: 0 424 | m_CorrespondingSourceObject: {fileID: 0} 425 | m_PrefabInstance: {fileID: 0} 426 | m_PrefabAsset: {fileID: 0} 427 | m_GameObject: {fileID: 1140085954} 428 | m_Enabled: 1 429 | serializedVersion: 8 430 | m_Type: 1 431 | m_Color: {r: 1, g: 1, b: 1, a: 1} 432 | m_Intensity: 1 433 | m_Range: 10 434 | m_SpotAngle: 30 435 | m_CookieSize: 10 436 | m_Shadows: 437 | m_Type: 0 438 | m_Resolution: -1 439 | m_CustomResolution: -1 440 | m_Strength: 1 441 | m_Bias: 0.05 442 | m_NormalBias: 0.4 443 | m_NearPlane: 0.2 444 | m_Cookie: {fileID: 0} 445 | m_DrawHalo: 0 446 | m_Flare: {fileID: 0} 447 | m_RenderMode: 0 448 | m_CullingMask: 449 | serializedVersion: 2 450 | m_Bits: 4294967295 451 | m_Lightmapping: 4 452 | m_LightShadowCasterMode: 0 453 | m_AreaSize: {x: 1, y: 1} 454 | m_BounceIntensity: 1 455 | m_ColorTemperature: 6570 456 | m_UseColorTemperature: 0 457 | m_ShadowRadius: 0 458 | m_ShadowAngle: 0 459 | --- !u!4 &1140085956 460 | Transform: 461 | m_ObjectHideFlags: 0 462 | m_CorrespondingSourceObject: {fileID: 0} 463 | m_PrefabInstance: {fileID: 0} 464 | m_PrefabAsset: {fileID: 0} 465 | m_GameObject: {fileID: 1140085954} 466 | m_LocalRotation: {x: -0.08016472, y: 0.8758733, z: -0.23259881, w: -0.41511124} 467 | m_LocalPosition: {x: 0, y: 0, z: 0} 468 | m_LocalScale: {x: 1, y: 1, z: 1} 469 | m_Children: [] 470 | m_Father: {fileID: 0} 471 | m_RootOrder: 2 472 | m_LocalEulerAnglesHint: {x: 28.295002, y: -128.419, z: 3.43} 473 | --- !u!1 &1298887538 474 | GameObject: 475 | m_ObjectHideFlags: 0 476 | m_CorrespondingSourceObject: {fileID: 0} 477 | m_PrefabInstance: {fileID: 0} 478 | m_PrefabAsset: {fileID: 0} 479 | serializedVersion: 6 480 | m_Component: 481 | - component: {fileID: 1298887540} 482 | - component: {fileID: 1298887539} 483 | m_Layer: 0 484 | m_Name: DirLight_Baked-Y 485 | m_TagString: Untagged 486 | m_Icon: {fileID: 0} 487 | m_NavMeshLayer: 0 488 | m_StaticEditorFlags: 0 489 | m_IsActive: 0 490 | --- !u!108 &1298887539 491 | Light: 492 | m_ObjectHideFlags: 0 493 | m_CorrespondingSourceObject: {fileID: 0} 494 | m_PrefabInstance: {fileID: 0} 495 | m_PrefabAsset: {fileID: 0} 496 | m_GameObject: {fileID: 1298887538} 497 | m_Enabled: 1 498 | serializedVersion: 8 499 | m_Type: 1 500 | m_Color: {r: 0, g: 1, b: 0, a: 1} 501 | m_Intensity: 1 502 | m_Range: 10 503 | m_SpotAngle: 30 504 | m_CookieSize: 10 505 | m_Shadows: 506 | m_Type: 0 507 | m_Resolution: -1 508 | m_CustomResolution: -1 509 | m_Strength: 1 510 | m_Bias: 0.05 511 | m_NormalBias: 0.4 512 | m_NearPlane: 0.2 513 | m_Cookie: {fileID: 0} 514 | m_DrawHalo: 0 515 | m_Flare: {fileID: 0} 516 | m_RenderMode: 0 517 | m_CullingMask: 518 | serializedVersion: 2 519 | m_Bits: 4294967295 520 | m_Lightmapping: 2 521 | m_LightShadowCasterMode: 0 522 | m_AreaSize: {x: 1, y: 1} 523 | m_BounceIntensity: 1 524 | m_ColorTemperature: 6570 525 | m_UseColorTemperature: 0 526 | m_ShadowRadius: 0 527 | m_ShadowAngle: 0 528 | --- !u!4 &1298887540 529 | Transform: 530 | m_ObjectHideFlags: 0 531 | m_CorrespondingSourceObject: {fileID: 0} 532 | m_PrefabInstance: {fileID: 0} 533 | m_PrefabAsset: {fileID: 0} 534 | m_GameObject: {fileID: 1298887538} 535 | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} 536 | m_LocalPosition: {x: 0, y: 0, z: 0} 537 | m_LocalScale: {x: 1, y: 1, z: 1} 538 | m_Children: [] 539 | m_Father: {fileID: 0} 540 | m_RootOrder: 5 541 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 542 | --- !u!1 &1844434643 543 | GameObject: 544 | m_ObjectHideFlags: 0 545 | m_CorrespondingSourceObject: {fileID: 0} 546 | m_PrefabInstance: {fileID: 0} 547 | m_PrefabAsset: {fileID: 0} 548 | serializedVersion: 6 549 | m_Component: 550 | - component: {fileID: 1844434645} 551 | - component: {fileID: 1844434644} 552 | m_Layer: 0 553 | m_Name: Light Probe Group 554 | m_TagString: Untagged 555 | m_Icon: {fileID: 0} 556 | m_NavMeshLayer: 0 557 | m_StaticEditorFlags: 0 558 | m_IsActive: 1 559 | --- !u!220 &1844434644 560 | LightProbeGroup: 561 | m_ObjectHideFlags: 0 562 | m_CorrespondingSourceObject: {fileID: 0} 563 | m_PrefabInstance: {fileID: 0} 564 | m_PrefabAsset: {fileID: 0} 565 | m_GameObject: {fileID: 1844434643} 566 | m_Enabled: 1 567 | m_SourcePositions: 568 | - {x: 1, y: 1, z: 1} 569 | - {x: 1, y: 1, z: -1} 570 | - {x: 1, y: -1, z: 1} 571 | - {x: 1, y: -1, z: -1} 572 | - {x: -1, y: 1, z: 1} 573 | - {x: -1, y: 1, z: -1} 574 | - {x: -1, y: -1, z: 1} 575 | - {x: -1, y: -1, z: -1} 576 | m_Dering: 0 577 | --- !u!4 &1844434645 578 | Transform: 579 | m_ObjectHideFlags: 0 580 | m_CorrespondingSourceObject: {fileID: 0} 581 | m_PrefabInstance: {fileID: 0} 582 | m_PrefabAsset: {fileID: 0} 583 | m_GameObject: {fileID: 1844434643} 584 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 585 | m_LocalPosition: {x: -0.019366244, y: 0.51762587, z: -0.043408338} 586 | m_LocalScale: {x: 0.46673, y: 0.46673, z: 0.46673} 587 | m_Children: [] 588 | m_Father: {fileID: 0} 589 | m_RootOrder: 1 590 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 591 | --- !u!1001 &4536827949447016534 592 | PrefabInstance: 593 | m_ObjectHideFlags: 0 594 | serializedVersion: 2 595 | m_Modification: 596 | m_TransformParent: {fileID: 0} 597 | m_Modifications: 598 | - target: {fileID: 0} 599 | propertyPath: anchor 600 | value: 601 | objectReference: {fileID: 4536827949447016540} 602 | - target: {fileID: 0} 603 | propertyPath: SH.Array.data[0].x 604 | value: 0.23529391 605 | objectReference: {fileID: 0} 606 | - target: {fileID: 0} 607 | propertyPath: SH.Array.data[0].y 608 | value: 0.23529391 609 | objectReference: {fileID: 0} 610 | - target: {fileID: 0} 611 | propertyPath: SH.Array.data[0].z 612 | value: 0.23529391 613 | objectReference: {fileID: 0} 614 | - target: {fileID: 0} 615 | propertyPath: SH.Array.data[1].x 616 | value: 0.223063 617 | objectReference: {fileID: 0} 618 | - target: {fileID: 0} 619 | propertyPath: SH.Array.data[1].y 620 | value: 0.223063 621 | objectReference: {fileID: 0} 622 | - target: {fileID: 0} 623 | propertyPath: SH.Array.data[1].z 624 | value: 0.223063 625 | objectReference: {fileID: 0} 626 | - target: {fileID: 0} 627 | propertyPath: SH.Array.data[2].x 628 | value: 0.2574875 629 | objectReference: {fileID: 0} 630 | - target: {fileID: 0} 631 | propertyPath: SH.Array.data[2].y 632 | value: 0.2574875 633 | objectReference: {fileID: 0} 634 | - target: {fileID: 0} 635 | propertyPath: SH.Array.data[2].z 636 | value: 0.2574875 637 | objectReference: {fileID: 0} 638 | - target: {fileID: 0} 639 | propertyPath: SH.Array.data[3].x 640 | value: 0.32464796 641 | objectReference: {fileID: 0} 642 | - target: {fileID: 0} 643 | propertyPath: SH.Array.data[3].y 644 | value: 0.32464796 645 | objectReference: {fileID: 0} 646 | - target: {fileID: 0} 647 | propertyPath: SH.Array.data[3].z 648 | value: 0.32464796 649 | objectReference: {fileID: 0} 650 | - target: {fileID: 0} 651 | propertyPath: SH.Array.data[4].x 652 | value: 0.28853664 653 | objectReference: {fileID: 0} 654 | - target: {fileID: 0} 655 | propertyPath: SH.Array.data[4].y 656 | value: 0.28853664 657 | objectReference: {fileID: 0} 658 | - target: {fileID: 0} 659 | propertyPath: SH.Array.data[4].z 660 | value: 0.28853664 661 | objectReference: {fileID: 0} 662 | - target: {fileID: 0} 663 | propertyPath: SH.Array.data[5].x 664 | value: 0.22884645 665 | objectReference: {fileID: 0} 666 | - target: {fileID: 0} 667 | propertyPath: SH.Array.data[5].y 668 | value: 0.22884645 669 | objectReference: {fileID: 0} 670 | - target: {fileID: 0} 671 | propertyPath: SH.Array.data[5].z 672 | value: 0.22884645 673 | objectReference: {fileID: 0} 674 | - target: {fileID: 0} 675 | propertyPath: SH.Array.data[6].x 676 | value: -0.007488578 677 | objectReference: {fileID: 0} 678 | - target: {fileID: 0} 679 | propertyPath: SH.Array.data[6].y 680 | value: -0.007488578 681 | objectReference: {fileID: 0} 682 | - target: {fileID: 0} 683 | propertyPath: SH.Array.data[6].z 684 | value: -0.007488578 685 | objectReference: {fileID: 0} 686 | - target: {fileID: 0} 687 | propertyPath: SH.Array.data[7].x 688 | value: 0.33306512 689 | objectReference: {fileID: 0} 690 | - target: {fileID: 0} 691 | propertyPath: SH.Array.data[7].y 692 | value: 0.33306512 693 | objectReference: {fileID: 0} 694 | - target: {fileID: 0} 695 | propertyPath: SH.Array.data[7].z 696 | value: 0.33306512 697 | objectReference: {fileID: 0} 698 | - target: {fileID: 0} 699 | propertyPath: SH.Array.data[8].x 700 | value: 0.05542203 701 | objectReference: {fileID: 0} 702 | - target: {fileID: 0} 703 | propertyPath: SH.Array.data[8].y 704 | value: 0.05542203 705 | objectReference: {fileID: 0} 706 | - target: {fileID: 0} 707 | propertyPath: SH.Array.data[8].z 708 | value: 0.05542203 709 | objectReference: {fileID: 0} 710 | - target: {fileID: 0} 711 | propertyPath: L0.x 712 | value: 0.24278249 713 | objectReference: {fileID: 0} 714 | - target: {fileID: 0} 715 | propertyPath: L0.y 716 | value: 0.24278249 717 | objectReference: {fileID: 0} 718 | - target: {fileID: 0} 719 | propertyPath: L0.z 720 | value: 0.24278249 721 | objectReference: {fileID: 0} 722 | - target: {fileID: 0} 723 | propertyPath: unity_SHAr.x 724 | value: 0.32464796 725 | objectReference: {fileID: 0} 726 | - target: {fileID: 0} 727 | propertyPath: unity_SHAr.y 728 | value: 0.223063 729 | objectReference: {fileID: 0} 730 | - target: {fileID: 0} 731 | propertyPath: unity_SHAr.z 732 | value: 0.2574875 733 | objectReference: {fileID: 0} 734 | - target: {fileID: 0} 735 | propertyPath: unity_SHAr.w 736 | value: 0.24278249 737 | objectReference: {fileID: 0} 738 | - target: {fileID: 0} 739 | propertyPath: unity_SHAg.x 740 | value: 0.32464796 741 | objectReference: {fileID: 0} 742 | - target: {fileID: 0} 743 | propertyPath: unity_SHAg.y 744 | value: 0.223063 745 | objectReference: {fileID: 0} 746 | - target: {fileID: 0} 747 | propertyPath: unity_SHAg.z 748 | value: 0.2574875 749 | objectReference: {fileID: 0} 750 | - target: {fileID: 0} 751 | propertyPath: unity_SHAg.w 752 | value: 0.24278249 753 | objectReference: {fileID: 0} 754 | - target: {fileID: 0} 755 | propertyPath: unity_SHAb.x 756 | value: 0.32464796 757 | objectReference: {fileID: 0} 758 | - target: {fileID: 0} 759 | propertyPath: unity_SHAb.y 760 | value: 0.223063 761 | objectReference: {fileID: 0} 762 | - target: {fileID: 0} 763 | propertyPath: unity_SHAb.z 764 | value: 0.2574875 765 | objectReference: {fileID: 0} 766 | - target: {fileID: 0} 767 | propertyPath: unity_SHAb.w 768 | value: 0.24278249 769 | objectReference: {fileID: 0} 770 | - target: {fileID: 0} 771 | propertyPath: unity_SHBr.x 772 | value: 0.28853664 773 | objectReference: {fileID: 0} 774 | - target: {fileID: 0} 775 | propertyPath: unity_SHBr.y 776 | value: 0.22884645 777 | objectReference: {fileID: 0} 778 | - target: {fileID: 0} 779 | propertyPath: unity_SHBr.z 780 | value: -0.022465734 781 | objectReference: {fileID: 0} 782 | - target: {fileID: 0} 783 | propertyPath: unity_SHBr.w 784 | value: 0.33306512 785 | objectReference: {fileID: 0} 786 | - target: {fileID: 0} 787 | propertyPath: unity_SHBg.x 788 | value: 0.28853664 789 | objectReference: {fileID: 0} 790 | - target: {fileID: 0} 791 | propertyPath: unity_SHBg.y 792 | value: 0.22884645 793 | objectReference: {fileID: 0} 794 | - target: {fileID: 0} 795 | propertyPath: unity_SHBg.z 796 | value: -0.022465734 797 | objectReference: {fileID: 0} 798 | - target: {fileID: 0} 799 | propertyPath: unity_SHBg.w 800 | value: 0.33306512 801 | objectReference: {fileID: 0} 802 | - target: {fileID: 0} 803 | propertyPath: unity_SHBb.x 804 | value: 0.28853664 805 | objectReference: {fileID: 0} 806 | - target: {fileID: 0} 807 | propertyPath: unity_SHBb.y 808 | value: 0.22884645 809 | objectReference: {fileID: 0} 810 | - target: {fileID: 0} 811 | propertyPath: unity_SHBb.z 812 | value: -0.022465734 813 | objectReference: {fileID: 0} 814 | - target: {fileID: 0} 815 | propertyPath: unity_SHBb.w 816 | value: 0.33306512 817 | objectReference: {fileID: 0} 818 | - target: {fileID: 0} 819 | propertyPath: unity_SHC.x 820 | value: 0.05542203 821 | objectReference: {fileID: 0} 822 | - target: {fileID: 0} 823 | propertyPath: unity_SHC.y 824 | value: 0.05542203 825 | objectReference: {fileID: 0} 826 | - target: {fileID: 0} 827 | propertyPath: unity_SHC.z 828 | value: 0.05542203 829 | objectReference: {fileID: 0} 830 | - target: {fileID: 8126587651428850846, guid: b3972933c81df5c408bf2bcb45317cd0, 831 | type: 3} 832 | propertyPath: m_LocalPosition.x 833 | value: -0.45 834 | objectReference: {fileID: 0} 835 | - target: {fileID: 8126587651428850846, guid: b3972933c81df5c408bf2bcb45317cd0, 836 | type: 3} 837 | propertyPath: m_LocalPosition.y 838 | value: 0 839 | objectReference: {fileID: 0} 840 | - target: {fileID: 8126587651428850846, guid: b3972933c81df5c408bf2bcb45317cd0, 841 | type: 3} 842 | propertyPath: m_LocalPosition.z 843 | value: 0 844 | objectReference: {fileID: 0} 845 | - target: {fileID: 8126587651428850846, guid: b3972933c81df5c408bf2bcb45317cd0, 846 | type: 3} 847 | propertyPath: m_LocalRotation.x 848 | value: 0 849 | objectReference: {fileID: 0} 850 | - target: {fileID: 8126587651428850846, guid: b3972933c81df5c408bf2bcb45317cd0, 851 | type: 3} 852 | propertyPath: m_LocalRotation.y 853 | value: 1 854 | objectReference: {fileID: 0} 855 | - target: {fileID: 8126587651428850846, guid: b3972933c81df5c408bf2bcb45317cd0, 856 | type: 3} 857 | propertyPath: m_LocalRotation.z 858 | value: 0 859 | objectReference: {fileID: 0} 860 | - target: {fileID: 8126587651428850846, guid: b3972933c81df5c408bf2bcb45317cd0, 861 | type: 3} 862 | propertyPath: m_LocalRotation.w 863 | value: -0.00000004371139 864 | objectReference: {fileID: 0} 865 | - target: {fileID: 8126587651428850846, guid: b3972933c81df5c408bf2bcb45317cd0, 866 | type: 3} 867 | propertyPath: m_RootOrder 868 | value: 7 869 | objectReference: {fileID: 0} 870 | - target: {fileID: 8126587651428850846, guid: b3972933c81df5c408bf2bcb45317cd0, 871 | type: 3} 872 | propertyPath: m_LocalEulerAnglesHint.x 873 | value: 0 874 | objectReference: {fileID: 0} 875 | - target: {fileID: 8126587651428850846, guid: b3972933c81df5c408bf2bcb45317cd0, 876 | type: 3} 877 | propertyPath: m_LocalEulerAnglesHint.y 878 | value: 0 879 | objectReference: {fileID: 0} 880 | - target: {fileID: 8126587651428850846, guid: b3972933c81df5c408bf2bcb45317cd0, 881 | type: 3} 882 | propertyPath: m_LocalEulerAnglesHint.z 883 | value: 0 884 | objectReference: {fileID: 0} 885 | - target: {fileID: 9078480317570080455, guid: b3972933c81df5c408bf2bcb45317cd0, 886 | type: 3} 887 | propertyPath: m_Name 888 | value: SHTester 889 | objectReference: {fileID: 0} 890 | m_RemovedComponents: [] 891 | m_SourcePrefab: {fileID: 100100000, guid: b3972933c81df5c408bf2bcb45317cd0, type: 3} 892 | --- !u!4 &4536827949447016540 stripped 893 | Transform: 894 | m_CorrespondingSourceObject: {fileID: 7530920997909027560, guid: b3972933c81df5c408bf2bcb45317cd0, 895 | type: 3} 896 | m_PrefabInstance: {fileID: 4536827949447016534} 897 | m_PrefabAsset: {fileID: 0} 898 | -------------------------------------------------------------------------------- /SH/_Scene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87948337d94793b4e81ac16ae52ba812 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /SH/m_RT_wrap.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: m_RT_wrap 11 | m_Shader: {fileID: 4800000, guid: 77b7041053d031f4f9d936a9de3cf07e, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 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 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _ConserveEnergy: 1 61 | - _Cutoff: 0.5 62 | - _DetailNormalMapScale: 1 63 | - _DstBlend: 0 64 | - _Equirectangular: 0 65 | - _Generalised: 0 66 | - _GlossMapScale: 1 67 | - _Glossiness: 0 68 | - _GlossyReflections: 1 69 | - _Metallic: 0 70 | - _Mode: 0 71 | - _OcclusionStrength: 1 72 | - _Parallax: 0.02 73 | - _SmoothnessTextureChannel: 0 74 | - _SpecularHighlights: 1 75 | - _SrcBlend: 1 76 | - _UVSec: 0 77 | - _Wrap: 0 78 | - _ZWrite: 1 79 | m_Colors: 80 | - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} 81 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} 82 | -------------------------------------------------------------------------------- /SH/m_RT_wrap.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a72540f7c92e7a342a8aaa0fe210e230 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SH/m_RT_wrap_eq.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: m_RT_wrap_eq 11 | m_Shader: {fileID: 4800000, guid: 77b7041053d031f4f9d936a9de3cf07e, type: 3} 12 | m_ShaderKeywords: _ 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 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 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _ConserveEnergy: 1 61 | - _Cutoff: 0.5 62 | - _DetailNormalMapScale: 1 63 | - _DstBlend: 0 64 | - _Equirectangular: 1 65 | - _Generalised: 0 66 | - _GlossMapScale: 1 67 | - _Glossiness: 0 68 | - _GlossyReflections: 1 69 | - _Metallic: 0 70 | - _Mode: 0 71 | - _OcclusionStrength: 1 72 | - _Parallax: 0.02 73 | - _SmoothnessTextureChannel: 0 74 | - _SpecularHighlights: 1 75 | - _SrcBlend: 1 76 | - _UVSec: 0 77 | - _Wrap: 0 78 | - _ZWrite: 1 79 | m_Colors: 80 | - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} 81 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} 82 | -------------------------------------------------------------------------------- /SH/m_RT_wrap_eq.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45c3e48ea112df8408bce6204743e413 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SH/m_SH_Geom.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: m_SH_Geom 11 | m_Shader: {fileID: 4800000, guid: 73fb79205f921a64596e1c9731754ece, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 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 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _Band: 0 60 | - _BumpScale: 1 61 | - _CubemapLod: 5 62 | - _CubemapMode: 0 63 | - _Cutoff: 0.5 64 | - _DetailNormalMapScale: 1 65 | - _DstBlend: 0 66 | - _Equirectangular: 0 67 | - _Exposure: 1 68 | - _Generalised: 0 69 | - _GlossMapScale: 1 70 | - _Glossiness: 0 71 | - _GlossyReflections: 1 72 | - _Metallic: 0 73 | - _Method: 3 74 | - _Mode: 0 75 | - _OcclusionStrength: 1 76 | - _Parallax: 0.02 77 | - _Roughness: 5 78 | - _SmoothnessTextureChannel: 0 79 | - _SpecularHighlights: 1 80 | - _SrcBlend: 1 81 | - _UVSec: 0 82 | - _Wrap: 0 83 | - _ZWrite: 1 84 | m_Colors: 85 | - _Bands: {r: 1, g: 1, b: 1, a: 0} 86 | - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} 87 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} 88 | -------------------------------------------------------------------------------- /SH/m_SH_Geom.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9f7b0dd13fb29e43815d69d04a5ee9b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SH/m_SH_Geom_eq.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: m_SH_Geom_eq 11 | m_Shader: {fileID: 4800000, guid: 73fb79205f921a64596e1c9731754ece, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 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 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _Band: 0 60 | - _BumpScale: 1 61 | - _CubemapLod: 5 62 | - _CubemapMode: 0 63 | - _Cutoff: 0.5 64 | - _DetailNormalMapScale: 1 65 | - _DstBlend: 0 66 | - _Equirectangular: 1 67 | - _Exposure: 1 68 | - _Gamma: 0 69 | - _Generalised: 0 70 | - _GlossMapScale: 1 71 | - _Glossiness: 0 72 | - _GlossyReflections: 1 73 | - _Metallic: 0 74 | - _Method: 3 75 | - _Mode: 0 76 | - _OcclusionStrength: 1 77 | - _Parallax: 0.02 78 | - _Roughness: 5 79 | - _SmoothnessTextureChannel: 0 80 | - _SpecularHighlights: 1 81 | - _SrcBlend: 1 82 | - _UVSec: 0 83 | - _Wrap: 1 84 | - _ZWrite: 1 85 | m_Colors: 86 | - _Bands: {r: 1, g: 1, b: 1, a: 0} 87 | - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} 88 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} 89 | -------------------------------------------------------------------------------- /SH/m_SH_Geom_eq.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7b79ec766ae5044896178289e8dbecc 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SH/m_SH_stock.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: m_SH_stock 11 | m_Shader: {fileID: 4800000, guid: 73fb79205f921a64596e1c9731754ece, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 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 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _CubemapLod: 5 61 | - _CubemapMode: 0 62 | - _Cutoff: 0.5 63 | - _DetailNormalMapScale: 1 64 | - _DstBlend: 0 65 | - _Equirectangular: 0 66 | - _Exposure: 1 67 | - _Gamma: 0 68 | - _Generalised: 0 69 | - _GlossMapScale: 1 70 | - _Glossiness: 0 71 | - _GlossyReflections: 1 72 | - _Metallic: 0 73 | - _Method: 0 74 | - _Mode: 0 75 | - _OcclusionStrength: 1 76 | - _Parallax: 0.02 77 | - _Roughness: 0 78 | - _SmoothnessTextureChannel: 0 79 | - _SpecularHighlights: 1 80 | - _SrcBlend: 1 81 | - _UVSec: 0 82 | - _Wrap: 0 83 | - _ZWrite: 1 84 | m_Colors: 85 | - _Bands: {r: 1, g: 1, b: 1, a: 0} 86 | - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} 87 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} 88 | -------------------------------------------------------------------------------- /SH/m_SH_stock.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0657541492213cb4a8d73ea949468304 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SH/m_SH_stock_eq.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: m_SH_stock_eq 11 | m_Shader: {fileID: 4800000, guid: 73fb79205f921a64596e1c9731754ece, type: 3} 12 | m_ShaderKeywords: _ 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 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 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _Band: 0 60 | - _BumpScale: 1 61 | - _CubemapLod: 5 62 | - _CubemapMode: 0 63 | - _Cutoff: 0.5 64 | - _DetailNormalMapScale: 1 65 | - _DstBlend: 0 66 | - _Equirectangular: 1 67 | - _Exposure: 1 68 | - _Gamma: 0 69 | - _Generalised: 1 70 | - _GlossMapScale: 1 71 | - _Glossiness: 0 72 | - _GlossyReflections: 1 73 | - _Metallic: 0 74 | - _Method: 0 75 | - _Mode: 0 76 | - _OcclusionStrength: 1 77 | - _Parallax: 0.02 78 | - _Roughness: 0 79 | - _SmoothnessTextureChannel: 0 80 | - _SpecularHighlights: 1 81 | - _SrcBlend: 1 82 | - _UVSec: 0 83 | - _Wrap: 0 84 | - _ZWrite: 1 85 | m_Colors: 86 | - _Bands: {r: 1, g: 1, b: 1, a: 0} 87 | - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} 88 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} 89 | -------------------------------------------------------------------------------- /SH/m_SH_stock_eq.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7777b755c961e4448f8cb94728118c1 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SH/m_SH_wrap0.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: m_SH_wrap0 11 | m_Shader: {fileID: 4800000, guid: 73fb79205f921a64596e1c9731754ece, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 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 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _Band: 0 60 | - _BumpScale: 1 61 | - _CubemapLod: 5 62 | - _CubemapMode: 0 63 | - _Cutoff: 0.5 64 | - _DetailNormalMapScale: 1 65 | - _DstBlend: 0 66 | - _Equirectangular: 0 67 | - _Exposure: 1 68 | - _Generalised: 0 69 | - _GlossMapScale: 1 70 | - _Glossiness: 0 71 | - _GlossyReflections: 1 72 | - _Metallic: 0 73 | - _Method: 1 74 | - _Mode: 0 75 | - _OcclusionStrength: 1 76 | - _Parallax: 0.02 77 | - _Roughness: 0 78 | - _SmoothnessTextureChannel: 0 79 | - _SpecularHighlights: 1 80 | - _SrcBlend: 1 81 | - _UVSec: 0 82 | - _Wrap: 1 83 | - _ZWrite: 1 84 | m_Colors: 85 | - _Bands: {r: 1, g: 1, b: 1, a: 0} 86 | - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} 87 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} 88 | -------------------------------------------------------------------------------- /SH/m_SH_wrap0.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45946d8b647302544916caeb0a068f1c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SH/m_SH_wrap0_eq.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: m_SH_wrap0_eq 11 | m_Shader: {fileID: 4800000, guid: 73fb79205f921a64596e1c9731754ece, type: 3} 12 | m_ShaderKeywords: _ 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 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 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _Band: 0 60 | - _BumpScale: 1 61 | - _CubemapLod: 5 62 | - _CubemapMode: 0 63 | - _Cutoff: 0.5 64 | - _DetailNormalMapScale: 1 65 | - _DstBlend: 0 66 | - _Equirectangular: 1 67 | - _Exposure: 1 68 | - _Generalised: 0 69 | - _GlossMapScale: 1 70 | - _Glossiness: 0 71 | - _GlossyReflections: 1 72 | - _Metallic: 0 73 | - _Method: 1 74 | - _Mode: 0 75 | - _OcclusionStrength: 1 76 | - _Parallax: 0.02 77 | - _Roughness: 5 78 | - _SmoothnessTextureChannel: 0 79 | - _SpecularHighlights: 1 80 | - _SrcBlend: 1 81 | - _UVSec: 0 82 | - _Wrap: 1 83 | - _ZWrite: 1 84 | m_Colors: 85 | - _Bands: {r: 1, g: 1, b: 1, a: 0} 86 | - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} 87 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} 88 | -------------------------------------------------------------------------------- /SH/m_SH_wrap0_eq.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 940b4c42da544c04e8af303d08bd6a72 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SH/m_SH_wrap1.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: m_SH_wrap1 11 | m_Shader: {fileID: 4800000, guid: 73fb79205f921a64596e1c9731754ece, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 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 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _Band: 0 60 | - _BumpScale: 1 61 | - _CubemapLod: 5 62 | - _CubemapMode: 0 63 | - _Cutoff: 0.5 64 | - _DetailNormalMapScale: 1 65 | - _DstBlend: 0 66 | - _Equirectangular: 0 67 | - _Exposure: 1 68 | - _Gamma: 0 69 | - _Generalised: 0 70 | - _GlossMapScale: 1 71 | - _Glossiness: 0 72 | - _GlossyReflections: 1 73 | - _Metallic: 0 74 | - _Method: 2 75 | - _Mode: 0 76 | - _OcclusionStrength: 1 77 | - _Parallax: 0.02 78 | - _Roughness: 0 79 | - _SmoothnessTextureChannel: 0 80 | - _SpecularHighlights: 1 81 | - _SrcBlend: 1 82 | - _UVSec: 0 83 | - _Wrap: 1 84 | - _ZWrite: 1 85 | m_Colors: 86 | - _Bands: {r: 1, g: 1, b: 1, a: 0} 87 | - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} 88 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} 89 | -------------------------------------------------------------------------------- /SH/m_SH_wrap1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc4639d626b58474491d451fc09565e4 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SH/m_SH_wrap1_eq.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: m_SH_wrap1_eq 11 | m_Shader: {fileID: 4800000, guid: 73fb79205f921a64596e1c9731754ece, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 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 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _Band: 0 60 | - _BumpScale: 1 61 | - _CubemapLod: 5 62 | - _CubemapMode: 0 63 | - _Cutoff: 0.5 64 | - _DetailNormalMapScale: 1 65 | - _DstBlend: 0 66 | - _Equirectangular: 1 67 | - _Exposure: 1 68 | - _Gamma: 0 69 | - _Generalised: 0 70 | - _GlossMapScale: 1 71 | - _Glossiness: 0 72 | - _GlossyReflections: 1 73 | - _Metallic: 0 74 | - _Method: 2 75 | - _Mode: 0 76 | - _OcclusionStrength: 1 77 | - _Parallax: 0.02 78 | - _Roughness: 5 79 | - _SmoothnessTextureChannel: 0 80 | - _SpecularHighlights: 1 81 | - _SrcBlend: 1 82 | - _UVSec: 0 83 | - _Wrap: 1 84 | - _ZWrite: 1 85 | m_Colors: 86 | - _Bands: {r: 1, g: 1, b: 1, a: 0} 87 | - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} 88 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} 89 | -------------------------------------------------------------------------------- /SH/m_SH_wrap1_eq.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8bab33338d3075a4db098b1940ff9a03 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SH/m_SH_wrap2.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: m_SH_wrap2 11 | m_Shader: {fileID: 4800000, guid: 73fb79205f921a64596e1c9731754ece, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 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 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _Band: 0 60 | - _BumpScale: 1 61 | - _CubemapLod: 5 62 | - _CubemapMode: 0 63 | - _Cutoff: 0.5 64 | - _DetailNormalMapScale: 1 65 | - _DstBlend: 0 66 | - _Equirectangular: 0 67 | - _Exposure: 1 68 | - _Gamma: 0 69 | - _Generalised: 1 70 | - _GlossMapScale: 1 71 | - _Glossiness: 0 72 | - _GlossyReflections: 1 73 | - _Metallic: 0 74 | - _Method: 2 75 | - _Mode: 0 76 | - _OcclusionStrength: 1 77 | - _Parallax: 0.02 78 | - _Roughness: 0 79 | - _SmoothnessTextureChannel: 0 80 | - _SpecularHighlights: 1 81 | - _SrcBlend: 1 82 | - _UVSec: 0 83 | - _Wrap: 1 84 | - _ZWrite: 1 85 | m_Colors: 86 | - _Bands: {r: 1, g: 1, b: 1, a: 0} 87 | - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} 88 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} 89 | -------------------------------------------------------------------------------- /SH/m_SH_wrap2.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4f6c421bece8f44290f0d3986acf850 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SH/m_SH_wrap2_eq.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: m_SH_wrap2_eq 11 | m_Shader: {fileID: 4800000, guid: 73fb79205f921a64596e1c9731754ece, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 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 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _Band: 0 60 | - _BumpScale: 1 61 | - _CubemapLod: 5 62 | - _CubemapMode: 0 63 | - _Cutoff: 0.5 64 | - _DetailNormalMapScale: 1 65 | - _DstBlend: 0 66 | - _Equirectangular: 1 67 | - _Exposure: 1 68 | - _Gamma: 0 69 | - _Generalised: 1 70 | - _GlossMapScale: 1 71 | - _Glossiness: 0 72 | - _GlossyReflections: 1 73 | - _Metallic: 0 74 | - _Method: 2 75 | - _Mode: 0 76 | - _OcclusionStrength: 1 77 | - _Parallax: 0.02 78 | - _Roughness: 5 79 | - _SmoothnessTextureChannel: 0 80 | - _SpecularHighlights: 1 81 | - _SrcBlend: 1 82 | - _UVSec: 0 83 | - _Wrap: 1 84 | - _ZWrite: 1 85 | m_Colors: 86 | - _Bands: {r: 1, g: 1, b: 1, a: 0} 87 | - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} 88 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} 89 | -------------------------------------------------------------------------------- /SH/m_SH_wrap2_eq.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6892a6ca51ee4d3409a7c69bb1ca3f6b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SH/s_Light0_Wrapped.shader: -------------------------------------------------------------------------------- 1 | Shader "DJL/Debug/Light0 Wrapped" 2 | { 3 | Properties 4 | { 5 | _Wrap("Wrap", Range(0, 2)) = 0 6 | [Toggle(_)] _ConserveEnergy("ConserveEnergy", Float) = 0 7 | [Toggle(_)] _Equirectangular("Equirectangular projection", Float) = 0 8 | _Generalised("Valve Generalised", Range(0, 1)) = 0 9 | } 10 | SubShader 11 | { 12 | Tags { "RenderType"="Opaque" "IgnoreProjector"="True" } 13 | LOD 100 14 | 15 | Pass 16 | { 17 | Name "FORWARD" 18 | Tags { "LightMode"="ForwardBase" } 19 | Cull Off 20 | 21 | CGPROGRAM 22 | #pragma vertex vert 23 | #pragma fragment frag 24 | 25 | #include "UnityCG.cginc" 26 | #include "AutoLight.cginc" 27 | #include "Lighting.cginc" 28 | 29 | #pragma multi_compile_fwdbase 30 | 31 | uniform float _Wrap; 32 | uniform float _ConserveEnergy; 33 | uniform float _Generalised; 34 | uniform float _Equirectangular; 35 | 36 | struct appdata 37 | { 38 | float4 vertex : POSITION; 39 | float3 normal : NORMAL; 40 | float3 uv : TEXCOORD0; 41 | }; 42 | 43 | struct v2f 44 | { 45 | float4 pos : SV_POSITION; 46 | float3 normal : TEXCOORD0; 47 | float4 worldPos : TEXCOORD1; 48 | float2 uv : TEXCOORD2; 49 | }; 50 | 51 | v2f vert (appdata v) 52 | { 53 | v2f o; 54 | o.pos = UnityObjectToClipPos(v.vertex); 55 | o.normal = UnityObjectToWorldNormal(v.normal); 56 | o.worldPos = mul(unity_ObjectToWorld, v.vertex); 57 | o.uv = v.uv; 58 | return o; 59 | } 60 | 61 | float3 uvToSphere(float2 uv) 62 | { 63 | float3 dir; 64 | dir.x = -sin(uv.x * UNITY_TWO_PI) * sin(uv.y * UNITY_PI); 65 | dir.y = -cos(uv.y * UNITY_PI); 66 | dir.z = -cos(uv.x * UNITY_TWO_PI) * sin(uv.y * UNITY_PI); 67 | return dir; 68 | } 69 | 70 | // Green’s model with [now optional] energy conservation 71 | // http://blog.stevemcauley.com/2011/12/03/energy-conserving-wrapped-diffuse/ 72 | float GreenWrapConserving(float fCosTheta, float wrap) 73 | { 74 | return max(0, fCosTheta + wrap) / ((1.0 + wrap) * lerp(1, 1.0 + wrap, _ConserveEnergy)); 75 | } 76 | // Generalised model for simple point and directional light sources. 77 | // http://www.cim.mcgill.ca/~derek/files/jgt_wrap.pdf 78 | float GeneralWrap(float fCosTheta, float wrap) 79 | { 80 | return pow(max(0, fCosTheta + wrap) / (1.0 + wrap), 1.0 + wrap); 81 | } 82 | // Valve half lambert 83 | // https://steamcdn-a.akamaihd.net/apps/valve/2006/SIGGRAPH06_Course_ShadingInValvesSourceEngine.pdf 84 | float ValveWrap(float fCosTheta, float wrap) 85 | { 86 | return pow(max(0, fCosTheta + wrap)*0.5 , 2); 87 | } 88 | 89 | float4 frag (v2f i) : SV_Target 90 | { 91 | float3 normal = normalize(lerp(i.normal, uvToSphere(i.uv.xy), _Equirectangular)); 92 | float3 lightDirection = normalize(lerp(_WorldSpaceLightPos0.xyz, _WorldSpaceLightPos0.xyz - i.worldPos.xyz, _WorldSpaceLightPos0.w)); 93 | float NdotL = dot(normal, lightDirection); 94 | float greenwrap = GreenWrapConserving(NdotL, _Wrap); 95 | float generalwrap = lerp(ValveWrap(NdotL, _Wrap), GeneralWrap(NdotL, _Wrap), _ConserveEnergy); 96 | float wrapped = lerp(greenwrap, generalwrap, _Generalised); 97 | return float4(_LightColor0.rgb * saturate(wrapped), 1); 98 | } 99 | ENDCG 100 | } 101 | UsePass "VertexLit/SHADOWCASTER" 102 | } 103 | FallBack Off 104 | } 105 | -------------------------------------------------------------------------------- /SH/s_Light0_Wrapped.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77b7041053d031f4f9d936a9de3cf07e 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /SH/s_SH_Wrapped.shader: -------------------------------------------------------------------------------- 1 | Shader "DJL/Debug/SH Wrapped" 2 | { 3 | Properties 4 | { 5 | [Gamma] _Exposure("Exposure", Range(0.0, 10.0)) = 1.0 6 | [Toggle(_)] _Gamma("Gamma output", Float) = 0 7 | [Toggle(_)] _Equirectangular("Equirectangular projection", Float) = 0 8 | [Header(Spherical Harmonics)] 9 | _Wrap("Wrap", Range(0, 2)) = 0 10 | [IntRange]_Method("Method", Range(0, 3)) = 0 11 | _Generalised("Valve Generalised", Range(0, 1)) = 0 12 | _Bands("Band strengths", Vector) = (1,1,1,0) 13 | [Header(Cubemap)] 14 | [Toggle(_)] _CubemapMode("Cubemap mode", Float) = 0 15 | _CubemapLod("LOD", Range(0.0, 10.0)) = 0.0 16 | } 17 | SubShader 18 | { 19 | Tags { "RenderType" = "Opaque" "IgnoreProjector" = "True" } 20 | LOD 100 21 | 22 | Pass 23 | { 24 | Name "FORWARD" 25 | Tags { "LightMode" = "ForwardBase" } 26 | Cull Off 27 | 28 | CGPROGRAM 29 | #pragma vertex vert 30 | #pragma fragment frag 31 | 32 | #include "UnityCG.cginc" 33 | #include "AutoLight.cginc" 34 | #include "Lighting.cginc" 35 | 36 | #pragma multi_compile_fwdbase 37 | 38 | uniform float _Exposure; 39 | uniform float _Gamma; 40 | uniform float _Equirectangular; 41 | 42 | uniform float _Wrap; 43 | uniform float _Method; 44 | uniform float _Generalised; 45 | uniform float3 _Bands; 46 | 47 | uniform float _CubemapMode; 48 | uniform float _CubemapLod; 49 | 50 | struct appdata 51 | { 52 | float4 vertex : POSITION; 53 | float3 normal : NORMAL; 54 | float3 uv : TEXCOORD0; 55 | }; 56 | 57 | struct v2f 58 | { 59 | float4 pos : SV_POSITION; 60 | float3 normal : TEXCOORD0; 61 | float2 uv : TEXCOORD1; 62 | }; 63 | 64 | // Implementation used by Unity 65 | // https://docs.unity3d.com/Manual/LightProbes-TechnicalInformation.html 66 | // https://www.ppsloan.org/publications/StupidSH36.pdf 67 | float3 ShadeSH9_stock(float3 normal) 68 | { 69 | float3 x0, x1, x2; 70 | float3 conv = _Bands.xyz; // debugging 71 | 72 | // Constant (L0) 73 | x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); 74 | 75 | // Linear (L1) polynomial terms 76 | x1.r = (dot(unity_SHAr.xyz, normal)); 77 | x1.g = (dot(unity_SHAg.xyz, normal)); 78 | x1.b = (dot(unity_SHAb.xyz, normal)); 79 | 80 | // 4 of the quadratic (L2) polynomials 81 | float4 vB = normal.xyzz * normal.yzzx; 82 | x2.r = dot(unity_SHBr, vB); 83 | x2.g = dot(unity_SHBg, vB); 84 | x2.b = dot(unity_SHBb, vB); 85 | 86 | // Final (5th) quadratic (L2) polynomial 87 | float vC = normal.x * normal.x - normal.y * normal.y; 88 | x2 += unity_SHC.rgb * vC; 89 | 90 | return x0*conv.x + x1*conv.y + x2*conv.z; 91 | } 92 | 93 | float3 ShadeSH9_wrapped(float3 normal, float3 conv) 94 | { 95 | float3 x0, x1, x2; 96 | conv *= float3(1, 1.5, 4); // Undo pre-applied cosine convolution 97 | conv *= _Bands.xyz; // debugging 98 | 99 | // Constant (L0) 100 | // Band 0 has constant part from 6th kernel (band 1) pre-applied, but ignore for performance 101 | x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); 102 | 103 | // Linear (L1) polynomial terms 104 | x1.r = (dot(unity_SHAr.xyz, normal)); 105 | x1.g = (dot(unity_SHAg.xyz, normal)); 106 | x1.b = (dot(unity_SHAb.xyz, normal)); 107 | 108 | // 4 of the quadratic (L2) polynomials 109 | float4 vB = normal.xyzz * normal.yzzx; 110 | x2.r = dot(unity_SHBr, vB); 111 | x2.g = dot(unity_SHBg, vB); 112 | x2.b = dot(unity_SHBb, vB); 113 | 114 | // Final (5th) quadratic (L2) polynomial 115 | float vC = normal.x * normal.x - normal.y * normal.y; 116 | x2 += unity_SHC.rgb * vC; 117 | 118 | return x0 * conv.x + x1 * conv.y + x2 * conv.z; 119 | } 120 | float3 ShadeSH9_wrappedCorrect(float3 normal, float3 conv) 121 | { 122 | const float3 cosconv_inv = float3(1, 1.5, 4); // Inverse of the pre-applied cosine convolution 123 | float3 x0, x1, x2; 124 | conv *= cosconv_inv; // Undo pre-applied cosine convolution 125 | conv *= _Bands.xyz; // debugging 126 | 127 | // Constant (L0) 128 | x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); 129 | // Remove the constant part from L2 and add it back with correct convolution 130 | float3 otherband = float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; 131 | x0 = (x0 + otherband) * conv.x - otherband * conv.z; 132 | 133 | // Linear (L1) polynomial terms 134 | x1.r = (dot(unity_SHAr.xyz, normal)); 135 | x1.g = (dot(unity_SHAg.xyz, normal)); 136 | x1.b = (dot(unity_SHAb.xyz, normal)); 137 | 138 | // 4 of the quadratic (L2) polynomials 139 | float4 vB = normal.xyzz * normal.yzzx; 140 | x2.r = dot(unity_SHBr, vB); 141 | x2.g = dot(unity_SHBg, vB); 142 | x2.b = dot(unity_SHBb, vB); 143 | 144 | // Final (5th) quadratic (L2) polynomial 145 | float vC = normal.x * normal.x - normal.y * normal.y; 146 | x2 += unity_SHC.rgb * vC; 147 | 148 | return x0 + x1 * conv.y + x2 * conv.z; 149 | } 150 | 151 | // SH Convolution Functions 152 | // Code adapted from https://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/ 153 | /////////////////////////// 154 | 155 | float3 GeneralWrapSH(float fA) // original unoptimized 156 | { 157 | // Normalization factor for our model. 158 | float norm = 0.5 * (2 + fA) / (1 + fA); 159 | float4 t = float4(2 * (fA + 1), fA + 2, fA + 3, fA + 4); 160 | return norm * float3(t.x / t.y, 2 * t.x / (t.y * t.z), 161 | t.x * (fA * fA - t.x + 5) / (t.y * t.z * t.w)); 162 | } 163 | float3 GeneralWrapSHOpt(float fA) 164 | { 165 | const float4 t0 = float4(-0.047771, -0.129310, 0.214438, 0.279310); 166 | const float4 t1 = float4( 1.000000, 0.666667, 0.250000, 0.000000); 167 | 168 | float3 r; 169 | r.xyz = saturate(t0.xxy * fA + t0.yzw); 170 | r.xyz = -r * fA + t1.xyz; 171 | return r; 172 | } 173 | 174 | float3 GreenWrapSHOpt(float fW) 175 | { 176 | const float4 t0 = float4(0.0, 1.0 / 4.0, -1.0 / 3.0, -1.0 / 2.0); 177 | const float4 t1 = float4(1.0, 2.0 / 3.0, 1.0 / 4.0, 0.0); 178 | 179 | float3 r; 180 | r.xyz = t0.xxy * fW + t0.xzw; 181 | r.xyz = r.xyz * fW + t1.xyz; 182 | return r; 183 | } 184 | 185 | float3 SHConvolution(float wrap) 186 | { 187 | float3 a = GeneralWrapSH(wrap); 188 | float3 b = GreenWrapSHOpt(wrap); 189 | return lerp(b, a, _Generalised); 190 | } 191 | 192 | // http://www.geomerics.com/wp-content/uploads/2015/08/CEDEC_Geomerics_ReconstructingDiffuseLighting1.pdf 193 | float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) 194 | { 195 | // average energy 196 | float R0 = L0; 197 | 198 | // avg direction of incoming light 199 | float3 R1 = 0.5f * L1; 200 | 201 | // directional brightness 202 | float lenR1 = length(R1); 203 | 204 | // linear angle between normal and direction 0-1 205 | //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); 206 | //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; 207 | float q = dot(normalize(R1), n) * 0.5 + 0.5; 208 | //float q = ((dot(normalize(R1), n) + _Wrap) / (1 + _Wrap)) * 0.5 + 0.5; // Blind attemp to add wrapping 209 | q = saturate(q); // Silent: Thanks to ScruffyRuffles for the bug identity. 210 | 211 | // power for q 212 | // lerps from 1 (linear) to 3 (cubic) based on directionality 213 | float p = 1.0f + 2.0f * lenR1 / R0; 214 | 215 | // dynamic range constant 216 | // should vary between 4 (highly directional) and 0 (ambient) 217 | float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); 218 | 219 | return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); 220 | } 221 | float3 BetterSH9(float3 normal) 222 | { 223 | float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); 224 | float3 nonLinearSH = float3(0, 0, 0); 225 | nonLinearSH.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal); 226 | nonLinearSH.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal); 227 | nonLinearSH.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal); 228 | nonLinearSH = max(nonLinearSH, 0); 229 | return nonLinearSH; 230 | } 231 | 232 | float3 uvToSphere(float2 uv) 233 | { 234 | float3 dir; 235 | dir.x = -sin(uv.x * UNITY_TWO_PI) * sin(uv.y * UNITY_PI); 236 | dir.y = -cos(uv.y * UNITY_PI); 237 | dir.z = -cos(uv.x * UNITY_TWO_PI) * sin(uv.y * UNITY_PI); 238 | return dir; 239 | } 240 | 241 | v2f vert (appdata v) 242 | { 243 | v2f o; 244 | o.pos = UnityObjectToClipPos(v.vertex); 245 | o.normal = UnityObjectToWorldNormal(v.normal); 246 | o.uv = v.uv; 247 | return o; 248 | } 249 | 250 | float4 frag (v2f i) : SV_Target 251 | { 252 | float3 normal = normalize(lerp(i.normal, uvToSphere(i.uv.xy), _Equirectangular)); 253 | float3 sh_conv = SHConvolution(_Wrap); 254 | float3 color = 0; 255 | 256 | // SH 257 | if (_Method < 1) 258 | color = ShadeSH9_stock(normal); 259 | if (_Method >= 1) 260 | color = ShadeSH9_wrapped(normal, sh_conv); 261 | if (_Method >= 2) 262 | color = ShadeSH9_wrappedCorrect(normal, sh_conv); 263 | if (_Method >= 2.99) 264 | color = BetterSH9(normal); 265 | 266 | // Reflection Cubemap 267 | if (_CubemapMode) 268 | color = DecodeHDR(UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, normal, _CubemapLod) , unity_SpecCube0_HDR); 269 | 270 | if (_Gamma) 271 | color = pow(color, 2.2); 272 | return float4(color*_Exposure, 1); 273 | } 274 | ENDCG 275 | } 276 | 277 | UsePass "VertexLit/SHADOWCASTER" 278 | } 279 | 280 | FallBack Off 281 | } 282 | -------------------------------------------------------------------------------- /SH/s_SH_Wrapped.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 73fb79205f921a64596e1c9731754ece 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /SH/skbox.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: skbox 11 | m_Shader: {fileID: 103, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 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 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _Tex: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | m_Floats: 63 | - _BumpScale: 1 64 | - _Cutoff: 0.5 65 | - _DetailNormalMapScale: 1 66 | - _DstBlend: 0 67 | - _Exposure: 1 68 | - _GlossMapScale: 1 69 | - _Glossiness: 0.5 70 | - _GlossyReflections: 1 71 | - _Metallic: 0 72 | - _Mode: 0 73 | - _OcclusionStrength: 1 74 | - _Parallax: 0.02 75 | - _Rotation: 0 76 | - _SmoothnessTextureChannel: 0 77 | - _SpecularHighlights: 1 78 | - _SrcBlend: 1 79 | - _UVSec: 0 80 | - _ZWrite: 1 81 | m_Colors: 82 | - _Color: {r: 1, g: 1, b: 1, a: 1} 83 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 84 | - _Tint: {r: 0.5019608, g: 0.5019608, b: 0.5019608, a: 1} 85 | -------------------------------------------------------------------------------- /SH/skbox.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a22cbc3f3fa3fca4683e9767a9ead424 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/Editor/.img/AnimatorExtensions_Context.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukis101/VRCUnityStuffs/b12bbca118cf0460d69193f26f8b8a51b49d1a9c/Scripts/Editor/.img/AnimatorExtensions_Context.png -------------------------------------------------------------------------------- /Scripts/Editor/.img/AnimatorExtensions_Labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukis101/VRCUnityStuffs/b12bbca118cf0460d69193f26f8b8a51b49d1a9c/Scripts/Editor/.img/AnimatorExtensions_Labels.png -------------------------------------------------------------------------------- /Scripts/Editor/.img/MaterialCleaner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukis101/VRCUnityStuffs/b12bbca118cf0460d69193f26f8b8a51b49d1a9c/Scripts/Editor/.img/MaterialCleaner.png -------------------------------------------------------------------------------- /Scripts/Editor/.img/PointMeshCreator.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukis101/VRCUnityStuffs/b12bbca118cf0460d69193f26f8b8a51b49d1a9c/Scripts/Editor/.img/PointMeshCreator.jpg -------------------------------------------------------------------------------- /Scripts/Editor/AnimatorExtensions.cs: -------------------------------------------------------------------------------- 1 | // Some Harmony based Unity animator window patches to help workflow 2 | // Copyright (c) 2021 Dj Lukis.LT 3 | // MIT license (see LICENSE in https://github.com/lukis101/VRCUnityStuffs) 4 | 5 | // Known issues: 6 | // Unsupported.PasteToStateMachineFromPasteboard copies some parameters, but does not copy their default values 7 | // It also does not have proper undo handling causing dangling sub-assets left in the controller 8 | // TODO: add undo callback handler to delete sub-state machines properly 9 | // State node motion label overlaps progress bar in "Live Link" mode 10 | 11 | #if UNITY_EDITOR 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Reflection; 15 | using HarmonyLib; 16 | using UnityEditor; 17 | using UnityEditor.Animations; 18 | using UnityEngine; 19 | using ReorderableList = UnityEditorInternal.ReorderableList; 20 | 21 | namespace DJL 22 | { 23 | [InitializeOnLoad] 24 | class AnimatorExtensions 25 | { 26 | public static int Version_major = 0; 27 | public static int Version_minor = 1; 28 | 29 | // Preferences 30 | private static bool ShowStateMotionLabel = true; 31 | private static bool ShowStateExtrasLabel = true; 32 | 33 | // Cache 34 | private static readonly Type AnimatorWindowType = AccessTools.TypeByName("UnityEditor.Graphs.AnimatorControllerTool"); 35 | private static readonly MethodInfo AnimatorControllerGetter = AccessTools.PropertyGetter(AnimatorWindowType, "animatorController"); 36 | private static readonly Type LayerControllerViewType = AccessTools.TypeByName("UnityEditor.Graphs.LayerControllerView"); 37 | private static readonly Type ParameterControllerViewType = AccessTools.TypeByName("UnityEditor.Graphs.ParameterControllerView"); 38 | private static readonly Type RenameOverlayType = AccessTools.TypeByName("UnityEditor.RenameOverlay"); 39 | private static readonly MethodInfo BeginRenameMethod = AccessTools.Method(RenameOverlayType, "BeginRename"); 40 | private static readonly MethodInfo GetElementHeightMethod = AccessTools.Method(typeof(ReorderableList), "GetElementHeight", new Type[]{typeof(int)}); 41 | private static readonly MethodInfo GetElementYOffsetMethod = AccessTools.Method(typeof(ReorderableList), "GetElementYOffset", new Type[]{typeof(int)}); 42 | private static readonly FieldInfo LayerScrollField = AccessTools.Field(LayerControllerViewType, "m_LayerScroll"); 43 | private static readonly FieldInfo LayerListField = AccessTools.Field(LayerControllerViewType, "m_LayerList"); 44 | private static GUIStyle StateMotionStyle = null; 45 | private static GUIStyle StateExtrasStyle = null; 46 | 47 | private static bool _refocusSelectedLayer = false; 48 | 49 | static AnimatorExtensions() 50 | { 51 | var harmonyInstance = new Harmony("djl.animatorextensions"); 52 | 53 | // --- Layer and parameter lists --- // 54 | // Workaround for layer list scroll reset 55 | MethodInfo resetui_target = AccessTools.Method(LayerControllerViewType, "ResetUI"); 56 | MethodInfo resetui_prefix = AccessTools.Method(typeof(AnimatorExtensions), "ResetUI_Prefix"); 57 | MethodInfo resetui_postfix = AccessTools.Method(typeof(AnimatorExtensions), "ResetUI_Postfix"); 58 | harmonyInstance.Patch(resetui_target, prefix:new HarmonyMethod(resetui_prefix), postfix:new HarmonyMethod(resetui_postfix)); 59 | 60 | // Scroll to parameter list bottom when adding a new one to see the rename field 61 | MethodInfo addparametermenu_target = AccessTools.Method(ParameterControllerViewType, "AddParameterMenu"); 62 | MethodInfo addparametermenu_postfix = AccessTools.Method(typeof(AnimatorExtensions), "AddParameterMenu_Postfix"); 63 | harmonyInstance.Patch(addparametermenu_target, postfix:new HarmonyMethod(addparametermenu_postfix)); 64 | 65 | // Add extra options for layer list context menu 66 | MethodInfo ondrawlayer_target = AccessTools.Method(LayerControllerViewType, "OnDrawLayer"); 67 | MethodInfo ondrawlayer_prefix = AccessTools.Method(typeof(AnimatorExtensions), "OnDrawLayer_Prefix"); 68 | harmonyInstance.Patch(ondrawlayer_target, prefix: new HarmonyMethod(ondrawlayer_prefix)); 69 | // And same via keyboard hooks 70 | MethodInfo layercontrollerongui_target = AccessTools.Method(LayerControllerViewType, "OnGUI"); 71 | MethodInfo layercontrollerongui_prefix = AccessTools.Method(typeof(AnimatorExtensions), "LayerController_OnGUI_Prefix"); 72 | harmonyInstance.Patch(layercontrollerongui_target, prefix:new HarmonyMethod(layercontrollerongui_prefix)); 73 | 74 | 75 | // --- Main graph --- // 76 | // Click bottom bar to ping the actual controller asset 77 | MethodInfo dographbottombar_target = AccessTools.Method(AnimatorWindowType, "DoGraphBottomBar"); 78 | MethodInfo dographbottombar_postfix = AccessTools.Method(typeof(AnimatorExtensions), "DoGraphBottomBar_postfix"); 79 | harmonyInstance.Patch(dographbottombar_target, postfix:new HarmonyMethod(dographbottombar_postfix)); 80 | 81 | // State info labels and rename trigger 82 | MethodInfo statenode_nodeui_target = AccessTools.Method(AccessTools.TypeByName("UnityEditor.Graphs.AnimationStateMachine.StateNode"), "NodeUI"); 83 | MethodInfo nodeui_postfix = AccessTools.Method(typeof(AnimatorExtensions), "NodeUI_postfix"); 84 | harmonyInstance.Patch(statenode_nodeui_target, postfix:new HarmonyMethod(nodeui_postfix)); 85 | MethodInfo statemachinenode_nodeui_target = AccessTools.Method(AccessTools.TypeByName("UnityEditor.Graphs.AnimationStateMachine.StateMachineNode"), "NodeUI"); 86 | harmonyInstance.Patch(statemachinenode_nodeui_target, postfix:new HarmonyMethod(nodeui_postfix)); 87 | 88 | 89 | // --- Extras --- // 90 | // Purposely break 'undo' of sub-state machine pasting as that leaves dead sub-assets inside the controller 91 | MethodInfo pastetostatemachine_target = typeof(Unsupported).GetMethod("PasteToStateMachineFromPasteboard", BindingFlags.Static | BindingFlags.Public);//AccessTools.Method(typeof(Unsupported), "PasteToStateMachineFromPasteboard"); 92 | MethodInfo pastetostatemachine_postfix = AccessTools.Method(typeof(AnimatorExtensions), "PasteToStateMachineFromPasteboard_Postfix"); 93 | harmonyInstance.Patch(pastetostatemachine_target, postfix:new HarmonyMethod(pastetostatemachine_postfix)); 94 | 95 | // Prevent transition condition parameter change from altering the condition function 96 | Type AnimatorTransitionInspectorBaseType = AccessTools.TypeByName("UnityEditor.Graphs.AnimationStateMachine.AnimatorTransitionInspectorBase"); 97 | MethodInfo drawconditionselement_target = AccessTools.Method(AnimatorTransitionInspectorBaseType, "DrawConditionsElement"); 98 | MethodInfo drawconditionselement_prefix = AccessTools.Method(typeof(AnimatorExtensions), "DrawConditionsElement_Prefix"); 99 | MethodInfo drawconditionselement_postfix = AccessTools.Method(typeof(AnimatorExtensions), "DrawConditionsElement_Postfix"); 100 | harmonyInstance.Patch(drawconditionselement_target, prefix:new HarmonyMethod(drawconditionselement_prefix), postfix:new HarmonyMethod(drawconditionselement_postfix)); 101 | 102 | // Preferences through window menu 103 | MethodInfo additemstomenu_target = AccessTools.Method(AnimatorWindowType, "AddItemsToMenu"); 104 | MethodInfo additemstomenu_postfix = AccessTools.Method(typeof(AnimatorExtensions), "AddItemsToMenu_Postfix"); 105 | harmonyInstance.Patch(additemstomenu_target, postfix:new HarmonyMethod(additemstomenu_postfix)); 106 | 107 | // Load preferences 108 | ShowStateExtrasLabel = EditorPrefs.GetBool("AnimatorExtensions.ShowStateExtrasLabel", true); 109 | ShowStateMotionLabel = EditorPrefs.GetBool("AnimatorExtensions.ShowStateMotionLabel", true); 110 | } 111 | 112 | #region ExtraStuff 113 | // Toggle features through the window menu 114 | public static void AddItemsToMenu_Postfix(object __instance, GenericMenu menu) 115 | { 116 | menu.AddDisabledItem(new GUIContent("AExtenstions/Version: "+Version_major+"."+Version_minor)); 117 | menu.AddSeparator("AExtenstions/"); 118 | menu.AddItem(new GUIContent("AExtenstions/Extra Indicators"), ShowStateExtrasLabel, WindowMenuCallback, "ShowStateExtrasLabel"); 119 | menu.AddItem(new GUIContent("AExtenstions/Motion name"), ShowStateMotionLabel, WindowMenuCallback, "ShowStateMotionLabel"); 120 | } 121 | private static void WindowMenuCallback(object obj) 122 | { 123 | String varname = obj as string; 124 | if (varname.Equals("ShowStateExtrasLabel")) 125 | { 126 | ShowStateExtrasLabel = !ShowStateExtrasLabel; 127 | EditorPrefs.SetBool("AnimatorExtensions.ShowStateExtrasLabel", ShowStateMotionLabel); 128 | } 129 | else if (varname.Equals("ShowStateMotionLabel")) 130 | { 131 | ShowStateMotionLabel = !ShowStateMotionLabel; 132 | EditorPrefs.SetBool("AnimatorExtensions.ShowStateMotionLabel", ShowStateMotionLabel); 133 | } 134 | } 135 | 136 | // Prevent scroll position reset when rearranging or editing layers 137 | private static Vector2 _layerScrollCache; 138 | public static void ResetUI_Prefix(object __instance) 139 | { 140 | _layerScrollCache = (Vector2)LayerScrollField.GetValue(__instance); 141 | } 142 | public static void ResetUI_Postfix(object __instance) 143 | { 144 | Vector2 scrollpos = (Vector2)LayerScrollField.GetValue(__instance); 145 | if (scrollpos.y == 0) 146 | LayerScrollField.SetValue(__instance, _layerScrollCache); 147 | _refocusSelectedLayer = true; // Defer focusing to OnGUI to get latest list size and window rect 148 | } 149 | 150 | // Set scroll to far down when adding new parameter, gets clamped so good enough 151 | public static void AddParameterMenu_Postfix(object __instance, object value) 152 | { 153 | Traverse.Create(__instance).Field("m_ScrollPosition").SetValue(new Vector2(0, 9001)); 154 | } 155 | 156 | // Break 'undo' of sub-state machine pasting 157 | public static void PasteToStateMachineFromPasteboard_Postfix( 158 | AnimatorStateMachine sm, 159 | AnimatorController controller, 160 | int layerIndex, 161 | Vector3 position) 162 | { 163 | //Debug.Log("Yeeet: "+Undo.GetCurrentGroupName()); 164 | Undo.ClearUndo(sm); 165 | } 166 | 167 | // Prevent transition condition parameter change from altering the condition function 168 | private static int ConditionIndex; 169 | private static int ConditionMode_pre; 170 | private static string ConditionParam_pre; 171 | private static AnimatorControllerParameterType ConditionParamType_pre; 172 | public static void DrawConditionsElement_Prefix(object __instance, Rect rect, int index, bool selected, bool focused) 173 | { 174 | ConditionIndex = index; 175 | SerializedProperty conditions = (SerializedProperty)Traverse.Create(__instance).Field("m_Conditions").GetValue(); 176 | SerializedProperty arrayElementAtIndex = conditions.GetArrayElementAtIndex(index); 177 | ConditionMode_pre = arrayElementAtIndex.FindPropertyRelative("m_ConditionMode").intValue; 178 | ConditionParam_pre = arrayElementAtIndex.FindPropertyRelative("m_ConditionEvent").stringValue; 179 | 180 | AnimatorController ctrl = Traverse.Create(__instance).Field("m_Controller").GetValue() as AnimatorController; 181 | if (ctrl) 182 | { 183 | // Unity, why make IndexOfParameter(name) internal -_- 184 | foreach (var param in ctrl.parameters) 185 | { 186 | if (param.name.Equals(ConditionParam_pre)) 187 | { 188 | ConditionParamType_pre = param.type; 189 | break; 190 | } 191 | } 192 | } 193 | } 194 | public static void DrawConditionsElement_Postfix(object __instance, Rect rect, int index, bool selected, bool focused) 195 | { 196 | if (ConditionIndex == index) 197 | { 198 | SerializedProperty conditions = (SerializedProperty)Traverse.Create(__instance).Field("m_Conditions").GetValue(); 199 | SerializedProperty arrayElementAtIndex = conditions.GetArrayElementAtIndex(index); 200 | SerializedProperty m_ConditionMode = arrayElementAtIndex.FindPropertyRelative("m_ConditionMode"); 201 | string conditionparam_post = arrayElementAtIndex.FindPropertyRelative("m_ConditionEvent").stringValue; 202 | 203 | if (!conditionparam_post.Equals(ConditionParam_pre) && (m_ConditionMode.intValue != ConditionMode_pre)) 204 | { 205 | // Parameter and condition changed, restore condition if parameter type is same 206 | AnimatorController ctrl = Traverse.Create(__instance).Field("m_Controller").GetValue() as AnimatorController; 207 | if (ctrl) 208 | { 209 | // Unity, why make IndexOfParameter(name) internal -_- 210 | foreach (var param in ctrl.parameters) 211 | { 212 | if (param.name.Equals(conditionparam_post)) 213 | { 214 | // same type or float->int, fully compatible 215 | if ((param.type == ConditionParamType_pre) 216 | || ((ConditionParamType_pre == AnimatorControllerParameterType.Float) && (param.type == AnimatorControllerParameterType.Int))) 217 | { 218 | m_ConditionMode.intValue = ConditionMode_pre; 219 | Debug.Log("Restored transition condition mode"); 220 | } 221 | // int->float has restrictions 222 | else if ((ConditionParamType_pre == AnimatorControllerParameterType.Int) && (param.type == AnimatorControllerParameterType.Float)) 223 | { 224 | AnimatorConditionMode premode = (AnimatorConditionMode)ConditionMode_pre; 225 | if ((premode != AnimatorConditionMode.Equals) && (premode != AnimatorConditionMode.NotEqual)) 226 | { 227 | m_ConditionMode.intValue = ConditionMode_pre; 228 | Debug.Log("Restored transition condition mode 2"); 229 | } 230 | } 231 | break; 232 | } 233 | } 234 | } 235 | } 236 | } 237 | } 238 | #endregion ExtraStuff 239 | 240 | #region GraphStuff 241 | // Controller asset pinging/selection via bottom bar 242 | public static void DoGraphBottomBar_postfix(object __instance, Rect nameRect) 243 | { 244 | UnityEngine.Object ctrl = (UnityEngine.Object)AnimatorControllerGetter.Invoke(__instance, null); 245 | if (ctrl != (UnityEngine.Object)null) 246 | { 247 | EditorGUIUtility.AddCursorRect(nameRect, MouseCursor.Link); // "I'm clickable!" 248 | 249 | Event current = Event.current; 250 | if (((current.type == EventType.MouseDown) && (current.button == 0)) && nameRect.Contains(current.mousePosition)) 251 | { 252 | EditorGUIUtility.PingObject(ctrl); 253 | if (current.clickCount == 2) // Adhere to the 'select only on double click' convention 254 | Selection.activeObject = ctrl; 255 | current.Use(); 256 | } 257 | } 258 | } 259 | 260 | // Show motion name and extra details on state graph nodes 261 | public static void NodeUI_postfix(object __instance, UnityEditor.Graphs.GraphGUI host) 262 | { 263 | // Figure out which node type 264 | AnimatorState astate = Traverse.Create(__instance).Field("state").GetValue(); 265 | bool hasmotion = astate != null; 266 | AnimatorStateMachine asm = Traverse.Create(__instance).Field("stateMachine").GetValue(); 267 | bool hassm = asm != null; 268 | 269 | // Lazy-init styles because built-in ones not available during static init 270 | if (StateMotionStyle == null) 271 | { 272 | StateExtrasStyle = new GUIStyle(EditorStyles.label); 273 | StateExtrasStyle.alignment = TextAnchor.UpperRight; 274 | StateExtrasStyle.fontStyle = FontStyle.Bold; 275 | StateMotionStyle = new GUIStyle(EditorStyles.label); 276 | StateMotionStyle.alignment = TextAnchor.LowerCenter; 277 | } 278 | Rect rect = GUILayoutUtility.GetLastRect(); 279 | 280 | // Tags in corner, similar to what layer editor does 281 | if ((hasmotion || hassm) && ShowStateExtrasLabel) 282 | { 283 | string extralabel = ""; 284 | if (hasmotion) 285 | { 286 | if (astate.behaviours != null) 287 | if (astate.behaviours.Length > 0) 288 | extralabel += " B"; 289 | if (astate.writeDefaultValues) 290 | extralabel += " WD"; 291 | } 292 | else 293 | { 294 | if (asm.behaviours != null) 295 | if (asm.behaviours.Length > 0) 296 | extralabel += " B"; 297 | } 298 | Rect extralabelrect = new Rect(rect.x, rect.y - 30, rect.width, 20); 299 | EditorGUI.LabelField(extralabelrect, extralabel, StateExtrasStyle); 300 | } 301 | 302 | // Name of Motion (btree or animation clip) at bottom 303 | // TODO? overlaps progress bar in play mode 304 | if (hasmotion && ShowStateMotionLabel) 305 | { 306 | string motionname = "[None]"; 307 | if (astate.motion) 308 | motionname = "[" + astate.motion.name + "]"; 309 | Rect motionlabelrect = new Rect(rect.x, rect.y - 10, rect.width, 20); 310 | EditorGUI.LabelField(motionlabelrect, motionname, StateMotionStyle); 311 | } 312 | 313 | Event current = Event.current; 314 | if (current.type == EventType.KeyDown && current.keyCode == KeyCode.F2) 315 | { 316 | Debug.Log("TODO: Rename"); 317 | } 318 | } 319 | #endregion Graphstuff 320 | 321 | #region LayerStuff 322 | // Layer copy-pasting 323 | private static AnimatorControllerLayer _layerClipboard = null; 324 | private static AnimatorController _controllerClipboard = null; 325 | [HarmonyPriority(Priority.Low)] // Low to not consume event for more extensive tools 326 | public static void OnDrawLayer_Prefix(object __instance, Rect rect, int index, bool selected, bool focused) 327 | { 328 | Event current = Event.current; 329 | if (((current.type == EventType.MouseUp) && (current.button == 1)) && rect.Contains(current.mousePosition)) 330 | { 331 | current.Use(); 332 | GenericMenu menu = new GenericMenu(); 333 | menu.AddItem(EditorGUIUtility.TrTextContent("Copy layer", null, (Texture) null), false, 334 | new GenericMenu.MenuFunction2(AnimatorExtensions.CopyLayer), __instance); 335 | if (_layerClipboard != null) 336 | { 337 | menu.AddItem(EditorGUIUtility.TrTextContent("Paste layer", null, (Texture) null), false, 338 | new GenericMenu.MenuFunction2(AnimatorExtensions.PasteLayer), __instance); 339 | menu.AddItem(EditorGUIUtility.TrTextContent("Paste layer settings", null, (Texture) null), false, 340 | new GenericMenu.MenuFunction2(AnimatorExtensions.PasteLayerSettings), __instance); 341 | } 342 | else 343 | { 344 | menu.AddDisabledItem(EditorGUIUtility.TrTextContent("Paste layer", null, (Texture) null)); 345 | menu.AddDisabledItem(EditorGUIUtility.TrTextContent("Paste layer settings", null, (Texture) null)); 346 | } 347 | menu.AddItem(EditorGUIUtility.TrTextContent("Delete layer", null, (Texture) null), false, 348 | new GenericMenu.MenuFunction(() => Traverse.Create(__instance).Method("DeleteLayer").GetValue(null))); 349 | menu.ShowAsContext(); 350 | } 351 | } 352 | 353 | private static void CopyLayer(object layerControllerView) 354 | { 355 | var rlist = (ReorderableList)LayerListField.GetValue(layerControllerView); 356 | var ctrl = Traverse.Create(layerControllerView).Field("m_Host").Property("animatorController").GetValue(); 357 | _layerClipboard = rlist.list[rlist.index] as AnimatorControllerLayer; 358 | _controllerClipboard = ctrl; 359 | Unsupported.CopyStateMachineDataToPasteboard(_layerClipboard.stateMachine, ctrl, rlist.index); 360 | } 361 | 362 | public static void PasteLayer(object layerControllerView) 363 | { 364 | if (_layerClipboard == null) 365 | return; 366 | var rlist = (ReorderableList)LayerListField.GetValue(layerControllerView); 367 | var ctrl = Traverse.Create(layerControllerView).Field("m_Host").Property("animatorController").GetValue(); 368 | 369 | // Will paste layer right below selected one 370 | int targetindex = rlist.index + 1; 371 | string newname = ctrl.MakeUniqueLayerName(_layerClipboard.name); 372 | Undo.FlushUndoRecordObjects(); 373 | 374 | // Use unity built-in function to clone state machine 375 | ctrl.AddLayer(newname); 376 | var layers = ctrl.layers; 377 | int pastedlayerindex = layers.Length - 1; 378 | var pastedlayer = layers[pastedlayerindex]; 379 | Unsupported.PasteToStateMachineFromPasteboard(pastedlayer.stateMachine, ctrl, pastedlayerindex, Vector3.zero); 380 | 381 | // Promote from child to main 382 | var pastedsm = pastedlayer.stateMachine.stateMachines[0].stateMachine; 383 | pastedsm.name = newname; 384 | pastedlayer.stateMachine.stateMachines = new ChildAnimatorStateMachine[0]; 385 | UnityEngine.Object.DestroyImmediate(pastedlayer.stateMachine, true); 386 | pastedlayer.stateMachine = pastedsm; 387 | PasteLayerProperties(pastedlayer, _layerClipboard); 388 | 389 | // Move up to desired spot 390 | for (int i = layers.Length-1; i > targetindex; i--) 391 | layers[i] = layers[i - 1]; 392 | layers[targetindex] = pastedlayer; 393 | ctrl.layers = layers; 394 | 395 | // Make layer unaffected by undo, forces user to delete manually but prevents dangling sub-assets 396 | Undo.ClearUndo(ctrl); 397 | 398 | // Pasting to different controller, sync parameters 399 | if (ctrl != _controllerClipboard) 400 | { 401 | Undo.IncrementCurrentGroup(); 402 | int curgroup = Undo.GetCurrentGroup(); 403 | Undo.RecordObject(ctrl, "Sync pasted layer parameters"); 404 | 405 | // cache names 406 | // TODO: do this before pasting to workaround default values not being copied 407 | var destparams = new Dictionary(ctrl.parameters.Length); 408 | foreach (var param in ctrl.parameters) 409 | destparams[param.name] = param; 410 | 411 | var srcparams = new Dictionary(_controllerClipboard.parameters.Length); 412 | foreach (var param in _controllerClipboard.parameters) 413 | srcparams[param.name] = param; 414 | 415 | var queuedparams = new Dictionary(_controllerClipboard.parameters.Length); 416 | 417 | // Recursively loop over all nested state machines 418 | GatherSmParams(pastedsm, ref srcparams, ref queuedparams); 419 | 420 | // Sync up whats missing 421 | foreach (var param in queuedparams.Values) 422 | { 423 | string pname = param.name; 424 | if (!destparams.ContainsKey(pname)) 425 | { 426 | Debug.Log("Transferring parameter "+pname); // TODO: count or concatenate names? 427 | ctrl.AddParameter(param); 428 | // note: queuedparams should not have duplicates so don't need to append to destparams 429 | } 430 | } 431 | Undo.CollapseUndoOperations(curgroup); 432 | } 433 | 434 | EditorUtility.SetDirty(ctrl); 435 | AssetDatabase.SaveAssets(); 436 | AssetDatabase.Refresh(); 437 | 438 | // Update list selection 439 | Traverse.Create(layerControllerView).Property("selectedLayerIndex").SetValue(targetindex); 440 | } 441 | 442 | public static void PasteLayerSettings(object layerControllerView) 443 | { 444 | var rlist = (ReorderableList)LayerListField.GetValue(layerControllerView); 445 | AnimatorController ctrl = Traverse.Create(layerControllerView).Field("m_Host").Property("animatorController").GetValue(); 446 | 447 | var layers = ctrl.layers; 448 | var targetlayer = layers[rlist.index]; 449 | PasteLayerProperties(targetlayer, _layerClipboard); 450 | ctrl.layers = layers; // needed for edits to apply 451 | } 452 | 453 | public static void PasteLayerProperties(AnimatorControllerLayer dest, AnimatorControllerLayer src) 454 | { 455 | dest.avatarMask = src.avatarMask; 456 | dest.blendingMode = src.blendingMode; 457 | dest.defaultWeight = src.defaultWeight; 458 | dest.iKPass = src.iKPass; 459 | dest.syncedLayerAffectsTiming = src.syncedLayerAffectsTiming; 460 | dest.syncedLayerIndex = src.syncedLayerIndex; 461 | } 462 | 463 | // Keyboard hooks for layer editing 464 | public static void LayerController_OnGUI_Prefix(object __instance, Rect rect) 465 | { 466 | var rlist = (ReorderableList)LayerListField.GetValue(__instance); 467 | if (rlist.HasKeyboardControl()) 468 | { 469 | Event current = Event.current; 470 | switch (current.type) 471 | { 472 | case EventType.ExecuteCommand: 473 | if (current.commandName == "Copy") 474 | { 475 | current.Use(); 476 | CopyLayer(__instance); 477 | } 478 | else if (current.commandName == "Paste") 479 | { 480 | current.Use(); 481 | PasteLayer(__instance); 482 | } 483 | else if (current.commandName == "Duplicate") 484 | { 485 | current.Use(); 486 | CopyLayer(__instance); 487 | PasteLayer(__instance); 488 | // todo: dupe without polluting clipboard 489 | } 490 | break; 491 | 492 | case EventType.KeyDown: 493 | { 494 | KeyCode keyCode = Event.current.keyCode; 495 | if (keyCode == KeyCode.F2) // Rename 496 | { 497 | current.Use(); 498 | _refocusSelectedLayer = true; 499 | AnimatorControllerLayer layer = rlist.list[rlist.index] as AnimatorControllerLayer; 500 | var rovl = Traverse.Create(__instance).Property("renameOverlay").GetValue(); 501 | BeginRenameMethod.Invoke(rovl, new object[] {layer.name, rlist.index, 0.1f}); 502 | break; 503 | } 504 | break; 505 | } 506 | } 507 | } 508 | 509 | // Adjust scroll to get selected layer visible 510 | if (_refocusSelectedLayer) 511 | { 512 | _refocusSelectedLayer = false; 513 | Vector2 curscroll = (Vector2)LayerScrollField.GetValue(__instance); 514 | float height = (float)GetElementHeightMethod.Invoke(rlist, new object[] {rlist.index}) + 20; 515 | float offs = (float)GetElementYOffsetMethod.Invoke(rlist, new object[] {rlist.index}); 516 | if (offs < curscroll.y) 517 | LayerScrollField.SetValue(__instance, new Vector2(curscroll.x,offs)); 518 | else if (offs+height > curscroll.y+rect.height) 519 | LayerScrollField.SetValue(__instance, new Vector2(curscroll.x,offs+height-rect.height)); 520 | } 521 | } 522 | 523 | // Recursive helper functions to gather deeply-nested parameter references 524 | private static void GatherBtParams(BlendTree bt, 525 | ref Dictionary srcparams, 526 | ref Dictionary queuedparams) 527 | { 528 | if (srcparams.ContainsKey(bt.blendParameter)) 529 | queuedparams[bt.blendParameter] = srcparams[bt.blendParameter]; 530 | if (srcparams.ContainsKey(bt.blendParameterY)) 531 | queuedparams[bt.blendParameterY] = srcparams[bt.blendParameterY]; 532 | 533 | foreach (var cmotion in bt.children) 534 | { 535 | if (srcparams.ContainsKey(cmotion.directBlendParameter)) 536 | queuedparams[cmotion.directBlendParameter] = srcparams[cmotion.directBlendParameter]; 537 | 538 | // Go deeper to nested BlendTrees 539 | var cbt = cmotion.motion as BlendTree; 540 | if (!(cbt is null)) 541 | GatherBtParams(cbt, ref srcparams, ref queuedparams); 542 | } 543 | } 544 | private static void GatherSmParams(AnimatorStateMachine sm, 545 | ref Dictionary srcparams, 546 | ref Dictionary queuedparams) 547 | { 548 | // Go over states to check controlling or BlendTree params 549 | foreach (var cstate in sm.states) 550 | { 551 | var s = cstate.state; 552 | if (s.mirrorParameterActive && srcparams.ContainsKey(s.mirrorParameter)) 553 | queuedparams[s.mirrorParameter] = srcparams[s.mirrorParameter]; 554 | if (s.speedParameterActive && srcparams.ContainsKey(s.speedParameter)) 555 | queuedparams[s.speedParameter] = srcparams[s.speedParameter]; 556 | if (s.timeParameterActive && srcparams.ContainsKey(s.timeParameter)) 557 | queuedparams[s.timeParameter] = srcparams[s.timeParameter]; 558 | if (s.cycleOffsetParameterActive && srcparams.ContainsKey(s.cycleOffsetParameter)) 559 | queuedparams[s.cycleOffsetParameter] = srcparams[s.cycleOffsetParameter]; 560 | 561 | var bt = s.motion as BlendTree; 562 | if (!(bt is null)) 563 | GatherBtParams(bt, ref srcparams, ref queuedparams); 564 | } 565 | 566 | // Go over all transitions 567 | var transitions = new List(sm.anyStateTransitions.Length); 568 | transitions.AddRange(sm.anyStateTransitions); 569 | foreach (var cstate in sm.states) 570 | transitions.AddRange(cstate.state.transitions); 571 | foreach (var transition in transitions) 572 | foreach (var cond in transition.conditions) 573 | if (srcparams.ContainsKey(cond.parameter)) 574 | queuedparams[cond.parameter] = srcparams[cond.parameter]; 575 | 576 | // Go deeper to child sate machines 577 | foreach (var csm in sm.stateMachines) 578 | GatherSmParams(csm.stateMachine, ref srcparams, ref queuedparams); 579 | } 580 | #endregion Layerstuff 581 | } 582 | } 583 | #endif 584 | -------------------------------------------------------------------------------- /Scripts/Editor/AnimatorExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df177ca37e99e964086c7faa96270f03 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/Editor/MaterialCleaner.cs: -------------------------------------------------------------------------------- 1 | 2 | // Original code taken from https://forum.unity.com/threads/clear-old-texture-references-from-materials.318769/ 3 | // Modifications by Dj Lukis.LT and are licensed under "unlicense" 4 | 5 | using UnityEngine; 6 | using UnityEditor; 7 | using System.Collections.Generic; 8 | 9 | //namespace CrankshaftEditor.Toolset 10 | namespace DJL 11 | { 12 | public class MaterialCleaner : EditorWindow 13 | { 14 | private Material m_selectedMaterial; 15 | private SerializedObject m_serializedObject; 16 | private Vector2 scrollPos; 17 | private const string PropPath_Tex = "m_SavedProperties.m_TexEnvs"; 18 | private const string PropPath_Float = "m_SavedProperties.m_Floats"; 19 | private const string PropPath_Col = "m_SavedProperties.m_Colors"; 20 | 21 | [MenuItem("Window/Material Cleaner")] 22 | private static void Init() 23 | { 24 | GetWindow("Mat. Cleaner"); 25 | } 26 | [MenuItem("Tools/DJL/Cleanup Material properties")] 27 | private static void CleanupMultiple() 28 | { 29 | foreach (var obj in Selection.objects) 30 | { 31 | Material mat = obj as Material; 32 | if (mat != null) 33 | { 34 | SerializedObject serObj = new SerializedObject(mat); 35 | RemoveAllUnusedProperties(mat, serObj); 36 | } 37 | } 38 | } 39 | 40 | [MenuItem("CONTEXT/ModelImporter/Cleanup material remapping")] 41 | public static void CLeanupMaterialRemapping(MenuCommand menuCommand) 42 | { 43 | ModelImporter mi = menuCommand.context as ModelImporter; 44 | 45 | // The list of materials that are actually used by the model is not exposed, 46 | // but can be accessed via SerializedObject interface 47 | var usedmats = new SerializedObject(mi).FindProperty("m_Materials"); 48 | 49 | // Cache the actually-used name list 50 | List usednames = new List(usedmats.arraySize); 51 | for (int i = 0; i < usedmats.arraySize; i++) 52 | { 53 | // SourceAssetIdentifier is struct so need to use 'FindPropertyRelative' instead of 'objectReferenceValue' 54 | SerializedProperty usedmat = usedmats.GetArrayElementAtIndex(i).FindPropertyRelative("name"); 55 | usednames.Add(usedmat.stringValue); 56 | } 57 | 58 | var remaps = mi.GetExternalObjectMap(); 59 | int count = 0; 60 | foreach(var kv in remaps) 61 | { 62 | if (kv.Key.type == typeof(UnityEngine.Material)) 63 | { 64 | if (!usednames.Contains(kv.Key.name)) 65 | { 66 | mi.RemoveRemap(kv.Key); 67 | count++; 68 | } 69 | } 70 | } 71 | Debug.Log("Removed " + count + " unused material remaps"); 72 | } 73 | 74 | protected virtual void OnEnable() 75 | { 76 | GetSelectedMaterial(); 77 | } 78 | protected virtual void OnSelectionChange() 79 | { 80 | GetSelectedMaterial(); 81 | } 82 | protected virtual void OnProjectChange() 83 | { 84 | GetSelectedMaterial(); 85 | } 86 | 87 | private void GetSelectedMaterial() 88 | { 89 | m_selectedMaterial = Selection.activeObject as Material; 90 | if (m_selectedMaterial != null) 91 | { 92 | m_serializedObject = new SerializedObject(m_selectedMaterial); 93 | } 94 | 95 | Repaint(); 96 | } 97 | 98 | 99 | protected virtual void OnGUI() 100 | { 101 | EditorGUIUtility.labelWidth = 200f; 102 | 103 | if (m_selectedMaterial == null) 104 | { 105 | EditorGUILayout.LabelField("No material selected"); 106 | } 107 | else 108 | { 109 | m_serializedObject.Update(); 110 | 111 | EditorGUILayout.Space(); 112 | EditorGUILayout.LabelField("Selected material:", m_selectedMaterial.name); 113 | EditorGUILayout.LabelField("Shader:", m_selectedMaterial.shader.name); 114 | EditorGUILayout.LabelField("Keywords: " + m_selectedMaterial.shaderKeywords.Length); 115 | 116 | if (GUILayout.Button("Clear keywords")) 117 | ClearKeywords(m_selectedMaterial); 118 | 119 | EditorGUI.indentLevel++; 120 | for (int i = 0; i < m_selectedMaterial.shaderKeywords.Length; i++) 121 | { 122 | string kwname = m_selectedMaterial.shaderKeywords[i]; 123 | using (new EditorGUILayout.HorizontalScope()) 124 | { 125 | EditorGUILayout.LabelField(kwname); 126 | if (GUILayout.Button("Remove", GUILayout.Width(80f))) 127 | { 128 | Undo.RecordObject(m_selectedMaterial, "Material keyword remove"); 129 | m_selectedMaterial.DisableKeyword(kwname); 130 | EditorUtility.SetDirty(m_selectedMaterial); 131 | GUIUtility.ExitGUI(); 132 | } 133 | } 134 | } 135 | EditorGUI.indentLevel--; 136 | 137 | EditorGUILayout.LabelField("Properties:"); 138 | if (GUILayout.Button("Cleanup properties")) 139 | RemoveAllUnusedProperties(m_selectedMaterial, m_serializedObject); 140 | 141 | scrollPos = EditorGUILayout.BeginScrollView(scrollPos); 142 | EditorGUI.indentLevel++; 143 | 144 | ProcessProperties(PropPath_Tex, "Textures", true); 145 | ProcessProperties(PropPath_Float, "Floats", false); 146 | ProcessProperties(PropPath_Col, "Colors", false); 147 | 148 | EditorGUI.indentLevel--; 149 | EditorGUILayout.EndScrollView(); 150 | } 151 | 152 | EditorGUIUtility.labelWidth = 0; 153 | } 154 | 155 | private void ProcessProperties(string path, string name, bool checkTexture) 156 | { 157 | var properties = m_serializedObject.FindProperty(path); 158 | if (properties != null && properties.isArray) 159 | { 160 | int count = properties.arraySize; 161 | EditorGUILayout.LabelField($"{name}: {count}"); 162 | EditorGUI.indentLevel++; 163 | 164 | for (int i = 0; i < count; i++) 165 | { 166 | string propName = properties.GetArrayElementAtIndex(i).displayName; 167 | if (!m_selectedMaterial.HasProperty(propName)) 168 | { 169 | using (new EditorGUILayout.HorizontalScope()) 170 | { 171 | if (checkTexture && (m_selectedMaterial.GetTexture(propName) != null)) 172 | EditorGUILayout.LabelField(propName, "Unused and set", "CN StatusError"); 173 | else 174 | EditorGUILayout.LabelField(propName, "Unused", "CN StatusWarn"); 175 | if (GUILayout.Button("Remove", GUILayout.Width(80f))) 176 | { 177 | properties.DeleteArrayElementAtIndex(i); 178 | m_serializedObject.ApplyModifiedProperties(); 179 | GUIUtility.ExitGUI(); 180 | } 181 | } 182 | } 183 | } 184 | EditorGUI.indentLevel--; 185 | } 186 | } 187 | 188 | private static int RemoveUnusedProperties(Material mat, SerializedObject serObj, string path) 189 | { 190 | int removedprops = 0; 191 | var properties = serObj.FindProperty(path); 192 | if (properties != null && properties.isArray) 193 | { 194 | int amount = properties.arraySize; 195 | for (int i = amount-1; i >= 0; i--) // reverse loop because array gets modified 196 | { 197 | string propName = properties.GetArrayElementAtIndex(i).displayName; 198 | if (!mat.HasProperty(propName)) 199 | { 200 | properties.DeleteArrayElementAtIndex(i); 201 | removedprops++; 202 | } 203 | } 204 | if (removedprops > 0) 205 | serObj.ApplyModifiedProperties(); 206 | } 207 | return removedprops; 208 | } 209 | private static void RemoveAllUnusedProperties(Material mat, SerializedObject serObj) 210 | { 211 | if (!mat.shader.isSupported) 212 | { 213 | Debug.LogWarning("Skipping \""+mat.name+"\" cleanup because shader is unsupported!"); 214 | return; 215 | } 216 | Undo.RecordObject(mat, "Material property cleanup"); 217 | int removedprops = 0; 218 | removedprops += RemoveUnusedProperties(mat, serObj, PropPath_Tex); 219 | removedprops += RemoveUnusedProperties(mat, serObj, PropPath_Float); 220 | removedprops += RemoveUnusedProperties(mat, serObj, PropPath_Col); 221 | 222 | Debug.Log("Removed "+removedprops+" unused properties from "+mat.name); 223 | } 224 | private static void ClearKeywords(Material mat) 225 | { 226 | Undo.RecordObject(mat, "Material keyword clear"); 227 | string[] keywords = mat.shaderKeywords; 228 | mat.shaderKeywords = new string[0]; 229 | } 230 | } 231 | } 232 | -------------------------------------------------------------------------------- /Scripts/Editor/MaterialCleaner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e1fb3a44da89784689c69714ea4ee45 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/Editor/MaterialInspectorLocator.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace DJL 5 | { 6 | public class MaterialInspectorLocator 7 | { 8 | [MenuItem("CONTEXT/Material/Select Material")] 9 | private static void SelectAssetObject(MenuCommand command) 10 | { 11 | Material obj = command.context as Material; 12 | 13 | // Select the object in the project folder 14 | Selection.activeObject = obj; 15 | 16 | // Also flash the folder yellow to highlight it 17 | EditorGUIUtility.PingObject(obj); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Scripts/Editor/MaterialInspectorLocator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 019bf0bf2fe820e479b45b72ff0b10ff 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/Editor/MeshAssetSaver.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace DJL 5 | { 6 | public static class MeshAssetSaver 7 | { 8 | [MenuItem("CONTEXT/MeshFilter/Export as asset")] 9 | public static void SaveMeshInPlace(MenuCommand menuCommand) { 10 | MeshFilter mf = menuCommand.context as MeshFilter; 11 | Mesh m = mf.sharedMesh; 12 | SaveMesh(m, m.name, true, false); 13 | } 14 | 15 | [MenuItem("CONTEXT/MeshFilter/Optimise and export as asset")] 16 | public static void SaveMeshNewInstanceItem(MenuCommand menuCommand) { 17 | MeshFilter mf = menuCommand.context as MeshFilter; 18 | Mesh m = mf.sharedMesh; 19 | SaveMesh(m, m.name, true, true); 20 | } 21 | 22 | [MenuItem("CONTEXT/SkinnedMeshRenderer/Export as asset/Regular")] 23 | public static void SaveSkinnedMeshInPlace(MenuCommand menuCommand) { 24 | SkinnedMeshRenderer smr = menuCommand.context as SkinnedMeshRenderer; 25 | Mesh m = smr.sharedMesh; 26 | SaveMesh(m, m.name, true, false); 27 | } 28 | 29 | [MenuItem("CONTEXT/SkinnedMeshRenderer/Export as asset/Optimized")] 30 | public static void SaveSkinnedMeshNewInstanceItem(MenuCommand menuCommand) { 31 | SkinnedMeshRenderer smr = menuCommand.context as SkinnedMeshRenderer; 32 | Mesh m = smr.sharedMesh; 33 | SaveMesh(m, m.name, true, true); 34 | } 35 | 36 | [MenuItem("CONTEXT/SkinnedMeshRenderer/Export as asset/With custom bounds")] 37 | public static void SaveSkinnedMeshInPlaceBounds(MenuCommand menuCommand) { 38 | SkinnedMeshRenderer smr = menuCommand.context as SkinnedMeshRenderer; 39 | Mesh m = smr.sharedMesh; 40 | //Bounds bounds = m.bounds 41 | m.bounds = smr.localBounds; 42 | SaveMesh(m, m.name, true, false); 43 | } 44 | 45 | // Bounds copy-pasting 46 | static bool boundscopied = false; 47 | static Bounds copiedbounds = new Bounds(); 48 | [MenuItem("CONTEXT/SkinnedMeshRenderer/Copy Bounds")] 49 | public static void CopySkinnedMeshBounds(MenuCommand menuCommand) 50 | { 51 | SkinnedMeshRenderer smr = menuCommand.context as SkinnedMeshRenderer; 52 | copiedbounds = smr.localBounds; 53 | boundscopied = true; 54 | } 55 | [MenuItem("CONTEXT/MeshRenderer/Copy Bounds")] 56 | public static void CopyMeshRendererBounds(MenuCommand menuCommand) 57 | { 58 | MeshRenderer mr = menuCommand.context as MeshRenderer; 59 | copiedbounds = mr.bounds; 60 | boundscopied = true; 61 | } 62 | [MenuItem("CONTEXT/Mesh/Copy Bounds")] 63 | public static void CopyMeshBounds(MenuCommand menuCommand) 64 | { 65 | Mesh smr = menuCommand.context as Mesh; 66 | copiedbounds = smr.bounds; 67 | boundscopied = true; 68 | } 69 | 70 | [MenuItem("CONTEXT/SkinnedMeshRenderer/Paste Bounds", true)] 71 | public static bool CanPasteSkinnedMeshBounds(MenuCommand menuCommand) 72 | { 73 | return boundscopied; 74 | } 75 | [MenuItem("CONTEXT/SkinnedMeshRenderer/Paste Bounds", false)] 76 | public static void PasteSkinnedMeshBounds(MenuCommand menuCommand) 77 | { 78 | SkinnedMeshRenderer smr = menuCommand.context as SkinnedMeshRenderer; 79 | Undo.RecordObject(smr, "Paste Bounds"); 80 | smr.localBounds = copiedbounds; 81 | } 82 | 83 | public static void SaveMesh (Mesh mesh, string name, bool makeNewInstance, bool optimizeMesh) { 84 | string path = EditorUtility.SaveFilePanel("Save Separate Mesh Asset", "Assets/", name, "asset"); 85 | if (string.IsNullOrEmpty(path)) return; 86 | 87 | path = FileUtil.GetProjectRelativePath(path); 88 | 89 | Mesh meshToSave = (makeNewInstance) ? UnityEngine.Object.Instantiate(mesh) as Mesh : mesh; 90 | 91 | if (optimizeMesh) 92 | MeshUtility.Optimize(meshToSave); 93 | 94 | AssetDatabase.CreateAsset(meshToSave, path); 95 | AssetDatabase.SaveAssets(); 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Scripts/Editor/MeshAssetSaver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06d78ac7a21d6104daa51d2af234de93 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/Editor/MeshBoundsInspector.cs: -------------------------------------------------------------------------------- 1 |  2 | // Editor script to draw regular mesh bounds like it's done for skinned meshes 3 | // Based on Unity C# reference source 4 | // https://github.com/Unity-Technologies/UnityCsReference/blob/2018.4/Editor/Mono/Inspector/SkinnedMeshRendererEditor.cs 5 | 6 | // TODO: add a way of hiding, as minimizing component does not 7 | 8 | using UnityEngine; 9 | using UnityEditor; 10 | using UnityEditor.IMGUI.Controls; 11 | 12 | [CustomEditor(typeof(MeshFilter))] 13 | [CanEditMultipleObjects] 14 | public class MeshBoundsInspector : Editor 15 | { 16 | private BoxBoundsHandle m_BoundsHandle = new BoxBoundsHandle(); 17 | public void OnEnable() 18 | { 19 | // https://github.com/Unity-Technologies/UnityCsReference/blob/046023e393f90a7952d53a7386bfcfd231bf4870/Editor/Mono/Handles.cs#L55 20 | Color s_BoundingBoxHandleColor = new Color(255, 255, 255, 150) / 255; 21 | m_BoundsHandle.SetColor(s_BoundingBoxHandleColor); 22 | } 23 | 24 | public void OnSceneGUI() 25 | { 26 | if (!target) 27 | return; 28 | MeshFilter mf = (MeshFilter)target; 29 | var mesh = mf.sharedMesh; 30 | if (!mesh) 31 | return; 32 | 33 | using (new Handles.DrawingScope(mf.transform.localToWorldMatrix)) 34 | { 35 | Bounds bounds = mesh.bounds; 36 | m_BoundsHandle.center = bounds.center; 37 | m_BoundsHandle.size = bounds.size; 38 | 39 | m_BoundsHandle.DrawHandle(); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Scripts/Editor/MeshBoundsInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a5111e5005633b644addeab60fdf5d5a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/Editor/PointMeshCreator.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using UnityEditor; 4 | 5 | namespace DJL 6 | { 7 | public class PointMeshCreator : EditorWindow 8 | { 9 | public Vector3 meshSize = new Vector3(1, 1, 1); 10 | public Vector3 originPos = new Vector3(0, 0, 0); 11 | public Vector3Int meshDensity = new Vector3Int(10, 10, 10); 12 | 13 | 14 | [MenuItem("Tools/DJL/Create Point Mesh")] 15 | public static void ShowWindow() 16 | { 17 | GetWindow(true, "Create Point Mesh", true); 18 | } 19 | 20 | void OnGUI() 21 | { 22 | meshSize = EditorGUILayout.Vector3Field("Mesh size", meshSize, GUILayout.Width(300)); 23 | meshDensity = EditorGUILayout.Vector3IntField("Point amount", meshDensity, GUILayout.Width(300)); 24 | originPos = EditorGUILayout.Vector3Field("Origin (unit)", originPos, GUILayout.Width(300)); 25 | 26 | GUILayout.FlexibleSpace(); 27 | EditorGUILayout.BeginHorizontal(); 28 | GUILayout.FlexibleSpace(); 29 | if (GUILayout.Button("Create Mesh", GUILayout.Width(100), GUILayout.Height(30))) 30 | { 31 | string path = EditorUtility.SaveFilePanelInProject("Save mesh to", "Pmesh.asset", "asset", "message"); 32 | if (path.Length == 0) 33 | return; 34 | 35 | // TODO: check if asset exists and update it instead 36 | 37 | int numpoints = meshDensity.x * meshDensity.y * meshDensity.z; 38 | Mesh mesh = new Mesh(); 39 | mesh.name = "Pointmesh"; 40 | mesh.indexFormat = numpoints > 65535 ? UnityEngine.Rendering.IndexFormat.UInt32 : UnityEngine.Rendering.IndexFormat.UInt16; 41 | 42 | List vertices = new List(); 43 | Vector3 step = new Vector3(meshSize.x/(meshDensity.x-1),meshSize.y/(meshDensity.y-1), meshSize.z/(meshDensity.z-1)); 44 | Vector3 offs = Vector3.Scale(meshSize, originPos); 45 | for (int z = 0; z < meshDensity.z; z++) 46 | for (int y = 0; y < meshDensity.y; y++) 47 | for (int x = 0; x < meshDensity.x; x++) 48 | vertices.Add(new Vector3(step.x*x - offs.x, step.y*y - offs.y, step.z*z - offs.z)); 49 | mesh.vertices = vertices.ToArray(); 50 | int[] indices = new int[numpoints]; 51 | for (int i = 0; i < indices.Length; i++) 52 | indices[i] = i; 53 | mesh.SetIndices(indices, MeshTopology.Points, 0); 54 | 55 | //mesh.Optimize(); 56 | mesh.RecalculateBounds(); 57 | 58 | AssetDatabase.CreateAsset(mesh, path); 59 | AssetDatabase.SaveAssets(); 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Scripts/Editor/PointMeshCreator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c3d2c5431ad48344b59966dcbe612a3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/Editor/README.md: -------------------------------------------------------------------------------- 1 | # Editor tools 2 | **NOTE:** these must be placed inside a folder named `Editor` to work! 3 | 4 | ## Animator Extensions 5 | Some [Harmony](https://github.com/pardeike/Harmony) -based patches to Unitys Animator window: 6 | * Layer copy-pasting and duplication (including cross-controller) via context menu or keyboard shortcuts 7 | * F2 keyboard shortcut to rename selected layer 8 | * Instead of the annoying list scrollbar reset, get new or edited layer in view 9 | * Similarly scroll to bottom when adding a new parameter 10 | * Prevent transition condition mode/function resetting when swapping parameter 11 | * Highlight/select animator controller by single/double-clicking its path in bottom bar 12 | * Show extra labels on animation states, both toggleable via window menu: 13 | * Animation clip or BlendTree name 14 | * `B` if has StateBehaviors 15 | * `WD` if has Write-Defaults enabled 16 | * Disable undo of "Paste Sub-Sate Machine" action as it leaves dangling sub-assets. 17 | Manually delete pasted layers or sub-state machines to correctly dispose of majority _(but still not all)_ of sub-assets! 18 | 19 | ![Animator Extensions context menu](.img/AnimatorExtensions_Labels.png) 20 | ![Animator Extensions context menu](.img/AnimatorExtensions_Context.png) 21 | 22 | ## Material Cleaner 23 | Full window to display material keywords, property stats and and allow quick cleanup of unused ones. 24 | Also has single click way to cleanup multiple materials via Toolbar->`Tools/DJL/Cleanup Material properties`. 25 | Skips materials with missing/invalid shaders so hopefully should not damage assets. 26 | Extra feature: cleanup unused material remaps of imported models. Acessible by context/right-click menu of the model inspector. 27 | > _When a material gets renamed/deleted in modeling software and reimported to unity, the old material reference is no longer 28 | visible through regular user interface and bloats exported packages_ 29 | 30 | ![Material cleaner window](.img/MaterialCleaner.png) 31 | 32 | ## Point-cloud mesh creator 33 | ![Point Mesh Creator window](.img/PointMeshCreator.jpg) 34 | 35 | ## Material object locator 36 | With some material shown in inspector, right-click its header to select and highlight material object in project window, just like Unity allows to select the shader 37 | 38 | ## Mesh asset saver 39 | Right click `Mesh Filter` or `Skinned Mesh Renderer` component to save its mesh as an asset. Useful for saving runtime(script)-generated meshes. 40 | One of the options allows to **overwrite the mesh bounds** with the ones specified in `Skinned Mesh Renderer` component. 41 | Can also manually copy and paste (Skinned)MeshRenderer bounds. 42 | 43 | ## Mesh bounds inspector 44 | Makes `Mesh Filter` components show bounding box like `Skinned Mesh Renderer`s do 45 | -------------------------------------------------------------------------------- /Shaders/DJL/.img/A2CDemo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukis101/VRCUnityStuffs/b12bbca118cf0460d69193f26f8b8a51b49d1a9c/Shaders/DJL/.img/A2CDemo.gif -------------------------------------------------------------------------------- /Shaders/DJL/A2C-Custom.shader: -------------------------------------------------------------------------------- 1 |  2 | // Custom Alpha-to-coverage by Dj Lukis.LT (Unlicense) 3 | 4 | // Dithering code logic yoinked from Amplify and XSToon (MIT) 5 | // https://github.com/Xiexe/Xiexes-Unity-Shaders 6 | 7 | // Edit fragment shader to use texture alpha instead of UV.x 8 | 9 | Shader "DJL/A2C-Custom" 10 | { 11 | Properties 12 | { 13 | _MainTex ("Texture", 2D) = "white" {} 14 | _Alpha("Alpha Value", Range(0, 1)) = 1 15 | _DitherGradient("Dither Strength", Range(0, 1)) = 1 16 | [ToggleUI]_Gamma("Gamma Adjust", Float) = 0 17 | [Toggle(_NATIVE_A2C)]_AlphaToMask("Native A2C", Float) = 0 18 | } 19 | SubShader 20 | { 21 | Tags { "Queue" = "AlphaTest" "RenderType"="TransparentCutout" } 22 | 23 | Cull Off 24 | //Blend Off 25 | AlphaToMask [_AlphaToMask] 26 | //LOD 100 27 | 28 | Pass 29 | { 30 | CGPROGRAM 31 | #pragma vertex vert 32 | #pragma fragment frag 33 | // 4.5+ Required for GetRenderTargetSampleCount() 34 | #pragma target 5.0 35 | #pragma shader_feature _NATIVE_A2C 36 | 37 | #include "UnityCG.cginc" 38 | 39 | uniform float _Alpha; 40 | uniform float _Gamma; 41 | uniform float _DitherGradient; 42 | 43 | struct appdata 44 | { 45 | float4 vertex : POSITION; 46 | float2 uv : TEXCOORD0; 47 | }; 48 | 49 | struct v2f 50 | { 51 | float4 vertex : SV_POSITION; 52 | float2 uv : TEXCOORD0; 53 | float4 screenPos : TEXCOORD1; 54 | }; 55 | 56 | sampler2D _MainTex; 57 | float4 _MainTex_ST; 58 | 59 | v2f vert (appdata v) 60 | { 61 | v2f o; 62 | o.vertex = UnityObjectToClipPos(v.vertex); 63 | o.uv = TRANSFORM_TEX(v.uv, _MainTex); 64 | o.screenPos = ComputeGrabScreenPos(o.vertex); 65 | return o; 66 | } 67 | 68 | /// Dither matrix from "Amplify Shader Editor" 69 | inline half Dither8x8Bayer(int x, int y) 70 | { 71 | const half dither[64] = { 72 | 1, 49, 13, 61, 4, 52, 16, 64, 73 | 33, 17, 45, 29, 36, 20, 48, 32, 74 | 9, 57, 5, 53, 12, 60, 8, 56, 75 | 41, 25, 37, 21, 44, 28, 40, 24, 76 | 3, 51, 15, 63, 2, 50, 14, 62, 77 | 35, 19, 47, 31, 34, 18, 46, 30, 78 | 11, 59, 7, 55, 10, 58, 6, 54, 79 | 43, 27, 39, 23, 42, 26, 38, 22 80 | }; 81 | int r = y * 8 + x; 82 | return dither[r] / 65; // Use 65 instead of 64 to get better centering 83 | } 84 | // https://github.com/Xiexe/Xiexes-Unity-Shaders/blob/2bade4beb87e96d73811ac2509588f27ae2e989f/Main/CGIncludes/XSHelperFunctions.cginc#L120 85 | half2 calcScreenUVs(float4 screenPos) 86 | { 87 | half2 uv = screenPos / (screenPos.w + 0.0000000001); 88 | #if UNITY_SINGLE_PASS_STEREO 89 | uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); 90 | #else 91 | uv.xy *= _ScreenParams.xy; 92 | #endif 93 | 94 | return uv; 95 | } 96 | 97 | half applyDithering(half alpha, float4 screenPos, half spacing) 98 | { 99 | half2 screenuv = calcScreenUVs(screenPos).xy; 100 | half dither = Dither8x8Bayer(fmod(screenuv.x, 8), fmod(screenuv.y, 8)); 101 | return alpha + (0.5 - dither)/spacing; 102 | } 103 | 104 | 105 | half4 frag(v2f i 106 | #ifndef _NATIVE_A2C 107 | , out uint cov : SV_Coverage 108 | #endif 109 | ) : SV_Target 110 | { 111 | half a = _Alpha; 112 | 113 | // Demo with just UV 114 | a *= i.uv.x; 115 | 116 | // Or to use texture instead: 117 | //half4 tex = tex2D(_MainTex, i.uv); 118 | //a *= tex.r; 119 | 120 | if (_Gamma) 121 | a = pow(a, 2.2); 122 | 123 | // Get the amount of MSAA samples enabled 124 | uint samplecount = GetRenderTargetSampleCount(); 125 | 126 | a = applyDithering(a, i.screenPos, samplecount / _DitherGradient); 127 | 128 | #ifndef _NATIVE_A2C 129 | // center out the steps 130 | a = a * samplecount + 0.5; 131 | 132 | // Shift and subtract to get the needed amount of positive bits 133 | cov = (1u << (uint)(a)) - 1u; 134 | 135 | // Output 1 as alpha, otherwise result would be a^2 136 | a = 1; 137 | #endif 138 | return half4(1,1,1, a); 139 | } 140 | ENDCG 141 | } 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /Shaders/DJL/Overlays/WorldPosOblique.shader: -------------------------------------------------------------------------------- 1 | // A simple unity shader example/template that visualizes world position to demonstrate 2 | // correct depth sampling with oblique view frustums, target use case being mirrors in VRChat 3 | 4 | // Algorithm based on the one provided by Alexander V. Popov 5 | // in "An Efficient Depth Linearization Method for Oblique View Frustums" 6 | // http://jcgt.org/published/0005/04/03/paper.pdf 7 | 8 | // This code is released under "The Unlicense", see UNLICENSE file 9 | 10 | Shader "DJL/Overlays/World position(oblique frustum aware)" 11 | { 12 | Properties 13 | { 14 | } 15 | SubShader 16 | { 17 | Tags { "Queue" = "Transparent" "RenderType"="Transparent" "IgnoreProjector"="True" } 18 | //Blend SrcAlpha OneMinusSrcAlpha 19 | //Blend One One 20 | Cull Off 21 | ZWrite Off 22 | //ZTest Always 23 | //ColorMask RGBA 24 | 25 | Pass 26 | { 27 | CGPROGRAM 28 | #pragma vertex vert 29 | #pragma fragment frag 30 | #pragma target 3.0 31 | 32 | #include "UnityCG.cginc" 33 | #define PM UNITY_MATRIX_P 34 | 35 | struct appdata 36 | { 37 | float4 vertex : POSITION; 38 | float2 uv : TEXCOORD0; 39 | }; 40 | 41 | struct v2f 42 | { 43 | float4 vertex : SV_POSITION; 44 | float4 worldPos : TEXCOORD1; 45 | float4 grabPos : TEXCOORD2; 46 | float4 worldDirection : TEXCOORD3; 47 | }; 48 | 49 | UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture); 50 | 51 | inline float4 CalculateFrustumCorrection() 52 | { 53 | float x1 = -PM._31/(PM._11*PM._34); 54 | float x2 = -PM._32/(PM._22*PM._34); 55 | return float4(x1, x2, 0, PM._33/PM._34 + x1*PM._13 + x2*PM._23); 56 | } 57 | inline float CorrectedLinearEyeDepth(float z, float B) 58 | { 59 | return 1.0 / (z/PM._34 + B); 60 | } 61 | 62 | v2f vert(appdata v) 63 | { 64 | v2f o; 65 | o.vertex = UnityObjectToClipPos(v.vertex); 66 | o.worldPos = mul(unity_ObjectToWorld, v.vertex); 67 | o.grabPos = ComputeGrabScreenPos(o.vertex); 68 | o.worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; 69 | // pack correction factor into direction w component to save space 70 | o.worldDirection.w = dot(o.vertex, CalculateFrustumCorrection()); 71 | return o; 72 | } 73 | 74 | float4 frag(v2f i) : SV_Target 75 | { 76 | float perspectiveDivide = 1.0f / i.vertex.w; 77 | float4 direction = i.worldDirection * perspectiveDivide; 78 | float2 screenpos = i.grabPos.xy * perspectiveDivide; 79 | 80 | float z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screenpos); 81 | 82 | // Only tested on setup with reversed Z buffer 83 | #if UNITY_REVERSED_Z 84 | if (z == 0) 85 | #else 86 | if (z == 1) 87 | #endif 88 | return float4(0,0,0,1); 89 | 90 | // Linearize depth and use it to calculate background world position 91 | float depth = CorrectedLinearEyeDepth(z, direction.w); 92 | float3 worldpos = direction * depth + (_WorldSpaceCameraPos.xyz); 93 | 94 | return float4(frac(worldpos), 1.0f); 95 | } 96 | ENDCG 97 | } 98 | } 99 | FallBack "Diffuse" 100 | } 101 | -------------------------------------------------------------------------------- /Shaders/DJL/README.md: -------------------------------------------------------------------------------- 1 | # Shaders 2 | 3 | * ## A2C-Custom 4 | Custom dithered "Alpha to coverage" shader that does not rely on GPU vendor implementation details (like AMD using dithering while Nvidia not) and allows outputting custom alpha values for application-specific needs. 5 | A preview of what happens on AMD GPU when trying to dither alpha for native A2C: 6 | ![AMD A2C Dithering Demo](.img/A2CDemo.gif) 7 | * ## [Stage FX](StageFX) 8 | (Older versions of) shaders used in ["DJL Dance Stage" VRChat world](https://vrchat.com/home/launch?worldId=wrld_a7f7d997-5261-4f64-abd2-082757d9797c) 9 | * ## Overlays 10 | Mirror-aware world position reconstruction from depth, will add more things for special FX 11 | -------------------------------------------------------------------------------- /Shaders/DJL/StageFX/ColorFuncs.cginc: -------------------------------------------------------------------------------- 1 | #ifndef COLOR_FUNCS 2 | #define COLOR_FUNCS 3 | 4 | // Color conversion functions by Ian Taylor, 5 | // source: http://www.chilliant.com/rgb2hsv.html 6 | 7 | const static float Epsilon = 1e-10; 8 | 9 | float3 LerpColor_RGB(in float3 rgb1, in float3 rgb2, in float interp) 10 | { 11 | return lerp(rgb1, rgb2, interp); 12 | } 13 | 14 | // ----- HSV operations ----- // 15 | 16 | float3 HUEtoRGB(in float H) 17 | { 18 | float R = abs(H * 6 - 3) - 1; 19 | float G = 2 - abs(H * 6 - 2); 20 | float B = 2 - abs(H * 6 - 4); 21 | return saturate(float3(R,G,B)); 22 | } 23 | float3 RGBtoHCV(in float3 RGB) 24 | { 25 | // Based on work by Sam Hocevar and Emil Persson 26 | float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0/3.0) : float4(RGB.gb, 0.0, -1.0/3.0); 27 | float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); 28 | float C = Q.x - min(Q.w, Q.y); 29 | float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); 30 | return float3(H, C, Q.x); 31 | } 32 | float3 RGBtoHSV(in float3 RGB) 33 | { 34 | float3 HCV = RGBtoHCV(RGB); 35 | float S = HCV.y / (HCV.z + Epsilon); 36 | return float3(HCV.x, S, HCV.z); 37 | } 38 | float3 HSVtoRGB(in float3 HSV) 39 | { 40 | float3 RGB = HUEtoRGB(HSV.x); 41 | return ((RGB - 1) * HSV.y + 1) * HSV.z; 42 | } 43 | 44 | // Code taken from blog post of Alan Zucconi 45 | // https://www.alanzucconi.com/2016/01/06/colour-interpolation/2/ 46 | float HueLerp(in float h1, in float h2, in float interp) 47 | { 48 | float h; 49 | float d = h2 - h1; 50 | if (h1 > h2) 51 | { 52 | // Swap hues 53 | float temp = h2; 54 | h2 = h1; 55 | h1 = temp; 56 | 57 | d = -d; 58 | interp = 1 - interp; 59 | } 60 | 61 | if (d > 0.5) // 180deg 62 | { 63 | h1 = h1 + 1; // 360deg 64 | h = frac( h1 + interp * (h2 - h1) ); // 360deg 65 | } 66 | if (d <= 0.5) // 180deg 67 | { 68 | h = h1 + interp * d; 69 | } 70 | return h; 71 | } 72 | 73 | float3 LerpHSV(in float3 hsv1, in float3 hsv2, in float interp) 74 | { 75 | float hue = HueLerp(hsv1.x, hsv2.x, interp); 76 | return float3(hue, lerp(hsv1.yz, hsv2.yz, interp)); 77 | } 78 | float3 LerpColor_HSV_Simple(in float3 rgb1, in float3 rgb2, in float interp) 79 | { 80 | float3 hsv1 = RGBtoHSV(rgb1); 81 | float3 hsv2 = RGBtoHSV(rgb2); 82 | float3 hsvout = lerp(hsv1, hsv2, interp); 83 | return HSVtoRGB(hsvout); 84 | } 85 | float3 LerpColor_HSV(in float3 rgb1, in float3 rgb2, in float interp) 86 | { 87 | float3 hsv1 = RGBtoHSV(rgb1); 88 | float3 hsv2 = RGBtoHSV(rgb2); 89 | float3 hsvout = LerpHSV(hsv1, hsv2, interp); 90 | return HSVtoRGB(hsvout); 91 | } 92 | 93 | // ----- HCY operations ----- // 94 | 95 | // The weights of RGB contributions to luminance. 96 | // Should sum to unity. 97 | float3 HCYwts = float3(0.299, 0.587, 0.114); 98 | 99 | float3 HCYtoRGB(in float3 HCY) 100 | { 101 | float3 RGB = HUEtoRGB(HCY.x); 102 | float Z = dot(RGB, HCYwts); 103 | if (HCY.z < Z) 104 | { 105 | HCY.y *= HCY.z / Z; 106 | } 107 | else if (Z < 1) 108 | { 109 | HCY.y *= (1 - HCY.z) / (1 - Z); 110 | } 111 | return (RGB - Z) * HCY.y + HCY.z; 112 | } 113 | float3 RGBtoHCY(in float3 RGB) 114 | { 115 | // Corrected by David Schaeffer 116 | float3 HCV = RGBtoHCV(RGB); 117 | float Y = dot(RGB, HCYwts); 118 | float Z = dot(HUEtoRGB(HCV.x), HCYwts); 119 | if (Y < Z) 120 | { 121 | HCV.y *= Z / (Epsilon + Y); 122 | } 123 | else 124 | { 125 | HCV.y *= (1 - Z) / (Epsilon + 1 - Y); 126 | } 127 | return float3(HCV.x, HCV.y, Y); 128 | } 129 | 130 | float3 LerpColor_HCY(in float3 rgb1, in float3 rgb2, in float interp) 131 | { 132 | float3 hcy1 = RGBtoHCY(rgb1); 133 | float3 hcy2 = RGBtoHCY(rgb2); 134 | float3 hsvout = LerpHSV(hcy1, hcy2, interp); 135 | return HCYtoRGB(hsvout); 136 | } 137 | float3 LerpColor_HCY_Simple(in float3 rgb1, in float3 rgb2, in float interp) 138 | { 139 | float3 hcy1 = RGBtoHCY(rgb1); 140 | float3 hcy2 = RGBtoHCY(rgb2); 141 | float3 hsvout = lerp(hcy1, hcy2, interp); 142 | return HCYtoRGB(hsvout); 143 | } 144 | 145 | // SOURCE: https://gist.github.com/mattatz/44f081cac87e2f7c8980 146 | /* 147 | * Conversion between RGB and LAB colorspace. 148 | * Import from flowabs glsl program : https://code.google.com/p/flowabs/source/browse/glsl/?r=f36cbdcf7790a28d90f09e2cf89ec9a64911f138 149 | */ 150 | float3 rgb2xyz( float3 c ) { 151 | float3 tmp; 152 | tmp.x = ( c.r > 0.04045 ) ? pow( ( c.r + 0.055 ) / 1.055, 2.4 ) : c.r / 12.92; 153 | tmp.y = ( c.g > 0.04045 ) ? pow( ( c.g + 0.055 ) / 1.055, 2.4 ) : c.g / 12.92, 154 | tmp.z = ( c.b > 0.04045 ) ? pow( ( c.b + 0.055 ) / 1.055, 2.4 ) : c.b / 12.92; 155 | const float3x3 mat = float3x3( 156 | 0.4124, 0.3576, 0.1805, 157 | 0.2126, 0.7152, 0.0722, 158 | 0.0193, 0.1192, 0.9505 159 | ); 160 | return 100.0 * mul(tmp, mat); 161 | } 162 | 163 | float3 xyz2lab( float3 c ) { 164 | float3 n = c / float3(95.047, 100, 108.883); 165 | float3 v; 166 | v.x = ( n.x > 0.008856 ) ? pow( n.x, 1.0 / 3.0 ) : ( 7.787 * n.x ) + ( 16.0 / 116.0 ); 167 | v.y = ( n.y > 0.008856 ) ? pow( n.y, 1.0 / 3.0 ) : ( 7.787 * n.y ) + ( 16.0 / 116.0 ); 168 | v.z = ( n.z > 0.008856 ) ? pow( n.z, 1.0 / 3.0 ) : ( 7.787 * n.z ) + ( 16.0 / 116.0 ); 169 | return float3(( 116.0 * v.y ) - 16.0, 500.0 * ( v.x - v.y ), 200.0 * ( v.y - v.z )); 170 | } 171 | 172 | float3 rgb2lab( float3 c ) { 173 | float3 lab = xyz2lab( rgb2xyz( c ) ); 174 | return float3( lab.x / 100.0, 0.5 + 0.5 * ( lab.y / 127.0 ), 0.5 + 0.5 * ( lab.z / 127.0 )); 175 | } 176 | 177 | float3 lab2xyz( float3 c ) { 178 | float fy = ( c.x + 16.0 ) / 116.0; 179 | float fx = c.y / 500.0 + fy; 180 | float fz = fy - c.z / 200.0; 181 | return float3( 182 | 95.047 * (( fx > 0.206897 ) ? fx * fx * fx : ( fx - 16.0 / 116.0 ) / 7.787), 183 | 100.000 * (( fy > 0.206897 ) ? fy * fy * fy : ( fy - 16.0 / 116.0 ) / 7.787), 184 | 108.883 * (( fz > 0.206897 ) ? fz * fz * fz : ( fz - 16.0 / 116.0 ) / 7.787) 185 | ); 186 | } 187 | 188 | float3 xyz2rgb( float3 c ) { 189 | const float3x3 mat = float3x3( 190 | 3.2406, -1.5372, -0.4986, 191 | -0.9689, 1.8758, 0.0415, 192 | 0.0557, -0.2040, 1.0570 193 | ); 194 | float3 v = mul(c / 100.0, mat); 195 | float3 r; 196 | r.x = ( v.r > 0.0031308 ) ? (( 1.055 * pow( v.r, ( 1.0 / 2.4 ))) - 0.055 ) : 12.92 * v.r; 197 | r.y = ( v.g > 0.0031308 ) ? (( 1.055 * pow( v.g, ( 1.0 / 2.4 ))) - 0.055 ) : 12.92 * v.g; 198 | r.z = ( v.b > 0.0031308 ) ? (( 1.055 * pow( v.b, ( 1.0 / 2.4 ))) - 0.055 ) : 12.92 * v.b; 199 | return r; 200 | } 201 | 202 | float3 lab2rgb( float3 c ) { 203 | return xyz2rgb( lab2xyz( float3(100.0 * c.x, 2.0 * 127.0 * (c.y - 0.5), 2.0 * 127.0 * (c.z - 0.5)) ) ); 204 | } 205 | 206 | #endif 207 | -------------------------------------------------------------------------------- /Shaders/DJL/StageFX/LScreen_Processing_Lite.shader: -------------------------------------------------------------------------------- 1 | // Render loop/processing shader for dot matrix stage FX 2 | // This code is released under "The Unlicense", see UNLICENSE file 3 | 4 | Shader "DJL/StageFX/Processing(Lite)" 5 | { 6 | Properties 7 | { 8 | [NoScaleOffset] 9 | _Buffer ("Main buffer", 2D) = "black" {} 10 | _Input ("Input (depth texture)", 2D) = "black" {} 11 | [IntRange] _Decay ("Decay", Range (1, 30)) = 5 12 | [KeywordEnum(Trail, Fire, Gravity, Glow)] _Mode ("Effect type", Int) = 0 13 | [Toggle(_)] _Sparkle("Sparkle", Int) = 0 14 | [Toggle(_HIDING_ON)] _Hide("Hide from regular view", Int) = 0 15 | } 16 | SubShader 17 | { 18 | Tags { "Queue"="Transparent" "RenderType"="Overlay" "PreviewType"="Plane" "IgnoreProjector"="True" "DisableBatching"="True" } 19 | Blend Off 20 | Cull Off 21 | ZWrite Off 22 | ZTest Always 23 | //ColorMask RGB 24 | 25 | Pass 26 | { 27 | CGPROGRAM 28 | #pragma vertex vert 29 | #pragma fragment frag 30 | #pragma target 3.0 31 | 32 | #pragma shader_feature _HIDING_ON 33 | #include "UnityCG.cginc" 34 | 35 | Texture2D _Input; 36 | float4 _Input_ST; 37 | Texture2D _Buffer; 38 | float4 _Buffer_TexelSize; 39 | 40 | uniform int _Decay; 41 | uniform float _Mode; 42 | 43 | struct vs_in 44 | { 45 | float4 vertex : POSITION; 46 | float4 uv : TEXCOORD0; 47 | }; 48 | struct fs_in 49 | { 50 | float4 pos : SV_POSITION; 51 | float4 uv : TEXCOORD0; 52 | float2 iuv : TEXCOORD1; 53 | float2 adj : TEXCOORD2; 54 | }; 55 | 56 | //--- Vertex shader ---// 57 | fs_in vert(vs_in v) 58 | { 59 | fs_in o; 60 | if (_ProjectionParams.z == 1) // fill the target camera 61 | { 62 | o.pos = float4(v.uv.x*2-1, 1-v.uv.y*2, 0.5, 1); 63 | } 64 | else 65 | { 66 | #if _HIDING_ON 67 | o.pos = float4(0,0,-2,1); // out of clip range 68 | #else 69 | o.pos = UnityObjectToClipPos(v.vertex); // regular quad for the rest 70 | #endif 71 | } 72 | float aratio = _Buffer_TexelSize.z / _Buffer_TexelSize.w; 73 | // xy - aspect ratio adjusted, zw - pixel-scale coords 74 | o.uv = float4(v.uv.x*aratio, v.uv.y, v.uv.xy*_Buffer_TexelSize.zw); 75 | o.iuv = TRANSFORM_TEX(v.uv.xy, _Input)*_Buffer_TexelSize.zw; 76 | o.adj.x = 90.0 / unity_DeltaTime.w; // fps compensation 77 | o.adj.y = _Decay * 2.6; // tweaked decay value 78 | return o; 79 | } 80 | 81 | //--- Fragment shader ---// 82 | fixed frag (fs_in i) : SV_Target 83 | { 84 | static const fixed STEP = 1.0/255.0; 85 | static const fixed RANGE = 1.0-STEP; 86 | static const fixed SCROLLRATIO = 0.5; 87 | 88 | fixed fpscompensate = i.adj.x; 89 | fixed decayadjusted = i.adj.y; 90 | fixed last = _Buffer.Load(int3(i.uv.zw, 0)).r; 91 | fixed inp = _Input.Load(int3(i.iuv, 0)).r > 0; // discard depth 92 | fixed noise = 0; 93 | 94 | // TODO use value of 0 when uvs out of range 95 | if (_Mode > 0.5) // Gravity 96 | { 97 | last = lerp(last, _Buffer.Load(int3(i.uv.zw + int2(0,1), 0)).r, SCROLLRATIO); 98 | } 99 | 100 | fixed next = max(last*RANGE - STEP*_Decay*fpscompensate, inp); 101 | 102 | return next; 103 | } 104 | ENDCG 105 | } 106 | } 107 | } -------------------------------------------------------------------------------- /Shaders/DJL/StageFX/LScreen_Screen.shader: -------------------------------------------------------------------------------- 1 | // Render loop/processing shader for dot matrix stage FX 2 | // Copyright (c) 2019 Dj Lukis.LT 3 | // MIT license (see LICENSE in https://github.com/lukis101/VRCUnityStuffs) 4 | 5 | Shader "DJL/StageFX/Screen" 6 | { 7 | Properties 8 | { 9 | [NoScaleOffset] 10 | _Buffer ("Buffer", 2D) = "black" {} 11 | [Enum(UnityEngine.Rendering.CullMode)] _CullMode("Cull Mode", Float) = 0 // Off 12 | [Toggle(_)] _Shape("Circle shape", Float) = 0 13 | _Radius ("Segment radius", Range(0.0, 1.0)) = 0.4 14 | _Glow ("Glow", Range( 1.0, 5.0)) = 1.0 15 | _Mult ("Multiplier (fading)", Range (0.0, 1.0)) = 1.0 16 | 17 | [Header(Modifiers)] 18 | _HueOffset ("Hue shift", Range( 0.0, 1.0)) = 0.0 19 | _Desaturate ("Desaturate", Range( 0.0, 1.0)) = 0.0 20 | 21 | [Header(Colors)] 22 | [HDR]_FrontColor("Front color", Color) = (1,1,1,1) 23 | [HDR]_TrailColor1("Trail color 1(start)", Color) = (1,0,0,1) 24 | [HDR]_TrailColor2("Trail color 2(middle)", Color) = (0,1,0,1) 25 | [HDR]_TrailColor3("Trail color 3(end)", Color) = (0,0,1,1) 26 | 27 | // [Header(Stencil)] 28 | // [IntRange] _Stencil ("ID", Range(0,255)) = 0 29 | // [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Comparison", Int) = 3 30 | // [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 0 31 | } 32 | SubShader 33 | { 34 | Tags { "Queue"="Transparent" "RenderType"="Transparent" "IgnoreProjector"="True" "PreviewType"="Plane" } 35 | 36 | /*Stencil 37 | { 38 | Ref [_Stencil] 39 | Comp [_StencilComp] 40 | Pass keep 41 | Fail keep 42 | ZFail keep 43 | }*/ 44 | Pass 45 | { 46 | Name "FORWARD" 47 | Tags { "LightMode"="ForwardBase" } 48 | Blend One One 49 | Cull [_CullMode] 50 | ZWrite Off 51 | //ZTest [_ZTest] 52 | //AlphaToMask On 53 | //ColorMask RGBA 54 | 55 | CGPROGRAM 56 | #pragma vertex vert 57 | #pragma fragment frag 58 | #pragma multi_compile_instancing 59 | #pragma target 3.0 60 | 61 | #include "UnityCG.cginc" 62 | #include "ColorFuncs.cginc" 63 | #define DIM_EDGES 64 | #define ANTIALIAS 65 | //#define DEBUG_ANTIALIAS 66 | 67 | Texture2D _Buffer; 68 | float4 _Buffer_TexelSize; 69 | 70 | uniform float _Shape; 71 | uniform float _Glow; 72 | uniform float _Mult; 73 | //uniform float _HueOffset; 74 | //uniform float _Desaturate; 75 | UNITY_INSTANCING_BUFFER_START(Props) 76 | UNITY_DEFINE_INSTANCED_PROP(float4, _FrontColor) 77 | UNITY_DEFINE_INSTANCED_PROP(float4, _TrailColor1) 78 | UNITY_DEFINE_INSTANCED_PROP(float4, _TrailColor2) 79 | UNITY_DEFINE_INSTANCED_PROP(float4, _TrailColor3) 80 | UNITY_DEFINE_INSTANCED_PROP(float, _Radius) 81 | UNITY_DEFINE_INSTANCED_PROP(float, _HueOffset) 82 | UNITY_DEFINE_INSTANCED_PROP(float, _Desaturate) 83 | UNITY_INSTANCING_BUFFER_END(Props) 84 | 85 | struct vs_in 86 | { 87 | float4 vertex : POSITION; 88 | float2 uv : TEXCOORD0; 89 | UNITY_VERTEX_INPUT_INSTANCE_ID 90 | }; 91 | struct fs_in 92 | { 93 | float4 pos : SV_POSITION; 94 | float4 uv : TEXCOORD0; 95 | UNITY_VERTEX_INPUT_INSTANCE_ID 96 | UNITY_VERTEX_OUTPUT_STEREO 97 | }; 98 | 99 | float3 LerpHSV_(in float3 c1, in float3 c2, in float value) 100 | { 101 | static const float DESAT_DIM = 0.9; // brightness when desaturated 102 | float3 hsv1 = RGBtoHSV(c1); 103 | float3 hsv2 = RGBtoHSV(c2); 104 | float3 hsvout = float3(HueLerp(hsv1.x,hsv2.x,value),lerp(hsv1.y,hsv2.y,value),lerp(hsv1.z,hsv2.z,value)); 105 | float desat = UNITY_ACCESS_INSTANCED_PROP(Props, _Desaturate); 106 | hsvout.y *= (1-desat); 107 | hsvout.z *= DESAT_DIM+(1-desat)*(1-DESAT_DIM); 108 | hsvout.x = frac(hsvout.x + UNITY_ACCESS_INSTANCED_PROP(Props, _HueOffset)); // shift and wrap to unit range 109 | return HSVtoRGB(hsvout); 110 | } 111 | 112 | //--- Vertex shader ---// 113 | fs_in vert(vs_in v) 114 | { 115 | fs_in o; 116 | UNITY_SETUP_INSTANCE_ID(v); 117 | UNITY_TRANSFER_INSTANCE_ID(v, o); 118 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 119 | o.pos = UnityObjectToClipPos(v.vertex); 120 | o.uv = float4(v.uv.xy, v.uv.xy * _Buffer_TexelSize.zw); 121 | return o; 122 | } 123 | 124 | //--- Fragment shader ---// 125 | half4 frag (fs_in i) : SV_Target 126 | { 127 | UNITY_SETUP_INSTANCE_ID(i); 128 | static const fixed VALUE_STEP = 1.0/256.0; 129 | static const uint FRONT_STEPS = 4; 130 | static const float SIDE_FALLOFF = 0.3; 131 | 132 | const static float MAIN_RANGE = 1.0 - VALUE_STEP*(FRONT_STEPS+1); 133 | float2 fragpos = i.uv.zw; // in pixels 134 | int2 addr = fragpos; // discard fractional part 135 | float2 segmcenter = addr + float2(0.5, 0.5); 136 | float segmdist_sq = max(abs(segmcenter.x-fragpos.x),abs(segmcenter.y-fragpos.y)); 137 | float segmdist_c = distance(fragpos, segmcenter); 138 | float segmdist = lerp(segmdist_sq, segmdist_c, _Shape); 139 | 140 | bool reflprobe = _ScreenParams.x < 257; // Prevent shaping in low resolution 141 | 142 | float radius = UNITY_ACCESS_INSTANCED_PROP(Props, _Radius); 143 | #ifdef ANTIALIAS 144 | float2 fw = fwidth(i.uv.xy)*_ScreenParams.xy*0.125; 145 | float duv = saturate((fw.x+fw.y)*0.5-0.5 + reflprobe); 146 | radius = lerp(radius, 1, duv); 147 | //return float4( duv,0,0,1); 148 | #ifdef DEBUG_ANTIALIAS // Bypass to compare anti-alias logic 149 | if (i.uv.x < 0.5) 150 | radius = UNITY_ACCESS_INSTANCED_PROP(Props, _Radius); 151 | #endif 152 | #endif 153 | 154 | half input = _Buffer.Load(int3(addr.xy, 0)); 155 | half3 color = 0; 156 | 157 | float alpha = segmdist < radius; 158 | alpha *= input > 0; 159 | #ifdef ANTIALIAS 160 | alpha *= 1.0 + reflprobe*0.9; // Compensate brightness in reflection probes 161 | #endif 162 | 163 | half input_adj = input / MAIN_RANGE; // compensate for range reduction by 'front' color 164 | 165 | half3 col1 = 0; 166 | half3 col2 = UNITY_ACCESS_INSTANCED_PROP(Props, _TrailColor2).rgb; 167 | half colorratio = 0; 168 | if (input_adj > 0.5) // Color 1 to 2 169 | { 170 | half3 cfront = UNITY_ACCESS_INSTANCED_PROP(Props, _FrontColor ).rgb; 171 | half3 ctrail1 = UNITY_ACCESS_INSTANCED_PROP(Props, _TrailColor1).rgb; 172 | col1 = lerp(cfront, ctrail1, input_adj < MAIN_RANGE); 173 | colorratio = 1-(input_adj-0.5)*2; 174 | // workaround for color conversions not preserving full black 175 | if ((col1.r+col1.g+col1.b) < VALUE_STEP) 176 | alpha = 0; 177 | } 178 | else // Color 2 to 3 179 | { 180 | colorratio = input_adj*2; 181 | col1 = UNITY_ACCESS_INSTANCED_PROP(Props, _TrailColor3).rgb; 182 | } 183 | color = LerpHSV_(col1, col2, colorratio); 184 | 185 | #ifdef DIM_EDGES 186 | // Dim at screen horizontal borders 187 | alpha *= 2 - abs(i.uv.x-0.5)*4; 188 | #endif 189 | // Smooth out dot edges 190 | //float radius2 = radius*0.15; 191 | //alpha *= (1-saturate((segmdist-radius+radius2)/radius2)); 192 | 193 | #ifdef ANTIALIAS 194 | #ifdef DEBUG_ANTIALIAS // Bypass to compare anti-alias logic 195 | if (i.uv.x > 0.5) 196 | #endif 197 | alpha *= clamp(1-duv*5, 0.1, 1); 198 | #endif 199 | 200 | half3 adjustedcol = pow(color,2)*_Glow; 201 | return half4(adjustedcol*alpha*_Mult, 1); 202 | } 203 | ENDCG 204 | } 205 | } 206 | //FallBack "Diffuse" 207 | } -------------------------------------------------------------------------------- /Shaders/DJL/StageFX/README.md: -------------------------------------------------------------------------------- 1 | # Stage FX shaders 2 | Shaders that I use in [DJL Dance Stage world](https://www.vrchat.net/home/launch?worldId=wrld_a7f7d997-5261-4f64-abd2-082757d9797c) 3 | Processing shader is used with render textures to simulate custom render loop. 4 | Processing shader version shared here is trimmed to exclude noise-based features (namely _Fire_ mode and _Sparkle_ modifier found in the VRC world) 5 | 6 | **Prefabs with unity package will be uploaded later** 7 | -------------------------------------------------------------------------------- /UNLICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | --------------------------------------------------------------------------------