├── screen.jpg ├── ProjectSettings ├── ProjectVersion.txt ├── CommonBurstAotSettings.json ├── ClusterInputManager.asset ├── PresetManager.asset ├── XRSettings.asset ├── VersionControlSettings.asset ├── TimeManager.asset ├── EditorBuildSettings.asset ├── VFXManager.asset ├── BurstAotSettings_StandaloneWindows.json ├── AudioManager.asset ├── TagManager.asset ├── UnityConnectSettings.asset ├── EditorSettings.asset ├── PackageManagerSettings.asset ├── DynamicsManager.asset ├── QualitySettings.asset ├── NavMeshAreas.asset ├── Physics2DSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset └── ProjectSettings.asset ├── .vsconfig ├── Assets ├── FastMarchingCubes │ ├── Textures │ │ ├── texture.png │ │ └── texture.png.meta │ ├── Scenes │ │ ├── SampleScene.unity.meta │ │ └── SampleScene.unity │ ├── Materials.meta │ ├── Scenes.meta │ ├── Shaders.meta │ ├── Textures.meta │ ├── Extensions.meta │ ├── Materials │ │ ├── Triplanar.mat.meta │ │ └── Triplanar.mat │ ├── Chunk.cs.meta │ ├── Mesher.cs.meta │ ├── Example.cs.meta │ ├── GenerateJob.cs.meta │ ├── MeshingJob.cs.meta │ ├── Shaders │ │ ├── TriplanarSurface.shader.meta │ │ └── TriplanarSurface.shader │ ├── Mesher.Arrays.cs.meta │ ├── Extensions │ │ ├── MeshExtensions.cs.meta │ │ └── MeshExtensions.cs │ ├── Chunk.cs │ ├── Mesher.cs │ ├── GenerateJob.cs │ ├── Example.cs │ └── MeshingJob.cs ├── Wireframe │ ├── Examples │ │ ├── Textures │ │ │ ├── checkerboard.jpg │ │ │ └── checkerboard.jpg.meta │ │ ├── WireframeImageEffect.unity.meta │ │ ├── WireframeShaders.unity.meta │ │ ├── Materials.meta │ │ ├── Scripts.meta │ │ ├── Textures.meta │ │ ├── WireframeShadersSettings.lighting.meta │ │ ├── WireframeImageEffectSettings.lighting.meta │ │ ├── Materials │ │ │ ├── Standard.mat.meta │ │ │ ├── Wireframe-Solid.mat.meta │ │ │ ├── Wireframe-ShadedUnlit.mat.meta │ │ │ ├── Wireframe-Transparent.mat.meta │ │ │ ├── Wireframe-TransparentCulled.mat.meta │ │ │ ├── Standard.mat │ │ │ ├── Wireframe-Solid.mat │ │ │ ├── Wireframe-Transparent.mat │ │ │ ├── Wireframe-TransparentCulled.mat │ │ │ └── Wireframe-ShadedUnlit.mat │ │ ├── Scripts │ │ │ ├── AutoRotate.cs.meta │ │ │ └── AutoRotate.cs │ │ ├── WireframeShadersSettings.lighting │ │ ├── WireframeImageEffectSettings.lighting │ │ ├── WireframeImageEffect.unity │ │ └── WireframeShaders.unity │ ├── Examples.meta │ ├── Shaders.meta │ ├── ImageEffect.meta │ ├── Shaders │ │ ├── Resources.meta │ │ ├── Wireframe.cginc.meta │ │ ├── Wireframe.shader.meta │ │ ├── WireframeTransparent.shader.meta │ │ ├── WireframeShaded-Unlit.shader.meta │ │ ├── Resources │ │ │ ├── Wireframe-Global.shader.meta │ │ │ ├── WireframeShaded-Unlit-Global.shader.meta │ │ │ ├── WireframeTransparent-Global.shader.meta │ │ │ ├── WireframeTransparentCulled-Global.shader.meta │ │ │ ├── Wireframe-Global.shader │ │ │ ├── WireframeTransparent-Global.shader │ │ │ ├── WireframeTransparentCulled-Global.shader │ │ │ └── WireframeShaded-Unlit-Global.shader │ │ ├── WireframeTransparentCulled.shader.meta │ │ ├── Wireframe.shader │ │ ├── WireframeTransparent.shader │ │ ├── WireframeTransparentCulled.shader │ │ ├── Wireframe.cginc │ │ └── WireframeShaded-Unlit.shader │ └── ImageEffect │ │ ├── WireframeImageEffect.cs.meta │ │ └── WireframeImageEffect.cs ├── Utils.meta ├── Wireframe.meta ├── FastMarchingCubes.meta └── Utils │ ├── TimeCounter.cs.meta │ ├── UnsafePointer.cs.meta │ ├── RotationControl.cs.meta │ ├── TimeCounter.cs │ ├── UnsafePointer.cs │ └── RotationControl.cs ├── UserSettings └── EditorUserSettings.asset ├── LICENSE ├── .gitignore ├── Packages ├── manifest.json └── packages-lock.json └── README.md /screen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigos91/fastMarchingCubes/HEAD/screen.jpg -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2020.3.23f1 2 | m_EditorVersionWithRevision: 2020.3.23f1 (c5d91304a876) 3 | -------------------------------------------------------------------------------- /.vsconfig: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "components": [ 4 | "Microsoft.VisualStudio.Workload.ManagedGame" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /ProjectSettings/CommonBurstAotSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MonoBehaviour": { 3 | "Version": 3, 4 | "DisabledWarnings": "" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Textures/texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigos91/fastMarchingCubes/HEAD/Assets/FastMarchingCubes/Textures/texture.png -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Textures/checkerboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigos91/fastMarchingCubes/HEAD/Assets/Wireframe/Examples/Textures/checkerboard.jpg -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /Assets/Utils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a00de17cb2b4454e93936283ec523ad 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wireframe.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2459bd9152f5e6d4ba061a53e49d96bf 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9aee144b555abbd4a98eb252ede2adfa 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acbb154ad9e959e45a9e255c485a7cb8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9388ffd12afc6a42a184089a782de1c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6feb10d99dbf06843a506cecbbab816a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 516770ffa6f52144db34783e17803228 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Extensions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: de4829c5ecbe1f7478d22dd48a82447f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/WireframeImageEffect.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 03a63f225942b8c448cae9afd102cd65 3 | timeCreated: 1510337189 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/WireframeShaders.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e150bec0cff5c0a4a8cb8562daef65b5 3 | timeCreated: 1510336344 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Materials/Triplanar.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55eec5f8bd6a19f4ebe1478202c09604 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7d2f71438e47a24599982d5fba86b00 3 | folderAsset: yes 4 | timeCreated: 1510336260 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c346e94a7904a7b438d7e3ce3d59ced9 3 | folderAsset: yes 4 | timeCreated: 1510335785 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /Assets/Wireframe/ImageEffect.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77ede725aa4193e4cad0d1edb3abacc0 3 | folderAsset: yes 4 | timeCreated: 1510335835 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 49917f0017e2fe94f9a9c6744325c86d 3 | folderAsset: yes 4 | timeCreated: 1510336407 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2d480734d818944cb878cd18913c6a5 3 | folderAsset: yes 4 | timeCreated: 1510336552 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 827d242de2e0e5b41bc655afd087f0a4 3 | folderAsset: yes 4 | timeCreated: 1514327991 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b979e1ca97ce894c892a696977098ad 3 | folderAsset: yes 4 | timeCreated: 1514327153 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/Wireframe.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b693f100d417e6e4d801acc7f073311e 3 | timeCreated: 1514327156 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/Wireframe.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7de4bf0f370ca243b4604b8cd314ffc 3 | timeCreated: 1510335795 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/WireframeShadersSettings.lighting.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6503f20c48db55e49b5f6b14e3736822 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4890085278179872738 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/WireframeTransparent.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 90cadb91a7902754f9fe5b4563306677 3 | timeCreated: 1510335794 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/WireframeImageEffectSettings.lighting.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 662148627117ecb45939b750432c03cd 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4890085278179872738 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/WireframeShaded-Unlit.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 349737f389860b042946c40afa327524 3 | timeCreated: 1514327156 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Materials/Standard.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa974dea2827b2a48a184876c9c3629b 3 | timeCreated: 1514328568 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/Resources/Wireframe-Global.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eda14fadbcd8360489e3b44c67587d85 3 | timeCreated: 1510336028 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/WireframeTransparentCulled.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a64caad055200da45b6df1c7c80839ed 3 | timeCreated: 1510335794 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Materials/Wireframe-Solid.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e716fa77392144f429f502f781e7f56b 3 | timeCreated: 1510336429 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/Resources/WireframeShaded-Unlit-Global.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f40228a07d09584498b18aefbdfa409 3 | timeCreated: 1514327156 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/Resources/WireframeTransparent-Global.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d21a827a79cb6c4d829ef32a8286794 3 | timeCreated: 1510336028 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Materials/Wireframe-ShadedUnlit.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbe40dfb3249aca43ba4e4bf028c6b5e 3 | timeCreated: 1510336429 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Materials/Wireframe-Transparent.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6833a623d1b4df54abdfe933a1483a27 3 | timeCreated: 1510336429 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/Resources/WireframeTransparentCulled-Global.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f4edd4b0c688c744a9dda3dccba8553e 3 | timeCreated: 1510336028 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Materials/Wireframe-TransparentCulled.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e563d2611df3e984e92203420188c3ee 3 | timeCreated: 1510336429 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Utils/TimeCounter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f093605ced126414da5d7c89d041fbdd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Utils/UnsafePointer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d1d2829c4c55db468f19a6b87ce4b03 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Chunk.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 476617e6e121e4c43b4c2a767f198df5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Mesher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 40856febe1b24ae4f8b6fadc80e4ad77 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Utils/RotationControl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b8491ff2f083b0448afd9468e2e903b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Example.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c408235735e3efa4eb89f693b7409052 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/GenerateJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89d974cedcf63d0489cf7df64681d30b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/MeshingJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 13737198002c31045b90f71c79f1acbf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Shaders/TriplanarSurface.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f70bedd53fb9dac4490a5b399f4d8b57 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Mesher.Arrays.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 951f456837a244047bd5259999c9f509 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Extensions/MeshExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a01d37ed04944fc47aa1adc7b092b56d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/FastMarchingCubes/Scenes/SampleScene.unity 10 | guid: 9fc0d4010bbf28b4594072e72b8655ab 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Scripts/AutoRotate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4124c59241137374c9cae45d25683042 3 | timeCreated: 1510336570 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Wireframe/ImageEffect/WireframeImageEffect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff3b440a66b67aa4697009c0155eddc8 3 | timeCreated: 1510335864 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Scripts/AutoRotate.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SuperSystems.UnityTools 4 | { 5 | 6 | public class AutoRotate : MonoBehaviour 7 | { 8 | public Vector3 speed = new Vector3(10, 10, 10); 9 | public Space space = Space.World; 10 | 11 | void Update() 12 | { 13 | transform.Rotate(speed * Time.deltaTime, space); 14 | } 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /ProjectSettings/BurstAotSettings_StandaloneWindows.json: -------------------------------------------------------------------------------- 1 | { 2 | "MonoBehaviour": { 3 | "Version": 3, 4 | "EnableBurstCompilation": true, 5 | "EnableOptimisations": true, 6 | "EnableSafetyChecks": false, 7 | "EnableDebugInAllBuilds": false, 8 | "UsePlatformSDKLinker": false, 9 | "CpuMinTargetX32": 0, 10 | "CpuMaxTargetX32": 0, 11 | "CpuMinTargetX64": 0, 12 | "CpuMaxTargetX64": 0, 13 | "CpuTargetsX32": 4, 14 | "CpuTargetsX64": 16 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/Resources/Wireframe-Global.shader: -------------------------------------------------------------------------------- 1 | Shader "hidden/SuperSystems/Wireframe-Global" 2 | { 3 | SubShader 4 | { 5 | // Each color represents a meter. 6 | 7 | Tags { "RenderType"="Opaque" } 8 | 9 | Pass 10 | { 11 | // Wireframe shader based on the the following 12 | // http://developer.download.nvidia.com/SDK/10/direct3d/Source/SolidWireframe/Doc/SolidWireframe.pdf 13 | 14 | CGPROGRAM 15 | #pragma vertex vert 16 | #pragma geometry geom 17 | #pragma fragment frag 18 | 19 | #include "UnityCG.cginc" 20 | #include "../Wireframe.cginc" 21 | 22 | ENDCG 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/Resources/WireframeTransparent-Global.shader: -------------------------------------------------------------------------------- 1 | Shader "hidden/SuperSystems/Wireframe-Transparent-Global" 2 | { 3 | SubShader 4 | { 5 | Tags { 6 | "IgnoreProjector"="True" 7 | "Queue"="Transparent" 8 | "RenderType"="Opaque" 9 | } 10 | 11 | Pass 12 | { 13 | Blend SrcAlpha OneMinusSrcAlpha 14 | ZWrite Off 15 | Cull Off 16 | 17 | // Wireframe shader based on the the following 18 | // http://developer.download.nvidia.com/SDK/10/direct3d/Source/SolidWireframe/Doc/SolidWireframe.pdf 19 | 20 | CGPROGRAM 21 | #pragma vertex vert 22 | #pragma geometry geom 23 | #pragma fragment frag 24 | 25 | #include "UnityCG.cginc" 26 | #include "../Wireframe.cginc" 27 | 28 | ENDCG 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Chunk.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Unity.Collections; 3 | 4 | namespace MarchingCubes 5 | { 6 | public class Chunk : IDisposable 7 | { 8 | public const int ChunkSizeX = 32; /* can be changed */ 9 | public const int ChunkSizeY = 32; /* can be changed */ 10 | public const int ChunkSizeZ = 32; /* can be changed , but optimized version of marching cubes would not work (need 32 voxel in z coordinate) */ 11 | public const int VoxelsAmount = ChunkSizeX * ChunkSizeY * ChunkSizeZ; 12 | 13 | public NativeArray data; 14 | 15 | public Chunk() 16 | { 17 | data = new NativeArray(ChunkSizeX * ChunkSizeY * ChunkSizeZ, Allocator.Persistent, NativeArrayOptions.ClearMemory); 18 | } 19 | 20 | public void Dispose() 21 | { 22 | data.Dispose(); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/Resources/WireframeTransparentCulled-Global.shader: -------------------------------------------------------------------------------- 1 | Shader "hidden/SuperSystems/Wireframe-Transparent-Culled-Global" 2 | { 3 | SubShader 4 | { 5 | // Each color represents a meter. 6 | 7 | Tags { 8 | "IgnoreProjector"="True" 9 | "Queue"="Transparent" 10 | "RenderType"="Opaque" 11 | } 12 | 13 | Pass 14 | { 15 | Blend SrcAlpha OneMinusSrcAlpha 16 | ZWrite Off 17 | Cull Back 18 | 19 | // Wireframe shader based on the the following 20 | // http://developer.download.nvidia.com/SDK/10/direct3d/Source/SolidWireframe/Doc/SolidWireframe.pdf 21 | 22 | CGPROGRAM 23 | #pragma vertex vert 24 | #pragma geometry geom 25 | #pragma fragment frag 26 | 27 | #include "UnityCG.cginc" 28 | #include "../Wireframe.cginc" 29 | 30 | ENDCG 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Assets/Utils/TimeCounter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using UnityEngine; 5 | 6 | public class TimeCounter 7 | { 8 | Stopwatch stopwatch = new Stopwatch(); 9 | float[] measurements; 10 | 11 | public float mean { get; private set; } 12 | 13 | public TimeCounter(int samplesCount = 100) { mean = 0.0f; measurements = new float[samplesCount]; } 14 | 15 | public void Start() 16 | { 17 | stopwatch.Restart(); 18 | } 19 | 20 | public void Stop(bool updateMean = true) 21 | { 22 | stopwatch.Stop(); 23 | measurements[Time.frameCount % measurements.Length] = 1000.0f * stopwatch.ElapsedTicks / (float)Stopwatch.Frequency; 24 | 25 | if (updateMean) 26 | { 27 | mean = 0; 28 | foreach (var item in measurements) 29 | mean += item; 30 | mean /= measurements.Length; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/Wireframe.shader: -------------------------------------------------------------------------------- 1 | Shader "SuperSystems/Wireframe" 2 | { 3 | Properties 4 | { 5 | _WireThickness ("Wire Thickness", RANGE(0, 800)) = 100 6 | _WireSmoothness ("Wire Smoothness", RANGE(0, 20)) = 3 7 | _WireColor ("Wire Color", Color) = (0.0, 1.0, 0.0, 1.0) 8 | _BaseColor ("Base Color", Color) = (0.0, 0.0, 0.0, 1.0) 9 | _MaxTriSize ("Max Tri Size", RANGE(0, 200)) = 25 10 | } 11 | 12 | SubShader 13 | { 14 | Tags { 15 | "RenderType"="Opaque" 16 | } 17 | 18 | Pass 19 | { 20 | // Wireframe shader based on the the following 21 | // http://developer.download.nvidia.com/SDK/10/direct3d/Source/SolidWireframe/Doc/SolidWireframe.pdf 22 | 23 | CGPROGRAM 24 | #pragma vertex vert 25 | #pragma geometry geom 26 | #pragma fragment frag 27 | 28 | #include "UnityCG.cginc" 29 | #include "Wireframe.cginc" 30 | 31 | ENDCG 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /UserSettings/EditorUserSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!162 &1 4 | EditorUserSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ConfigSettings: 8 | RecentlyUsedScenePath-0: 9 | value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d 10 | flags: 0 11 | RecentlyUsedScenePath-1: 12 | value: 224247031146467d0c1d180f11315c181f191f09392a2323621a1e36ece52777d1e63bf9eb3f0c3f3c0cea721130082beb 13 | flags: 0 14 | vcSharedLogLevel: 15 | value: 0d5e400f0650 16 | flags: 0 17 | m_VCAutomaticAdd: 1 18 | m_VCDebugCom: 0 19 | m_VCDebugCmd: 0 20 | m_VCDebugOut: 0 21 | m_SemanticMergeMode: 2 22 | m_VCShowFailedCheckout: 1 23 | m_VCOverwriteFailedCheckoutAssets: 1 24 | m_VCProjectOverlayIcons: 1 25 | m_VCHierarchyOverlayIcons: 1 26 | m_VCOtherOverlayIcons: 1 27 | m_VCAllowAsyncUpdate: 1 28 | -------------------------------------------------------------------------------- /Assets/Utils/UnsafePointer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Unity.Burst; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | 6 | /// 7 | /// Because NativeReference.value is not ref 8 | /// 9 | public unsafe struct UnsafePointer : IDisposable where T : unmanaged 10 | { 11 | [NoAlias][NativeDisableUnsafePtrRestriction] public T* pointer; 12 | 13 | public UnsafePointer(T defaultValue) 14 | { 15 | pointer = (T*)UnsafeUtility.Malloc(UnsafeUtility.SizeOf(), UnsafeUtility.AlignOf(), Allocator.Persistent); 16 | *pointer = defaultValue; 17 | } 18 | 19 | public static UnsafePointer Create() 20 | { 21 | return new UnsafePointer(default); 22 | } 23 | 24 | public bool IsCreated => pointer != null; 25 | 26 | public ref T item => ref *pointer; 27 | 28 | public void Dispose() 29 | { 30 | if (IsCreated) UnsafeUtility.Free(pointer, Allocator.Persistent); 31 | pointer = null; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | UnityAdsSettings: 27 | m_Enabled: 0 28 | m_InitializeOnStartup: 1 29 | m_TestMode: 0 30 | m_IosGameId: 31 | m_AndroidGameId: 32 | m_GameIds: {} 33 | m_GameId: 34 | PerformanceReportingSettings: 35 | m_Enabled: 0 36 | -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/WireframeTransparent.shader: -------------------------------------------------------------------------------- 1 | Shader "SuperSystems/Wireframe-Transparent" 2 | { 3 | Properties 4 | { 5 | _WireThickness ("Wire Thickness", RANGE(0, 800)) = 100 6 | _WireSmoothness ("Wire Smoothness", RANGE(0, 20)) = 3 7 | _WireColor ("Wire Color", Color) = (0.0, 1.0, 0.0, 1.0) 8 | _BaseColor ("Base Color", Color) = (0.0, 0.0, 0.0, 0.0) 9 | _MaxTriSize ("Max Tri Size", RANGE(0, 200)) = 25 10 | } 11 | 12 | SubShader 13 | { 14 | Tags { 15 | "IgnoreProjector"="True" 16 | "Queue"="Transparent" 17 | "RenderType"="Transparent" 18 | } 19 | 20 | Pass 21 | { 22 | Blend SrcAlpha OneMinusSrcAlpha 23 | ZWrite Off 24 | Cull Off 25 | 26 | // Wireframe shader based on the the following 27 | // http://developer.download.nvidia.com/SDK/10/direct3d/Source/SolidWireframe/Doc/SolidWireframe.pdf 28 | 29 | CGPROGRAM 30 | #pragma vertex vert 31 | #pragma geometry geom 32 | #pragma fragment frag 33 | 34 | #include "UnityCG.cginc" 35 | #include "Wireframe.cginc" 36 | 37 | ENDCG 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/WireframeTransparentCulled.shader: -------------------------------------------------------------------------------- 1 | Shader "SuperSystems/Wireframe-Transparent-Culled" 2 | { 3 | Properties 4 | { 5 | _WireThickness ("Wire Thickness", RANGE(0, 800)) = 100 6 | _WireSmoothness ("Wire Smoothness", RANGE(0, 20)) = 3 7 | _WireColor ("Wire Color", Color) = (0.0, 1.0, 0.0, 1.0) 8 | _BaseColor ("Base Color", Color) = (0.0, 0.0, 0.0, 0.0) 9 | _MaxTriSize ("Max Tri Size", RANGE(0, 200)) = 25 10 | } 11 | 12 | SubShader 13 | { 14 | Tags { 15 | "IgnoreProjector"="True" 16 | "Queue"="Transparent" 17 | "RenderType"="Transparent" 18 | } 19 | 20 | Pass 21 | { 22 | Blend SrcAlpha OneMinusSrcAlpha 23 | ZWrite Off 24 | Cull Back 25 | 26 | // Wireframe shader based on the the following 27 | // http://developer.download.nvidia.com/SDK/10/direct3d/Source/SolidWireframe/Doc/SolidWireframe.pdf 28 | 29 | CGPROGRAM 30 | #pragma vertex vert 31 | #pragma geometry geom 32 | #pragma fragment frag 33 | 34 | #include "UnityCG.cginc" 35 | #include "Wireframe.cginc" 36 | 37 | ENDCG 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 bigos91 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 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 1 16 | m_EnablePackageDependencies: 1 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 1 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | 13 | # Asset meta data should only be ignored when the corresponding asset is also ignored 14 | !/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # Autogenerated Jetbrains Rider plugin 20 | [Aa]ssets/Plugins/Editor/JetBrains* 21 | 22 | # Visual Studio cache directory 23 | .vs/ 24 | 25 | # Gradle cache directory 26 | .gradle/ 27 | 28 | # Autogenerated VS/MD/Consulo solution and project files 29 | ExportedObj/ 30 | .consulo/ 31 | *.csproj 32 | *.unityproj 33 | *.sln 34 | *.suo 35 | *.tmp 36 | *.user 37 | *.userprefs 38 | *.pidb 39 | *.booproj 40 | *.svd 41 | *.pdb 42 | *.mdb 43 | *.opendb 44 | *.VC.db 45 | 46 | # Unity3D generated meta files 47 | *.pidb.meta 48 | *.pdb.meta 49 | *.mdb.meta 50 | 51 | # Unity3D generated file on crash reports 52 | sysinfo.txt 53 | 54 | # Builds 55 | *.apk 56 | *.unitypackage 57 | 58 | # Crashlytics generated file 59 | crashlytics-build.properties 60 | 61 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /Assets/Utils/RotationControl.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class RotationControl : MonoBehaviour 6 | { 7 | public float radius = 35.0f; 8 | float xangle = Mathf.PI / 2; 9 | float yangle = -Mathf.PI / 2; 10 | 11 | float radiusSmooth; 12 | float xangleSmooth; 13 | float yangleSmooth; 14 | 15 | void Start() 16 | { 17 | radiusSmooth = radius; 18 | xangleSmooth = xangle; 19 | yangleSmooth = yangle; 20 | } 21 | 22 | void Update() 23 | { 24 | var mouseButton = Input.GetMouseButton(1); 25 | var shift = Input.GetKey(KeyCode.LeftShift); 26 | 27 | var xdelta = Input.GetAxis("Mouse X") * 0.04f * (shift ? 2.0f : 1.0f); 28 | var ydelta = Input.GetAxis("Mouse Y") * 0.04f * (shift ? 2.0f : 1.0f); 29 | radius += Input.mouseScrollDelta.y * -1.0f * (shift ? 3.0f : 1.0f); 30 | 31 | radius = Mathf.Clamp(radius, 0.3f, 50.0f); 32 | 33 | if (mouseButton) 34 | { 35 | xangle -= xdelta; 36 | yangle -= ydelta; 37 | yangle = Mathf.Clamp(yangle, Mathf.PI * -0.99f, Mathf.PI * -0.01f); 38 | } 39 | 40 | radiusSmooth = Mathf.Lerp(radiusSmooth, radius, 0.1f); 41 | xangleSmooth = Mathf.Lerp(xangleSmooth, xangle, 0.1f); 42 | yangleSmooth = Mathf.Lerp(yangleSmooth, yangle, 0.1f); 43 | 44 | var position = new Vector3 45 | { 46 | x = radiusSmooth * Mathf.Sin(yangleSmooth) * Mathf.Cos(xangleSmooth), 47 | z = radiusSmooth * Mathf.Sin(yangleSmooth) * Mathf.Sin(xangleSmooth), 48 | y = radiusSmooth * Mathf.Cos(yangleSmooth) 49 | }; 50 | 51 | transform.position = position + Vector3.one * 15.5f; 52 | transform.LookAt(Vector3.one * 15.5f); 53 | 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 0 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Ultra 11 | pixelLightCount: 4 12 | shadows: 2 13 | shadowResolution: 2 14 | shadowProjection: 1 15 | shadowCascades: 4 16 | shadowDistance: 150 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 1 21 | skinWeights: 4 22 | textureQuality: 0 23 | anisotropicTextures: 2 24 | antiAliasing: 2 25 | softParticles: 1 26 | softVegetation: 1 27 | realtimeReflectionProbes: 1 28 | billboardsFaceCameraPosition: 1 29 | vSyncCount: 1 30 | lodBias: 2 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4096 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | m_PerPlatformDefaultQuality: 46 | Android: 0 47 | Lumin: 0 48 | Nintendo 3DS: 0 49 | Nintendo Switch: 0 50 | PS4: 0 51 | PSP2: 0 52 | Stadia: 0 53 | Standalone: 0 54 | WebGL: 0 55 | Windows Store Apps: 0 56 | XboxOne: 0 57 | iPhone: 0 58 | tvOS: 0 59 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.burst": "1.5.3", 4 | "com.unity.collab-proxy": "1.15.1", 5 | "com.unity.ide.visualstudio": "2.0.15", 6 | "com.unity.jobs": "0.8.0-preview.23", 7 | "com.unity.test-framework": "1.1.29", 8 | "com.unity.ugui": "1.0.0", 9 | "com.unity.modules.ai": "1.0.0", 10 | "com.unity.modules.androidjni": "1.0.0", 11 | "com.unity.modules.animation": "1.0.0", 12 | "com.unity.modules.assetbundle": "1.0.0", 13 | "com.unity.modules.audio": "1.0.0", 14 | "com.unity.modules.cloth": "1.0.0", 15 | "com.unity.modules.director": "1.0.0", 16 | "com.unity.modules.imageconversion": "1.0.0", 17 | "com.unity.modules.imgui": "1.0.0", 18 | "com.unity.modules.jsonserialize": "1.0.0", 19 | "com.unity.modules.particlesystem": "1.0.0", 20 | "com.unity.modules.physics": "1.0.0", 21 | "com.unity.modules.physics2d": "1.0.0", 22 | "com.unity.modules.screencapture": "1.0.0", 23 | "com.unity.modules.terrain": "1.0.0", 24 | "com.unity.modules.terrainphysics": "1.0.0", 25 | "com.unity.modules.tilemap": "1.0.0", 26 | "com.unity.modules.ui": "1.0.0", 27 | "com.unity.modules.uielements": "1.0.0", 28 | "com.unity.modules.umbra": "1.0.0", 29 | "com.unity.modules.unityanalytics": "1.0.0", 30 | "com.unity.modules.unitywebrequest": "1.0.0", 31 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 32 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 33 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 34 | "com.unity.modules.unitywebrequestwww": "1.0.0", 35 | "com.unity.modules.vehicles": "1.0.0", 36 | "com.unity.modules.video": "1.0.0", 37 | "com.unity.modules.vr": "1.0.0", 38 | "com.unity.modules.wind": "1.0.0", 39 | "com.unity.modules.xr": "1.0.0" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Textures/checkerboard.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8cf05d70ac94eb6498f0b6ae9dc027da 3 | timeCreated: 1514328294 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 3 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 256 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 256 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | spritePackingTag: 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/WireframeShadersSettings.lighting: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!850595691 &4890085278179872738 4 | LightingSettings: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: WireframeShadersSettings 10 | serializedVersion: 3 11 | m_GIWorkflowMode: 0 12 | m_EnableBakedLightmaps: 1 13 | m_EnableRealtimeLightmaps: 1 14 | m_RealtimeEnvironmentLighting: 1 15 | m_BounceScale: 1 16 | m_AlbedoBoost: 1 17 | m_IndirectOutputScale: 1 18 | m_UsingShadowmask: 1 19 | m_BakeBackend: 0 20 | m_LightmapMaxSize: 1024 21 | m_BakeResolution: 40 22 | m_Padding: 2 23 | m_TextureCompression: 1 24 | m_AO: 0 25 | m_AOMaxDistance: 1 26 | m_CompAOExponent: 1 27 | m_CompAOExponentDirect: 0 28 | m_ExtractAO: 0 29 | m_MixedBakeMode: 2 30 | m_LightmapsBakeMode: 1 31 | m_FilterMode: 1 32 | m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} 33 | m_ExportTrainingData: 0 34 | m_TrainingDataDestination: TrainingData 35 | m_RealtimeResolution: 2 36 | m_ForceWhiteAlbedo: 0 37 | m_ForceUpdates: 0 38 | m_FinalGather: 0 39 | m_FinalGatherRayCount: 256 40 | m_FinalGatherFiltering: 1 41 | m_PVRCulling: 1 42 | m_PVRSampling: 1 43 | m_PVRDirectSampleCount: 32 44 | m_PVRSampleCount: 500 45 | m_PVREnvironmentSampleCount: 500 46 | m_PVREnvironmentReferencePointCount: 2048 47 | m_LightProbeSampleCountMultiplier: 4 48 | m_PVRBounces: 2 49 | m_PVRMinBounces: 2 50 | m_PVREnvironmentMIS: 0 51 | m_PVRFilteringMode: 2 52 | m_PVRDenoiserTypeDirect: 0 53 | m_PVRDenoiserTypeIndirect: 0 54 | m_PVRDenoiserTypeAO: 0 55 | m_PVRFilterTypeDirect: 0 56 | m_PVRFilterTypeIndirect: 0 57 | m_PVRFilterTypeAO: 0 58 | m_PVRFilteringGaussRadiusDirect: 1 59 | m_PVRFilteringGaussRadiusIndirect: 5 60 | m_PVRFilteringGaussRadiusAO: 2 61 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 62 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 63 | m_PVRFilteringAtrousPositionSigmaAO: 1 64 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/WireframeImageEffectSettings.lighting: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!850595691 &4890085278179872738 4 | LightingSettings: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: WireframeImageEffectSettings 10 | serializedVersion: 3 11 | m_GIWorkflowMode: 0 12 | m_EnableBakedLightmaps: 1 13 | m_EnableRealtimeLightmaps: 1 14 | m_RealtimeEnvironmentLighting: 1 15 | m_BounceScale: 1 16 | m_AlbedoBoost: 1 17 | m_IndirectOutputScale: 1 18 | m_UsingShadowmask: 1 19 | m_BakeBackend: 0 20 | m_LightmapMaxSize: 1024 21 | m_BakeResolution: 40 22 | m_Padding: 2 23 | m_TextureCompression: 1 24 | m_AO: 0 25 | m_AOMaxDistance: 1 26 | m_CompAOExponent: 1 27 | m_CompAOExponentDirect: 0 28 | m_ExtractAO: 0 29 | m_MixedBakeMode: 2 30 | m_LightmapsBakeMode: 1 31 | m_FilterMode: 1 32 | m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} 33 | m_ExportTrainingData: 0 34 | m_TrainingDataDestination: TrainingData 35 | m_RealtimeResolution: 2 36 | m_ForceWhiteAlbedo: 0 37 | m_ForceUpdates: 0 38 | m_FinalGather: 0 39 | m_FinalGatherRayCount: 256 40 | m_FinalGatherFiltering: 1 41 | m_PVRCulling: 1 42 | m_PVRSampling: 1 43 | m_PVRDirectSampleCount: 32 44 | m_PVRSampleCount: 500 45 | m_PVREnvironmentSampleCount: 500 46 | m_PVREnvironmentReferencePointCount: 2048 47 | m_LightProbeSampleCountMultiplier: 4 48 | m_PVRBounces: 2 49 | m_PVRMinBounces: 2 50 | m_PVREnvironmentMIS: 0 51 | m_PVRFilteringMode: 2 52 | m_PVRDenoiserTypeDirect: 0 53 | m_PVRDenoiserTypeIndirect: 0 54 | m_PVRDenoiserTypeAO: 0 55 | m_PVRFilterTypeDirect: 0 56 | m_PVRFilterTypeIndirect: 0 57 | m_PVRFilterTypeAO: 0 58 | m_PVRFilteringGaussRadiusDirect: 1 59 | m_PVRFilteringGaussRadiusIndirect: 5 60 | m_PVRFilteringGaussRadiusAO: 2 61 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 62 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 63 | m_PVRFilteringAtrousPositionSigmaAO: 1 64 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # fastMarchingCubes 2 | - Fast implementation of Marching Cubes in Unity, using Burst and SIMD instructions. 3 | - Less than 1ms (around ~0.2-0.5 depends on complexity of meshed area) 4 | - Similiar to : https://github.com/bigos91/fastNaiveSurfaceNets 5 | - Triangulation table is a bit different than original - different corner indexing is used to make simd stuff possible 6 | ![alt text](https://github.com/bigos91/fastMarchingCubes/blob/main/screen.jpg?raw=true) 7 | https://www.youtube.com/watch?v=fIzZdO7FxqQ&ab_channel=Bigos91 8 | 9 | #### Features: 10 | - 2 different triangulation tables (read Mesher.Arrays.cs) 11 | - Naive version, SIMD, and SIMD multithreaded. 12 | - No normals generated, intead they are calculated in fragment shader (ddx,ddy) 13 | - No comment on simd stuff - if you need explanation read https://github.com/bigos91/fastNaiveSurfaceNets it is same. 14 | - Cornermask calculations are done using SIMD stuff, 32 cubes at time (32x2x2 voxels), reusing values calculated from previous loop steps. 15 | 16 | #### Problems: 17 | - Multithreaded version sometimes gives better performance results, sometimes not. No idea why. 18 | 19 | #### Limitations: 20 | - Meshed area must have 32 voxels in Z dimension to make SIMD implementation work 21 | - 32x32x32 volumes, but it is possible to make it working with 32xNxM (Chunk.cs), or any size if you do not use SIMD stuff. 22 | - It is only meshing algorithm. No any king of world management, etc. 23 | 24 | #### Requirements: 25 | - Unity (2020.3 works fine, dont know about previous versions) 26 | - CPU with SSE4.1 support (around year 2007) 27 | 28 | #### Usage: 29 | - Clone, run, open scene [FastMarchingCubes/Scenes/SampleScene], 30 | - Disable everything what makes burst safe to make it faster :) 31 | 32 | #### Resources: 33 | - http://paulbourke.net/geometry/polygonise/ - table 34 | - http://paulbourke.net/geometry/polygonise/table2.txt - alternative table 35 | - https://github.com/SebLague/Marching-Cubes - corner tables 36 | - https://github.com/Chaser324/unity-wireframe - for wireframe. 37 | 38 | #### Todo: 39 | - 16^3 size version 40 | - maybe 64^3 size version but on AVX 41 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Shaders/TriplanarSurface.shader: -------------------------------------------------------------------------------- 1 | Shader "Voxels/TriplanarSurface" 2 | { 3 | Properties 4 | { 5 | _Color ("Color", Color) = (1,1,1,1) 6 | _MainTex ("Albedo (RGB)", 2D) = "white" {} 7 | _Glossiness ("Smoothness", Range(0,1)) = 0.5 8 | _Metallic ("Metallic", Range(0,1)) = 0.0 9 | } 10 | SubShader 11 | { 12 | Tags { "RenderType" = "Opaque" } 13 | LOD 200 14 | 15 | CGPROGRAM 16 | #pragma surface surf Standard fullforwardshadows vertex:vert 17 | #pragma target 3.0 18 | 19 | sampler2D _MainTex; 20 | float4 _MainTex_ST; 21 | half _Glossiness; 22 | half _Metallic; 23 | fixed4 _Color; 24 | 25 | struct Input 26 | { 27 | float3 localPos; 28 | float3 cameraRelativeWorldPos; 29 | }; 30 | 31 | 32 | UNITY_INSTANCING_BUFFER_START(Props) 33 | UNITY_INSTANCING_BUFFER_END(Props) 34 | 35 | 36 | void vert(inout appdata_full v, out Input o) 37 | { 38 | UNITY_INITIALIZE_OUTPUT(Input, o); 39 | 40 | o.localPos = v.vertex; 41 | o.cameraRelativeWorldPos = mul(unity_ObjectToWorld, float4(v.vertex.xyz, 1.0)) - _WorldSpaceCameraPos.xyz; 42 | } 43 | 44 | void surf (Input IN, inout SurfaceOutputStandard o) 45 | { 46 | half3 flatWorldNormal = normalize(cross(ddy(IN.cameraRelativeWorldPos.xyz), ddx(IN.cameraRelativeWorldPos.xyz))); 47 | 48 | float3 blending = normalize(abs(flatWorldNormal)); 49 | blending /= dot(blending, 1.0f); 50 | 51 | float2 uvx = IN.localPos.yz * _MainTex_ST; 52 | float2 uvy = IN.localPos.zx * _MainTex_ST; 53 | float2 uvz = IN.localPos.xy * _MainTex_ST; 54 | 55 | half4 cx = tex2D(_MainTex, uvx) * blending.x; 56 | half4 cy = tex2D(_MainTex, uvy) * blending.y; 57 | half4 cz = tex2D(_MainTex, uvz) * blending.z; 58 | half4 color = (cx + cy + cz) * _Color; 59 | 60 | o.Alpha = color.a; 61 | o.Albedo = color.rgb; 62 | o.Metallic = _Metallic; 63 | o.Smoothness = _Glossiness; 64 | o.Normal = flatWorldNormal; 65 | } 66 | ENDCG 67 | } 68 | FallBack "Diffuse" 69 | } 70 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Materials/Standard.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: Standard 11 | m_Shader: {fileID: 46, 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: 2800000, guid: 8cf05d70ac94eb6498f0b6ae9dc027da, type: 3} 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 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 1, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | m_BuildTextureStacks: [] 79 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Materials/Triplanar.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: Triplanar 11 | m_Shader: {fileID: 4800000, guid: f70bedd53fb9dac4490a5b399f4d8b57, 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: 2800000, guid: ef8c64a01c36a0849b3b1690061c6964, type: 3} 44 | m_Scale: {x: 0.4, y: 0.4} 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 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.04 65 | - _GlossyReflections: 1 66 | - _Metallic: 0.242 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 1, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | m_BuildTextureStacks: [] 79 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | m_LogWhenShaderIsCompiled: 0 63 | m_AllowEnlightenSupportForUpgradedProject: 0 64 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Textures/texture.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef8c64a01c36a0849b3b1690061c6964 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 1 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 0 39 | wrapV: 0 40 | wrapW: 0 41 | nPOTScale: 1 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 0 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: -1 55 | textureType: 0 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | flipbookRows: 1 59 | flipbookColumns: 1 60 | maxTextureSizeSet: 0 61 | compressionQualitySet: 0 62 | textureFormatSet: 0 63 | ignorePngGamma: 0 64 | applyGammaDecoding: 0 65 | platformSettings: 66 | - serializedVersion: 3 67 | buildTarget: DefaultTexturePlatform 68 | maxTextureSize: 2048 69 | resizeAlgorithm: 0 70 | textureFormat: -1 71 | textureCompression: 1 72 | compressionQuality: 50 73 | crunchedCompression: 0 74 | allowsAlphaSplitting: 0 75 | overridden: 0 76 | androidETC2FallbackOverride: 0 77 | forceMaximumCompressionQuality_BC6H_BC7: 0 78 | spriteSheet: 79 | serializedVersion: 2 80 | sprites: [] 81 | outline: [] 82 | physicsShape: [] 83 | bones: [] 84 | spriteID: 85 | internalID: 0 86 | vertices: [] 87 | indices: 88 | edges: [] 89 | weights: [] 90 | secondaryTextures: [] 91 | spritePackingTag: 92 | pSDRemoveMatte: 0 93 | pSDShowRemoveMatteOption: 0 94 | userData: 95 | assetBundleName: 96 | assetBundleVariant: 97 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Materials/Wireframe-Solid.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: Wireframe-Solid 11 | m_Shader: {fileID: 4800000, guid: a7de4bf0f370ca243b4604b8cd314ffc, 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 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _MaxTriSize: 25 67 | - _Metallic: 0 68 | - _Mode: 0 69 | - _OcclusionStrength: 1 70 | - _Parallax: 0.02 71 | - _SmoothnessTextureChannel: 0 72 | - _SpecularHighlights: 1 73 | - _SrcBlend: 1 74 | - _UVSec: 0 75 | - _WireSmoothness: 3 76 | - _WireThickness: 600 77 | - _ZWrite: 1 78 | m_Colors: 79 | - _BaseColor: {r: 0, g: 0, b: 0, a: 1} 80 | - _Color: {r: 1, g: 1, b: 1, a: 1} 81 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 82 | - _WireColor: {r: 0, g: 1, b: 0.98823535, a: 1} 83 | m_BuildTextureStacks: [] 84 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Materials/Wireframe-Transparent.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: Wireframe-Transparent 11 | m_Shader: {fileID: 4800000, guid: 90cadb91a7902754f9fe5b4563306677, 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 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _MaxTriSize: 25 67 | - _Metallic: 0 68 | - _Mode: 0 69 | - _OcclusionStrength: 1 70 | - _Parallax: 0.02 71 | - _SmoothnessTextureChannel: 0 72 | - _SpecularHighlights: 1 73 | - _SrcBlend: 1 74 | - _UVSec: 0 75 | - _WireSmoothness: 3 76 | - _WireThickness: 600 77 | - _ZWrite: 1 78 | m_Colors: 79 | - _BaseColor: {r: 1, g: 0, b: 0.32941177, a: 0} 80 | - _Color: {r: 1, g: 1, b: 1, a: 1} 81 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 82 | - _WireColor: {r: 0, g: 1, b: 0.98823535, a: 1} 83 | m_BuildTextureStacks: [] 84 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Materials/Wireframe-TransparentCulled.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: Wireframe-TransparentCulled 11 | m_Shader: {fileID: 4800000, guid: a64caad055200da45b6df1c7c80839ed, 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 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _MaxTriSize: 25 67 | - _Metallic: 0 68 | - _Mode: 0 69 | - _OcclusionStrength: 1 70 | - _Parallax: 0.02 71 | - _SmoothnessTextureChannel: 0 72 | - _SpecularHighlights: 1 73 | - _SrcBlend: 1 74 | - _UVSec: 0 75 | - _WireSmoothness: 3 76 | - _WireThickness: 600 77 | - _ZWrite: 1 78 | m_Colors: 79 | - _BaseColor: {r: 1, g: 0, b: 0.32941177, a: 0} 80 | - _Color: {r: 1, g: 1, b: 1, a: 1} 81 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 82 | - _WireColor: {r: 0, g: 1, b: 0.98823535, a: 1} 83 | m_BuildTextureStacks: [] 84 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/Materials/Wireframe-ShadedUnlit.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: Wireframe-ShadedUnlit 11 | m_Shader: {fileID: 4800000, guid: 349737f389860b042946c40afa327524, 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: 2800000, guid: 8cf05d70ac94eb6498f0b6ae9dc027da, type: 3} 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 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _MaxTriSize: 25 67 | - _Metallic: 0 68 | - _Mode: 0 69 | - _OcclusionStrength: 1 70 | - _Parallax: 0.02 71 | - _SmoothnessTextureChannel: 0 72 | - _SpecularHighlights: 1 73 | - _SrcBlend: 1 74 | - _UVSec: 0 75 | - _WireSmoothness: 3 76 | - _WireThickness: 600 77 | - _ZWrite: 1 78 | m_Colors: 79 | - _BaseColor: {r: 1, g: 1, b: 1, a: 1} 80 | - _Color: {r: 1, g: 1, b: 1, a: 1} 81 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 82 | - _WireColor: {r: 0, g: 1, b: 0.98823535, a: 1} 83 | m_BuildTextureStacks: [] 84 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Extensions/MeshExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using UnityEngine.Rendering; 4 | 5 | public static class MeshExtensions 6 | { 7 | static MeshUpdateFlags updateFlags = 8 | MeshUpdateFlags.DontNotifyMeshUsers | 9 | MeshUpdateFlags.DontRecalculateBounds | 10 | MeshUpdateFlags.DontResetBoneBounds | 11 | MeshUpdateFlags.DontValidateIndices; 12 | 13 | public static void SetMesh(this Mesh mesh, MarchingCubes.Mesher mesher) 14 | { 15 | var vertices = mesher.Vertices; 16 | 17 | if (vertices.Length > 2) 18 | { 19 | bool use32bitIndices = vertices.Length > ushort.MaxValue; 20 | 21 | if (use32bitIndices) 22 | { 23 | var indices = MarchingCubes.Mesher.GetIndices(vertices.Length); 24 | mesh.SetIndexBufferParams(indices.Length, IndexFormat.UInt32); 25 | mesh.SetIndexBufferData(indices, 0, 0, indices.Length, updateFlags); 26 | } 27 | else 28 | { 29 | var indices = MarchingCubes.Mesher.GetIndices16(vertices.Length); 30 | mesh.SetIndexBufferParams(indices.Length, IndexFormat.UInt16); 31 | mesh.SetIndexBufferData(indices, 0, 0, indices.Length, updateFlags); 32 | } 33 | 34 | mesh.SetVertexBufferParams(vertices.Length, MarchingCubes.Mesher.VertexFormat); 35 | mesh.SetVertexBufferData(vertices, 0, 0, vertices.Length, 0, updateFlags); 36 | var subMeshDescriptor = new SubMeshDescriptor(0, vertices.Length, MeshTopology.Triangles); 37 | mesh.subMeshCount = 1; 38 | mesh.SetSubMesh(0, subMeshDescriptor, updateFlags); 39 | 40 | mesh.bounds = mesher.Bounds; 41 | } 42 | else 43 | { 44 | mesh.Clear(); 45 | } 46 | } 47 | 48 | public static void SetMesh(this Mesh mesh, List meshers, bool combineMeshesOnCpu) 49 | { 50 | var verticesCount = 0; 51 | 52 | if (combineMeshesOnCpu) 53 | { 54 | var mesher = meshers[0]; 55 | mesher.CombineMeshers(meshers); 56 | mesh.SetMesh(mesher); 57 | return; 58 | } 59 | 60 | foreach (var mesher in meshers) 61 | { 62 | verticesCount += mesher.Vertices.Length; 63 | } 64 | 65 | if (verticesCount > 2) 66 | { 67 | bool use32bitIndices = verticesCount > ushort.MaxValue; 68 | 69 | if (use32bitIndices) 70 | { 71 | var indices = MarchingCubes.Mesher.GetIndices(verticesCount); 72 | mesh.SetIndexBufferParams(indices.Length, IndexFormat.UInt32); 73 | mesh.SetIndexBufferData(indices, 0, 0, indices.Length, updateFlags); 74 | } 75 | else 76 | { 77 | var indices = MarchingCubes.Mesher.GetIndices16(verticesCount); 78 | mesh.SetIndexBufferParams(indices.Length, IndexFormat.UInt16); 79 | mesh.SetIndexBufferData(indices, 0, 0, indices.Length, updateFlags); 80 | } 81 | 82 | mesh.SetVertexBufferParams(verticesCount, MarchingCubes.Mesher.VertexFormat); 83 | var subMeshDescriptor = new SubMeshDescriptor(0, verticesCount, MeshTopology.Triangles); 84 | mesh.subMeshCount = 1; 85 | mesh.SetSubMesh(0, subMeshDescriptor, updateFlags); 86 | 87 | Bounds bounds = default; 88 | var previousVerticesCount = 0; 89 | 90 | foreach (var mesher in meshers) 91 | { 92 | var vertices = mesher.Vertices; 93 | 94 | if (vertices.Length > 2) 95 | { 96 | mesh.SetVertexBufferData(vertices, 0, previousVerticesCount, vertices.Length, 0, updateFlags); 97 | bounds.Encapsulate(mesher.Bounds); 98 | previousVerticesCount += vertices.Length; 99 | } 100 | } 101 | 102 | mesh.bounds = bounds; 103 | } 104 | else 105 | { 106 | mesh.Clear(); 107 | } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /Assets/Wireframe/ImageEffect/WireframeImageEffect.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | namespace SuperSystems.ImageEffects 5 | { 6 | 7 | [ExecuteInEditMode] 8 | public class WireframeImageEffect : MonoBehaviour 9 | { 10 | public enum WireframeType 11 | { 12 | None = 0, 13 | Solid, 14 | ShadedUnlit, 15 | Transparent, 16 | TransparentCulled, 17 | COUNT 18 | } 19 | 20 | [Header("Replacement Shader")] 21 | public WireframeType wireframeType = WireframeType.None; 22 | public string replacementTag = "RenderType"; 23 | public bool cameraBackgroundMatchesBaseColor = true; 24 | 25 | [Header("Wireframe Shader Properties")] 26 | [Range(0, 800)] 27 | public float wireThickness = 600; 28 | 29 | [Range(0, 20)] 30 | public float wireSmoothness = 3; 31 | 32 | public Color wireColor = Color.green; 33 | public Color baseColor = Color.black; 34 | public float maxTriSize = 25.0f; 35 | 36 | private Color initialClearColor; 37 | private CameraClearFlags initialClearFlag; 38 | 39 | private Camera cam; 40 | private WireframeType lastWireframeType = WireframeType.None; 41 | 42 | protected void OnEnable() 43 | { 44 | cam = GetComponent(); 45 | initialClearFlag = cam.clearFlags; 46 | initialClearColor = cam.backgroundColor; 47 | } 48 | 49 | protected void OnDisable() 50 | { 51 | ResetCamera(); 52 | lastWireframeType = WireframeType.None; 53 | } 54 | 55 | protected void Update() 56 | { 57 | Shader.SetGlobalFloat("_WireThickness", wireThickness); 58 | Shader.SetGlobalFloat("_WireSmoothness", wireSmoothness); 59 | Shader.SetGlobalColor("_WireColor", wireColor); 60 | Shader.SetGlobalColor("_BaseColor", baseColor); 61 | Shader.SetGlobalFloat("_MaxTriSize", maxTriSize); 62 | 63 | if (wireframeType != WireframeType.None && cameraBackgroundMatchesBaseColor) 64 | { 65 | cam.backgroundColor = baseColor; 66 | cam.clearFlags = CameraClearFlags.SolidColor; 67 | } 68 | 69 | ApplyShader(); 70 | } 71 | 72 | private void ApplyShader() 73 | { 74 | if (wireframeType != lastWireframeType) 75 | { 76 | lastWireframeType = wireframeType; 77 | 78 | switch (wireframeType) 79 | { 80 | case WireframeType.Solid: 81 | cam.SetReplacementShader(Shader.Find("hidden/SuperSystems/Wireframe-Global"), replacementTag); 82 | break; 83 | case WireframeType.ShadedUnlit: 84 | cam.SetReplacementShader(Shader.Find("hidden/SuperSystems/Wireframe-Shaded-Unlit-Global"), replacementTag); 85 | break; 86 | case WireframeType.Transparent: 87 | cam.SetReplacementShader(Shader.Find("hidden/SuperSystems/Wireframe-Transparent-Global"), replacementTag); 88 | break; 89 | case WireframeType.TransparentCulled: 90 | cam.SetReplacementShader(Shader.Find("hidden/SuperSystems/Wireframe-Transparent-Culled-Global"), replacementTag); 91 | break; 92 | default: 93 | ResetCamera(); 94 | break; 95 | } 96 | } 97 | } 98 | 99 | private void ResetCamera() 100 | { 101 | cam.ResetReplacementShader(); 102 | cam.backgroundColor = initialClearColor; 103 | cam.clearFlags = initialClearFlag; 104 | } 105 | } 106 | 107 | } -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/Wireframe.cginc: -------------------------------------------------------------------------------- 1 | 2 | uniform float _WireThickness = 100; 3 | uniform float _WireSmoothness = 3; 4 | uniform float4 _WireColor = float4(0.0, 1.0, 0.0, 1.0); 5 | uniform float4 _BaseColor = float4(0.0, 0.0, 0.0, 0.0); 6 | uniform float _MaxTriSize = 25.0; 7 | 8 | struct appdata 9 | { 10 | float4 vertex : POSITION; 11 | UNITY_VERTEX_INPUT_INSTANCE_ID 12 | }; 13 | 14 | struct v2g 15 | { 16 | float4 projectionSpaceVertex : SV_POSITION; 17 | float4 worldSpacePosition : TEXCOORD1; 18 | UNITY_VERTEX_OUTPUT_STEREO 19 | }; 20 | 21 | struct g2f 22 | { 23 | float4 projectionSpaceVertex : SV_POSITION; 24 | float4 worldSpacePosition : TEXCOORD0; 25 | float4 dist : TEXCOORD1; 26 | float4 area : TEXCOORD2; 27 | UNITY_VERTEX_OUTPUT_STEREO 28 | }; 29 | 30 | v2g vert (appdata v) 31 | { 32 | v2g o; 33 | UNITY_SETUP_INSTANCE_ID(v); 34 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 35 | o.projectionSpaceVertex = UnityObjectToClipPos(v.vertex); 36 | o.worldSpacePosition = mul(unity_ObjectToWorld, v.vertex); 37 | return o; 38 | } 39 | 40 | [maxvertexcount(3)] 41 | void geom(triangle v2g i[3], inout TriangleStream triangleStream) 42 | { 43 | float2 p0 = i[0].projectionSpaceVertex.xy / i[0].projectionSpaceVertex.w; 44 | float2 p1 = i[1].projectionSpaceVertex.xy / i[1].projectionSpaceVertex.w; 45 | float2 p2 = i[2].projectionSpaceVertex.xy / i[2].projectionSpaceVertex.w; 46 | 47 | float2 edge0 = p2 - p1; 48 | float2 edge1 = p2 - p0; 49 | float2 edge2 = p1 - p0; 50 | 51 | float4 worldEdge0 = i[0].worldSpacePosition - i[1].worldSpacePosition; 52 | float4 worldEdge1 = i[1].worldSpacePosition - i[2].worldSpacePosition; 53 | float4 worldEdge2 = i[0].worldSpacePosition - i[2].worldSpacePosition; 54 | 55 | // To find the distance to the opposite edge, we take the 56 | // formula for finding the area of a triangle Area = Base/2 * Height, 57 | // and solve for the Height = (Area * 2)/Base. 58 | // We can get the area of a triangle by taking its cross product 59 | // divided by 2. However we can avoid dividing our area/base by 2 60 | // since our cross product will already be double our area. 61 | float area = abs(edge1.x * edge2.y - edge1.y * edge2.x); 62 | float wireThickness = 800 - _WireThickness; 63 | 64 | g2f o; 65 | 66 | o.area = float4(0, 0, 0, 0); 67 | o.area.x = max(length(worldEdge0), max(length(worldEdge1), length(worldEdge2))); 68 | 69 | o.worldSpacePosition = i[0].worldSpacePosition; 70 | o.projectionSpaceVertex = i[0].projectionSpaceVertex; 71 | o.dist.xyz = float3( (area / length(edge0)), 0.0, 0.0) * o.projectionSpaceVertex.w * wireThickness; 72 | o.dist.w = 1.0 / o.projectionSpaceVertex.w; 73 | UNITY_TRANSFER_VERTEX_OUTPUT_STEREO(i[0], o); 74 | triangleStream.Append(o); 75 | 76 | o.worldSpacePosition = i[1].worldSpacePosition; 77 | o.projectionSpaceVertex = i[1].projectionSpaceVertex; 78 | o.dist.xyz = float3(0.0, (area / length(edge1)), 0.0) * o.projectionSpaceVertex.w * wireThickness; 79 | o.dist.w = 1.0 / o.projectionSpaceVertex.w; 80 | UNITY_TRANSFER_VERTEX_OUTPUT_STEREO(i[1], o); 81 | triangleStream.Append(o); 82 | 83 | o.worldSpacePosition = i[2].worldSpacePosition; 84 | o.projectionSpaceVertex = i[2].projectionSpaceVertex; 85 | o.dist.xyz = float3(0.0, 0.0, (area / length(edge2))) * o.projectionSpaceVertex.w * wireThickness; 86 | o.dist.w = 1.0 / o.projectionSpaceVertex.w; 87 | UNITY_TRANSFER_VERTEX_OUTPUT_STEREO(i[2], o); 88 | triangleStream.Append(o); 89 | } 90 | 91 | fixed4 frag(g2f i) : SV_Target 92 | { 93 | float minDistanceToEdge = min(i.dist[0], min(i.dist[1], i.dist[2])) * i.dist[3]; 94 | 95 | // Early out if we know we are not on a line segment. 96 | if(minDistanceToEdge > 0.9 || i.area.x > _MaxTriSize) 97 | { 98 | return fixed4(_BaseColor.rgb,0); 99 | } 100 | 101 | // Smooth our line out 102 | float t = exp2(_WireSmoothness * -1.0 * minDistanceToEdge * minDistanceToEdge); 103 | fixed4 finalColor = lerp(_BaseColor, _WireColor, t); 104 | 105 | return finalColor; 106 | } -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Mesher.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using UnityEngine.Rendering; 4 | using Unity.Jobs; 5 | using Unity.Mathematics; 6 | using Unity.Collections; 7 | using Unity.Collections.LowLevel.Unsafe; 8 | 9 | namespace MarchingCubes 10 | { 11 | public partial class Mesher 12 | { 13 | // Precalculated array of indices (0,1,2,3,4,5...) because vertices are not shared, so we can just extract subarray 14 | // It may sound dumb, but it gives small boost (no list reallocations, no bounds checking, less cache pollution) 15 | // ~4mb but we probably saving that by not using indices list in each Mesher instance. 16 | // Also, 16bit indices can be used if needed. 17 | private const int PrecalculatedIndicesCount = 1000000; 18 | private static NativeArray indicesPrecalc32bit; 19 | private static NativeArray indicesPrecalc16bit; 20 | private static NativeArray triangulationTable; 21 | private static NativeArray cornerIndexA; 22 | private static NativeArray cornerIndexB; 23 | private static NativeArray cornerIndexMix; 24 | // with static native arrays we need that: 25 | private static int referenceCounter; 26 | 27 | 28 | 29 | public enum Mode { Naive, Simd32, Simd32Multithreaded } 30 | 31 | MeshingJob meshingJob; 32 | JobHandle meshingJobHandle; 33 | 34 | 35 | 36 | public Mesher() 37 | { 38 | System.Threading.Interlocked.Increment(ref referenceCounter); 39 | AllocateLookupArrays(); 40 | Allocate(); 41 | } 42 | private void Allocate() 43 | { 44 | meshingJob = new MeshingJob 45 | { 46 | triangulationTable = triangulationTable, 47 | cornerIndexA = cornerIndexA, 48 | cornerIndexB = cornerIndexB, 49 | }; 50 | meshingJob.Allocate(); 51 | } 52 | public void Dispose() 53 | { 54 | System.Threading.Interlocked.Decrement(ref referenceCounter); 55 | meshingJob.Dispose(); 56 | DisposeStaticLookupArrays(); 57 | } 58 | private static void DisposeStaticLookupArrays() 59 | { 60 | if (referenceCounter == 0) 61 | { 62 | indicesPrecalc32bit.Dispose(); 63 | indicesPrecalc16bit.Dispose(); 64 | triangulationTable.Dispose(); 65 | cornerIndexMix.Dispose(); 66 | } 67 | } 68 | 69 | 70 | 71 | public JobHandle StartMeshJob(Chunk chunk, Mode mode, int xStart = 0, int xStop = Chunk.ChunkSizeX - 1) 72 | { 73 | meshingJob.vertices.Clear(); 74 | meshingJob.volume = chunk.data; 75 | meshingJob.mode = mode; 76 | 77 | if (mode == Mode.Simd32Multithreaded) 78 | { 79 | meshingJob.xStart = xStart; 80 | meshingJob.xStop = xStop; 81 | meshingJobHandle = meshingJob.Schedule(); 82 | if (xStart >= (Chunk.ChunkSizeX - 1)) 83 | Debug.LogWarning("Job started with xStart parameter outside bounds. It will do nothing."); 84 | } 85 | else 86 | { 87 | meshingJobHandle = meshingJob.Schedule(); 88 | } 89 | 90 | return meshingJobHandle; 91 | } 92 | public bool IsFinished() => meshingJobHandle.IsCompleted; 93 | public void WaitForMeshJob() => meshingJobHandle.Complete(); 94 | 95 | 96 | /// 97 | /// Combine meshes from different meshers. 98 | /// 99 | public void CombineMeshers(List meshers) 100 | { 101 | var verticesCount = 0; 102 | foreach(var mesher in meshers) 103 | { 104 | verticesCount += mesher.Vertices.Length; 105 | } 106 | 107 | meshingJob.vertices.Capacity = verticesCount + 9; 108 | 109 | foreach (var mesher in meshers) 110 | { 111 | if (mesher != this) 112 | { 113 | meshingJob.vertices.AddRange(mesher.meshingJob.vertices.AsArray()); 114 | } 115 | } 116 | } 117 | 118 | 119 | 120 | public static VertexAttributeDescriptor VertexFormat => new VertexAttributeDescriptor(VertexAttribute.Position, VertexAttributeFormat.Float32); 121 | public static NativeArray GetIndices(int count) 122 | { 123 | if (count > PrecalculatedIndicesCount) 124 | throw new System.Exception("Precalculated indices array is too short. Consider increasing PrecalculatedIndicesCount const in Mesher class."); 125 | return indicesPrecalc32bit.GetSubArray(0, count); 126 | } 127 | public static NativeArray GetIndices16(int count) 128 | { 129 | if (count > ushort.MaxValue) 130 | throw new System.Exception("This should not happen. You are trying to get 16bit indices array for too many indices."); 131 | return indicesPrecalc16bit.GetSubArray(0, count); 132 | } 133 | public NativeArray Vertices => meshingJob.vertices.AsArray(); 134 | public Bounds Bounds => meshingJob.bounds.item; 135 | } 136 | } -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/GenerateJob.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Unity.Mathematics; 5 | using Unity.Burst; 6 | using Unity.Jobs; 7 | using Unity.Collections; 8 | 9 | 10 | namespace MarchingCubes 11 | { 12 | /// 13 | /// Generate SDF 14 | /// 15 | [BurstCompile(CompileSynchronously = true, DisableSafetyChecks = true, FloatMode = FloatMode.Fast, FloatPrecision = FloatPrecision.Low)] 16 | public struct GenerateJob : IJob, IJobParallelFor 17 | { 18 | public enum Mode { SingleSphere, Noise, Sphereblob, Terrain } 19 | public Mode mode; 20 | 21 | [NoAlias][WriteOnly][NativeDisableParallelForRestriction] public NativeArray volume; 22 | public float time; 23 | 24 | // used by different modes 25 | public float3 sphereCenter; 26 | public float noiseFreq; 27 | [NoAlias][NativeDisableParallelForRestriction][ReadOnly] public NativeArray spheresPositions; 28 | [NoAlias][NativeDisableParallelForRestriction] public NativeArray spheresDeltas; 29 | 30 | 31 | public void Execute() 32 | { 33 | SphereblobUpdate(); 34 | } 35 | 36 | public void Execute(int jobIndex) 37 | { 38 | switch (mode) 39 | { 40 | case Mode.SingleSphere: 41 | SphereJob(jobIndex); 42 | break; 43 | case Mode.Noise: 44 | NoiseJob(jobIndex); 45 | break; 46 | case Mode.Sphereblob: 47 | SphereblobJob(jobIndex); 48 | break; 49 | case Mode.Terrain: 50 | TerrainJob(jobIndex); 51 | break; 52 | default: 53 | break; 54 | } 55 | } 56 | 57 | 58 | private void SphereJob(int x) 59 | { 60 | var flatIndex = x * Chunk.ChunkSizeY * Chunk.ChunkSizeZ; 61 | var sphereRadius = 14.4f + math.sin(time); 62 | 63 | for (int y = 0; y < Chunk.ChunkSizeY; y++) 64 | { 65 | for (int z = 0; z < Chunk.ChunkSizeZ; z++) 66 | { 67 | var voxelPosition = new float3(x, y, z); 68 | var val = math.distance(voxelPosition, sphereCenter) - sphereRadius; 69 | val = math.clamp(val, -1.0f, 1.0f) * -127; 70 | volume[flatIndex] = (sbyte)val; 71 | flatIndex++; 72 | } 73 | } 74 | } 75 | 76 | private void NoiseJob(int x) 77 | { 78 | var flatIndex = x * Chunk.ChunkSizeY * Chunk.ChunkSizeZ; 79 | 80 | float4 position = new float4(x * noiseFreq, 0, 0, time * noiseFreq); 81 | 82 | for (int y = 0; y < Chunk.ChunkSizeY; y++) 83 | { 84 | position.y = y * noiseFreq; 85 | 86 | for (int z = 0; z < Chunk.ChunkSizeZ; z++) 87 | { 88 | position.z = z * noiseFreq; 89 | 90 | var value = noise.snoise(position) * -127; 91 | volume[flatIndex] = (sbyte)value; 92 | flatIndex++; 93 | } 94 | } 95 | } 96 | 97 | private void SphereblobUpdate() 98 | { 99 | for (int i = 0; i < spheresPositions.Length; i++) 100 | { 101 | var pos = spheresPositions[i] * noiseFreq + time * 0.02f; 102 | spheresDeltas[i] = new float4 103 | { 104 | x = noise.snoise(pos.yz) * 5.0f, 105 | y = noise.snoise(pos.xz) * 5.0f, 106 | z = noise.snoise(pos.xy) * 5.0f, 107 | w = noise.snoise(pos.xy + time * 0.06f) * 1.5f + 4.0f 108 | }; 109 | } 110 | } 111 | 112 | private void SphereblobJob(int x) 113 | { 114 | var flatIndex = x * Chunk.ChunkSizeY * Chunk.ChunkSizeZ; 115 | 116 | for (int y = 0; y < Chunk.ChunkSizeY; y++) 117 | { 118 | for (int z = 0; z < Chunk.ChunkSizeZ; z++) 119 | { 120 | var value = 1.0f; 121 | var voxelPos = new float3(x, y, z); 122 | 123 | for (int i = 0; i < spheresPositions.Length; i++) 124 | { 125 | var vector = voxelPos - (spheresPositions[i] + spheresDeltas[i].xyz); 126 | var val = math.length(vector) - spheresDeltas[i].w; 127 | 128 | value = math.min(value, math.max(val, -1.0f)); 129 | } 130 | 131 | volume[flatIndex] = (sbyte)(value * -127.0f); 132 | flatIndex++; 133 | } 134 | } 135 | } 136 | 137 | private void TerrainJob(int x) 138 | { 139 | var flatIndex = x * Chunk.ChunkSizeY * Chunk.ChunkSizeZ; 140 | 141 | for (int y = 0; y < Chunk.ChunkSizeY; y++) 142 | { 143 | for (int z = 0; z < Chunk.ChunkSizeZ; z++) 144 | { 145 | float2 noisePos = new float2(x, z) + time; 146 | var val = y - ( 147 | noise.snoise(noisePos * 0.01f) * 8.0f + 148 | noise.snoise(noisePos * 0.02f) * 4.0f + 149 | noise.snoise(noisePos * 0.04f) * 2.0f + 150 | noise.snoise(noisePos * 0.16f) * 0.5f + 151 | 15.5f); 152 | val = math.clamp(val, -1.0f, 1.0f) * -127; 153 | volume[flatIndex] = (sbyte)val; 154 | flatIndex++; 155 | } 156 | } 157 | } 158 | } 159 | } -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/WireframeShaded-Unlit.shader: -------------------------------------------------------------------------------- 1 | Shader "SuperSystems/Wireframe-Shaded-Unlit" 2 | { 3 | Properties 4 | { 5 | _MainTex ("MainTex", 2D) = "white" {} 6 | _WireThickness ("Wire Thickness", RANGE(0, 800)) = 100 7 | _WireSmoothness ("Wire Smoothness", RANGE(0, 20)) = 3 8 | _WireColor ("Wire Color", Color) = (0.0, 1.0, 0.0, 1.0) 9 | _BaseColor ("Base Color", Color) = (0.0, 0.0, 0.0, 1.0) 10 | } 11 | 12 | SubShader 13 | { 14 | Tags { 15 | "RenderType"="Opaque" 16 | } 17 | 18 | Pass 19 | { 20 | // Wireframe shader based on the the following 21 | // http://developer.download.nvidia.com/SDK/10/direct3d/Source/SolidWireframe/Doc/SolidWireframe.pdf 22 | 23 | CGPROGRAM 24 | #pragma vertex vert 25 | #pragma geometry geom 26 | #pragma fragment frag 27 | 28 | #include "UnityCG.cginc" 29 | 30 | uniform sampler2D _MainTex; uniform float4 _MainTex_ST; 31 | uniform float _WireThickness; 32 | uniform float _WireSmoothness; 33 | uniform float4 _WireColor; 34 | uniform float4 _BaseColor; 35 | 36 | struct appdata 37 | { 38 | float4 vertex : POSITION; 39 | float2 texcoord0 : TEXCOORD0; 40 | UNITY_VERTEX_INPUT_INSTANCE_ID 41 | }; 42 | 43 | struct v2g 44 | { 45 | float4 projectionSpaceVertex : SV_POSITION; 46 | float2 uv0 : TEXCOORD0; 47 | float4 worldSpacePosition : TEXCOORD1; 48 | UNITY_VERTEX_OUTPUT_STEREO 49 | }; 50 | 51 | struct g2f 52 | { 53 | float4 projectionSpaceVertex : SV_POSITION; 54 | float2 uv0 : TEXCOORD0; 55 | float4 worldSpacePosition : TEXCOORD1; 56 | float4 dist : TEXCOORD2; 57 | UNITY_VERTEX_OUTPUT_STEREO 58 | }; 59 | 60 | v2g vert (appdata v) 61 | { 62 | v2g o; 63 | UNITY_SETUP_INSTANCE_ID(v); 64 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 65 | o.projectionSpaceVertex = UnityObjectToClipPos(v.vertex); 66 | o.worldSpacePosition = mul(unity_ObjectToWorld, v.vertex); 67 | o.uv0 = TRANSFORM_TEX(v.texcoord0, _MainTex); 68 | return o; 69 | } 70 | 71 | [maxvertexcount(3)] 72 | void geom(triangle v2g i[3], inout TriangleStream triangleStream) 73 | { 74 | float2 p0 = i[0].projectionSpaceVertex.xy / i[0].projectionSpaceVertex.w; 75 | float2 p1 = i[1].projectionSpaceVertex.xy / i[1].projectionSpaceVertex.w; 76 | float2 p2 = i[2].projectionSpaceVertex.xy / i[2].projectionSpaceVertex.w; 77 | 78 | float2 edge0 = p2 - p1; 79 | float2 edge1 = p2 - p0; 80 | float2 edge2 = p1 - p0; 81 | 82 | // To find the distance to the opposite edge, we take the 83 | // formula for finding the area of a triangle Area = Base/2 * Height, 84 | // and solve for the Height = (Area * 2)/Base. 85 | // We can get the area of a triangle by taking its cross product 86 | // divided by 2. However we can avoid dividing our area/base by 2 87 | // since our cross product will already be double our area. 88 | float area = abs(edge1.x * edge2.y - edge1.y * edge2.x); 89 | float wireThickness = 800 - _WireThickness; 90 | 91 | g2f o; 92 | 93 | o.uv0 = i[0].uv0; 94 | o.worldSpacePosition = i[0].worldSpacePosition; 95 | o.projectionSpaceVertex = i[0].projectionSpaceVertex; 96 | o.dist.xyz = float3( (area / length(edge0)), 0.0, 0.0) * o.projectionSpaceVertex.w * wireThickness; 97 | o.dist.w = 1.0 / o.projectionSpaceVertex.w; 98 | UNITY_TRANSFER_VERTEX_OUTPUT_STEREO(i[0], o); 99 | triangleStream.Append(o); 100 | 101 | o.uv0 = i[1].uv0; 102 | o.worldSpacePosition = i[1].worldSpacePosition; 103 | o.projectionSpaceVertex = i[1].projectionSpaceVertex; 104 | o.dist.xyz = float3(0.0, (area / length(edge1)), 0.0) * o.projectionSpaceVertex.w * wireThickness; 105 | o.dist.w = 1.0 / o.projectionSpaceVertex.w; 106 | UNITY_TRANSFER_VERTEX_OUTPUT_STEREO(i[1], o); 107 | triangleStream.Append(o); 108 | 109 | o.uv0 = i[2].uv0; 110 | o.worldSpacePosition = i[2].worldSpacePosition; 111 | o.projectionSpaceVertex = i[2].projectionSpaceVertex; 112 | o.dist.xyz = float3(0.0, 0.0, (area / length(edge2))) * o.projectionSpaceVertex.w * wireThickness; 113 | o.dist.w = 1.0 / o.projectionSpaceVertex.w; 114 | UNITY_TRANSFER_VERTEX_OUTPUT_STEREO(i[2], o); 115 | triangleStream.Append(o); 116 | } 117 | 118 | fixed4 frag (g2f i) : SV_Target 119 | { 120 | float minDistanceToEdge = min(i.dist[0], min(i.dist[1], i.dist[2])) * i.dist[3]; 121 | 122 | float4 baseColor = _BaseColor * tex2D(_MainTex, i.uv0); 123 | 124 | // Early out if we know we are not on a line segment. 125 | if(minDistanceToEdge > 0.9) 126 | { 127 | return fixed4(baseColor.rgb,0); 128 | } 129 | 130 | // Smooth our line out 131 | float t = exp2(_WireSmoothness * -1.0 * minDistanceToEdge * minDistanceToEdge); 132 | fixed4 finalColor = lerp(baseColor, _WireColor, t); 133 | finalColor.a = t; 134 | 135 | return finalColor; 136 | } 137 | ENDCG 138 | } 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /Assets/Wireframe/Shaders/Resources/WireframeShaded-Unlit-Global.shader: -------------------------------------------------------------------------------- 1 | Shader "hidden/SuperSystems/Wireframe-Shaded-Unlit-Global" 2 | { 3 | Properties 4 | { 5 | _MainTex ("MainTex", 2D) = "white" {} 6 | _Color ("Base Color", Color) = (0.0, 0.0, 0.0, 1.0) 7 | } 8 | 9 | SubShader 10 | { 11 | Tags { 12 | "RenderType"="Opaque" 13 | } 14 | 15 | Pass 16 | { 17 | // Wireframe shader based on the the following 18 | // http://developer.download.nvidia.com/SDK/10/direct3d/Source/SolidWireframe/Doc/SolidWireframe.pdf 19 | 20 | CGPROGRAM 21 | #pragma vertex vert 22 | #pragma geometry geom 23 | #pragma fragment frag 24 | 25 | #include "UnityCG.cginc" 26 | 27 | uniform sampler2D _MainTex; uniform float4 _MainTex_ST; 28 | uniform float4 _Color; 29 | uniform float _WireThickness = 100; 30 | uniform float _WireSmoothness = 3; 31 | uniform float4 _WireColor = float4(0.0, 1.0, 0.0, 1.0); 32 | uniform float4 _BaseColor = float4(0.0, 0.0, 0.0, 0.0); 33 | uniform float _MaxTriSize = 25.0; 34 | 35 | struct appdata 36 | { 37 | float4 vertex : POSITION; 38 | float2 texcoord0 : TEXCOORD0; 39 | UNITY_VERTEX_INPUT_INSTANCE_ID 40 | }; 41 | 42 | struct v2g 43 | { 44 | float4 projectionSpaceVertex : SV_POSITION; 45 | float2 uv0 : TEXCOORD0; 46 | float4 worldSpacePosition : TEXCOORD1; 47 | UNITY_VERTEX_OUTPUT_STEREO 48 | }; 49 | 50 | struct g2f 51 | { 52 | float4 projectionSpaceVertex : SV_POSITION; 53 | float2 uv0 : TEXCOORD0; 54 | float4 worldSpacePosition : TEXCOORD1; 55 | float4 dist : TEXCOORD2; 56 | float4 area : TEXCOORD3; 57 | UNITY_VERTEX_OUTPUT_STEREO 58 | }; 59 | 60 | v2g vert (appdata v) 61 | { 62 | v2g o; 63 | UNITY_SETUP_INSTANCE_ID(v); 64 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 65 | o.projectionSpaceVertex = UnityObjectToClipPos(v.vertex); 66 | o.worldSpacePosition = mul(unity_ObjectToWorld, v.vertex); 67 | o.uv0 = TRANSFORM_TEX(v.texcoord0, _MainTex); 68 | return o; 69 | } 70 | 71 | [maxvertexcount(3)] 72 | void geom(triangle v2g i[3], inout TriangleStream triangleStream) 73 | { 74 | float2 p0 = i[0].projectionSpaceVertex.xy / i[0].projectionSpaceVertex.w; 75 | float2 p1 = i[1].projectionSpaceVertex.xy / i[1].projectionSpaceVertex.w; 76 | float2 p2 = i[2].projectionSpaceVertex.xy / i[2].projectionSpaceVertex.w; 77 | 78 | float2 edge0 = p2 - p1; 79 | float2 edge1 = p2 - p0; 80 | float2 edge2 = p1 - p0; 81 | 82 | float4 worldEdge0 = i[0].worldSpacePosition - i[1].worldSpacePosition; 83 | float4 worldEdge1 = i[1].worldSpacePosition - i[2].worldSpacePosition; 84 | float4 worldEdge2 = i[0].worldSpacePosition - i[2].worldSpacePosition; 85 | 86 | // To find the distance to the opposite edge, we take the 87 | // formula for finding the area of a triangle Area = Base/2 * Height, 88 | // and solve for the Height = (Area * 2)/Base. 89 | // We can get the area of a triangle by taking its cross product 90 | // divided by 2. However we can avoid dividing our area/base by 2 91 | // since our cross product will already be double our area. 92 | float area = abs(edge1.x * edge2.y - edge1.y * edge2.x); 93 | float wireThickness = 800 - _WireThickness; 94 | 95 | g2f o; 96 | 97 | o.area = float4(0, 0, 0, 0); 98 | o.area.x = max(length(worldEdge0), max(length(worldEdge1), length(worldEdge2))); 99 | 100 | o.uv0 = i[0].uv0; 101 | o.worldSpacePosition = i[0].worldSpacePosition; 102 | o.projectionSpaceVertex = i[0].projectionSpaceVertex; 103 | o.dist.xyz = float3( (area / length(edge0)), 0.0, 0.0) * o.projectionSpaceVertex.w * wireThickness; 104 | o.dist.w = 1.0 / o.projectionSpaceVertex.w; 105 | UNITY_TRANSFER_VERTEX_OUTPUT_STEREO(i[0], o); 106 | triangleStream.Append(o); 107 | 108 | o.uv0 = i[1].uv0; 109 | o.worldSpacePosition = i[1].worldSpacePosition; 110 | o.projectionSpaceVertex = i[1].projectionSpaceVertex; 111 | o.dist.xyz = float3(0.0, (area / length(edge1)), 0.0) * o.projectionSpaceVertex.w * wireThickness; 112 | o.dist.w = 1.0 / o.projectionSpaceVertex.w; 113 | UNITY_TRANSFER_VERTEX_OUTPUT_STEREO(i[1], o); 114 | triangleStream.Append(o); 115 | 116 | o.uv0 = i[2].uv0; 117 | o.worldSpacePosition = i[2].worldSpacePosition; 118 | o.projectionSpaceVertex = i[2].projectionSpaceVertex; 119 | o.dist.xyz = float3(0.0, 0.0, (area / length(edge2))) * o.projectionSpaceVertex.w * wireThickness; 120 | o.dist.w = 1.0 / o.projectionSpaceVertex.w; 121 | UNITY_TRANSFER_VERTEX_OUTPUT_STEREO(i[2], o); 122 | triangleStream.Append(o); 123 | } 124 | 125 | fixed4 frag (g2f i) : SV_Target 126 | { 127 | float minDistanceToEdge = min(i.dist[0], min(i.dist[1], i.dist[2])) * i.dist[3]; 128 | 129 | float4 baseColor = _Color * _BaseColor * tex2D(_MainTex, i.uv0); 130 | 131 | // Early out if we know we are not on a line segment. 132 | if(minDistanceToEdge > 0.9 || i.area.x > _MaxTriSize) 133 | { 134 | return fixed4(baseColor.rgb,0); 135 | } 136 | 137 | // Smooth our line out 138 | float t = exp2(_WireSmoothness * -1.0 * minDistanceToEdge * minDistanceToEdge); 139 | fixed4 finalColor = lerp(baseColor, _WireColor, t); 140 | finalColor.a = t; 141 | 142 | return finalColor; 143 | } 144 | ENDCG 145 | } 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Example.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Unity.Mathematics; 5 | using Unity.Burst; 6 | using Unity.Jobs; 7 | using Unity.Profiling; 8 | using Unity.Burst.CompilerServices; 9 | using Unity.Collections.LowLevel.Unsafe; 10 | using Unity.Collections; 11 | using WireframeImageEffect = SuperSystems.ImageEffects.WireframeImageEffect; 12 | 13 | namespace MarchingCubes 14 | { 15 | public class Example : MonoBehaviour 16 | { 17 | private bool regenerateOnce = true; 18 | private GenerateJob.Mode generateModePrev; 19 | public GenerateJob.Mode generateMode; 20 | public Mesher.Mode meshingMode; 21 | public int threadCount = 4; 22 | 23 | public bool regenerateChunk = true; 24 | public float noiseSpeed = 0.1f; 25 | public GameObject chunkGameObject; 26 | private MeshFilter chunkMeshFilter; 27 | 28 | Chunk chunk; 29 | Mesher mesher; 30 | List meshers = new List(); // for multithreaded meshing 31 | GenerateJob generateJob; 32 | 33 | TimeCounter meshingCounter = new TimeCounter(samplesCount: 300); 34 | TimeCounter uploadingCounter = new TimeCounter(); 35 | TimeCounter chunkRegenCounter = new TimeCounter(); 36 | 37 | 38 | void OnGUI() 39 | { 40 | GUILayout.BeginHorizontal(); 41 | 42 | { 43 | var wires = Camera.main.GetComponent(); 44 | 45 | GUILayout.BeginVertical(GUI.skin.box); 46 | 47 | GUILayout.Label("Chunk regenerate mean time: " + chunkRegenCounter.mean.ToString("F3") + " ms"); 48 | GUILayout.Label("Meshing mean time: " + meshingCounter.mean.ToString("F3") + " ms"); 49 | GUILayout.Label("Upload mean time: " + uploadingCounter.mean.ToString("F3") + " ms"); 50 | GUILayout.BeginHorizontal(); 51 | GUILayout.Label("Speed"); 52 | noiseSpeed = GUILayout.HorizontalSlider(noiseSpeed, 0.0f, 2.0f); 53 | GUILayout.EndHorizontal(); 54 | GUILayout.Space(10); 55 | wires.wireframeType = GUILayout.Toggle(wires.wireframeType == WireframeImageEffect.WireframeType.Solid, "Wireframe") ? WireframeImageEffect.WireframeType.Solid : WireframeImageEffect.WireframeType.None; 56 | 57 | GUILayout.Space(10); 58 | GUIToggles(); 59 | 60 | GUILayout.Space(10); 61 | GUILayout.BeginHorizontal(); 62 | GUILayout.Label("Threads " + threadCount); 63 | threadCount = (int)GUILayout.HorizontalSlider(threadCount, 1, 16); 64 | GUILayout.EndHorizontal(); 65 | 66 | GUILayout.EndVertical(); 67 | } 68 | { 69 | GUILayout.BeginVertical(GUI.skin.box); 70 | GUILayout.Label("Scrool to zoom, RMB to rotate (shift for faster)"); 71 | GUILayout.Label("Vertices " + chunkMeshFilter.mesh.vertexCount); 72 | GUILayout.EndVertical(); 73 | } 74 | 75 | GUILayout.EndHorizontal(); 76 | } 77 | void GUIToggles() 78 | { 79 | generateMode = GUILayout.Toggle(generateMode == GenerateJob.Mode.SingleSphere, "Single sphere") ? GenerateJob.Mode.SingleSphere : generateMode; 80 | generateMode = GUILayout.Toggle(generateMode == GenerateJob.Mode.Noise, "Noise") ? GenerateJob.Mode.Noise : generateMode; 81 | generateMode = GUILayout.Toggle(generateMode == GenerateJob.Mode.Sphereblob, "Sphereblobs") ? GenerateJob.Mode.Sphereblob : generateMode; 82 | generateMode = GUILayout.Toggle(generateMode == GenerateJob.Mode.Terrain, "Terrain") ? GenerateJob.Mode.Terrain : generateMode; 83 | GUILayout.Space(5); 84 | meshingMode = GUILayout.Toggle(meshingMode == Mesher.Mode.Naive, "Naive meshing") ? Mesher.Mode.Naive : meshingMode; 85 | meshingMode = GUILayout.Toggle(meshingMode == Mesher.Mode.Simd32, "SIMD") ? Mesher.Mode.Simd32 : meshingMode; 86 | meshingMode = GUILayout.Toggle(meshingMode == Mesher.Mode.Simd32Multithreaded, "SIMD+Threads") ? Mesher.Mode.Simd32Multithreaded : meshingMode; 87 | } 88 | 89 | void Start() 90 | { 91 | threadCount = Mathf.Clamp(threadCount, 1, 16); 92 | 93 | if (chunkGameObject != null) 94 | chunkMeshFilter = chunkGameObject.GetComponent(); 95 | 96 | chunk = new Chunk(); 97 | mesher = new Mesher(); 98 | for (int i = 0; i < 16; i++) 99 | meshers.Add(new Mesher()); 100 | 101 | PrepareJobsData(); 102 | } 103 | 104 | void PrepareJobsData() 105 | { 106 | generateJob = new GenerateJob 107 | { 108 | volume = chunk.data, 109 | 110 | sphereCenter = new float3(15.5f, 15.5f, 15.5f), 111 | noiseFreq = 0.07f, 112 | spheresPositions = new NativeArray(50, Allocator.Persistent), 113 | spheresDeltas = new NativeArray(50, Allocator.Persistent) 114 | }; 115 | 116 | for (int i = 0; i < generateJob.spheresPositions.Length; i++) 117 | { 118 | generateJob.spheresPositions[i] = new float3 119 | { 120 | x = UnityEngine.Random.value * (Chunk.ChunkSizeX - 10) + 5, 121 | y = UnityEngine.Random.value * (Chunk.ChunkSizeY - 10) + 5, 122 | z = UnityEngine.Random.value * (Chunk.ChunkSizeZ - 10) + 5, 123 | }; 124 | } 125 | } 126 | 127 | void Update() 128 | { 129 | if (generateMode != generateModePrev) 130 | { 131 | generateModePrev = generateMode; 132 | regenerateOnce = true; 133 | } 134 | 135 | if (regenerateChunk || regenerateOnce) 136 | { 137 | regenerateOnce = false; 138 | chunkRegenCounter.Start(); 139 | generateJob.time += Time.deltaTime * noiseSpeed; 140 | generateJob.mode = generateMode; 141 | if (generateMode == GenerateJob.Mode.Sphereblob) 142 | generateJob.Run(); 143 | generateJob.Schedule(32, 1).Complete(); 144 | chunkRegenCounter.Stop(); 145 | } 146 | 147 | if (meshingMode == Mesher.Mode.Simd32Multithreaded) 148 | { 149 | List usedMeshers = new List(); 150 | 151 | meshingCounter.Start(); 152 | 153 | for (int i = 0; i < threadCount; i++) 154 | usedMeshers.Add(meshers[i]); 155 | 156 | StartMeshGroup(usedMeshers, chunk); 157 | 158 | for (int i = 0; i < usedMeshers.Count; i++) 159 | usedMeshers[i].WaitForMeshJob(); 160 | 161 | meshingCounter.Stop(); 162 | 163 | uploadingCounter.Start(); 164 | chunkMeshFilter.mesh.SetMesh(usedMeshers, combineMeshesOnCpu: false); 165 | uploadingCounter.Stop(); 166 | } 167 | else 168 | { 169 | meshingCounter.Start(); 170 | mesher.StartMeshJob(chunk, meshingMode); 171 | mesher.WaitForMeshJob(); 172 | meshingCounter.Stop(); 173 | 174 | uploadingCounter.Start(); 175 | chunkMeshFilter.mesh.SetMesh(mesher); 176 | uploadingCounter.Stop(); 177 | } 178 | } 179 | 180 | void OnDestroy() 181 | { 182 | chunk.Dispose(); 183 | mesher.Dispose(); 184 | generateJob.spheresPositions.Dispose(); 185 | generateJob.spheresDeltas.Dispose(); 186 | 187 | foreach (var mesher in meshers) 188 | mesher.Dispose(); 189 | } 190 | 191 | void StartMeshGroup(List meshers, Chunk chunk) 192 | { 193 | var range = (Chunk.ChunkSizeX - 1) / meshers.Count; 194 | var remainder = (Chunk.ChunkSizeX - 1) % meshers.Count; 195 | var stop = 0; 196 | 197 | for (int i = 0; i < meshers.Count; i++) 198 | { 199 | var start = stop; 200 | stop += range + (remainder-- > 0 ? 1 : 0); 201 | meshers[i].StartMeshJob(chunk, meshingMode, start, stop); 202 | } 203 | } 204 | } 205 | } 206 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.burst": { 4 | "version": "1.5.3", 5 | "depth": 0, 6 | "source": "registry", 7 | "dependencies": { 8 | "com.unity.mathematics": "1.2.1" 9 | }, 10 | "url": "https://packages.unity.com" 11 | }, 12 | "com.unity.collab-proxy": { 13 | "version": "1.15.1", 14 | "depth": 0, 15 | "source": "registry", 16 | "dependencies": { 17 | "com.unity.nuget.newtonsoft-json": "2.0.0", 18 | "com.unity.services.core": "1.0.1" 19 | }, 20 | "url": "https://packages.unity.com" 21 | }, 22 | "com.unity.collections": { 23 | "version": "0.15.0-preview.21", 24 | "depth": 1, 25 | "source": "registry", 26 | "dependencies": { 27 | "com.unity.test-framework.performance": "2.3.1-preview", 28 | "com.unity.burst": "1.4.1" 29 | }, 30 | "url": "https://packages.unity.com" 31 | }, 32 | "com.unity.ext.nunit": { 33 | "version": "1.0.6", 34 | "depth": 1, 35 | "source": "registry", 36 | "dependencies": {}, 37 | "url": "https://packages.unity.com" 38 | }, 39 | "com.unity.ide.visualstudio": { 40 | "version": "2.0.15", 41 | "depth": 0, 42 | "source": "registry", 43 | "dependencies": { 44 | "com.unity.test-framework": "1.1.9" 45 | }, 46 | "url": "https://packages.unity.com" 47 | }, 48 | "com.unity.jobs": { 49 | "version": "0.8.0-preview.23", 50 | "depth": 0, 51 | "source": "registry", 52 | "dependencies": { 53 | "com.unity.collections": "0.15.0-preview.21", 54 | "com.unity.mathematics": "1.2.1" 55 | }, 56 | "url": "https://packages.unity.com" 57 | }, 58 | "com.unity.mathematics": { 59 | "version": "1.2.1", 60 | "depth": 1, 61 | "source": "registry", 62 | "dependencies": {}, 63 | "url": "https://packages.unity.com" 64 | }, 65 | "com.unity.nuget.newtonsoft-json": { 66 | "version": "2.0.0", 67 | "depth": 1, 68 | "source": "registry", 69 | "dependencies": {}, 70 | "url": "https://packages.unity.com" 71 | }, 72 | "com.unity.services.core": { 73 | "version": "1.0.1", 74 | "depth": 1, 75 | "source": "registry", 76 | "dependencies": { 77 | "com.unity.modules.unitywebrequest": "1.0.0" 78 | }, 79 | "url": "https://packages.unity.com" 80 | }, 81 | "com.unity.test-framework": { 82 | "version": "1.1.29", 83 | "depth": 0, 84 | "source": "registry", 85 | "dependencies": { 86 | "com.unity.ext.nunit": "1.0.6", 87 | "com.unity.modules.imgui": "1.0.0", 88 | "com.unity.modules.jsonserialize": "1.0.0" 89 | }, 90 | "url": "https://packages.unity.com" 91 | }, 92 | "com.unity.test-framework.performance": { 93 | "version": "2.3.1-preview", 94 | "depth": 2, 95 | "source": "registry", 96 | "dependencies": { 97 | "com.unity.test-framework": "1.1.0", 98 | "com.unity.nuget.newtonsoft-json": "2.0.0-preview" 99 | }, 100 | "url": "https://packages.unity.com" 101 | }, 102 | "com.unity.ugui": { 103 | "version": "1.0.0", 104 | "depth": 0, 105 | "source": "builtin", 106 | "dependencies": { 107 | "com.unity.modules.ui": "1.0.0", 108 | "com.unity.modules.imgui": "1.0.0" 109 | } 110 | }, 111 | "com.unity.modules.ai": { 112 | "version": "1.0.0", 113 | "depth": 0, 114 | "source": "builtin", 115 | "dependencies": {} 116 | }, 117 | "com.unity.modules.androidjni": { 118 | "version": "1.0.0", 119 | "depth": 0, 120 | "source": "builtin", 121 | "dependencies": {} 122 | }, 123 | "com.unity.modules.animation": { 124 | "version": "1.0.0", 125 | "depth": 0, 126 | "source": "builtin", 127 | "dependencies": {} 128 | }, 129 | "com.unity.modules.assetbundle": { 130 | "version": "1.0.0", 131 | "depth": 0, 132 | "source": "builtin", 133 | "dependencies": {} 134 | }, 135 | "com.unity.modules.audio": { 136 | "version": "1.0.0", 137 | "depth": 0, 138 | "source": "builtin", 139 | "dependencies": {} 140 | }, 141 | "com.unity.modules.cloth": { 142 | "version": "1.0.0", 143 | "depth": 0, 144 | "source": "builtin", 145 | "dependencies": { 146 | "com.unity.modules.physics": "1.0.0" 147 | } 148 | }, 149 | "com.unity.modules.director": { 150 | "version": "1.0.0", 151 | "depth": 0, 152 | "source": "builtin", 153 | "dependencies": { 154 | "com.unity.modules.audio": "1.0.0", 155 | "com.unity.modules.animation": "1.0.0" 156 | } 157 | }, 158 | "com.unity.modules.imageconversion": { 159 | "version": "1.0.0", 160 | "depth": 0, 161 | "source": "builtin", 162 | "dependencies": {} 163 | }, 164 | "com.unity.modules.imgui": { 165 | "version": "1.0.0", 166 | "depth": 0, 167 | "source": "builtin", 168 | "dependencies": {} 169 | }, 170 | "com.unity.modules.jsonserialize": { 171 | "version": "1.0.0", 172 | "depth": 0, 173 | "source": "builtin", 174 | "dependencies": {} 175 | }, 176 | "com.unity.modules.particlesystem": { 177 | "version": "1.0.0", 178 | "depth": 0, 179 | "source": "builtin", 180 | "dependencies": {} 181 | }, 182 | "com.unity.modules.physics": { 183 | "version": "1.0.0", 184 | "depth": 0, 185 | "source": "builtin", 186 | "dependencies": {} 187 | }, 188 | "com.unity.modules.physics2d": { 189 | "version": "1.0.0", 190 | "depth": 0, 191 | "source": "builtin", 192 | "dependencies": {} 193 | }, 194 | "com.unity.modules.screencapture": { 195 | "version": "1.0.0", 196 | "depth": 0, 197 | "source": "builtin", 198 | "dependencies": { 199 | "com.unity.modules.imageconversion": "1.0.0" 200 | } 201 | }, 202 | "com.unity.modules.subsystems": { 203 | "version": "1.0.0", 204 | "depth": 1, 205 | "source": "builtin", 206 | "dependencies": { 207 | "com.unity.modules.jsonserialize": "1.0.0" 208 | } 209 | }, 210 | "com.unity.modules.terrain": { 211 | "version": "1.0.0", 212 | "depth": 0, 213 | "source": "builtin", 214 | "dependencies": {} 215 | }, 216 | "com.unity.modules.terrainphysics": { 217 | "version": "1.0.0", 218 | "depth": 0, 219 | "source": "builtin", 220 | "dependencies": { 221 | "com.unity.modules.physics": "1.0.0", 222 | "com.unity.modules.terrain": "1.0.0" 223 | } 224 | }, 225 | "com.unity.modules.tilemap": { 226 | "version": "1.0.0", 227 | "depth": 0, 228 | "source": "builtin", 229 | "dependencies": { 230 | "com.unity.modules.physics2d": "1.0.0" 231 | } 232 | }, 233 | "com.unity.modules.ui": { 234 | "version": "1.0.0", 235 | "depth": 0, 236 | "source": "builtin", 237 | "dependencies": {} 238 | }, 239 | "com.unity.modules.uielements": { 240 | "version": "1.0.0", 241 | "depth": 0, 242 | "source": "builtin", 243 | "dependencies": { 244 | "com.unity.modules.ui": "1.0.0", 245 | "com.unity.modules.imgui": "1.0.0", 246 | "com.unity.modules.jsonserialize": "1.0.0", 247 | "com.unity.modules.uielementsnative": "1.0.0" 248 | } 249 | }, 250 | "com.unity.modules.uielementsnative": { 251 | "version": "1.0.0", 252 | "depth": 1, 253 | "source": "builtin", 254 | "dependencies": { 255 | "com.unity.modules.ui": "1.0.0", 256 | "com.unity.modules.imgui": "1.0.0", 257 | "com.unity.modules.jsonserialize": "1.0.0" 258 | } 259 | }, 260 | "com.unity.modules.umbra": { 261 | "version": "1.0.0", 262 | "depth": 0, 263 | "source": "builtin", 264 | "dependencies": {} 265 | }, 266 | "com.unity.modules.unityanalytics": { 267 | "version": "1.0.0", 268 | "depth": 0, 269 | "source": "builtin", 270 | "dependencies": { 271 | "com.unity.modules.unitywebrequest": "1.0.0", 272 | "com.unity.modules.jsonserialize": "1.0.0" 273 | } 274 | }, 275 | "com.unity.modules.unitywebrequest": { 276 | "version": "1.0.0", 277 | "depth": 0, 278 | "source": "builtin", 279 | "dependencies": {} 280 | }, 281 | "com.unity.modules.unitywebrequestassetbundle": { 282 | "version": "1.0.0", 283 | "depth": 0, 284 | "source": "builtin", 285 | "dependencies": { 286 | "com.unity.modules.assetbundle": "1.0.0", 287 | "com.unity.modules.unitywebrequest": "1.0.0" 288 | } 289 | }, 290 | "com.unity.modules.unitywebrequestaudio": { 291 | "version": "1.0.0", 292 | "depth": 0, 293 | "source": "builtin", 294 | "dependencies": { 295 | "com.unity.modules.unitywebrequest": "1.0.0", 296 | "com.unity.modules.audio": "1.0.0" 297 | } 298 | }, 299 | "com.unity.modules.unitywebrequesttexture": { 300 | "version": "1.0.0", 301 | "depth": 0, 302 | "source": "builtin", 303 | "dependencies": { 304 | "com.unity.modules.unitywebrequest": "1.0.0", 305 | "com.unity.modules.imageconversion": "1.0.0" 306 | } 307 | }, 308 | "com.unity.modules.unitywebrequestwww": { 309 | "version": "1.0.0", 310 | "depth": 0, 311 | "source": "builtin", 312 | "dependencies": { 313 | "com.unity.modules.unitywebrequest": "1.0.0", 314 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 315 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 316 | "com.unity.modules.audio": "1.0.0", 317 | "com.unity.modules.assetbundle": "1.0.0", 318 | "com.unity.modules.imageconversion": "1.0.0" 319 | } 320 | }, 321 | "com.unity.modules.vehicles": { 322 | "version": "1.0.0", 323 | "depth": 0, 324 | "source": "builtin", 325 | "dependencies": { 326 | "com.unity.modules.physics": "1.0.0" 327 | } 328 | }, 329 | "com.unity.modules.video": { 330 | "version": "1.0.0", 331 | "depth": 0, 332 | "source": "builtin", 333 | "dependencies": { 334 | "com.unity.modules.audio": "1.0.0", 335 | "com.unity.modules.ui": "1.0.0", 336 | "com.unity.modules.unitywebrequest": "1.0.0" 337 | } 338 | }, 339 | "com.unity.modules.vr": { 340 | "version": "1.0.0", 341 | "depth": 0, 342 | "source": "builtin", 343 | "dependencies": { 344 | "com.unity.modules.jsonserialize": "1.0.0", 345 | "com.unity.modules.physics": "1.0.0", 346 | "com.unity.modules.xr": "1.0.0" 347 | } 348 | }, 349 | "com.unity.modules.wind": { 350 | "version": "1.0.0", 351 | "depth": 0, 352 | "source": "builtin", 353 | "dependencies": {} 354 | }, 355 | "com.unity.modules.xr": { 356 | "version": "1.0.0", 357 | "depth": 0, 358 | "source": "builtin", 359 | "dependencies": { 360 | "com.unity.modules.physics": "1.0.0", 361 | "com.unity.modules.jsonserialize": "1.0.0", 362 | "com.unity.modules.subsystems": "1.0.0" 363 | } 364 | } 365 | } 366 | } 367 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/MeshingJob.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using Unity.Burst; 3 | using Unity.Burst.Intrinsics; 4 | using Unity.Jobs; 5 | using Unity.Mathematics; 6 | using Unity.Collections; 7 | using Unity.Collections.LowLevel.Unsafe; 8 | 9 | namespace MarchingCubes 10 | { 11 | [BurstCompile( 12 | CompileSynchronously = true, 13 | DisableSafetyChecks = true, 14 | FloatMode = FloatMode.Fast, 15 | FloatPrecision = FloatPrecision.Low)] 16 | public struct MeshingJob : IJob, System.IDisposable 17 | { 18 | public Mesher.Mode mode; 19 | public int xStart; 20 | public int xStop; 21 | 22 | [ReadOnly] public NativeArray triangulationTable; 23 | [ReadOnly] public NativeArray cornerIndexA; 24 | [ReadOnly] public NativeArray cornerIndexB; 25 | 26 | [ReadOnly] public NativeArray volume; 27 | [NativeDisableParallelForRestriction] public NativeList vertices; 28 | public UnsafePointer bounds; 29 | 30 | 31 | [BurstDiscard] 32 | public void Allocate() 33 | { 34 | vertices = new NativeList(500, Allocator.Persistent); 35 | bounds = new UnsafePointer(default); 36 | } 37 | 38 | [BurstDiscard] 39 | public void Dispose() 40 | { 41 | vertices.Dispose(); 42 | bounds.Dispose(); 43 | } 44 | 45 | 46 | public void Execute() 47 | { 48 | switch (mode) 49 | { 50 | case Mesher.Mode.Naive: 51 | DefaultImplementation(); 52 | break; 53 | case Mesher.Mode.Simd32: 54 | SIMDChunkSizeZ32(0, Chunk.ChunkSizeX - 1); 55 | break; 56 | case Mesher.Mode.Simd32Multithreaded: 57 | SIMDChunkSizeZ32(xStart, xStop); 58 | break; 59 | default: 60 | break; 61 | } 62 | } 63 | 64 | 65 | private unsafe void DefaultImplementation() 66 | { 67 | float4* samples = stackalloc float4[8]; 68 | 69 | for (int x = 0; x < Chunk.ChunkSizeX - 1; x++) 70 | { 71 | for (int y = 0; y < Chunk.ChunkSizeY - 1; y++) 72 | { 73 | for (int z = 0; z < Chunk.ChunkSizeZ - 1; z++) 74 | { 75 | const int flatOffsetX = Chunk.ChunkSizeY * Chunk.ChunkSizeZ; 76 | const int flatOffsetY = Chunk.ChunkSizeZ; 77 | const int flatOffsetZ = 1; 78 | var flatIndex = FlattenIndex(x, y, z); 79 | 80 | samples[0] = new float4(x + 0, y + 0, z + 0, volume[flatIndex]); // volume[FlattenIndex(x + 0, y + 0, z + 0)]); 81 | samples[1] = new float4(x + 1, y + 0, z + 0, volume[flatIndex + flatOffsetX]); // volume[FlattenIndex(x + 1, y + 0, z + 0)]); 82 | samples[2] = new float4(x + 1, y + 0, z + 1, volume[flatIndex + flatOffsetX + flatOffsetZ]); // volume[FlattenIndex(x + 1, y + 0, z + 1)]); 83 | samples[3] = new float4(x + 0, y + 0, z + 1, volume[flatIndex + flatOffsetZ]); // volume[FlattenIndex(x + 0, y + 0, z + 1)]); 84 | samples[4] = new float4(x + 0, y + 1, z + 0, volume[flatIndex + flatOffsetY]); // volume[FlattenIndex(x + 0, y + 1, z + 0)]); 85 | samples[5] = new float4(x + 1, y + 1, z + 0, volume[flatIndex + flatOffsetX + flatOffsetY]); // volume[FlattenIndex(x + 1, y + 1, z + 0)]); 86 | samples[6] = new float4(x + 1, y + 1, z + 1, volume[flatIndex + flatOffsetX + flatOffsetY + flatOffsetZ]); // volume[FlattenIndex(x + 1, y + 1, z + 1)]); 87 | samples[7] = new float4(x + 0, y + 1, z + 1, volume[flatIndex + flatOffsetY + flatOffsetZ]); // volume[FlattenIndex(x + 0, y + 1, z + 1)]); 88 | 89 | int cornerMask = 0; 90 | 91 | if (samples[0].w < 0.0f) cornerMask |= 1 << 0; // order of bits is different than in original marching cubes 92 | if (samples[1].w < 0.0f) cornerMask |= 1 << 1; // only to make simd stuff easier 93 | if (samples[2].w < 0.0f) cornerMask |= 1 << 5; // read Mesher.Arrays.cs for more info 94 | if (samples[3].w < 0.0f) cornerMask |= 1 << 4; 95 | if (samples[4].w < 0.0f) cornerMask |= 1 << 2; // default order: 76 54 32 10 96 | if (samples[5].w < 0.0f) cornerMask |= 1 << 3; // new order : 67 23 54 10 97 | if (samples[6].w < 0.0f) cornerMask |= 1 << 7; 98 | if (samples[7].w < 0.0f) cornerMask |= 1 << 6; 99 | 100 | if (cornerMask == 0 || cornerMask == 255) 101 | continue; 102 | 103 | cornerMask *= Mesher.TriangulationSubTableLenght; 104 | 105 | bounds.item.Encapsulate(new Vector3(x, y, z)); 106 | bounds.item.Encapsulate(new Vector3(x + 1, y + 1, z + 1)); 107 | 108 | for (; triangulationTable[cornerMask] != 99; cornerMask += 3) 109 | { 110 | vertices.Length = vertices.Length + 3; // make room for 3 vertices 111 | int a0 = cornerIndexA[triangulationTable[cornerMask]]; 112 | int b0 = cornerIndexB[triangulationTable[cornerMask]]; 113 | int a1 = cornerIndexA[triangulationTable[cornerMask + 1]]; 114 | int b1 = cornerIndexB[triangulationTable[cornerMask + 1]]; 115 | int a2 = cornerIndexA[triangulationTable[cornerMask + 2]]; 116 | int b2 = cornerIndexB[triangulationTable[cornerMask + 2]]; 117 | vertices[vertices.Length - 1] = InterpolateVerts(samples[a0], samples[b0]); 118 | vertices[vertices.Length - 2] = InterpolateVerts(samples[a1], samples[b1]); 119 | vertices[vertices.Length - 3] = InterpolateVerts(samples[a2], samples[b2]); 120 | } 121 | } 122 | } 123 | } 124 | } 125 | 126 | private unsafe void SIMDChunkSizeZ32(int xStart, int xStop) 127 | { 128 | if (Chunk.ChunkSizeZ != 32) 129 | throw new System.Exception("ChunkSize Z must be equal to 32 to use this function"); 130 | 131 | xStart = math.clamp(xStart, 0, Chunk.ChunkSizeX - 1); 132 | xStop = math.clamp(xStop, 0, Chunk.ChunkSizeX - 1); 133 | if (xStart >= xStop) 134 | return; 135 | 136 | sbyte* samplesBase = stackalloc sbyte[Chunk.ChunkSizeZ * 4]; 137 | sbyte* samples01 = samplesBase + Chunk.ChunkSizeZ * 0; 138 | sbyte* samples23 = samplesBase + Chunk.ChunkSizeZ * 2; 139 | 140 | int signBits0, signBits1, signBits2, signBits3; 141 | 142 | float4* samples = stackalloc float4[8]; 143 | 144 | for (int x = xStart; x < xStop; x++) 145 | { 146 | (signBits2, signBits3) = SimdExtractBitsAndSamples(samples23, volume.GetUnsafeReadOnlyPtr(), x); 147 | 148 | for (int y = 0; y < Chunk.ChunkSizeY - 1; y++) 149 | { 150 | // reuse previous step 151 | var temp = samples01; 152 | samples01 = samples23; 153 | samples23 = temp; 154 | signBits0 = signBits2; 155 | signBits1 = signBits3; 156 | 157 | 158 | (signBits2, signBits3) = SimdExtractBitsAndSamples(samples23, volume.GetUnsafeReadOnlyPtr(), x, y); 159 | 160 | 161 | v128 signBits = new v128(signBits0, signBits1, signBits2, signBits3); 162 | 163 | 164 | if (SameSigns(signBits)) 165 | continue; 166 | 167 | 168 | // make sure there is enought capacity for vertices, 169 | // otherwise, allocate bit more 170 | if (vertices.Capacity < vertices.Length + 32 * 5) 171 | vertices.Capacity = vertices.Length + 128 * 5; 172 | var verticesPtr = (float3*)vertices.GetUnsafePtr(); 173 | 174 | 175 | int cornerMask = X86.Sse.movemask_ps(signBits) << 4; 176 | 177 | for (int z = 0; z < Chunk.ChunkSizeZ - 1; z++) 178 | { 179 | cornerMask = cornerMask >> 4; 180 | signBits = X86.Sse2.slli_epi32(signBits, 1); 181 | cornerMask |= X86.Sse.movemask_ps(signBits) << 4; 182 | 183 | if (cornerMask == 0 || cornerMask == 255) 184 | continue; 185 | 186 | 187 | var zz = z + z; 188 | samples[0] = new float4(x + 0, y + 0, z + 0, samples01[zz + 0]); 189 | samples[1] = new float4(x + 1, y + 0, z + 0, samples01[zz + 1]); 190 | samples[2] = new float4(x + 1, y + 0, z + 1, samples01[zz + 3]); 191 | samples[3] = new float4(x + 0, y + 0, z + 1, samples01[zz + 2]); 192 | samples[4] = new float4(x + 0, y + 1, z + 0, samples23[zz + 0]); 193 | samples[5] = new float4(x + 1, y + 1, z + 0, samples23[zz + 1]); 194 | samples[6] = new float4(x + 1, y + 1, z + 1, samples23[zz + 3]); 195 | samples[7] = new float4(x + 0, y + 1, z + 1, samples23[zz + 2]); 196 | 197 | var triangulationTableIndex = cornerMask * Mesher.TriangulationSubTableLenght; 198 | 199 | bounds.item.Encapsulate(new Vector3(x, y, z)); 200 | bounds.item.Encapsulate(new Vector3(x + 1, y + 1, z + 1)); 201 | 202 | for (; triangulationTable[triangulationTableIndex] != 99; triangulationTableIndex += 3) 203 | { 204 | vertices.Length = vertices.Length + 3; // make room for 3 vertices 205 | int a0 = cornerIndexA[triangulationTable[triangulationTableIndex]]; 206 | int b0 = cornerIndexB[triangulationTable[triangulationTableIndex]]; 207 | int a1 = cornerIndexA[triangulationTable[triangulationTableIndex + 1]]; 208 | int b1 = cornerIndexB[triangulationTable[triangulationTableIndex + 1]]; 209 | int a2 = cornerIndexA[triangulationTable[triangulationTableIndex + 2]]; 210 | int b2 = cornerIndexB[triangulationTable[triangulationTableIndex + 2]]; 211 | verticesPtr[vertices.Length - 1] = InterpolateVerts(samples[a0], samples[b0]); 212 | verticesPtr[vertices.Length - 2] = InterpolateVerts(samples[a1], samples[b1]); 213 | verticesPtr[vertices.Length - 3] = InterpolateVerts(samples[a2], samples[b2]); 214 | } 215 | } 216 | } 217 | } 218 | } 219 | 220 | 221 | private static unsafe (int, int) SimdExtractBitsAndSamples(sbyte* samples23, void* volumePtr, int x, int y = -1 /* first step */) 222 | { 223 | v128 shuffleReverseByteOrder = new v128(15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); 224 | 225 | var ptr2 = (sbyte*)volumePtr + (x + 0) * Chunk.ChunkSizeY * Chunk.ChunkSizeZ + (y + 1) * Chunk.ChunkSizeZ; 226 | var ptr3 = (sbyte*)volumePtr + (x + 1) * Chunk.ChunkSizeY * Chunk.ChunkSizeZ + (y + 1) * Chunk.ChunkSizeZ; 227 | v128 lo2 = X86.Sse2.load_si128(ptr2 + 0); 228 | v128 hi2 = X86.Sse2.load_si128(ptr2 + 16); 229 | v128 lo3 = X86.Sse2.load_si128(ptr3 + 0); 230 | v128 hi3 = X86.Sse2.load_si128(ptr3 + 16); 231 | X86.Sse2.store_si128(samples23 + 00, X86.Sse2.unpacklo_epi8(lo2, lo3)); 232 | X86.Sse2.store_si128(samples23 + 16, X86.Sse2.unpackhi_epi8(lo2, lo3)); 233 | X86.Sse2.store_si128(samples23 + 32, X86.Sse2.unpacklo_epi8(hi2, hi3)); 234 | X86.Sse2.store_si128(samples23 + 48, X86.Sse2.unpackhi_epi8(hi2, hi3)); 235 | lo2 = X86.Ssse3.shuffle_epi8(lo2, shuffleReverseByteOrder); 236 | lo3 = X86.Ssse3.shuffle_epi8(lo3, shuffleReverseByteOrder); 237 | hi2 = X86.Ssse3.shuffle_epi8(hi2, shuffleReverseByteOrder); 238 | hi3 = X86.Ssse3.shuffle_epi8(hi3, shuffleReverseByteOrder); 239 | var signBits2 = (X86.Sse2.movemask_epi8(lo2) << 16 | (X86.Sse2.movemask_epi8(hi2))); 240 | var signBits3 = (X86.Sse2.movemask_epi8(lo3) << 16 | (X86.Sse2.movemask_epi8(hi3))); 241 | return (signBits2, signBits3); 242 | } 243 | 244 | private static bool SameSigns(v128 signBits) 245 | { 246 | var maskAllOnes = new v128(uint.MaxValue); 247 | return X86.Sse4_1.test_mix_ones_zeroes(signBits, maskAllOnes) == 0; 248 | } 249 | 250 | 251 | 252 | private static int FlattenIndex(int x, int y, int z) => x * Chunk.ChunkSizeY * Chunk.ChunkSizeZ + y * Chunk.ChunkSizeZ + z; 253 | 254 | private static float3 InterpolateVerts(float4 v1, float4 v2) 255 | { 256 | // both version, simd and default assumes that the isolevel is equal to 0 257 | // its easy to change this in default version (those 8 if's) 258 | // but simd version extract sign bits, so it might be harder to implement different isolevels. 259 | const float isoLevel = 0.0f; 260 | float t = (isoLevel - v1.w) / (v2.w - v1.w); 261 | return (v1 + t * (v2 - v1)).xyz; 262 | } 263 | 264 | 265 | 266 | // bad idea :( 267 | private static float3 GetInterpolatedVertex(int edge, float sample0, float sample1) 268 | { 269 | var t = (-sample0) / (sample1 - sample0); 270 | switch (edge) 271 | { 272 | case 0: return new float3(t, 0, 0); 273 | case 1: return new float3(1, 0, t); 274 | case 2: return new float3(1 - t, 0, 1); 275 | case 3: return new float3(0, 0, 1 - t); 276 | 277 | case 4: return new float3(t, 1, 0); 278 | case 5: return new float3(1, 1, t); 279 | case 6: return new float3(1 - t, 1, 1); 280 | case 7: return new float3(0, 1, 1 - t); 281 | 282 | case 8: return new float3(0, t, 0); 283 | case 9: return new float3(1, t, 0); 284 | case 10: return new float3(1, t, 1); 285 | case 11: return new float3(0, t, 1); 286 | 287 | } 288 | return default; 289 | } 290 | } 291 | } -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/WireframeImageEffect.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.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 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: 12 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_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 4890085278179872738, guid: 662148627117ecb45939b750432c03cd, type: 2} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &729427092 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 729427097} 135 | - component: {fileID: 729427096} 136 | - component: {fileID: 729427095} 137 | - component: {fileID: 729427094} 138 | - component: {fileID: 729427093} 139 | m_Layer: 0 140 | m_Name: Solid 141 | m_TagString: Untagged 142 | m_Icon: {fileID: 0} 143 | m_NavMeshLayer: 0 144 | m_StaticEditorFlags: 0 145 | m_IsActive: 1 146 | --- !u!114 &729427093 147 | MonoBehaviour: 148 | m_ObjectHideFlags: 0 149 | m_CorrespondingSourceObject: {fileID: 0} 150 | m_PrefabInstance: {fileID: 0} 151 | m_PrefabAsset: {fileID: 0} 152 | m_GameObject: {fileID: 729427092} 153 | m_Enabled: 1 154 | m_EditorHideFlags: 0 155 | m_Script: {fileID: 11500000, guid: 4124c59241137374c9cae45d25683042, type: 3} 156 | m_Name: 157 | m_EditorClassIdentifier: 158 | speed: {x: 10, y: 10, z: 10} 159 | space: 0 160 | --- !u!23 &729427094 161 | MeshRenderer: 162 | m_ObjectHideFlags: 0 163 | m_CorrespondingSourceObject: {fileID: 0} 164 | m_PrefabInstance: {fileID: 0} 165 | m_PrefabAsset: {fileID: 0} 166 | m_GameObject: {fileID: 729427092} 167 | m_Enabled: 1 168 | m_CastShadows: 1 169 | m_ReceiveShadows: 1 170 | m_DynamicOccludee: 1 171 | m_MotionVectors: 1 172 | m_LightProbeUsage: 1 173 | m_ReflectionProbeUsage: 1 174 | m_RayTracingMode: 2 175 | m_RayTraceProcedural: 0 176 | m_RenderingLayerMask: 1 177 | m_RendererPriority: 0 178 | m_Materials: 179 | - {fileID: 2100000, guid: aa974dea2827b2a48a184876c9c3629b, type: 2} 180 | m_StaticBatchInfo: 181 | firstSubMesh: 0 182 | subMeshCount: 0 183 | m_StaticBatchRoot: {fileID: 0} 184 | m_ProbeAnchor: {fileID: 0} 185 | m_LightProbeVolumeOverride: {fileID: 0} 186 | m_ScaleInLightmap: 1 187 | m_ReceiveGI: 1 188 | m_PreserveUVs: 1 189 | m_IgnoreNormalsForChartDetection: 0 190 | m_ImportantGI: 0 191 | m_StitchLightmapSeams: 1 192 | m_SelectedEditorRenderState: 3 193 | m_MinimumChartSize: 4 194 | m_AutoUVMaxDistance: 0.5 195 | m_AutoUVMaxAngle: 89 196 | m_LightmapParameters: {fileID: 0} 197 | m_SortingLayerID: 0 198 | m_SortingLayer: 0 199 | m_SortingOrder: 0 200 | m_AdditionalVertexStreams: {fileID: 0} 201 | --- !u!135 &729427095 202 | SphereCollider: 203 | m_ObjectHideFlags: 0 204 | m_CorrespondingSourceObject: {fileID: 0} 205 | m_PrefabInstance: {fileID: 0} 206 | m_PrefabAsset: {fileID: 0} 207 | m_GameObject: {fileID: 729427092} 208 | m_Material: {fileID: 0} 209 | m_IsTrigger: 0 210 | m_Enabled: 1 211 | serializedVersion: 2 212 | m_Radius: 0.5 213 | m_Center: {x: 0, y: 0, z: 0} 214 | --- !u!33 &729427096 215 | MeshFilter: 216 | m_ObjectHideFlags: 0 217 | m_CorrespondingSourceObject: {fileID: 0} 218 | m_PrefabInstance: {fileID: 0} 219 | m_PrefabAsset: {fileID: 0} 220 | m_GameObject: {fileID: 729427092} 221 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 222 | --- !u!4 &729427097 223 | Transform: 224 | m_ObjectHideFlags: 0 225 | m_CorrespondingSourceObject: {fileID: 0} 226 | m_PrefabInstance: {fileID: 0} 227 | m_PrefabAsset: {fileID: 0} 228 | m_GameObject: {fileID: 729427092} 229 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 230 | m_LocalPosition: {x: 0, y: 0, z: 0} 231 | m_LocalScale: {x: 6, y: 6, z: 6} 232 | m_Children: [] 233 | m_Father: {fileID: 0} 234 | m_RootOrder: 2 235 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 236 | --- !u!1 &852354232 237 | GameObject: 238 | m_ObjectHideFlags: 0 239 | m_CorrespondingSourceObject: {fileID: 0} 240 | m_PrefabInstance: {fileID: 0} 241 | m_PrefabAsset: {fileID: 0} 242 | serializedVersion: 6 243 | m_Component: 244 | - component: {fileID: 852354237} 245 | - component: {fileID: 852354236} 246 | - component: {fileID: 852354233} 247 | m_Layer: 0 248 | m_Name: Main Camera 249 | m_TagString: MainCamera 250 | m_Icon: {fileID: 0} 251 | m_NavMeshLayer: 0 252 | m_StaticEditorFlags: 0 253 | m_IsActive: 1 254 | --- !u!114 &852354233 255 | MonoBehaviour: 256 | m_ObjectHideFlags: 0 257 | m_CorrespondingSourceObject: {fileID: 0} 258 | m_PrefabInstance: {fileID: 0} 259 | m_PrefabAsset: {fileID: 0} 260 | m_GameObject: {fileID: 852354232} 261 | m_Enabled: 1 262 | m_EditorHideFlags: 0 263 | m_Script: {fileID: 11500000, guid: ff3b440a66b67aa4697009c0155eddc8, type: 3} 264 | m_Name: 265 | m_EditorClassIdentifier: 266 | wireframeType: 1 267 | replacementTag: RenderType 268 | cameraBackgroundMatchesBaseColor: 1 269 | wireThickness: 676 270 | wireSmoothness: 6.97 271 | wireColor: {r: 0, g: 0.006896496, b: 1, a: 1} 272 | baseColor: {r: 1, g: 1, b: 1, a: 0} 273 | maxTriSize: 25 274 | --- !u!20 &852354236 275 | Camera: 276 | m_ObjectHideFlags: 0 277 | m_CorrespondingSourceObject: {fileID: 0} 278 | m_PrefabInstance: {fileID: 0} 279 | m_PrefabAsset: {fileID: 0} 280 | m_GameObject: {fileID: 852354232} 281 | m_Enabled: 1 282 | serializedVersion: 2 283 | m_ClearFlags: 2 284 | m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0} 285 | m_projectionMatrixMode: 1 286 | m_GateFitMode: 2 287 | m_FOVAxisMode: 0 288 | m_SensorSize: {x: 36, y: 24} 289 | m_LensShift: {x: 0, y: 0} 290 | m_FocalLength: 50 291 | m_NormalizedViewPortRect: 292 | serializedVersion: 2 293 | x: 0 294 | y: 0 295 | width: 1 296 | height: 1 297 | near clip plane: 0.3 298 | far clip plane: 1000 299 | field of view: 60 300 | orthographic: 1 301 | orthographic size: 5 302 | m_Depth: -1 303 | m_CullingMask: 304 | serializedVersion: 2 305 | m_Bits: 4294967295 306 | m_RenderingPath: -1 307 | m_TargetTexture: {fileID: 0} 308 | m_TargetDisplay: 0 309 | m_TargetEye: 3 310 | m_HDR: 1 311 | m_AllowMSAA: 1 312 | m_AllowDynamicResolution: 0 313 | m_ForceIntoRT: 0 314 | m_OcclusionCulling: 1 315 | m_StereoConvergence: 10 316 | m_StereoSeparation: 0.022 317 | --- !u!4 &852354237 318 | Transform: 319 | m_ObjectHideFlags: 0 320 | m_CorrespondingSourceObject: {fileID: 0} 321 | m_PrefabInstance: {fileID: 0} 322 | m_PrefabAsset: {fileID: 0} 323 | m_GameObject: {fileID: 852354232} 324 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 325 | m_LocalPosition: {x: 0, y: 0, z: -10} 326 | m_LocalScale: {x: 1, y: 1, z: 1} 327 | m_Children: [] 328 | m_Father: {fileID: 0} 329 | m_RootOrder: 0 330 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 331 | --- !u!1 &1690132667 332 | GameObject: 333 | m_ObjectHideFlags: 0 334 | m_CorrespondingSourceObject: {fileID: 0} 335 | m_PrefabInstance: {fileID: 0} 336 | m_PrefabAsset: {fileID: 0} 337 | serializedVersion: 6 338 | m_Component: 339 | - component: {fileID: 1690132669} 340 | - component: {fileID: 1690132668} 341 | m_Layer: 0 342 | m_Name: Directional light 343 | m_TagString: Untagged 344 | m_Icon: {fileID: 0} 345 | m_NavMeshLayer: 0 346 | m_StaticEditorFlags: 0 347 | m_IsActive: 1 348 | --- !u!108 &1690132668 349 | Light: 350 | m_ObjectHideFlags: 0 351 | m_CorrespondingSourceObject: {fileID: 0} 352 | m_PrefabInstance: {fileID: 0} 353 | m_PrefabAsset: {fileID: 0} 354 | m_GameObject: {fileID: 1690132667} 355 | m_Enabled: 1 356 | serializedVersion: 10 357 | m_Type: 1 358 | m_Shape: 0 359 | m_Color: {r: 1, g: 1, b: 1, a: 1} 360 | m_Intensity: 1 361 | m_Range: 10 362 | m_SpotAngle: 30 363 | m_InnerSpotAngle: 21.80208 364 | m_CookieSize: 10 365 | m_Shadows: 366 | m_Type: 0 367 | m_Resolution: -1 368 | m_CustomResolution: -1 369 | m_Strength: 1 370 | m_Bias: 0.05 371 | m_NormalBias: 0.4 372 | m_NearPlane: 0.2 373 | m_CullingMatrixOverride: 374 | e00: 1 375 | e01: 0 376 | e02: 0 377 | e03: 0 378 | e10: 0 379 | e11: 1 380 | e12: 0 381 | e13: 0 382 | e20: 0 383 | e21: 0 384 | e22: 1 385 | e23: 0 386 | e30: 0 387 | e31: 0 388 | e32: 0 389 | e33: 1 390 | m_UseCullingMatrixOverride: 0 391 | m_Cookie: {fileID: 0} 392 | m_DrawHalo: 0 393 | m_Flare: {fileID: 0} 394 | m_RenderMode: 0 395 | m_CullingMask: 396 | serializedVersion: 2 397 | m_Bits: 4294967295 398 | m_RenderingLayerMask: 1 399 | m_Lightmapping: 4 400 | m_LightShadowCasterMode: 0 401 | m_AreaSize: {x: 1, y: 1} 402 | m_BounceIntensity: 1 403 | m_ColorTemperature: 6570 404 | m_UseColorTemperature: 0 405 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 406 | m_UseBoundingSphereOverride: 0 407 | m_UseViewFrustumForShadowCasterCull: 1 408 | m_ShadowRadius: 0 409 | m_ShadowAngle: 0 410 | --- !u!4 &1690132669 411 | Transform: 412 | m_ObjectHideFlags: 0 413 | m_CorrespondingSourceObject: {fileID: 0} 414 | m_PrefabInstance: {fileID: 0} 415 | m_PrefabAsset: {fileID: 0} 416 | m_GameObject: {fileID: 1690132667} 417 | m_LocalRotation: {x: 0.27781588, y: 0.36497167, z: -0.1150751, w: 0.8811196} 418 | m_LocalPosition: {x: 0, y: 0, z: -10} 419 | m_LocalScale: {x: 1, y: 1, z: 1} 420 | m_Children: [] 421 | m_Father: {fileID: 0} 422 | m_RootOrder: 1 423 | m_LocalEulerAnglesHint: {x: 35, y: 45, z: 0} 424 | -------------------------------------------------------------------------------- /Assets/FastMarchingCubes/Scenes/SampleScene.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.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 705507994} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 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: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 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_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &658977142 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 658977147} 135 | - component: {fileID: 658977146} 136 | - component: {fileID: 658977145} 137 | - component: {fileID: 658977144} 138 | m_Layer: 0 139 | m_Name: Cube 140 | m_TagString: Untagged 141 | m_Icon: {fileID: 0} 142 | m_NavMeshLayer: 0 143 | m_StaticEditorFlags: 0 144 | m_IsActive: 1 145 | --- !u!65 &658977144 146 | BoxCollider: 147 | m_ObjectHideFlags: 0 148 | m_CorrespondingSourceObject: {fileID: 0} 149 | m_PrefabInstance: {fileID: 0} 150 | m_PrefabAsset: {fileID: 0} 151 | m_GameObject: {fileID: 658977142} 152 | m_Material: {fileID: 0} 153 | m_IsTrigger: 0 154 | m_Enabled: 1 155 | serializedVersion: 2 156 | m_Size: {x: 1, y: 1, z: 1} 157 | m_Center: {x: 0, y: 0, z: 0} 158 | --- !u!23 &658977145 159 | MeshRenderer: 160 | m_ObjectHideFlags: 0 161 | m_CorrespondingSourceObject: {fileID: 0} 162 | m_PrefabInstance: {fileID: 0} 163 | m_PrefabAsset: {fileID: 0} 164 | m_GameObject: {fileID: 658977142} 165 | m_Enabled: 1 166 | m_CastShadows: 1 167 | m_ReceiveShadows: 1 168 | m_DynamicOccludee: 1 169 | m_MotionVectors: 1 170 | m_LightProbeUsage: 1 171 | m_ReflectionProbeUsage: 1 172 | m_RayTracingMode: 2 173 | m_RayTraceProcedural: 0 174 | m_RenderingLayerMask: 1 175 | m_RendererPriority: 0 176 | m_Materials: 177 | - {fileID: 2100000, guid: 55eec5f8bd6a19f4ebe1478202c09604, type: 2} 178 | m_StaticBatchInfo: 179 | firstSubMesh: 0 180 | subMeshCount: 0 181 | m_StaticBatchRoot: {fileID: 0} 182 | m_ProbeAnchor: {fileID: 0} 183 | m_LightProbeVolumeOverride: {fileID: 0} 184 | m_ScaleInLightmap: 1 185 | m_ReceiveGI: 1 186 | m_PreserveUVs: 0 187 | m_IgnoreNormalsForChartDetection: 0 188 | m_ImportantGI: 0 189 | m_StitchLightmapSeams: 1 190 | m_SelectedEditorRenderState: 3 191 | m_MinimumChartSize: 4 192 | m_AutoUVMaxDistance: 0.5 193 | m_AutoUVMaxAngle: 89 194 | m_LightmapParameters: {fileID: 0} 195 | m_SortingLayerID: 0 196 | m_SortingLayer: 0 197 | m_SortingOrder: 0 198 | m_AdditionalVertexStreams: {fileID: 0} 199 | --- !u!33 &658977146 200 | MeshFilter: 201 | m_ObjectHideFlags: 0 202 | m_CorrespondingSourceObject: {fileID: 0} 203 | m_PrefabInstance: {fileID: 0} 204 | m_PrefabAsset: {fileID: 0} 205 | m_GameObject: {fileID: 658977142} 206 | m_Mesh: {fileID: 0} 207 | --- !u!4 &658977147 208 | Transform: 209 | m_ObjectHideFlags: 0 210 | m_CorrespondingSourceObject: {fileID: 0} 211 | m_PrefabInstance: {fileID: 0} 212 | m_PrefabAsset: {fileID: 0} 213 | m_GameObject: {fileID: 658977142} 214 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 215 | m_LocalPosition: {x: 0, y: 0, z: 0} 216 | m_LocalScale: {x: 1, y: 1, z: 1} 217 | m_Children: [] 218 | m_Father: {fileID: 0} 219 | m_RootOrder: 3 220 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 221 | --- !u!1 &705507993 222 | GameObject: 223 | m_ObjectHideFlags: 0 224 | m_CorrespondingSourceObject: {fileID: 0} 225 | m_PrefabInstance: {fileID: 0} 226 | m_PrefabAsset: {fileID: 0} 227 | serializedVersion: 6 228 | m_Component: 229 | - component: {fileID: 705507995} 230 | - component: {fileID: 705507994} 231 | m_Layer: 0 232 | m_Name: Directional Light 233 | m_TagString: Untagged 234 | m_Icon: {fileID: 0} 235 | m_NavMeshLayer: 0 236 | m_StaticEditorFlags: 0 237 | m_IsActive: 1 238 | --- !u!108 &705507994 239 | Light: 240 | m_ObjectHideFlags: 0 241 | m_CorrespondingSourceObject: {fileID: 0} 242 | m_PrefabInstance: {fileID: 0} 243 | m_PrefabAsset: {fileID: 0} 244 | m_GameObject: {fileID: 705507993} 245 | m_Enabled: 1 246 | serializedVersion: 10 247 | m_Type: 1 248 | m_Shape: 0 249 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 250 | m_Intensity: 1 251 | m_Range: 10 252 | m_SpotAngle: 30 253 | m_InnerSpotAngle: 21.80208 254 | m_CookieSize: 10 255 | m_Shadows: 256 | m_Type: 2 257 | m_Resolution: -1 258 | m_CustomResolution: -1 259 | m_Strength: 1 260 | m_Bias: 0.05 261 | m_NormalBias: 0.4 262 | m_NearPlane: 0.2 263 | m_CullingMatrixOverride: 264 | e00: 1 265 | e01: 0 266 | e02: 0 267 | e03: 0 268 | e10: 0 269 | e11: 1 270 | e12: 0 271 | e13: 0 272 | e20: 0 273 | e21: 0 274 | e22: 1 275 | e23: 0 276 | e30: 0 277 | e31: 0 278 | e32: 0 279 | e33: 1 280 | m_UseCullingMatrixOverride: 0 281 | m_Cookie: {fileID: 0} 282 | m_DrawHalo: 0 283 | m_Flare: {fileID: 0} 284 | m_RenderMode: 0 285 | m_CullingMask: 286 | serializedVersion: 2 287 | m_Bits: 4294967295 288 | m_RenderingLayerMask: 1 289 | m_Lightmapping: 1 290 | m_LightShadowCasterMode: 0 291 | m_AreaSize: {x: 1, y: 1} 292 | m_BounceIntensity: 1 293 | m_ColorTemperature: 6570 294 | m_UseColorTemperature: 0 295 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 296 | m_UseBoundingSphereOverride: 0 297 | m_UseViewFrustumForShadowCasterCull: 1 298 | m_ShadowRadius: 0 299 | m_ShadowAngle: 0 300 | --- !u!4 &705507995 301 | Transform: 302 | m_ObjectHideFlags: 0 303 | m_CorrespondingSourceObject: {fileID: 0} 304 | m_PrefabInstance: {fileID: 0} 305 | m_PrefabAsset: {fileID: 0} 306 | m_GameObject: {fileID: 705507993} 307 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 308 | m_LocalPosition: {x: 0, y: 3, z: 0} 309 | m_LocalScale: {x: 1, y: 1, z: 1} 310 | m_Children: [] 311 | m_Father: {fileID: 0} 312 | m_RootOrder: 1 313 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 314 | --- !u!1 &963194225 315 | GameObject: 316 | m_ObjectHideFlags: 0 317 | m_CorrespondingSourceObject: {fileID: 0} 318 | m_PrefabInstance: {fileID: 0} 319 | m_PrefabAsset: {fileID: 0} 320 | serializedVersion: 6 321 | m_Component: 322 | - component: {fileID: 963194228} 323 | - component: {fileID: 963194227} 324 | - component: {fileID: 963194226} 325 | - component: {fileID: 963194230} 326 | - component: {fileID: 963194229} 327 | m_Layer: 0 328 | m_Name: Main Camera 329 | m_TagString: MainCamera 330 | m_Icon: {fileID: 0} 331 | m_NavMeshLayer: 0 332 | m_StaticEditorFlags: 0 333 | m_IsActive: 1 334 | --- !u!81 &963194226 335 | AudioListener: 336 | m_ObjectHideFlags: 0 337 | m_CorrespondingSourceObject: {fileID: 0} 338 | m_PrefabInstance: {fileID: 0} 339 | m_PrefabAsset: {fileID: 0} 340 | m_GameObject: {fileID: 963194225} 341 | m_Enabled: 1 342 | --- !u!20 &963194227 343 | Camera: 344 | m_ObjectHideFlags: 0 345 | m_CorrespondingSourceObject: {fileID: 0} 346 | m_PrefabInstance: {fileID: 0} 347 | m_PrefabAsset: {fileID: 0} 348 | m_GameObject: {fileID: 963194225} 349 | m_Enabled: 1 350 | serializedVersion: 2 351 | m_ClearFlags: 2 352 | m_BackGroundColor: {r: 0.34442863, g: 0.43060997, b: 0.5660378, a: 0} 353 | m_projectionMatrixMode: 1 354 | m_GateFitMode: 2 355 | m_FOVAxisMode: 0 356 | m_SensorSize: {x: 36, y: 24} 357 | m_LensShift: {x: 0, y: 0} 358 | m_FocalLength: 50 359 | m_NormalizedViewPortRect: 360 | serializedVersion: 2 361 | x: 0 362 | y: 0 363 | width: 1 364 | height: 1 365 | near clip plane: 0.3 366 | far clip plane: 1000 367 | field of view: 60 368 | orthographic: 0 369 | orthographic size: 5 370 | m_Depth: -1 371 | m_CullingMask: 372 | serializedVersion: 2 373 | m_Bits: 4294967295 374 | m_RenderingPath: -1 375 | m_TargetTexture: {fileID: 0} 376 | m_TargetDisplay: 0 377 | m_TargetEye: 3 378 | m_HDR: 1 379 | m_AllowMSAA: 1 380 | m_AllowDynamicResolution: 0 381 | m_ForceIntoRT: 0 382 | m_OcclusionCulling: 1 383 | m_StereoConvergence: 10 384 | m_StereoSeparation: 0.022 385 | --- !u!4 &963194228 386 | Transform: 387 | m_ObjectHideFlags: 0 388 | m_CorrespondingSourceObject: {fileID: 0} 389 | m_PrefabInstance: {fileID: 0} 390 | m_PrefabAsset: {fileID: 0} 391 | m_GameObject: {fileID: 963194225} 392 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 393 | m_LocalPosition: {x: 0, y: 1, z: -10} 394 | m_LocalScale: {x: 1, y: 1, z: 1} 395 | m_Children: [] 396 | m_Father: {fileID: 0} 397 | m_RootOrder: 0 398 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 399 | --- !u!114 &963194229 400 | MonoBehaviour: 401 | m_ObjectHideFlags: 0 402 | m_CorrespondingSourceObject: {fileID: 0} 403 | m_PrefabInstance: {fileID: 0} 404 | m_PrefabAsset: {fileID: 0} 405 | m_GameObject: {fileID: 963194225} 406 | m_Enabled: 1 407 | m_EditorHideFlags: 0 408 | m_Script: {fileID: 11500000, guid: ff3b440a66b67aa4697009c0155eddc8, type: 3} 409 | m_Name: 410 | m_EditorClassIdentifier: 411 | wireframeType: 0 412 | replacementTag: RenderType 413 | cameraBackgroundMatchesBaseColor: 1 414 | wireThickness: 242 415 | wireSmoothness: 2.29 416 | wireColor: {r: 0, g: 1, b: 0, a: 1} 417 | baseColor: {r: 0.34509805, g: 0.43137255, b: 0.5647059, a: 0} 418 | maxTriSize: 25 419 | --- !u!114 &963194230 420 | MonoBehaviour: 421 | m_ObjectHideFlags: 0 422 | m_CorrespondingSourceObject: {fileID: 0} 423 | m_PrefabInstance: {fileID: 0} 424 | m_PrefabAsset: {fileID: 0} 425 | m_GameObject: {fileID: 963194225} 426 | m_Enabled: 1 427 | m_EditorHideFlags: 0 428 | m_Script: {fileID: 11500000, guid: 1b8491ff2f083b0448afd9468e2e903b, type: 3} 429 | m_Name: 430 | m_EditorClassIdentifier: 431 | radius: 35 432 | --- !u!1 &1472950647 433 | GameObject: 434 | m_ObjectHideFlags: 0 435 | m_CorrespondingSourceObject: {fileID: 0} 436 | m_PrefabInstance: {fileID: 0} 437 | m_PrefabAsset: {fileID: 0} 438 | serializedVersion: 6 439 | m_Component: 440 | - component: {fileID: 1472950649} 441 | - component: {fileID: 1472950648} 442 | m_Layer: 0 443 | m_Name: MarchingCubes 444 | m_TagString: Untagged 445 | m_Icon: {fileID: 0} 446 | m_NavMeshLayer: 0 447 | m_StaticEditorFlags: 0 448 | m_IsActive: 1 449 | --- !u!114 &1472950648 450 | MonoBehaviour: 451 | m_ObjectHideFlags: 0 452 | m_CorrespondingSourceObject: {fileID: 0} 453 | m_PrefabInstance: {fileID: 0} 454 | m_PrefabAsset: {fileID: 0} 455 | m_GameObject: {fileID: 1472950647} 456 | m_Enabled: 1 457 | m_EditorHideFlags: 0 458 | m_Script: {fileID: 11500000, guid: c408235735e3efa4eb89f693b7409052, type: 3} 459 | m_Name: 460 | m_EditorClassIdentifier: 461 | generateMode: 1 462 | meshingMode: 0 463 | threadCount: 4 464 | regenerateChunk: 1 465 | noiseSpeed: 0 466 | chunkGameObject: {fileID: 658977142} 467 | --- !u!4 &1472950649 468 | Transform: 469 | m_ObjectHideFlags: 0 470 | m_CorrespondingSourceObject: {fileID: 0} 471 | m_PrefabInstance: {fileID: 0} 472 | m_PrefabAsset: {fileID: 0} 473 | m_GameObject: {fileID: 1472950647} 474 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 475 | m_LocalPosition: {x: 13.084379, y: 16.136969, z: 13.124772} 476 | m_LocalScale: {x: 1, y: 1, z: 1} 477 | m_Children: [] 478 | m_Father: {fileID: 0} 479 | m_RootOrder: 2 480 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 481 | -------------------------------------------------------------------------------- /Assets/Wireframe/Examples/WireframeShaders.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.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 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: 12 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_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 4890085278179872738, guid: 6503f20c48db55e49b5f6b14e3736822, type: 2} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &729427092 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 729427097} 135 | - component: {fileID: 729427096} 136 | - component: {fileID: 729427095} 137 | - component: {fileID: 729427094} 138 | - component: {fileID: 729427093} 139 | m_Layer: 0 140 | m_Name: Solid 141 | m_TagString: Untagged 142 | m_Icon: {fileID: 0} 143 | m_NavMeshLayer: 0 144 | m_StaticEditorFlags: 0 145 | m_IsActive: 1 146 | --- !u!114 &729427093 147 | MonoBehaviour: 148 | m_ObjectHideFlags: 0 149 | m_CorrespondingSourceObject: {fileID: 0} 150 | m_PrefabInstance: {fileID: 0} 151 | m_PrefabAsset: {fileID: 0} 152 | m_GameObject: {fileID: 729427092} 153 | m_Enabled: 1 154 | m_EditorHideFlags: 0 155 | m_Script: {fileID: 11500000, guid: 4124c59241137374c9cae45d25683042, type: 3} 156 | m_Name: 157 | m_EditorClassIdentifier: 158 | speed: {x: 10, y: 10, z: 10} 159 | space: 0 160 | --- !u!23 &729427094 161 | MeshRenderer: 162 | m_ObjectHideFlags: 0 163 | m_CorrespondingSourceObject: {fileID: 0} 164 | m_PrefabInstance: {fileID: 0} 165 | m_PrefabAsset: {fileID: 0} 166 | m_GameObject: {fileID: 729427092} 167 | m_Enabled: 1 168 | m_CastShadows: 1 169 | m_ReceiveShadows: 1 170 | m_DynamicOccludee: 1 171 | m_MotionVectors: 1 172 | m_LightProbeUsage: 1 173 | m_ReflectionProbeUsage: 1 174 | m_RayTracingMode: 2 175 | m_RayTraceProcedural: 0 176 | m_RenderingLayerMask: 1 177 | m_RendererPriority: 0 178 | m_Materials: 179 | - {fileID: 2100000, guid: e716fa77392144f429f502f781e7f56b, type: 2} 180 | m_StaticBatchInfo: 181 | firstSubMesh: 0 182 | subMeshCount: 0 183 | m_StaticBatchRoot: {fileID: 0} 184 | m_ProbeAnchor: {fileID: 0} 185 | m_LightProbeVolumeOverride: {fileID: 0} 186 | m_ScaleInLightmap: 1 187 | m_ReceiveGI: 1 188 | m_PreserveUVs: 1 189 | m_IgnoreNormalsForChartDetection: 0 190 | m_ImportantGI: 0 191 | m_StitchLightmapSeams: 1 192 | m_SelectedEditorRenderState: 3 193 | m_MinimumChartSize: 4 194 | m_AutoUVMaxDistance: 0.5 195 | m_AutoUVMaxAngle: 89 196 | m_LightmapParameters: {fileID: 0} 197 | m_SortingLayerID: 0 198 | m_SortingLayer: 0 199 | m_SortingOrder: 0 200 | m_AdditionalVertexStreams: {fileID: 0} 201 | --- !u!135 &729427095 202 | SphereCollider: 203 | m_ObjectHideFlags: 0 204 | m_CorrespondingSourceObject: {fileID: 0} 205 | m_PrefabInstance: {fileID: 0} 206 | m_PrefabAsset: {fileID: 0} 207 | m_GameObject: {fileID: 729427092} 208 | m_Material: {fileID: 0} 209 | m_IsTrigger: 0 210 | m_Enabled: 1 211 | serializedVersion: 2 212 | m_Radius: 0.5 213 | m_Center: {x: 0, y: 0, z: 0} 214 | --- !u!33 &729427096 215 | MeshFilter: 216 | m_ObjectHideFlags: 0 217 | m_CorrespondingSourceObject: {fileID: 0} 218 | m_PrefabInstance: {fileID: 0} 219 | m_PrefabAsset: {fileID: 0} 220 | m_GameObject: {fileID: 729427092} 221 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 222 | --- !u!4 &729427097 223 | Transform: 224 | m_ObjectHideFlags: 0 225 | m_CorrespondingSourceObject: {fileID: 0} 226 | m_PrefabInstance: {fileID: 0} 227 | m_PrefabAsset: {fileID: 0} 228 | m_GameObject: {fileID: 729427092} 229 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 230 | m_LocalPosition: {x: -5, y: 0, z: 0} 231 | m_LocalScale: {x: 4, y: 4, z: 4} 232 | m_Children: [] 233 | m_Father: {fileID: 0} 234 | m_RootOrder: 1 235 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 236 | --- !u!1 &852354232 237 | GameObject: 238 | m_ObjectHideFlags: 0 239 | m_CorrespondingSourceObject: {fileID: 0} 240 | m_PrefabInstance: {fileID: 0} 241 | m_PrefabAsset: {fileID: 0} 242 | serializedVersion: 6 243 | m_Component: 244 | - component: {fileID: 852354237} 245 | - component: {fileID: 852354236} 246 | m_Layer: 0 247 | m_Name: Main Camera 248 | m_TagString: MainCamera 249 | m_Icon: {fileID: 0} 250 | m_NavMeshLayer: 0 251 | m_StaticEditorFlags: 0 252 | m_IsActive: 1 253 | --- !u!20 &852354236 254 | Camera: 255 | m_ObjectHideFlags: 0 256 | m_CorrespondingSourceObject: {fileID: 0} 257 | m_PrefabInstance: {fileID: 0} 258 | m_PrefabAsset: {fileID: 0} 259 | m_GameObject: {fileID: 852354232} 260 | m_Enabled: 1 261 | serializedVersion: 2 262 | m_ClearFlags: 2 263 | m_BackGroundColor: {r: 1, g: 0, b: 0.32941177, a: 0} 264 | m_projectionMatrixMode: 1 265 | m_GateFitMode: 2 266 | m_FOVAxisMode: 0 267 | m_SensorSize: {x: 36, y: 24} 268 | m_LensShift: {x: 0, y: 0} 269 | m_FocalLength: 50 270 | m_NormalizedViewPortRect: 271 | serializedVersion: 2 272 | x: 0 273 | y: 0 274 | width: 1 275 | height: 1 276 | near clip plane: 0.3 277 | far clip plane: 1000 278 | field of view: 60 279 | orthographic: 1 280 | orthographic size: 6.04 281 | m_Depth: -1 282 | m_CullingMask: 283 | serializedVersion: 2 284 | m_Bits: 4294967295 285 | m_RenderingPath: -1 286 | m_TargetTexture: {fileID: 0} 287 | m_TargetDisplay: 0 288 | m_TargetEye: 3 289 | m_HDR: 1 290 | m_AllowMSAA: 1 291 | m_AllowDynamicResolution: 0 292 | m_ForceIntoRT: 0 293 | m_OcclusionCulling: 1 294 | m_StereoConvergence: 10 295 | m_StereoSeparation: 0.022 296 | --- !u!4 &852354237 297 | Transform: 298 | m_ObjectHideFlags: 0 299 | m_CorrespondingSourceObject: {fileID: 0} 300 | m_PrefabInstance: {fileID: 0} 301 | m_PrefabAsset: {fileID: 0} 302 | m_GameObject: {fileID: 852354232} 303 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 304 | m_LocalPosition: {x: 2.5, y: 0, z: -10} 305 | m_LocalScale: {x: 1, y: 1, z: 1} 306 | m_Children: [] 307 | m_Father: {fileID: 0} 308 | m_RootOrder: 0 309 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 310 | --- !u!1 &1050717185 311 | GameObject: 312 | m_ObjectHideFlags: 0 313 | m_CorrespondingSourceObject: {fileID: 0} 314 | m_PrefabInstance: {fileID: 0} 315 | m_PrefabAsset: {fileID: 0} 316 | serializedVersion: 6 317 | m_Component: 318 | - component: {fileID: 1050717190} 319 | - component: {fileID: 1050717189} 320 | - component: {fileID: 1050717188} 321 | - component: {fileID: 1050717187} 322 | - component: {fileID: 1050717186} 323 | m_Layer: 0 324 | m_Name: Transparent 325 | m_TagString: Untagged 326 | m_Icon: {fileID: 0} 327 | m_NavMeshLayer: 0 328 | m_StaticEditorFlags: 0 329 | m_IsActive: 1 330 | --- !u!114 &1050717186 331 | MonoBehaviour: 332 | m_ObjectHideFlags: 0 333 | m_CorrespondingSourceObject: {fileID: 0} 334 | m_PrefabInstance: {fileID: 0} 335 | m_PrefabAsset: {fileID: 0} 336 | m_GameObject: {fileID: 1050717185} 337 | m_Enabled: 1 338 | m_EditorHideFlags: 0 339 | m_Script: {fileID: 11500000, guid: 4124c59241137374c9cae45d25683042, type: 3} 340 | m_Name: 341 | m_EditorClassIdentifier: 342 | speed: {x: 10, y: 10, z: 10} 343 | space: 0 344 | --- !u!23 &1050717187 345 | MeshRenderer: 346 | m_ObjectHideFlags: 0 347 | m_CorrespondingSourceObject: {fileID: 0} 348 | m_PrefabInstance: {fileID: 0} 349 | m_PrefabAsset: {fileID: 0} 350 | m_GameObject: {fileID: 1050717185} 351 | m_Enabled: 1 352 | m_CastShadows: 1 353 | m_ReceiveShadows: 1 354 | m_DynamicOccludee: 1 355 | m_MotionVectors: 1 356 | m_LightProbeUsage: 1 357 | m_ReflectionProbeUsage: 1 358 | m_RayTracingMode: 2 359 | m_RayTraceProcedural: 0 360 | m_RenderingLayerMask: 1 361 | m_RendererPriority: 0 362 | m_Materials: 363 | - {fileID: 2100000, guid: 6833a623d1b4df54abdfe933a1483a27, type: 2} 364 | m_StaticBatchInfo: 365 | firstSubMesh: 0 366 | subMeshCount: 0 367 | m_StaticBatchRoot: {fileID: 0} 368 | m_ProbeAnchor: {fileID: 0} 369 | m_LightProbeVolumeOverride: {fileID: 0} 370 | m_ScaleInLightmap: 1 371 | m_ReceiveGI: 1 372 | m_PreserveUVs: 1 373 | m_IgnoreNormalsForChartDetection: 0 374 | m_ImportantGI: 0 375 | m_StitchLightmapSeams: 1 376 | m_SelectedEditorRenderState: 3 377 | m_MinimumChartSize: 4 378 | m_AutoUVMaxDistance: 0.5 379 | m_AutoUVMaxAngle: 89 380 | m_LightmapParameters: {fileID: 0} 381 | m_SortingLayerID: 0 382 | m_SortingLayer: 0 383 | m_SortingOrder: 0 384 | m_AdditionalVertexStreams: {fileID: 0} 385 | --- !u!135 &1050717188 386 | SphereCollider: 387 | m_ObjectHideFlags: 0 388 | m_CorrespondingSourceObject: {fileID: 0} 389 | m_PrefabInstance: {fileID: 0} 390 | m_PrefabAsset: {fileID: 0} 391 | m_GameObject: {fileID: 1050717185} 392 | m_Material: {fileID: 0} 393 | m_IsTrigger: 0 394 | m_Enabled: 1 395 | serializedVersion: 2 396 | m_Radius: 0.5 397 | m_Center: {x: 0, y: 0, z: 0} 398 | --- !u!33 &1050717189 399 | MeshFilter: 400 | m_ObjectHideFlags: 0 401 | m_CorrespondingSourceObject: {fileID: 0} 402 | m_PrefabInstance: {fileID: 0} 403 | m_PrefabAsset: {fileID: 0} 404 | m_GameObject: {fileID: 1050717185} 405 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 406 | --- !u!4 &1050717190 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: 1050717185} 413 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 414 | m_LocalPosition: {x: 0, y: 0, z: 0} 415 | m_LocalScale: {x: 4, y: 4, z: 4} 416 | m_Children: [] 417 | m_Father: {fileID: 0} 418 | m_RootOrder: 2 419 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 420 | --- !u!1 &1405266982 421 | GameObject: 422 | m_ObjectHideFlags: 0 423 | m_CorrespondingSourceObject: {fileID: 0} 424 | m_PrefabInstance: {fileID: 0} 425 | m_PrefabAsset: {fileID: 0} 426 | serializedVersion: 6 427 | m_Component: 428 | - component: {fileID: 1405266987} 429 | - component: {fileID: 1405266986} 430 | - component: {fileID: 1405266985} 431 | - component: {fileID: 1405266984} 432 | - component: {fileID: 1405266983} 433 | m_Layer: 0 434 | m_Name: ShadedUnlit 435 | m_TagString: Untagged 436 | m_Icon: {fileID: 0} 437 | m_NavMeshLayer: 0 438 | m_StaticEditorFlags: 0 439 | m_IsActive: 1 440 | --- !u!114 &1405266983 441 | MonoBehaviour: 442 | m_ObjectHideFlags: 0 443 | m_CorrespondingSourceObject: {fileID: 0} 444 | m_PrefabInstance: {fileID: 0} 445 | m_PrefabAsset: {fileID: 0} 446 | m_GameObject: {fileID: 1405266982} 447 | m_Enabled: 1 448 | m_EditorHideFlags: 0 449 | m_Script: {fileID: 11500000, guid: 4124c59241137374c9cae45d25683042, type: 3} 450 | m_Name: 451 | m_EditorClassIdentifier: 452 | speed: {x: 10, y: 10, z: 10} 453 | space: 0 454 | --- !u!23 &1405266984 455 | MeshRenderer: 456 | m_ObjectHideFlags: 0 457 | m_CorrespondingSourceObject: {fileID: 0} 458 | m_PrefabInstance: {fileID: 0} 459 | m_PrefabAsset: {fileID: 0} 460 | m_GameObject: {fileID: 1405266982} 461 | m_Enabled: 1 462 | m_CastShadows: 1 463 | m_ReceiveShadows: 1 464 | m_DynamicOccludee: 1 465 | m_MotionVectors: 1 466 | m_LightProbeUsage: 1 467 | m_ReflectionProbeUsage: 1 468 | m_RayTracingMode: 2 469 | m_RayTraceProcedural: 0 470 | m_RenderingLayerMask: 1 471 | m_RendererPriority: 0 472 | m_Materials: 473 | - {fileID: 2100000, guid: dbe40dfb3249aca43ba4e4bf028c6b5e, type: 2} 474 | m_StaticBatchInfo: 475 | firstSubMesh: 0 476 | subMeshCount: 0 477 | m_StaticBatchRoot: {fileID: 0} 478 | m_ProbeAnchor: {fileID: 0} 479 | m_LightProbeVolumeOverride: {fileID: 0} 480 | m_ScaleInLightmap: 1 481 | m_ReceiveGI: 1 482 | m_PreserveUVs: 1 483 | m_IgnoreNormalsForChartDetection: 0 484 | m_ImportantGI: 0 485 | m_StitchLightmapSeams: 1 486 | m_SelectedEditorRenderState: 3 487 | m_MinimumChartSize: 4 488 | m_AutoUVMaxDistance: 0.5 489 | m_AutoUVMaxAngle: 89 490 | m_LightmapParameters: {fileID: 0} 491 | m_SortingLayerID: 0 492 | m_SortingLayer: 0 493 | m_SortingOrder: 0 494 | m_AdditionalVertexStreams: {fileID: 0} 495 | --- !u!135 &1405266985 496 | SphereCollider: 497 | m_ObjectHideFlags: 0 498 | m_CorrespondingSourceObject: {fileID: 0} 499 | m_PrefabInstance: {fileID: 0} 500 | m_PrefabAsset: {fileID: 0} 501 | m_GameObject: {fileID: 1405266982} 502 | m_Material: {fileID: 0} 503 | m_IsTrigger: 0 504 | m_Enabled: 1 505 | serializedVersion: 2 506 | m_Radius: 0.5 507 | m_Center: {x: 0, y: 0, z: 0} 508 | --- !u!33 &1405266986 509 | MeshFilter: 510 | m_ObjectHideFlags: 0 511 | m_CorrespondingSourceObject: {fileID: 0} 512 | m_PrefabInstance: {fileID: 0} 513 | m_PrefabAsset: {fileID: 0} 514 | m_GameObject: {fileID: 1405266982} 515 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 516 | --- !u!4 &1405266987 517 | Transform: 518 | m_ObjectHideFlags: 0 519 | m_CorrespondingSourceObject: {fileID: 0} 520 | m_PrefabInstance: {fileID: 0} 521 | m_PrefabAsset: {fileID: 0} 522 | m_GameObject: {fileID: 1405266982} 523 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 524 | m_LocalPosition: {x: 10, y: 0, z: 0} 525 | m_LocalScale: {x: 4, y: 4, z: 4} 526 | m_Children: [] 527 | m_Father: {fileID: 0} 528 | m_RootOrder: 4 529 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 530 | --- !u!1 &1745606306 531 | GameObject: 532 | m_ObjectHideFlags: 0 533 | m_CorrespondingSourceObject: {fileID: 0} 534 | m_PrefabInstance: {fileID: 0} 535 | m_PrefabAsset: {fileID: 0} 536 | serializedVersion: 6 537 | m_Component: 538 | - component: {fileID: 1745606311} 539 | - component: {fileID: 1745606310} 540 | - component: {fileID: 1745606309} 541 | - component: {fileID: 1745606308} 542 | - component: {fileID: 1745606307} 543 | m_Layer: 0 544 | m_Name: TransparentCulled 545 | m_TagString: Untagged 546 | m_Icon: {fileID: 0} 547 | m_NavMeshLayer: 0 548 | m_StaticEditorFlags: 0 549 | m_IsActive: 1 550 | --- !u!114 &1745606307 551 | MonoBehaviour: 552 | m_ObjectHideFlags: 0 553 | m_CorrespondingSourceObject: {fileID: 0} 554 | m_PrefabInstance: {fileID: 0} 555 | m_PrefabAsset: {fileID: 0} 556 | m_GameObject: {fileID: 1745606306} 557 | m_Enabled: 1 558 | m_EditorHideFlags: 0 559 | m_Script: {fileID: 11500000, guid: 4124c59241137374c9cae45d25683042, type: 3} 560 | m_Name: 561 | m_EditorClassIdentifier: 562 | speed: {x: 10, y: 10, z: 10} 563 | space: 0 564 | --- !u!23 &1745606308 565 | MeshRenderer: 566 | m_ObjectHideFlags: 0 567 | m_CorrespondingSourceObject: {fileID: 0} 568 | m_PrefabInstance: {fileID: 0} 569 | m_PrefabAsset: {fileID: 0} 570 | m_GameObject: {fileID: 1745606306} 571 | m_Enabled: 1 572 | m_CastShadows: 1 573 | m_ReceiveShadows: 1 574 | m_DynamicOccludee: 1 575 | m_MotionVectors: 1 576 | m_LightProbeUsage: 1 577 | m_ReflectionProbeUsage: 1 578 | m_RayTracingMode: 2 579 | m_RayTraceProcedural: 0 580 | m_RenderingLayerMask: 1 581 | m_RendererPriority: 0 582 | m_Materials: 583 | - {fileID: 2100000, guid: e563d2611df3e984e92203420188c3ee, type: 2} 584 | m_StaticBatchInfo: 585 | firstSubMesh: 0 586 | subMeshCount: 0 587 | m_StaticBatchRoot: {fileID: 0} 588 | m_ProbeAnchor: {fileID: 0} 589 | m_LightProbeVolumeOverride: {fileID: 0} 590 | m_ScaleInLightmap: 1 591 | m_ReceiveGI: 1 592 | m_PreserveUVs: 1 593 | m_IgnoreNormalsForChartDetection: 0 594 | m_ImportantGI: 0 595 | m_StitchLightmapSeams: 1 596 | m_SelectedEditorRenderState: 3 597 | m_MinimumChartSize: 4 598 | m_AutoUVMaxDistance: 0.5 599 | m_AutoUVMaxAngle: 89 600 | m_LightmapParameters: {fileID: 0} 601 | m_SortingLayerID: 0 602 | m_SortingLayer: 0 603 | m_SortingOrder: 0 604 | m_AdditionalVertexStreams: {fileID: 0} 605 | --- !u!135 &1745606309 606 | SphereCollider: 607 | m_ObjectHideFlags: 0 608 | m_CorrespondingSourceObject: {fileID: 0} 609 | m_PrefabInstance: {fileID: 0} 610 | m_PrefabAsset: {fileID: 0} 611 | m_GameObject: {fileID: 1745606306} 612 | m_Material: {fileID: 0} 613 | m_IsTrigger: 0 614 | m_Enabled: 1 615 | serializedVersion: 2 616 | m_Radius: 0.5 617 | m_Center: {x: 0, y: 0, z: 0} 618 | --- !u!33 &1745606310 619 | MeshFilter: 620 | m_ObjectHideFlags: 0 621 | m_CorrespondingSourceObject: {fileID: 0} 622 | m_PrefabInstance: {fileID: 0} 623 | m_PrefabAsset: {fileID: 0} 624 | m_GameObject: {fileID: 1745606306} 625 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 626 | --- !u!4 &1745606311 627 | Transform: 628 | m_ObjectHideFlags: 0 629 | m_CorrespondingSourceObject: {fileID: 0} 630 | m_PrefabInstance: {fileID: 0} 631 | m_PrefabAsset: {fileID: 0} 632 | m_GameObject: {fileID: 1745606306} 633 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 634 | m_LocalPosition: {x: 5, y: 0, z: 0} 635 | m_LocalScale: {x: 4, y: 4, z: 4} 636 | m_Children: [] 637 | m_Father: {fileID: 0} 638 | m_RootOrder: 3 639 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 640 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 22 7 | productGUID: 32819bfadc2af0249ae1615abda4dfd6 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: bigos91 16 | productName: fastMarchingCubes 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1920 46 | defaultScreenHeight: 1080 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | mipStripping: 0 53 | numberOfMipsStripped: 0 54 | m_StackTraceTypes: 000000000000000000000000000000000000000001000000 55 | iosShowActivityIndicatorOnLoading: -1 56 | androidShowActivityIndicatorOnLoading: -1 57 | iosUseCustomAppBackgroundBehavior: 0 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidStartInFullscreen: 1 68 | androidRenderOutsideSafeArea: 1 69 | androidUseSwappy: 1 70 | androidBlitType: 0 71 | androidResizableWindow: 0 72 | androidDefaultWindowWidth: 1920 73 | androidDefaultWindowHeight: 1080 74 | androidMinimumWindowWidth: 400 75 | androidMinimumWindowHeight: 300 76 | androidFullscreenMode: 1 77 | defaultIsNativeResolution: 1 78 | macRetinaSupport: 1 79 | runInBackground: 1 80 | captureSingleScreen: 0 81 | muteOtherAudioSources: 0 82 | Prepare IOS For Recording: 0 83 | Force IOS Speakers When Recording: 0 84 | deferSystemGesturesMode: 0 85 | hideHomeButton: 0 86 | submitAnalytics: 1 87 | usePlayerLog: 1 88 | bakeCollisionMeshes: 0 89 | forceSingleInstance: 0 90 | useFlipModelSwapchain: 1 91 | resizableWindow: 0 92 | useMacAppStoreValidation: 0 93 | macAppStoreCategory: public.app-category.games 94 | gpuSkinning: 1 95 | xboxPIXTextureCapture: 0 96 | xboxEnableAvatar: 0 97 | xboxEnableKinect: 0 98 | xboxEnableKinectAutoTracking: 0 99 | xboxEnableFitness: 0 100 | visibleInBackground: 1 101 | allowFullscreenSwitch: 1 102 | fullscreenMode: 3 103 | xboxSpeechDB: 0 104 | xboxEnableHeadOrientation: 0 105 | xboxEnableGuest: 0 106 | xboxEnablePIXSampling: 0 107 | metalFramebufferOnly: 0 108 | xboxOneResolution: 0 109 | xboxOneSResolution: 0 110 | xboxOneXResolution: 3 111 | xboxOneMonoLoggingLevel: 0 112 | xboxOneLoggingLevel: 1 113 | xboxOneDisableEsram: 0 114 | xboxOneEnableTypeOptimization: 0 115 | xboxOnePresentImmediateThreshold: 0 116 | switchQueueCommandMemory: 0 117 | switchQueueControlMemory: 16384 118 | switchQueueComputeMemory: 262144 119 | switchNVNShaderPoolsGranularity: 33554432 120 | switchNVNDefaultPoolsGranularity: 16777216 121 | switchNVNOtherPoolsGranularity: 16777216 122 | switchNVNMaxPublicTextureIDCount: 0 123 | switchNVNMaxPublicSamplerIDCount: 0 124 | stadiaPresentMode: 0 125 | stadiaTargetFramerate: 0 126 | vulkanNumSwapchainBuffers: 3 127 | vulkanEnableSetSRGBWrite: 0 128 | vulkanEnablePreTransform: 0 129 | vulkanEnableLateAcquireNextImage: 0 130 | vulkanEnableCommandBufferRecycling: 1 131 | m_SupportedAspectRatios: 132 | 4:3: 1 133 | 5:4: 1 134 | 16:10: 1 135 | 16:9: 1 136 | Others: 1 137 | bundleVersion: 0.1 138 | preloadedAssets: [] 139 | metroInputSource: 0 140 | wsaTransparentSwapchain: 0 141 | m_HolographicPauseOnTrackingLoss: 1 142 | xboxOneDisableKinectGpuReservation: 1 143 | xboxOneEnable7thCore: 1 144 | vrSettings: 145 | enable360StereoCapture: 0 146 | isWsaHolographicRemotingEnabled: 0 147 | enableFrameTimingStats: 0 148 | useHDRDisplay: 0 149 | D3DHDRBitDepth: 0 150 | m_ColorGamuts: 00000000 151 | targetPixelDensity: 30 152 | resolutionScalingMode: 0 153 | androidSupportedAspectRatio: 1 154 | androidMaxAspectRatio: 2.1 155 | applicationIdentifier: 156 | Standalone: com.bigos91.fastMarchingCubes 157 | buildNumber: 158 | Standalone: 0 159 | iPhone: 0 160 | tvOS: 0 161 | overrideDefaultApplicationIdentifier: 0 162 | AndroidBundleVersionCode: 1 163 | AndroidMinSdkVersion: 19 164 | AndroidTargetSdkVersion: 0 165 | AndroidPreferredInstallLocation: 1 166 | aotOptions: 167 | stripEngineCode: 1 168 | iPhoneStrippingLevel: 0 169 | iPhoneScriptCallOptimization: 0 170 | ForceInternetPermission: 0 171 | ForceSDCardPermission: 0 172 | CreateWallpaper: 0 173 | APKExpansionFiles: 0 174 | keepLoadedShadersAlive: 0 175 | StripUnusedMeshComponents: 1 176 | VertexChannelCompressionMask: 4054 177 | iPhoneSdkVersion: 988 178 | iOSTargetOSVersionString: 11.0 179 | tvOSSdkVersion: 0 180 | tvOSRequireExtendedGameController: 0 181 | tvOSTargetOSVersionString: 11.0 182 | uIPrerenderedIcon: 0 183 | uIRequiresPersistentWiFi: 0 184 | uIRequiresFullScreen: 1 185 | uIStatusBarHidden: 1 186 | uIExitOnSuspend: 0 187 | uIStatusBarStyle: 0 188 | appleTVSplashScreen: {fileID: 0} 189 | appleTVSplashScreen2x: {fileID: 0} 190 | tvOSSmallIconLayers: [] 191 | tvOSSmallIconLayers2x: [] 192 | tvOSLargeIconLayers: [] 193 | tvOSLargeIconLayers2x: [] 194 | tvOSTopShelfImageLayers: [] 195 | tvOSTopShelfImageLayers2x: [] 196 | tvOSTopShelfImageWideLayers: [] 197 | tvOSTopShelfImageWideLayers2x: [] 198 | iOSLaunchScreenType: 0 199 | iOSLaunchScreenPortrait: {fileID: 0} 200 | iOSLaunchScreenLandscape: {fileID: 0} 201 | iOSLaunchScreenBackgroundColor: 202 | serializedVersion: 2 203 | rgba: 0 204 | iOSLaunchScreenFillPct: 100 205 | iOSLaunchScreenSize: 100 206 | iOSLaunchScreenCustomXibPath: 207 | iOSLaunchScreeniPadType: 0 208 | iOSLaunchScreeniPadImage: {fileID: 0} 209 | iOSLaunchScreeniPadBackgroundColor: 210 | serializedVersion: 2 211 | rgba: 0 212 | iOSLaunchScreeniPadFillPct: 100 213 | iOSLaunchScreeniPadSize: 100 214 | iOSLaunchScreeniPadCustomXibPath: 215 | iOSLaunchScreenCustomStoryboardPath: 216 | iOSLaunchScreeniPadCustomStoryboardPath: 217 | iOSDeviceRequirements: [] 218 | iOSURLSchemes: [] 219 | iOSBackgroundModes: 0 220 | iOSMetalForceHardShadows: 0 221 | metalEditorSupport: 1 222 | metalAPIValidation: 1 223 | iOSRenderExtraFrameOnPause: 0 224 | iosCopyPluginsCodeInsteadOfSymlink: 0 225 | appleDeveloperTeamID: 226 | iOSManualSigningProvisioningProfileID: 227 | tvOSManualSigningProvisioningProfileID: 228 | iOSManualSigningProvisioningProfileType: 0 229 | tvOSManualSigningProvisioningProfileType: 0 230 | appleEnableAutomaticSigning: 0 231 | iOSRequireARKit: 0 232 | iOSAutomaticallyDetectAndAddCapabilities: 1 233 | appleEnableProMotion: 0 234 | shaderPrecisionModel: 0 235 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 236 | templatePackageId: com.unity.template.3d@5.0.4 237 | templateDefaultScene: Assets/Scenes/SampleScene.unity 238 | useCustomMainManifest: 0 239 | useCustomLauncherManifest: 0 240 | useCustomMainGradleTemplate: 0 241 | useCustomLauncherGradleManifest: 0 242 | useCustomBaseGradleTemplate: 0 243 | useCustomGradlePropertiesTemplate: 0 244 | useCustomProguardFile: 0 245 | AndroidTargetArchitectures: 1 246 | AndroidTargetDevices: 0 247 | AndroidSplashScreenScale: 0 248 | androidSplashScreen: {fileID: 0} 249 | AndroidKeystoreName: 250 | AndroidKeyaliasName: 251 | AndroidBuildApkPerCpuArchitecture: 0 252 | AndroidTVCompatibility: 0 253 | AndroidIsGame: 1 254 | AndroidEnableTango: 0 255 | androidEnableBanner: 1 256 | androidUseLowAccuracyLocation: 0 257 | androidUseCustomKeystore: 0 258 | m_AndroidBanners: 259 | - width: 320 260 | height: 180 261 | banner: {fileID: 0} 262 | androidGamepadSupportLevel: 0 263 | chromeosInputEmulation: 1 264 | AndroidMinifyWithR8: 0 265 | AndroidMinifyRelease: 0 266 | AndroidMinifyDebug: 0 267 | AndroidValidateAppBundleSize: 1 268 | AndroidAppBundleSizeToValidate: 150 269 | m_BuildTargetIcons: [] 270 | m_BuildTargetPlatformIcons: [] 271 | m_BuildTargetBatching: 272 | - m_BuildTarget: Standalone 273 | m_StaticBatching: 1 274 | m_DynamicBatching: 0 275 | - m_BuildTarget: tvOS 276 | m_StaticBatching: 1 277 | m_DynamicBatching: 0 278 | - m_BuildTarget: Android 279 | m_StaticBatching: 1 280 | m_DynamicBatching: 0 281 | - m_BuildTarget: iPhone 282 | m_StaticBatching: 1 283 | m_DynamicBatching: 0 284 | - m_BuildTarget: WebGL 285 | m_StaticBatching: 0 286 | m_DynamicBatching: 0 287 | m_BuildTargetGraphicsJobs: 288 | - m_BuildTarget: MacStandaloneSupport 289 | m_GraphicsJobs: 0 290 | - m_BuildTarget: Switch 291 | m_GraphicsJobs: 1 292 | - m_BuildTarget: MetroSupport 293 | m_GraphicsJobs: 1 294 | - m_BuildTarget: AppleTVSupport 295 | m_GraphicsJobs: 0 296 | - m_BuildTarget: BJMSupport 297 | m_GraphicsJobs: 1 298 | - m_BuildTarget: LinuxStandaloneSupport 299 | m_GraphicsJobs: 1 300 | - m_BuildTarget: PS4Player 301 | m_GraphicsJobs: 1 302 | - m_BuildTarget: iOSSupport 303 | m_GraphicsJobs: 0 304 | - m_BuildTarget: WindowsStandaloneSupport 305 | m_GraphicsJobs: 1 306 | - m_BuildTarget: XboxOnePlayer 307 | m_GraphicsJobs: 1 308 | - m_BuildTarget: LuminSupport 309 | m_GraphicsJobs: 0 310 | - m_BuildTarget: AndroidPlayer 311 | m_GraphicsJobs: 0 312 | - m_BuildTarget: WebGLSupport 313 | m_GraphicsJobs: 0 314 | m_BuildTargetGraphicsJobMode: 315 | - m_BuildTarget: PS4Player 316 | m_GraphicsJobMode: 0 317 | - m_BuildTarget: XboxOnePlayer 318 | m_GraphicsJobMode: 0 319 | m_BuildTargetGraphicsAPIs: 320 | - m_BuildTarget: AndroidPlayer 321 | m_APIs: 150000000b000000 322 | m_Automatic: 0 323 | - m_BuildTarget: iOSSupport 324 | m_APIs: 10000000 325 | m_Automatic: 1 326 | - m_BuildTarget: AppleTVSupport 327 | m_APIs: 10000000 328 | m_Automatic: 1 329 | - m_BuildTarget: WebGLSupport 330 | m_APIs: 0b000000 331 | m_Automatic: 1 332 | m_BuildTargetVRSettings: 333 | - m_BuildTarget: Standalone 334 | m_Enabled: 0 335 | m_Devices: 336 | - Oculus 337 | - OpenVR 338 | openGLRequireES31: 0 339 | openGLRequireES31AEP: 0 340 | openGLRequireES32: 0 341 | m_TemplateCustomTags: {} 342 | mobileMTRendering: 343 | Android: 1 344 | iPhone: 1 345 | tvOS: 1 346 | m_BuildTargetGroupLightmapEncodingQuality: [] 347 | m_BuildTargetGroupLightmapSettings: [] 348 | m_BuildTargetNormalMapEncoding: [] 349 | playModeTestRunnerEnabled: 0 350 | runPlayModeTestAsEditModeTest: 0 351 | actionOnDotNetUnhandledException: 1 352 | enableInternalProfiler: 0 353 | logObjCUncaughtExceptions: 1 354 | enableCrashReportAPI: 0 355 | cameraUsageDescription: 356 | locationUsageDescription: 357 | microphoneUsageDescription: 358 | bluetoothUsageDescription: 359 | switchNMETAOverride: 360 | switchNetLibKey: 361 | switchSocketMemoryPoolSize: 6144 362 | switchSocketAllocatorPoolSize: 128 363 | switchSocketConcurrencyLimit: 14 364 | switchScreenResolutionBehavior: 2 365 | switchUseCPUProfiler: 0 366 | switchUseGOLDLinker: 0 367 | switchApplicationID: 0x01004b9000490000 368 | switchNSODependencies: 369 | switchTitleNames_0: 370 | switchTitleNames_1: 371 | switchTitleNames_2: 372 | switchTitleNames_3: 373 | switchTitleNames_4: 374 | switchTitleNames_5: 375 | switchTitleNames_6: 376 | switchTitleNames_7: 377 | switchTitleNames_8: 378 | switchTitleNames_9: 379 | switchTitleNames_10: 380 | switchTitleNames_11: 381 | switchTitleNames_12: 382 | switchTitleNames_13: 383 | switchTitleNames_14: 384 | switchTitleNames_15: 385 | switchPublisherNames_0: 386 | switchPublisherNames_1: 387 | switchPublisherNames_2: 388 | switchPublisherNames_3: 389 | switchPublisherNames_4: 390 | switchPublisherNames_5: 391 | switchPublisherNames_6: 392 | switchPublisherNames_7: 393 | switchPublisherNames_8: 394 | switchPublisherNames_9: 395 | switchPublisherNames_10: 396 | switchPublisherNames_11: 397 | switchPublisherNames_12: 398 | switchPublisherNames_13: 399 | switchPublisherNames_14: 400 | switchPublisherNames_15: 401 | switchIcons_0: {fileID: 0} 402 | switchIcons_1: {fileID: 0} 403 | switchIcons_2: {fileID: 0} 404 | switchIcons_3: {fileID: 0} 405 | switchIcons_4: {fileID: 0} 406 | switchIcons_5: {fileID: 0} 407 | switchIcons_6: {fileID: 0} 408 | switchIcons_7: {fileID: 0} 409 | switchIcons_8: {fileID: 0} 410 | switchIcons_9: {fileID: 0} 411 | switchIcons_10: {fileID: 0} 412 | switchIcons_11: {fileID: 0} 413 | switchIcons_12: {fileID: 0} 414 | switchIcons_13: {fileID: 0} 415 | switchIcons_14: {fileID: 0} 416 | switchIcons_15: {fileID: 0} 417 | switchSmallIcons_0: {fileID: 0} 418 | switchSmallIcons_1: {fileID: 0} 419 | switchSmallIcons_2: {fileID: 0} 420 | switchSmallIcons_3: {fileID: 0} 421 | switchSmallIcons_4: {fileID: 0} 422 | switchSmallIcons_5: {fileID: 0} 423 | switchSmallIcons_6: {fileID: 0} 424 | switchSmallIcons_7: {fileID: 0} 425 | switchSmallIcons_8: {fileID: 0} 426 | switchSmallIcons_9: {fileID: 0} 427 | switchSmallIcons_10: {fileID: 0} 428 | switchSmallIcons_11: {fileID: 0} 429 | switchSmallIcons_12: {fileID: 0} 430 | switchSmallIcons_13: {fileID: 0} 431 | switchSmallIcons_14: {fileID: 0} 432 | switchSmallIcons_15: {fileID: 0} 433 | switchManualHTML: 434 | switchAccessibleURLs: 435 | switchLegalInformation: 436 | switchMainThreadStackSize: 1048576 437 | switchPresenceGroupId: 438 | switchLogoHandling: 0 439 | switchReleaseVersion: 0 440 | switchDisplayVersion: 1.0.0 441 | switchStartupUserAccount: 0 442 | switchTouchScreenUsage: 0 443 | switchSupportedLanguagesMask: 0 444 | switchLogoType: 0 445 | switchApplicationErrorCodeCategory: 446 | switchUserAccountSaveDataSize: 0 447 | switchUserAccountSaveDataJournalSize: 0 448 | switchApplicationAttribute: 0 449 | switchCardSpecSize: -1 450 | switchCardSpecClock: -1 451 | switchRatingsMask: 0 452 | switchRatingsInt_0: 0 453 | switchRatingsInt_1: 0 454 | switchRatingsInt_2: 0 455 | switchRatingsInt_3: 0 456 | switchRatingsInt_4: 0 457 | switchRatingsInt_5: 0 458 | switchRatingsInt_6: 0 459 | switchRatingsInt_7: 0 460 | switchRatingsInt_8: 0 461 | switchRatingsInt_9: 0 462 | switchRatingsInt_10: 0 463 | switchRatingsInt_11: 0 464 | switchRatingsInt_12: 0 465 | switchLocalCommunicationIds_0: 466 | switchLocalCommunicationIds_1: 467 | switchLocalCommunicationIds_2: 468 | switchLocalCommunicationIds_3: 469 | switchLocalCommunicationIds_4: 470 | switchLocalCommunicationIds_5: 471 | switchLocalCommunicationIds_6: 472 | switchLocalCommunicationIds_7: 473 | switchParentalControl: 0 474 | switchAllowsScreenshot: 1 475 | switchAllowsVideoCapturing: 1 476 | switchAllowsRuntimeAddOnContentInstall: 0 477 | switchDataLossConfirmation: 0 478 | switchUserAccountLockEnabled: 0 479 | switchSystemResourceMemory: 16777216 480 | switchSupportedNpadStyles: 22 481 | switchNativeFsCacheSize: 32 482 | switchIsHoldTypeHorizontal: 0 483 | switchSupportedNpadCount: 8 484 | switchSocketConfigEnabled: 0 485 | switchTcpInitialSendBufferSize: 32 486 | switchTcpInitialReceiveBufferSize: 64 487 | switchTcpAutoSendBufferSizeMax: 256 488 | switchTcpAutoReceiveBufferSizeMax: 256 489 | switchUdpSendBufferSize: 9 490 | switchUdpReceiveBufferSize: 42 491 | switchSocketBufferEfficiency: 4 492 | switchSocketInitializeEnabled: 1 493 | switchNetworkInterfaceManagerInitializeEnabled: 1 494 | switchPlayerConnectionEnabled: 1 495 | switchUseNewStyleFilepaths: 0 496 | switchUseMicroSleepForYield: 1 497 | switchMicroSleepForYieldTime: 25 498 | ps4NPAgeRating: 12 499 | ps4NPTitleSecret: 500 | ps4NPTrophyPackPath: 501 | ps4ParentalLevel: 11 502 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 503 | ps4Category: 0 504 | ps4MasterVersion: 01.00 505 | ps4AppVersion: 01.00 506 | ps4AppType: 0 507 | ps4ParamSfxPath: 508 | ps4VideoOutPixelFormat: 0 509 | ps4VideoOutInitialWidth: 1920 510 | ps4VideoOutBaseModeInitialWidth: 1920 511 | ps4VideoOutReprojectionRate: 60 512 | ps4PronunciationXMLPath: 513 | ps4PronunciationSIGPath: 514 | ps4BackgroundImagePath: 515 | ps4StartupImagePath: 516 | ps4StartupImagesFolder: 517 | ps4IconImagesFolder: 518 | ps4SaveDataImagePath: 519 | ps4SdkOverride: 520 | ps4BGMPath: 521 | ps4ShareFilePath: 522 | ps4ShareOverlayImagePath: 523 | ps4PrivacyGuardImagePath: 524 | ps4ExtraSceSysFile: 525 | ps4NPtitleDatPath: 526 | ps4RemotePlayKeyAssignment: -1 527 | ps4RemotePlayKeyMappingDir: 528 | ps4PlayTogetherPlayerCount: 0 529 | ps4EnterButtonAssignment: 1 530 | ps4ApplicationParam1: 0 531 | ps4ApplicationParam2: 0 532 | ps4ApplicationParam3: 0 533 | ps4ApplicationParam4: 0 534 | ps4DownloadDataSize: 0 535 | ps4GarlicHeapSize: 2048 536 | ps4ProGarlicHeapSize: 2560 537 | playerPrefsMaxSize: 32768 538 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 539 | ps4pnSessions: 1 540 | ps4pnPresence: 1 541 | ps4pnFriends: 1 542 | ps4pnGameCustomData: 1 543 | playerPrefsSupport: 0 544 | enableApplicationExit: 0 545 | resetTempFolder: 1 546 | restrictedAudioUsageRights: 0 547 | ps4UseResolutionFallback: 0 548 | ps4ReprojectionSupport: 0 549 | ps4UseAudio3dBackend: 0 550 | ps4UseLowGarlicFragmentationMode: 1 551 | ps4SocialScreenEnabled: 0 552 | ps4ScriptOptimizationLevel: 0 553 | ps4Audio3dVirtualSpeakerCount: 14 554 | ps4attribCpuUsage: 0 555 | ps4PatchPkgPath: 556 | ps4PatchLatestPkgPath: 557 | ps4PatchChangeinfoPath: 558 | ps4PatchDayOne: 0 559 | ps4attribUserManagement: 0 560 | ps4attribMoveSupport: 0 561 | ps4attrib3DSupport: 0 562 | ps4attribShareSupport: 0 563 | ps4attribExclusiveVR: 0 564 | ps4disableAutoHideSplash: 0 565 | ps4videoRecordingFeaturesUsed: 0 566 | ps4contentSearchFeaturesUsed: 0 567 | ps4CompatibilityPS5: 0 568 | ps4AllowPS5Detection: 0 569 | ps4GPU800MHz: 1 570 | ps4attribEyeToEyeDistanceSettingVR: 0 571 | ps4IncludedModules: [] 572 | ps4attribVROutputEnabled: 0 573 | monoEnv: 574 | splashScreenBackgroundSourceLandscape: {fileID: 0} 575 | splashScreenBackgroundSourcePortrait: {fileID: 0} 576 | blurSplashScreenBackground: 1 577 | spritePackerPolicy: 578 | webGLMemorySize: 16 579 | webGLExceptionSupport: 1 580 | webGLNameFilesAsHashes: 0 581 | webGLDataCaching: 1 582 | webGLDebugSymbols: 0 583 | webGLEmscriptenArgs: 584 | webGLModulesDirectory: 585 | webGLTemplate: APPLICATION:Default 586 | webGLAnalyzeBuildSize: 0 587 | webGLUseEmbeddedResources: 0 588 | webGLCompressionFormat: 1 589 | webGLWasmArithmeticExceptions: 0 590 | webGLLinkerTarget: 1 591 | webGLThreadsSupport: 0 592 | webGLDecompressionFallback: 0 593 | scriptingDefineSymbols: {} 594 | additionalCompilerArguments: {} 595 | platformArchitecture: {} 596 | scriptingBackend: {} 597 | il2cppCompilerConfiguration: {} 598 | managedStrippingLevel: {} 599 | incrementalIl2cppBuild: {} 600 | suppressCommonWarnings: 1 601 | allowUnsafeCode: 1 602 | useDeterministicCompilation: 1 603 | useReferenceAssemblies: 1 604 | enableRoslynAnalyzers: 1 605 | additionalIl2CppArgs: 606 | scriptingRuntimeVersion: 1 607 | gcIncremental: 1 608 | assemblyVersionValidation: 1 609 | gcWBarrierValidation: 0 610 | apiCompatibilityLevelPerPlatform: 611 | Standalone: 3 612 | m_RenderingPath: 1 613 | m_MobileRenderingPath: 1 614 | metroPackageName: Template_3D 615 | metroPackageVersion: 616 | metroCertificatePath: 617 | metroCertificatePassword: 618 | metroCertificateSubject: 619 | metroCertificateIssuer: 620 | metroCertificateNotAfter: 0000000000000000 621 | metroApplicationDescription: Template_3D 622 | wsaImages: {} 623 | metroTileShortName: 624 | metroTileShowName: 0 625 | metroMediumTileShowName: 0 626 | metroLargeTileShowName: 0 627 | metroWideTileShowName: 0 628 | metroSupportStreamingInstall: 0 629 | metroLastRequiredScene: 0 630 | metroDefaultTileSize: 1 631 | metroTileForegroundText: 2 632 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 633 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 634 | metroSplashScreenUseBackgroundColor: 0 635 | platformCapabilities: {} 636 | metroTargetDeviceFamilies: {} 637 | metroFTAName: 638 | metroFTAFileTypes: [] 639 | metroProtocolName: 640 | XboxOneProductId: 641 | XboxOneUpdateKey: 642 | XboxOneSandboxId: 643 | XboxOneContentId: 644 | XboxOneTitleId: 645 | XboxOneSCId: 646 | XboxOneGameOsOverridePath: 647 | XboxOnePackagingOverridePath: 648 | XboxOneAppManifestOverridePath: 649 | XboxOneVersion: 1.0.0.0 650 | XboxOnePackageEncryption: 0 651 | XboxOnePackageUpdateGranularity: 2 652 | XboxOneDescription: 653 | XboxOneLanguage: 654 | - enus 655 | XboxOneCapability: [] 656 | XboxOneGameRating: {} 657 | XboxOneIsContentPackage: 0 658 | XboxOneEnhancedXboxCompatibilityMode: 0 659 | XboxOneEnableGPUVariability: 1 660 | XboxOneSockets: {} 661 | XboxOneSplashScreen: {fileID: 0} 662 | XboxOneAllowedProductIds: [] 663 | XboxOnePersistentLocalStorageSize: 0 664 | XboxOneXTitleMemory: 8 665 | XboxOneOverrideIdentityName: 666 | XboxOneOverrideIdentityPublisher: 667 | vrEditorSettings: {} 668 | cloudServicesEnabled: 669 | UNet: 1 670 | luminIcon: 671 | m_Name: 672 | m_ModelFolderPath: 673 | m_PortalFolderPath: 674 | luminCert: 675 | m_CertPath: 676 | m_SignPackage: 1 677 | luminIsChannelApp: 0 678 | luminVersion: 679 | m_VersionCode: 1 680 | m_VersionName: 681 | apiCompatibilityLevel: 6 682 | activeInputHandler: 0 683 | cloudProjectId: 684 | framebufferDepthMemorylessMode: 0 685 | qualitySettingsNames: [] 686 | projectName: 687 | organizationId: 688 | cloudEnabled: 0 689 | legacyClampBlendShapeWeights: 0 690 | virtualTexturingSupportEnabled: 0 691 | --------------------------------------------------------------------------------