├── .gitignore ├── Assets ├── CameraController.cs ├── CameraController.cs.meta ├── CameraSpiral.cs ├── CameraSpiral.cs.meta ├── DepthRender.cs ├── DepthRender.cs.meta ├── Editor.meta ├── Editor │ ├── LoadVolume.cs │ └── LoadVolume.cs.meta ├── Materials.meta ├── Materials │ ├── icon.jpg │ ├── icon.jpg.meta │ ├── iconmat.mat │ └── iconmat.mat.meta ├── Pcx.meta ├── Pcx │ ├── Editor.meta │ ├── Editor │ │ ├── Default Point.mat │ │ ├── Default Point.mat.meta │ │ ├── MaterialInspector.cs │ │ ├── MaterialInspector.cs.meta │ │ ├── Pcx.Editor.asmdef │ │ ├── Pcx.Editor.asmdef.meta │ │ ├── PlyImporter.cs │ │ ├── PlyImporter.cs.meta │ │ ├── PlyImporterInspector.cs │ │ ├── PlyImporterInspector.cs.meta │ │ ├── PointCloudDataInspector.cs │ │ ├── PointCloudDataInspector.cs.meta │ │ ├── PointCloudRendererInspector.cs │ │ └── PointCloudRendererInspector.cs.meta │ ├── Runtime.meta │ └── Runtime │ │ ├── BakedPointCloud.cs │ │ ├── BakedPointCloud.cs.meta │ │ ├── Pcx.asmdef │ │ ├── Pcx.asmdef.meta │ │ ├── PointCloudData.cs │ │ ├── PointCloudData.cs.meta │ │ ├── PointCloudRenderer.cs │ │ ├── PointCloudRenderer.cs.meta │ │ ├── Shaders.meta │ │ └── Shaders │ │ ├── Common.cginc │ │ ├── Common.cginc.meta │ │ ├── Disk.cginc │ │ ├── Disk.cginc.meta │ │ ├── Disk.shader │ │ ├── Disk.shader.meta │ │ ├── Point.shader │ │ └── Point.shader.meta ├── RotateObj.cs ├── RotateObj.cs.meta ├── Scenes.meta ├── Scenes │ ├── MeshRender.unity │ ├── MeshRender.unity.meta │ ├── MixedReality.unity │ ├── MixedReality.unity.meta │ ├── VolumeRender.unity │ └── VolumeRender.unity.meta ├── Shaders.meta ├── Shaders │ ├── Shad.shader │ ├── Shad.shader.meta │ ├── Unlit_volumeShad2.mat │ ├── Unlit_volumeShad2.mat.meta │ ├── screen.mat │ ├── screen.mat.meta │ ├── volumeShad2.shader │ └── volumeShad2.shader.meta ├── StreamingAssets.meta ├── StreamingAssets │ ├── 000.png │ ├── 000.png.meta │ ├── 001.png │ ├── 001.png.meta │ ├── depth_000 │ ├── depth_000.meta │ ├── depth_001 │ └── depth_001.meta ├── SwitchScene.cs ├── SwitchScene.cs.meta ├── SwitchScene2.cs ├── SwitchScene2.cs.meta ├── drums.vol.meta ├── hotdog.vol.meta ├── lego.vol.meta ├── lego_lowres.ply.meta ├── materials.vol.meta ├── plant.ply.meta ├── plant.vol.meta ├── ship.vol.meta ├── silica.ply.meta └── silica.vol.meta ├── LICENSE ├── Packages └── manifest.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── URPProjectSettings.asset ├── UnityConnectSettings.asset ├── VFXManager.asset └── XRSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.vol 2 | *.ply 3 | WebGL*/ 4 | 5 | # This .gitignore file should be placed at the root of your Unity project directory 6 | # 7 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 8 | # 9 | /[Ll]ibrary/ 10 | /[Tt]emp/ 11 | /[Oo]bj/ 12 | /[Bb]uild/ 13 | /[Bb]uilds/ 14 | /[Ll]ogs/ 15 | /[Mm]emoryCaptures/ 16 | 17 | # Asset meta data should only be ignored when the corresponding asset is also ignored 18 | !/[Aa]ssets/**/*.meta 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # Autogenerated Jetbrains Rider plugin 24 | [Aa]ssets/Plugins/Editor/JetBrains* 25 | 26 | # Visual Studio cache directory 27 | .vs/ 28 | 29 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.suo 39 | *.tmp 40 | *.user 41 | *.userprefs 42 | *.pidb 43 | *.booproj 44 | *.svd 45 | *.pdb 46 | *.mdb 47 | *.opendb 48 | *.VC.db 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.unitypackage 61 | 62 | # Crashlytics generated file 63 | crashlytics-build.properties 64 | 65 | -------------------------------------------------------------------------------- /Assets/CameraController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class CameraController : MonoBehaviour 6 | { 7 | public float lookSpeedH = 2f; 8 | public float lookSpeedV = 2f; 9 | public float zoomSpeed = 2f; 10 | public float dragSpeed = 6f; 11 | 12 | private float yaw = 0f; 13 | private float pitch = 0f; 14 | 15 | void Update() 16 | { 17 | //Look around with Right Mouse 18 | if (Input.GetMouseButton(1)) 19 | { 20 | yaw += lookSpeedH * Input.GetAxis("Mouse X"); 21 | pitch -= lookSpeedV * Input.GetAxis("Mouse Y"); 22 | 23 | transform.eulerAngles = new Vector3(pitch, yaw, 0f); 24 | } 25 | 26 | //drag camera around with Middle Mouse 27 | if (Input.GetMouseButton(2)) 28 | { 29 | transform.Translate(-Input.GetAxisRaw("Mouse X") * Time.deltaTime * dragSpeed, -Input.GetAxisRaw("Mouse Y") * Time.deltaTime * dragSpeed, 0); 30 | } 31 | 32 | //Zoom in and out with Mouse Wheel 33 | transform.Translate(0, 0, Input.GetAxis("Mouse ScrollWheel") * zoomSpeed, Space.Self); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Assets/CameraController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cdca38a4a98a9684abed86364698de50 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/CameraSpiral.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class CameraSpiral : MonoBehaviour 6 | { 7 | 8 | public float speed = 1; 9 | public float radius = 1; 10 | public Transform target; 11 | 12 | float initZ; 13 | // Start is called before the first frame update 14 | void Start() 15 | { 16 | initZ = transform.position.z; 17 | } 18 | 19 | // Update is called once per frame 20 | void Update() 21 | { 22 | var x = -Mathf.Sin(Time.time * speed) * radius; 23 | var y = -Mathf.Cos(Time.time * speed) * radius; 24 | var z = initZ + Mathf.Cos(Time.time * speed * 0.5f) * radius; 25 | transform.position = new Vector3(x, y, z); 26 | transform.LookAt(target); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Assets/CameraSpiral.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82b581ee78e77094480f113700170ead 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/DepthRender.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using UnityEngine; 6 | using UnityEngine.Networking; 7 | 8 | public class DepthRender : MonoBehaviour 9 | { 10 | public Camera cam; 11 | public int width, height; 12 | public List image_paths, depth_paths, names; 13 | public GameObject cube; 14 | 15 | private int textureSet=0; 16 | private Texture2D[] itexs, dtexs; 17 | 18 | IEnumerator GetTex(string path, int type, int c) 19 | { 20 | UnityWebRequest www = UnityWebRequest.Get(Path.Combine(Application.streamingAssetsPath, path)); 21 | yield return www.SendWebRequest(); 22 | 23 | if (www.isNetworkError || www.isHttpError) 24 | { 25 | Debug.Log(www.error); 26 | } 27 | else 28 | { 29 | // Or retrieve results as binary data 30 | byte[] results = www.downloadHandler.data; 31 | if (type == 0) // image 32 | { 33 | itexs[c].LoadImage(results); 34 | } 35 | else // depth 36 | { 37 | dtexs[c].LoadRawTextureData(results); 38 | for (int j = 0; j < height; j++) 39 | { 40 | for (int i = 0; i < width; i++) 41 | { 42 | Color color = itexs[c].GetPixel(i, j); 43 | color.a = dtexs[c].GetPixel(i, j).r; // assign alpha as depth value (in 0~1 NDC) 44 | itexs[c].SetPixel(i, j, color); 45 | } 46 | } 47 | itexs[c].Apply(); 48 | textureSet += 1; 49 | } 50 | } 51 | } 52 | 53 | void Start() 54 | { 55 | cam.depthTextureMode |= DepthTextureMode.Depth; 56 | itexs = new Texture2D[image_paths.Count]; 57 | dtexs = new Texture2D[image_paths.Count]; 58 | 59 | for (int c = 0; c < image_paths.Count; c++) 60 | { 61 | itexs[c] = new Texture2D(width, height); 62 | dtexs[c] = new Texture2D(width, height, TextureFormat.RFloat, false); 63 | 64 | StartCoroutine(GetTex(image_paths[c], 0, c)); 65 | StartCoroutine(GetTex(depth_paths[c], 1, c)); 66 | } 67 | } 68 | 69 | void Update() 70 | { 71 | if (textureSet >= 1) 72 | { 73 | GetComponent().material.SetTexture("_MainTex", itexs[0]); 74 | textureSet = 0; 75 | } 76 | float z = Input.GetAxis("Mouse ScrollWheel"); 77 | float x = Input.GetAxis("Mouse X"); 78 | float y = Input.GetAxis("Mouse Y"); 79 | 80 | cube.transform.position += 5 * z * Vector3.forward; 81 | cube.transform.position += 0.25f * x * Vector3.right; 82 | cube.transform.position += 0.25f * y * Vector3.up; 83 | 84 | if (Input.GetMouseButtonDown(2)) 85 | { 86 | cube.transform.position = Vector3.zero; 87 | } 88 | } 89 | 90 | void OnGUI() 91 | { 92 | GUIStyle buttonStyle = new GUIStyle(GUI.skin.button) 93 | { 94 | fontSize = 20 95 | }; 96 | for (int c = 0; c < image_paths.Count; c++) 97 | { 98 | if (GUI.Button(new Rect(10, 10 + 50 * c, 120, 40), names[c], buttonStyle)) 99 | { 100 | GetComponent().material.SetTexture("_MainTex", itexs[c]); 101 | } 102 | } 103 | 104 | GUIStyle textStyle = new GUIStyle(GUI.skin.label) 105 | { 106 | fontSize = 20 107 | }; 108 | textStyle.normal.textColor = Color.black; 109 | GUI.Label(new Rect(10, 200, 150, 250), "Mouse:\nMove ball\nWheel:\nForward/\nBackward\nMiddle click:\nReset ball", textStyle); 110 | 111 | } 112 | } -------------------------------------------------------------------------------- /Assets/DepthRender.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69478877268193343b98a2bb86276199 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed18caf16896ac34d88e35e486c4591f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Editor/LoadVolume.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using UnityEngine; 4 | using UnityEditor.Experimental.AssetImporters; 5 | 6 | [ScriptedImporter(1, "vol")] 7 | public class LoadVolume : ScriptedImporter 8 | { 9 | public int size=512; 10 | // Start is called before the first frame update 11 | Texture3D Load(string path) 12 | { 13 | byte[] volumeData = File.ReadAllBytes(path); 14 | uint[] vF = new uint[volumeData.Length / 4]; 15 | Buffer.BlockCopy(volumeData, 0, vF, 0, volumeData.Length); 16 | Texture3D tex = new Texture3D(size, size, size, TextureFormat.RGBA32, false); 17 | Color[] colors = new Color[size*size*size]; 18 | tex.SetPixels(colors, 0); // all colors to (0, 0, 0, 0) first 19 | for (int c = 0; c < vF.Length; c += 2) 20 | { 21 | int x = (int)vF[c]; 22 | int i = x / size / size; 23 | int j = (x - size * size * i) / size; 24 | int k = x % size; 25 | uint col = vF[c + 1]; 26 | float r = ((col & 0xFF000000) >> 24) / 255.0f; 27 | float g = ((col & 0x00FF0000) >> 16) / 255.0f; 28 | float b = ((col & 0x0000FF00) >> 8) / 255.0f; 29 | float a = (col & 0x000000FF) / 255.0f; 30 | 31 | Color color = new Color(r, g, b, a); 32 | tex.SetPixel(k, j, i, color); 33 | } 34 | return tex; 35 | } 36 | 37 | public override void OnImportAsset(AssetImportContext ctx) 38 | { 39 | try 40 | { 41 | var tex3d = Load(ctx.assetPath); 42 | ctx.AddObjectToAsset("Volume", tex3d); 43 | } 44 | catch (Exception e) 45 | { 46 | Debug.LogException(e); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Assets/Editor/LoadVolume.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 19b8968e701f87a47b366c08b10fbec7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d87afb714f32dcb4abb2ff41417dc850 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwea123/nerf_Unity/ab4d03950a13794582224a884a00253a0d10a66c/Assets/Materials/icon.jpg -------------------------------------------------------------------------------- /Assets/Materials/icon.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d0d9f04ae407f34a8354e562d428612 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 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | spriteSheet: 75 | serializedVersion: 2 76 | sprites: [] 77 | outline: [] 78 | physicsShape: [] 79 | bones: [] 80 | spriteID: 81 | internalID: 0 82 | vertices: [] 83 | indices: 84 | edges: [] 85 | weights: [] 86 | secondaryTextures: [] 87 | spritePackingTag: 88 | pSDRemoveMatte: 0 89 | pSDShowRemoveMatteOption: 0 90 | userData: 91 | assetBundleName: 92 | assetBundleVariant: 93 | -------------------------------------------------------------------------------- /Assets/Materials/iconmat.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: iconmat 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: 3, y: 1.5} 41 | m_Offset: {x: 0.73, y: 0.85} 42 | - _MainTex: 43 | m_Texture: {fileID: 2800000, guid: 6d0d9f04ae407f34a8354e562d428612, type: 3} 44 | m_Scale: {x: 3, y: 1.5} 45 | m_Offset: {x: 0.73, y: 0.85} 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 | -------------------------------------------------------------------------------- /Assets/Materials/iconmat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f703a17dc437ce84ca343104ced1bb9b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Pcx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9aa9463d665a3fa4dbfef7127a35cbf4 3 | folderAsset: yes 4 | timeCreated: 1508941553 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Pcx/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ff2666a12e1c5e4a82171deb16421e3 3 | folderAsset: yes 4 | timeCreated: 1508991152 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Pcx/Editor/Default Point.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Default Point 10 | m_Shader: {fileID: 4800000, guid: 1baec256dca7c1642b87d05510e75a3f, type: 3} 11 | m_ShaderKeywords: _DISTANCE_ON 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: [] 21 | m_Floats: 22 | - _Distance: 1 23 | - _PointSize: 0.05 24 | m_Colors: 25 | - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 1} 26 | -------------------------------------------------------------------------------- /Assets/Pcx/Editor/Default Point.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 068f66693b9c4b64b8fe01cf78ce88f6 3 | timeCreated: 1509200963 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 2100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Pcx/Editor/MaterialInspector.cs: -------------------------------------------------------------------------------- 1 | // Pcx - Point cloud importer & renderer for Unity 2 | // https://github.com/keijiro/Pcx 3 | 4 | using UnityEngine; 5 | using UnityEditor; 6 | 7 | namespace Pcx 8 | { 9 | class PointMaterialInspector : ShaderGUI 10 | { 11 | public override void OnGUI(MaterialEditor editor, MaterialProperty[] props) 12 | { 13 | editor.ShaderProperty(FindProperty("_Tint", props), "Tint"); 14 | editor.ShaderProperty(FindProperty("_PointSize", props), "Point Size"); 15 | editor.ShaderProperty(FindProperty("_Distance", props), "Apply Distance"); 16 | 17 | EditorGUILayout.HelpBox( 18 | "Only some platform support these point size properties.", 19 | MessageType.None 20 | ); 21 | } 22 | } 23 | 24 | class DiskMaterialInspector : ShaderGUI 25 | { 26 | public override void OnGUI(MaterialEditor editor, MaterialProperty[] props) 27 | { 28 | editor.ShaderProperty(FindProperty("_Tint", props), "Tint"); 29 | editor.ShaderProperty(FindProperty("_PointSize", props), "Point Size"); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Assets/Pcx/Editor/MaterialInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4736c2a79e939b44e802153fac6e403c 3 | timeCreated: 1509199624 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Pcx/Editor/Pcx.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Pcx.Editor", 3 | "references": [ 4 | "Pcx" 5 | ], 6 | "optionalUnityReferences": [], 7 | "includePlatforms": [ 8 | "Editor" 9 | ], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": false, 13 | "precompiledReferences": [], 14 | "autoReferenced": true, 15 | "defineConstraints": [] 16 | } -------------------------------------------------------------------------------- /Assets/Pcx/Editor/Pcx.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8af269c4666d5214fbeaa6662ea7322f 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Pcx/Editor/PlyImporter.cs: -------------------------------------------------------------------------------- 1 | // Pcx - Point cloud importer & renderer for Unity 2 | // https://github.com/keijiro/Pcx 3 | 4 | using UnityEngine; 5 | using UnityEngine.Rendering; 6 | using UnityEditor; 7 | using UnityEditor.Experimental.AssetImporters; 8 | 9 | using System; 10 | using System.Collections.Generic; 11 | using System.IO; 12 | using System.Linq; 13 | 14 | namespace Pcx 15 | { 16 | [ScriptedImporter(1, "ply")] 17 | class PlyImporter : ScriptedImporter 18 | { 19 | #region ScriptedImporter implementation 20 | 21 | public enum ContainerType { Mesh, ComputeBuffer, Texture } 22 | 23 | [SerializeField] ContainerType _containerType = ContainerType.Mesh; 24 | 25 | public override void OnImportAsset(AssetImportContext context) 26 | { 27 | if (_containerType == ContainerType.Mesh) 28 | { 29 | // Mesh container 30 | // Create a prefab with MeshFilter/MeshRenderer. 31 | var gameObject = new GameObject(); 32 | var mesh = ImportAsMesh(context.assetPath); 33 | 34 | var meshFilter = gameObject.AddComponent(); 35 | meshFilter.sharedMesh = mesh; 36 | 37 | var meshRenderer = gameObject.AddComponent(); 38 | meshRenderer.sharedMaterial = GetDefaultMaterial(); 39 | 40 | context.AddObjectToAsset("prefab", gameObject); 41 | if (mesh != null) context.AddObjectToAsset("mesh", mesh); 42 | 43 | context.SetMainObject(gameObject); 44 | } 45 | else if (_containerType == ContainerType.ComputeBuffer) 46 | { 47 | // ComputeBuffer container 48 | // Create a prefab with PointCloudRenderer. 49 | var gameObject = new GameObject(); 50 | var data = ImportAsPointCloudData(context.assetPath); 51 | 52 | var renderer = gameObject.AddComponent(); 53 | renderer.sourceData = data; 54 | 55 | context.AddObjectToAsset("prefab", gameObject); 56 | if (data != null) context.AddObjectToAsset("data", data); 57 | 58 | context.SetMainObject(gameObject); 59 | } 60 | else // _containerType == ContainerType.Texture 61 | { 62 | // Texture container 63 | // No prefab is available for this type. 64 | var data = ImportAsBakedPointCloud(context.assetPath); 65 | if (data != null) 66 | { 67 | context.AddObjectToAsset("container", data); 68 | context.AddObjectToAsset("position", data.positionMap); 69 | context.AddObjectToAsset("color", data.colorMap); 70 | context.SetMainObject(data); 71 | } 72 | } 73 | } 74 | 75 | #endregion 76 | 77 | #region Internal utilities 78 | 79 | static Material GetDefaultMaterial() 80 | { 81 | // Via package manager 82 | var path_upm = "Packages/jp.keijiro.pcx/Editor/Default Point.mat"; 83 | // Via project asset database 84 | var path_prj = "Assets/Pcx/Editor/Default Point.mat"; 85 | return AssetDatabase.LoadAssetAtPath(path_upm) ?? 86 | AssetDatabase.LoadAssetAtPath(path_prj); 87 | } 88 | 89 | #endregion 90 | 91 | #region Internal data structure 92 | 93 | enum DataProperty 94 | { 95 | Invalid, 96 | R8, G8, B8, A8, 97 | R16, G16, B16, A16, 98 | SingleX, SingleY, SingleZ, 99 | DoubleX, DoubleY, DoubleZ, 100 | Data8, Data16, Data32, Data64 101 | } 102 | 103 | static int GetPropertySize(DataProperty p) 104 | { 105 | switch (p) 106 | { 107 | case DataProperty.R8: return 1; 108 | case DataProperty.G8: return 1; 109 | case DataProperty.B8: return 1; 110 | case DataProperty.A8: return 1; 111 | case DataProperty.R16: return 2; 112 | case DataProperty.G16: return 2; 113 | case DataProperty.B16: return 2; 114 | case DataProperty.A16: return 2; 115 | case DataProperty.SingleX: return 4; 116 | case DataProperty.SingleY: return 4; 117 | case DataProperty.SingleZ: return 4; 118 | case DataProperty.DoubleX: return 8; 119 | case DataProperty.DoubleY: return 8; 120 | case DataProperty.DoubleZ: return 8; 121 | case DataProperty.Data8: return 1; 122 | case DataProperty.Data16: return 2; 123 | case DataProperty.Data32: return 4; 124 | case DataProperty.Data64: return 8; 125 | } 126 | return 0; 127 | } 128 | 129 | class DataHeader 130 | { 131 | public List properties = new List(); 132 | public int vertexCount = 0; 133 | public int triangleCount = 0; 134 | } 135 | 136 | class DataBody 137 | { 138 | public List vertices; 139 | public List colors; 140 | public List triangles; 141 | 142 | public DataBody(int vertexCount, int triangleCount) 143 | { 144 | vertices = new List(vertexCount); 145 | colors = new List(vertexCount); 146 | triangles = new List(triangleCount); 147 | } 148 | 149 | public void AddPoint( 150 | float x, float y, float z, 151 | byte r, byte g, byte b, byte a 152 | ) 153 | { 154 | vertices.Add(new Vector3(x, y, z)); 155 | colors.Add(new Color32(r, g, b, a)); 156 | } 157 | 158 | public void AddTriangle(int v1, int v2, int v3) 159 | { 160 | triangles.Add(v1); 161 | triangles.Add(v2); 162 | triangles.Add(v3); 163 | } 164 | } 165 | 166 | #endregion 167 | 168 | #region Reader implementation 169 | 170 | Mesh ImportAsMesh(string path) 171 | { 172 | try 173 | { 174 | var stream = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read); 175 | var header = ReadDataHeader(new StreamReader(stream)); 176 | var body = ReadDataBody(header, new BinaryReader(stream)); 177 | 178 | var mesh = new Mesh(); 179 | mesh.name = Path.GetFileNameWithoutExtension(path); 180 | 181 | mesh.indexFormat = header.vertexCount > 65535 ? 182 | IndexFormat.UInt32 : IndexFormat.UInt16; 183 | 184 | mesh.SetVertices(body.vertices); 185 | mesh.SetColors(body.colors); 186 | if (body.triangles.Count > 0) 187 | { 188 | mesh.SetTriangles(body.triangles, 0); 189 | } 190 | else 191 | { 192 | mesh.SetIndices( 193 | Enumerable.Range(0, header.vertexCount).ToArray(), 194 | MeshTopology.Points, 0 195 | ); 196 | } 197 | 198 | mesh.UploadMeshData(true); 199 | return mesh; 200 | } 201 | catch (Exception e) 202 | { 203 | Debug.LogError("Failed importing " + path + ". " + e.Message); 204 | return null; 205 | } 206 | } 207 | 208 | PointCloudData ImportAsPointCloudData(string path) 209 | { 210 | try 211 | { 212 | var stream = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read); 213 | var header = ReadDataHeader(new StreamReader(stream)); 214 | var body = ReadDataBody(header, new BinaryReader(stream)); 215 | var data = ScriptableObject.CreateInstance(); 216 | data.Initialize(body.vertices, body.colors); 217 | data.name = Path.GetFileNameWithoutExtension(path); 218 | return data; 219 | } 220 | catch (Exception e) 221 | { 222 | Debug.LogError("Failed importing " + path + ". " + e.Message); 223 | return null; 224 | } 225 | } 226 | 227 | BakedPointCloud ImportAsBakedPointCloud(string path) 228 | { 229 | try 230 | { 231 | var stream = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read); 232 | var header = ReadDataHeader(new StreamReader(stream)); 233 | var body = ReadDataBody(header, new BinaryReader(stream)); 234 | var data = ScriptableObject.CreateInstance(); 235 | data.Initialize(body.vertices, body.colors); 236 | data.name = Path.GetFileNameWithoutExtension(path); 237 | return data; 238 | } 239 | catch (Exception e) 240 | { 241 | Debug.LogError("Failed importing " + path + ". " + e.Message); 242 | return null; 243 | } 244 | } 245 | 246 | DataHeader ReadDataHeader(StreamReader reader) 247 | { 248 | var data = new DataHeader(); 249 | var readCount = 0; 250 | 251 | // Magic number line ("ply") 252 | var line = reader.ReadLine(); 253 | readCount += line.Length + 1; 254 | if (line != "ply") 255 | throw new ArgumentException("Magic number ('ply') mismatch."); 256 | 257 | // Data format: check if it's binary/little endian. 258 | line = reader.ReadLine(); 259 | readCount += line.Length + 1; 260 | if (line != "format binary_little_endian 1.0") 261 | throw new ArgumentException( 262 | "Invalid data format ('" + line + "'). " + 263 | "Should be binary/little endian."); 264 | 265 | // Read header contents. 266 | for (var skip = false; ;) 267 | { 268 | // Read a line and split it with white space. 269 | line = reader.ReadLine(); 270 | readCount += line.Length + 1; 271 | if (line == "end_header") break; 272 | var col = line.Split(); 273 | 274 | // Element declaration (unskippable) 275 | if (col[0] == "element") 276 | { 277 | if (col[1] == "vertex") 278 | { 279 | data.vertexCount = Convert.ToInt32(col[2]); 280 | skip = false; 281 | } 282 | else if (col[1] == "face") 283 | { 284 | data.triangleCount = Convert.ToInt32(col[2]); 285 | skip = true; 286 | } 287 | else 288 | { 289 | // Don't read elements other than vertices or triangles. 290 | skip = true; 291 | } 292 | } 293 | 294 | if (skip) continue; 295 | 296 | // Property declaration line 297 | if (col[0] == "property") 298 | { 299 | var prop = DataProperty.Invalid; 300 | 301 | // Parse the property name entry. 302 | switch (col[2]) 303 | { 304 | case "red": prop = DataProperty.R8; break; 305 | case "green": prop = DataProperty.G8; break; 306 | case "blue": prop = DataProperty.B8; break; 307 | case "alpha": prop = DataProperty.A8; break; 308 | case "x": prop = DataProperty.SingleX; break; 309 | case "y": prop = DataProperty.SingleY; break; 310 | case "z": prop = DataProperty.SingleZ; break; 311 | } 312 | 313 | // Check the property type. 314 | if (col[1] == "char" || col[1] == "uchar" || 315 | col[1] == "int8" || col[1] == "uint8") 316 | { 317 | if (prop == DataProperty.Invalid) 318 | prop = DataProperty.Data8; 319 | else if (GetPropertySize(prop) != 1) 320 | throw new ArgumentException("Invalid property type ('" + line + "')."); 321 | } 322 | else if (col[1] == "short" || col[1] == "ushort" || 323 | col[1] == "int16" || col[1] == "uint16") 324 | { 325 | switch (prop) 326 | { 327 | case DataProperty.Invalid: prop = DataProperty.Data16; break; 328 | case DataProperty.R8: prop = DataProperty.R16; break; 329 | case DataProperty.G8: prop = DataProperty.G16; break; 330 | case DataProperty.B8: prop = DataProperty.B16; break; 331 | case DataProperty.A8: prop = DataProperty.A16; break; 332 | } 333 | if (GetPropertySize(prop) != 2) 334 | throw new ArgumentException("Invalid property type ('" + line + "')."); 335 | } 336 | else if (col[1] == "int" || col[1] == "uint" || col[1] == "float" || 337 | col[1] == "int32" || col[1] == "uint32" || col[1] == "float32") 338 | { 339 | if (prop == DataProperty.Invalid) 340 | prop = DataProperty.Data32; 341 | else if (GetPropertySize(prop) != 4) 342 | throw new ArgumentException("Invalid property type ('" + line + "')."); 343 | } 344 | else if (col[1] == "int64" || col[1] == "uint64" || 345 | col[1] == "double" || col[1] == "float64") 346 | { 347 | switch (prop) 348 | { 349 | case DataProperty.Invalid: prop = DataProperty.Data64; break; 350 | case DataProperty.SingleX: prop = DataProperty.DoubleX; break; 351 | case DataProperty.SingleY: prop = DataProperty.DoubleY; break; 352 | case DataProperty.SingleZ: prop = DataProperty.DoubleZ; break; 353 | } 354 | if (GetPropertySize(prop) != 8) 355 | throw new ArgumentException("Invalid property type ('" + line + "')."); 356 | } 357 | else 358 | { 359 | throw new ArgumentException("Unsupported property type ('" + line + "')."); 360 | } 361 | 362 | data.properties.Add(prop); 363 | } 364 | } 365 | 366 | // Rewind the stream back to the exact position of the reader. 367 | reader.BaseStream.Position = readCount; 368 | 369 | return data; 370 | } 371 | 372 | DataBody ReadDataBody(DataHeader header, BinaryReader reader) 373 | { 374 | var data = new DataBody(header.vertexCount, header.triangleCount); 375 | 376 | float x = 0, y = 0, z = 0; 377 | Byte r = 255, g = 255, b = 255, a = 255; 378 | 379 | // read vertices xyzrgba 380 | for (var i = 0; i < header.vertexCount; i++) 381 | { 382 | foreach (var prop in header.properties) 383 | { 384 | switch (prop) 385 | { 386 | case DataProperty.R8: r = reader.ReadByte(); break; 387 | case DataProperty.G8: g = reader.ReadByte(); break; 388 | case DataProperty.B8: b = reader.ReadByte(); break; 389 | case DataProperty.A8: a = reader.ReadByte(); break; 390 | 391 | case DataProperty.R16: r = (byte)(reader.ReadUInt16() >> 8); break; 392 | case DataProperty.G16: g = (byte)(reader.ReadUInt16() >> 8); break; 393 | case DataProperty.B16: b = (byte)(reader.ReadUInt16() >> 8); break; 394 | case DataProperty.A16: a = (byte)(reader.ReadUInt16() >> 8); break; 395 | 396 | case DataProperty.SingleX: x = reader.ReadSingle(); break; 397 | case DataProperty.SingleY: y = reader.ReadSingle(); break; 398 | case DataProperty.SingleZ: z = reader.ReadSingle(); break; 399 | 400 | case DataProperty.DoubleX: x = (float)reader.ReadDouble(); break; 401 | case DataProperty.DoubleY: y = (float)reader.ReadDouble(); break; 402 | case DataProperty.DoubleZ: z = (float)reader.ReadDouble(); break; 403 | 404 | case DataProperty.Data8: reader.ReadByte(); break; 405 | case DataProperty.Data16: reader.BaseStream.Position += 2; break; 406 | case DataProperty.Data32: reader.BaseStream.Position += 4; break; 407 | case DataProperty.Data64: reader.BaseStream.Position += 8; break; 408 | } 409 | } 410 | data.AddPoint(x, y, z, r, g, b, a); 411 | } 412 | 413 | int v1, v2, v3; 414 | 415 | // read triangles 416 | for (var i = 0; i < header.triangleCount; i++) 417 | { 418 | reader.ReadByte(); // number of vertices of the triangle, always 3 419 | v1 = reader.ReadInt32(); 420 | v2 = reader.ReadInt32(); 421 | v3 = reader.ReadInt32(); 422 | data.AddTriangle(v1, v2, v3); 423 | } 424 | 425 | return data; 426 | } 427 | } 428 | 429 | #endregion 430 | } 431 | -------------------------------------------------------------------------------- /Assets/Pcx/Editor/PlyImporter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 183c1cb276390b14e883dae29f585dfa 3 | timeCreated: 1508852153 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Pcx/Editor/PlyImporterInspector.cs: -------------------------------------------------------------------------------- 1 | // Pcx - Point cloud importer & renderer for Unity 2 | // https://github.com/keijiro/Pcx 3 | 4 | using UnityEngine; 5 | using UnityEditor; 6 | using UnityEditor.Experimental.AssetImporters; 7 | 8 | namespace Pcx 9 | { 10 | // Note: Not sure why but EnumPopup doesn't work in ScriptedImporterEditor, 11 | // so it has been replaced with a normal Popup control. 12 | 13 | [CustomEditor(typeof(PlyImporter))] 14 | class PlyImporterInspector : ScriptedImporterEditor 15 | { 16 | SerializedProperty _containerType; 17 | 18 | string[] _containerTypeNames; 19 | 20 | protected override bool useAssetDrawPreview { get { return false; } } 21 | 22 | public override void OnEnable() 23 | { 24 | base.OnEnable(); 25 | 26 | _containerType = serializedObject.FindProperty("_containerType"); 27 | _containerTypeNames = System.Enum.GetNames(typeof(PlyImporter.ContainerType)); 28 | } 29 | 30 | public override void OnInspectorGUI() 31 | { 32 | _containerType.intValue = EditorGUILayout.Popup( 33 | "Container Type", _containerType.intValue, _containerTypeNames); 34 | 35 | base.ApplyRevertGUI(); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Assets/Pcx/Editor/PlyImporterInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95b6a588a78b42349b595f58b4a69570 3 | timeCreated: 1509009112 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Pcx/Editor/PointCloudDataInspector.cs: -------------------------------------------------------------------------------- 1 | // Pcx - Point cloud importer & renderer for Unity 2 | // https://github.com/keijiro/Pcx 3 | 4 | using UnityEngine; 5 | using UnityEditor; 6 | 7 | namespace Pcx 8 | { 9 | [CustomEditor(typeof(PointCloudData))] 10 | public sealed class PointCloudDataInspector : Editor 11 | { 12 | public override void OnInspectorGUI() 13 | { 14 | var count = ((PointCloudData)target).pointCount; 15 | EditorGUILayout.LabelField("Point Count", count.ToString("N0")); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Assets/Pcx/Editor/PointCloudDataInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8411b5e94234b27449f0b9ee5c00708d 3 | timeCreated: 1509012153 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Pcx/Editor/PointCloudRendererInspector.cs: -------------------------------------------------------------------------------- 1 | // Pcx - Point cloud importer & renderer for Unity 2 | // https://github.com/keijiro/Pcx 3 | 4 | using UnityEngine; 5 | using UnityEditor; 6 | 7 | namespace Pcx 8 | { 9 | [CanEditMultipleObjects] 10 | [CustomEditor(typeof(PointCloudRenderer))] 11 | public class PointCloudRendererInspector : Editor 12 | { 13 | SerializedProperty _sourceData; 14 | SerializedProperty _pointTint; 15 | SerializedProperty _pointSize; 16 | 17 | void OnEnable() 18 | { 19 | _sourceData = serializedObject.FindProperty("_sourceData"); 20 | _pointTint = serializedObject.FindProperty("_pointTint"); 21 | _pointSize = serializedObject.FindProperty("_pointSize"); 22 | } 23 | 24 | public override void OnInspectorGUI() 25 | { 26 | serializedObject.Update(); 27 | 28 | EditorGUILayout.PropertyField(_sourceData); 29 | EditorGUILayout.PropertyField(_pointTint); 30 | EditorGUILayout.PropertyField(_pointSize); 31 | 32 | serializedObject.ApplyModifiedProperties(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Assets/Pcx/Editor/PointCloudRendererInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a237af582c9918148baae596f2936958 3 | timeCreated: 1509199040 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18f31f41996fe424b95386d159828448 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/BakedPointCloud.cs: -------------------------------------------------------------------------------- 1 | // Pcx - Point cloud importer & renderer for Unity 2 | // https://github.com/keijiro/Pcx 3 | 4 | using UnityEngine; 5 | using System.Collections.Generic; 6 | 7 | namespace Pcx 8 | { 9 | /// A container class for texture-baked point clouds. 10 | public sealed class BakedPointCloud : ScriptableObject 11 | { 12 | #region Public properties 13 | 14 | /// Number of points 15 | public int pointCount { get { return _pointCount; } } 16 | 17 | /// Position map texture 18 | public Texture2D positionMap { get { return _positionMap; } } 19 | 20 | /// Color map texture 21 | public Texture2D colorMap { get { return _colorMap; } } 22 | 23 | #endregion 24 | 25 | #region Serialized data members 26 | 27 | [SerializeField] int _pointCount; 28 | [SerializeField] Texture2D _positionMap; 29 | [SerializeField] Texture2D _colorMap; 30 | 31 | #endregion 32 | 33 | #region Editor functions 34 | 35 | #if UNITY_EDITOR 36 | 37 | public void Initialize(List positions, List colors) 38 | { 39 | _pointCount = positions.Count; 40 | 41 | var width = Mathf.CeilToInt(Mathf.Sqrt(_pointCount)); 42 | 43 | _positionMap = new Texture2D(width, width, TextureFormat.RGBAHalf, false); 44 | _positionMap.name = "Position Map"; 45 | _positionMap.filterMode = FilterMode.Point; 46 | 47 | _colorMap = new Texture2D(width, width, TextureFormat.RGBA32, false); 48 | _colorMap.name = "Color Map"; 49 | _colorMap.filterMode = FilterMode.Point; 50 | 51 | var i1 = 0; 52 | var i2 = 0U; 53 | 54 | for (var y = 0; y < width; y++) 55 | { 56 | for (var x = 0; x < width; x++) 57 | { 58 | var i = i1 < _pointCount ? i1 : (int)(i2 % _pointCount); 59 | var p = positions[i]; 60 | 61 | _positionMap.SetPixel(x, y, new Color(p.x, p.y, p.z)); 62 | _colorMap.SetPixel(x, y, colors[i]); 63 | 64 | i1 ++; 65 | i2 += 132049U; // prime 66 | } 67 | } 68 | 69 | _positionMap.Apply(false, true); 70 | _colorMap.Apply(false, true); 71 | } 72 | 73 | #endif 74 | 75 | #endregion 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/BakedPointCloud.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e24966311c3a42b880056b5d15db86a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/Pcx.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Pcx" 3 | } 4 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/Pcx.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e27a0cdc43c9d0e478a5dbde7ee2e5c4 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/PointCloudData.cs: -------------------------------------------------------------------------------- 1 | // Pcx - Point cloud importer & renderer for Unity 2 | // https://github.com/keijiro/Pcx 3 | 4 | using UnityEngine; 5 | using System.Collections.Generic; 6 | 7 | namespace Pcx 8 | { 9 | /// A container class optimized for compute buffer. 10 | public sealed class PointCloudData : ScriptableObject 11 | { 12 | #region Public properties 13 | 14 | /// Byte size of the point element. 15 | public const int elementSize = sizeof(float) * 4; 16 | 17 | /// Number of points. 18 | public int pointCount { 19 | get { return _pointData.Length; } 20 | } 21 | 22 | /// Get access to the compute buffer that contains the point cloud. 23 | public ComputeBuffer computeBuffer { 24 | get { 25 | if (_pointBuffer == null) 26 | { 27 | _pointBuffer = new ComputeBuffer(pointCount, elementSize); 28 | _pointBuffer.SetData(_pointData); 29 | } 30 | return _pointBuffer; 31 | } 32 | } 33 | 34 | #endregion 35 | 36 | #region ScriptableObject implementation 37 | 38 | ComputeBuffer _pointBuffer; 39 | 40 | void OnDisable() 41 | { 42 | if (_pointBuffer != null) 43 | { 44 | _pointBuffer.Release(); 45 | _pointBuffer = null; 46 | } 47 | } 48 | 49 | #endregion 50 | 51 | #region Serialized data members 52 | 53 | [System.Serializable] 54 | struct Point 55 | { 56 | public Vector3 position; 57 | public uint color; 58 | } 59 | 60 | [SerializeField] Point[] _pointData; 61 | 62 | #endregion 63 | 64 | #region Editor functions 65 | 66 | #if UNITY_EDITOR 67 | 68 | static uint EncodeColor(Color c) 69 | { 70 | const float kMaxBrightness = 16; 71 | 72 | var y = Mathf.Max(Mathf.Max(c.r, c.g), c.b); 73 | y = Mathf.Clamp(Mathf.Ceil(y * 255 / kMaxBrightness), 1, 255); 74 | 75 | var rgb = new Vector3(c.r, c.g, c.b); 76 | rgb *= 255 * 255 / (y * kMaxBrightness); 77 | 78 | return ((uint)rgb.x ) | 79 | ((uint)rgb.y << 8) | 80 | ((uint)rgb.z << 16) | 81 | ((uint)y << 24); 82 | } 83 | 84 | public void Initialize(List positions, List colors) 85 | { 86 | _pointData = new Point[positions.Count]; 87 | for (var i = 0; i < _pointData.Length; i++) 88 | { 89 | _pointData[i] = new Point { 90 | position = positions[i], 91 | color = EncodeColor(colors[i]) 92 | }; 93 | } 94 | } 95 | 96 | #endif 97 | 98 | #endregion 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/PointCloudData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26ff0e71eabe6a448bdec7f94568233f 3 | timeCreated: 1508997921 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/PointCloudRenderer.cs: -------------------------------------------------------------------------------- 1 | // Pcx - Point cloud importer & renderer for Unity 2 | // https://github.com/keijiro/Pcx 3 | 4 | using UnityEngine; 5 | 6 | namespace Pcx 7 | { 8 | /// A renderer class that renders a point cloud contained by PointCloudData. 9 | [ExecuteInEditMode] 10 | public sealed class PointCloudRenderer : MonoBehaviour 11 | { 12 | #region Editable attributes 13 | 14 | [SerializeField] PointCloudData _sourceData = null; 15 | 16 | public PointCloudData sourceData { 17 | get { return _sourceData; } 18 | set { _sourceData = value; } 19 | } 20 | 21 | [SerializeField] Color _pointTint = new Color(0.5f, 0.5f, 0.5f, 1); 22 | 23 | public Color pointTint { 24 | get { return _pointTint; } 25 | set { _pointTint = value; } 26 | } 27 | 28 | [SerializeField] float _pointSize = 0.05f; 29 | 30 | public float pointSize { 31 | get { return _pointSize; } 32 | set { _pointSize = value; } 33 | } 34 | 35 | #endregion 36 | 37 | #region Public properties (nonserialized) 38 | 39 | public ComputeBuffer sourceBuffer { get; set; } 40 | 41 | #endregion 42 | 43 | #region Internal resources 44 | 45 | [SerializeField, HideInInspector] Shader _pointShader = null; 46 | [SerializeField, HideInInspector] Shader _diskShader = null; 47 | 48 | #endregion 49 | 50 | #region Private objects 51 | 52 | Material _pointMaterial; 53 | Material _diskMaterial; 54 | 55 | #endregion 56 | 57 | #region MonoBehaviour implementation 58 | 59 | void OnValidate() 60 | { 61 | _pointSize = Mathf.Max(0, _pointSize); 62 | } 63 | 64 | void OnDestroy() 65 | { 66 | if (_pointMaterial != null) 67 | { 68 | if (Application.isPlaying) 69 | { 70 | Destroy(_pointMaterial); 71 | Destroy(_diskMaterial); 72 | } 73 | else 74 | { 75 | DestroyImmediate(_pointMaterial); 76 | DestroyImmediate(_diskMaterial); 77 | } 78 | } 79 | } 80 | 81 | void OnRenderObject() 82 | { 83 | // We need a source data or an externally given buffer. 84 | if (_sourceData == null && sourceBuffer == null) return; 85 | 86 | // Check the camera condition. 87 | var camera = Camera.current; 88 | if ((camera.cullingMask & (1 << gameObject.layer)) == 0) return; 89 | if (camera.name == "Preview Scene Camera") return; 90 | 91 | // TODO: Do view frustum culling here. 92 | 93 | // Lazy initialization 94 | if (_pointMaterial == null) 95 | { 96 | _pointMaterial = new Material(_pointShader); 97 | _pointMaterial.hideFlags = HideFlags.DontSave; 98 | _pointMaterial.EnableKeyword("_COMPUTE_BUFFER"); 99 | 100 | _diskMaterial = new Material(_diskShader); 101 | _diskMaterial.hideFlags = HideFlags.DontSave; 102 | _diskMaterial.EnableKeyword("_COMPUTE_BUFFER"); 103 | } 104 | 105 | // Use the external buffer if given any. 106 | var pointBuffer = sourceBuffer != null ? 107 | sourceBuffer : _sourceData.computeBuffer; 108 | 109 | if (_pointSize == 0) 110 | { 111 | _pointMaterial.SetPass(0); 112 | _pointMaterial.SetColor("_Tint", _pointTint); 113 | _pointMaterial.SetMatrix("_Transform", transform.localToWorldMatrix); 114 | _pointMaterial.SetBuffer("_PointBuffer", pointBuffer); 115 | #if UNITY_2019_1_OR_NEWER 116 | Graphics.DrawProceduralNow(MeshTopology.Points, pointBuffer.count, 1); 117 | #else 118 | Graphics.DrawProcedural(MeshTopology.Points, pointBuffer.count, 1); 119 | #endif 120 | } 121 | else 122 | { 123 | _diskMaterial.SetPass(0); 124 | _diskMaterial.SetColor("_Tint", _pointTint); 125 | _diskMaterial.SetMatrix("_Transform", transform.localToWorldMatrix); 126 | _diskMaterial.SetBuffer("_PointBuffer", pointBuffer); 127 | _diskMaterial.SetFloat("_PointSize", pointSize); 128 | #if UNITY_2019_1_OR_NEWER 129 | Graphics.DrawProceduralNow(MeshTopology.Points, pointBuffer.count, 1); 130 | #else 131 | Graphics.DrawProcedural(MeshTopology.Points, pointBuffer.count, 1); 132 | #endif 133 | } 134 | } 135 | 136 | #endregion 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/PointCloudRenderer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b5900aba1767854aa98592c99eb8b8a 3 | timeCreated: 1509113340 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: 9 | - _source: {instanceID: 0} 10 | - _pointShader: {fileID: 4800000, guid: 1baec256dca7c1642b87d05510e75a3f, type: 3} 11 | - _diskShader: {fileID: 4800000, guid: 7ebf1f15e5b03014d92704caa6c97e2e, type: 3} 12 | executionOrder: 0 13 | icon: {instanceID: 0} 14 | userData: 15 | assetBundleName: 16 | assetBundleVariant: 17 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b630145d59c3fd94192dee25504cefc7 3 | folderAsset: yes 4 | timeCreated: 1508941566 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/Shaders/Common.cginc: -------------------------------------------------------------------------------- 1 | // Pcx - Point cloud importer & renderer for Unity 2 | // https://github.com/keijiro/Pcx 3 | 4 | #define PCX_MAX_BRIGHTNESS 16 5 | 6 | uint PcxEncodeColor(half3 rgb) 7 | { 8 | half y = max(max(rgb.r, rgb.g), rgb.b); 9 | y = clamp(ceil(y * 255 / PCX_MAX_BRIGHTNESS), 1, 255); 10 | rgb *= 255 * 255 / (y * PCX_MAX_BRIGHTNESS); 11 | uint4 i = half4(rgb, y); 12 | return i.x | (i.y << 8) | (i.z << 16) | (i.w << 24); 13 | } 14 | 15 | half3 PcxDecodeColor(uint data) 16 | { 17 | half r = (data ) & 0xff; 18 | half g = (data >> 8) & 0xff; 19 | half b = (data >> 16) & 0xff; 20 | half a = (data >> 24) & 0xff; 21 | return half3(r, g, b) * a * PCX_MAX_BRIGHTNESS / (255 * 255); 22 | } 23 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/Shaders/Common.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53dbcdad165c00f48b5e7ab3b658b33c 3 | timeCreated: 1508924405 4 | licenseType: Pro 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/Shaders/Disk.cginc: -------------------------------------------------------------------------------- 1 | // Pcx - Point cloud importer & renderer for Unity 2 | // https://github.com/keijiro/Pcx 3 | 4 | #include "UnityCG.cginc" 5 | #include "Common.cginc" 6 | 7 | // Uniforms 8 | half4 _Tint; 9 | half _PointSize; 10 | float4x4 _Transform; 11 | 12 | #if _COMPUTE_BUFFER 13 | StructuredBuffer _PointBuffer; 14 | #endif 15 | 16 | // Vertex input attributes 17 | struct Attributes 18 | { 19 | #if _COMPUTE_BUFFER 20 | uint vertexID : SV_VertexID; 21 | #else 22 | float4 position : POSITION; 23 | half3 color : COLOR; 24 | #endif 25 | }; 26 | 27 | // Fragment varyings 28 | struct Varyings 29 | { 30 | float4 position : SV_POSITION; 31 | #if !PCX_SHADOW_CASTER 32 | half3 color : COLOR; 33 | UNITY_FOG_COORDS(0) 34 | #endif 35 | }; 36 | 37 | // Vertex phase 38 | Varyings Vertex(Attributes input) 39 | { 40 | // Retrieve vertex attributes. 41 | #if _COMPUTE_BUFFER 42 | float4 pt = _PointBuffer[input.vertexID]; 43 | float4 pos = mul(_Transform, float4(pt.xyz, 1)); 44 | half3 col = PcxDecodeColor(asuint(pt.w)); 45 | #else 46 | float4 pos = input.position; 47 | half3 col = input.color; 48 | #endif 49 | 50 | #if !PCX_SHADOW_CASTER 51 | // Color space convertion & applying tint 52 | #if UNITY_COLORSPACE_GAMMA 53 | col *= _Tint.rgb * 2; 54 | #else 55 | col *= LinearToGammaSpace(_Tint.rgb) * 2; 56 | col = GammaToLinearSpace(col); 57 | #endif 58 | #endif 59 | 60 | // Set vertex output. 61 | Varyings o; 62 | o.position = UnityObjectToClipPos(pos); 63 | #if !PCX_SHADOW_CASTER 64 | o.color = col; 65 | UNITY_TRANSFER_FOG(o, o.position); 66 | #endif 67 | return o; 68 | } 69 | 70 | // Geometry phase 71 | [maxvertexcount(36)] 72 | void Geometry(point Varyings input[1], inout TriangleStream outStream) 73 | { 74 | float4 origin = input[0].position; 75 | float2 extent = abs(UNITY_MATRIX_P._11_22 * _PointSize); 76 | 77 | // Copy the basic information. 78 | Varyings o = input[0]; 79 | 80 | // Determine the number of slices based on the radius of the 81 | // point on the screen. 82 | float radius = extent.y / origin.w * _ScreenParams.y; 83 | uint slices = min((radius + 1) / 5, 4) + 2; 84 | 85 | // Slightly enlarge quad points to compensate area reduction. 86 | // Hopefully this line would be complied without branch. 87 | if (slices == 2) extent *= 1.2; 88 | 89 | // Top vertex 90 | o.position.y = origin.y + extent.y; 91 | o.position.xzw = origin.xzw; 92 | outStream.Append(o); 93 | 94 | UNITY_LOOP for (uint i = 1; i < slices; i++) 95 | { 96 | float sn, cs; 97 | sincos(UNITY_PI / slices * i, sn, cs); 98 | 99 | // Right side vertex 100 | o.position.xy = origin.xy + extent * float2(sn, cs); 101 | outStream.Append(o); 102 | 103 | // Left side vertex 104 | o.position.x = origin.x - extent.x * sn; 105 | outStream.Append(o); 106 | } 107 | 108 | // Bottom vertex 109 | o.position.x = origin.x; 110 | o.position.y = origin.y - extent.y; 111 | outStream.Append(o); 112 | 113 | outStream.RestartStrip(); 114 | } 115 | 116 | half4 Fragment(Varyings input) : SV_Target 117 | { 118 | #if PCX_SHADOW_CASTER 119 | return 0; 120 | #else 121 | half4 c = half4(input.color, _Tint.a); 122 | UNITY_APPLY_FOG(input.fogCoord, c); 123 | return c; 124 | #endif 125 | } 126 | 127 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/Shaders/Disk.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8e5cac6daf67de449b3cfd878a77876 3 | timeCreated: 1509292824 4 | licenseType: Pro 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/Shaders/Disk.shader: -------------------------------------------------------------------------------- 1 | // Pcx - Point cloud importer & renderer for Unity 2 | // https://github.com/keijiro/Pcx 3 | 4 | Shader "Point Cloud/Disk" 5 | { 6 | Properties 7 | { 8 | _Tint("Tint", Color) = (0.5, 0.5, 0.5, 1) 9 | _PointSize("Point Size", Float) = 0.05 10 | } 11 | SubShader 12 | { 13 | Tags { "RenderType"="Opaque" } 14 | Cull Off 15 | Pass 16 | { 17 | Tags { "LightMode"="ForwardBase" } 18 | CGPROGRAM 19 | #pragma vertex Vertex 20 | #pragma geometry Geometry 21 | #pragma fragment Fragment 22 | #pragma multi_compile_fog 23 | #pragma multi_compile _ UNITY_COLORSPACE_GAMMA 24 | #pragma multi_compile _ _COMPUTE_BUFFER 25 | #include "Disk.cginc" 26 | ENDCG 27 | } 28 | Pass 29 | { 30 | Tags { "LightMode"="ShadowCaster" } 31 | CGPROGRAM 32 | #pragma vertex Vertex 33 | #pragma geometry Geometry 34 | #pragma fragment Fragment 35 | #pragma multi_compile _ _COMPUTE_BUFFER 36 | #define PCX_SHADOW_CASTER 1 37 | #include "Disk.cginc" 38 | ENDCG 39 | } 40 | } 41 | CustomEditor "Pcx.DiskMaterialInspector" 42 | } 43 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/Shaders/Disk.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ebf1f15e5b03014d92704caa6c97e2e 3 | timeCreated: 1508921654 4 | licenseType: Pro 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/Shaders/Point.shader: -------------------------------------------------------------------------------- 1 | // Pcx - Point cloud importer & renderer for Unity 2 | // https://github.com/keijiro/Pcx 3 | 4 | Shader "Point Cloud/Point" 5 | { 6 | Properties 7 | { 8 | _Tint("Tint", Color) = (0.5, 0.5, 0.5, 1) 9 | _PointSize("Point Size", Float) = 0.05 10 | [Toggle] _Distance("Apply Distance", Float) = 1 11 | } 12 | SubShader 13 | { 14 | Tags { "RenderType"="Opaque" } 15 | Cull off 16 | Pass 17 | { 18 | CGPROGRAM 19 | 20 | #pragma vertex Vertex 21 | #pragma fragment Fragment 22 | 23 | #pragma multi_compile_fog 24 | #pragma multi_compile _ UNITY_COLORSPACE_GAMMA 25 | #pragma multi_compile _ _DISTANCE_ON 26 | #pragma multi_compile _ _COMPUTE_BUFFER 27 | 28 | #include "UnityCG.cginc" 29 | #include "Common.cginc" 30 | 31 | struct Attributes 32 | { 33 | float4 position : POSITION; 34 | half3 color : COLOR; 35 | }; 36 | 37 | struct Varyings 38 | { 39 | float4 position : SV_Position; 40 | half3 color : COLOR; 41 | half psize : PSIZE; 42 | UNITY_FOG_COORDS(0) 43 | }; 44 | 45 | half4 _Tint; 46 | float4x4 _Transform; 47 | half _PointSize; 48 | 49 | #if _COMPUTE_BUFFER 50 | StructuredBuffer _PointBuffer; 51 | #endif 52 | 53 | #if _COMPUTE_BUFFER 54 | Varyings Vertex(uint vid : SV_VertexID) 55 | #else 56 | Varyings Vertex(Attributes input) 57 | #endif 58 | { 59 | #if _COMPUTE_BUFFER 60 | float4 pt = _PointBuffer[vid]; 61 | float4 pos = mul(_Transform, float4(pt.xyz, 1)); 62 | half3 col = PcxDecodeColor(asuint(pt.w)); 63 | #else 64 | float4 pos = input.position; 65 | half3 col = input.color; 66 | #endif 67 | 68 | #ifdef UNITY_COLORSPACE_GAMMA 69 | col *= _Tint.rgb * 2; 70 | #else 71 | col *= LinearToGammaSpace(_Tint.rgb) * 2; 72 | col = GammaToLinearSpace(col); 73 | #endif 74 | 75 | Varyings o; 76 | o.position = UnityObjectToClipPos(pos); 77 | o.color = col; 78 | #ifdef _DISTANCE_ON 79 | o.psize = _PointSize / o.position.w * _ScreenParams.y; 80 | #else 81 | o.psize = _PointSize; 82 | #endif 83 | UNITY_TRANSFER_FOG(o, o.position); 84 | return o; 85 | } 86 | 87 | half4 Fragment(Varyings input) : SV_Target 88 | { 89 | half4 c = half4(input.color, _Tint.a); 90 | UNITY_APPLY_FOG(input.fogCoord, c); 91 | return c; 92 | } 93 | 94 | ENDCG 95 | } 96 | } 97 | CustomEditor "Pcx.PointMaterialInspector" 98 | } 99 | -------------------------------------------------------------------------------- /Assets/Pcx/Runtime/Shaders/Point.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1baec256dca7c1642b87d05510e75a3f 3 | timeCreated: 1508905738 4 | licenseType: Pro 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/RotateObj.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class RotateObj : MonoBehaviour 6 | { 7 | public float speed = 1; 8 | public int direction = 0; 9 | 10 | private Vector3 axis; 11 | 12 | void Start() 13 | { 14 | if (direction == 0) 15 | { 16 | axis = Vector3.right; 17 | } else 18 | { 19 | axis = Vector3.up; 20 | } 21 | } 22 | 23 | // Update is called once per frame 24 | void Update() 25 | { 26 | transform.Rotate(axis * (speed * Time.deltaTime)); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Assets/RotateObj.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c709940ff56c2a046b19162358b87444 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d691f765434c48448fe7955b479c59a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/MeshRender.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 246522a6e51e90c4b90c8903646dcaf9 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/MixedReality.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: 11 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: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 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_UseShadowmask: 1 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 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1 &86975700 125 | GameObject: 126 | m_ObjectHideFlags: 0 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInstance: {fileID: 0} 129 | m_PrefabAsset: {fileID: 0} 130 | serializedVersion: 6 131 | m_Component: 132 | - component: {fileID: 86975703} 133 | - component: {fileID: 86975702} 134 | - component: {fileID: 86975701} 135 | m_Layer: 0 136 | m_Name: Sphere 137 | m_TagString: Untagged 138 | m_Icon: {fileID: 0} 139 | m_NavMeshLayer: 0 140 | m_StaticEditorFlags: 0 141 | m_IsActive: 1 142 | --- !u!23 &86975701 143 | MeshRenderer: 144 | m_ObjectHideFlags: 0 145 | m_CorrespondingSourceObject: {fileID: 0} 146 | m_PrefabInstance: {fileID: 0} 147 | m_PrefabAsset: {fileID: 0} 148 | m_GameObject: {fileID: 86975700} 149 | m_Enabled: 1 150 | m_CastShadows: 1 151 | m_ReceiveShadows: 1 152 | m_DynamicOccludee: 1 153 | m_MotionVectors: 1 154 | m_LightProbeUsage: 1 155 | m_ReflectionProbeUsage: 1 156 | m_RayTracingMode: 2 157 | m_RenderingLayerMask: 1 158 | m_RendererPriority: 0 159 | m_Materials: 160 | - {fileID: 2100000, guid: f703a17dc437ce84ca343104ced1bb9b, type: 2} 161 | m_StaticBatchInfo: 162 | firstSubMesh: 0 163 | subMeshCount: 0 164 | m_StaticBatchRoot: {fileID: 0} 165 | m_ProbeAnchor: {fileID: 0} 166 | m_LightProbeVolumeOverride: {fileID: 0} 167 | m_ScaleInLightmap: 1 168 | m_ReceiveGI: 1 169 | m_PreserveUVs: 0 170 | m_IgnoreNormalsForChartDetection: 0 171 | m_ImportantGI: 0 172 | m_StitchLightmapSeams: 1 173 | m_SelectedEditorRenderState: 3 174 | m_MinimumChartSize: 4 175 | m_AutoUVMaxDistance: 0.5 176 | m_AutoUVMaxAngle: 89 177 | m_LightmapParameters: {fileID: 0} 178 | m_SortingLayerID: 0 179 | m_SortingLayer: 0 180 | m_SortingOrder: 0 181 | --- !u!33 &86975702 182 | MeshFilter: 183 | m_ObjectHideFlags: 0 184 | m_CorrespondingSourceObject: {fileID: 0} 185 | m_PrefabInstance: {fileID: 0} 186 | m_PrefabAsset: {fileID: 0} 187 | m_GameObject: {fileID: 86975700} 188 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 189 | --- !u!4 &86975703 190 | Transform: 191 | m_ObjectHideFlags: 0 192 | m_CorrespondingSourceObject: {fileID: 0} 193 | m_PrefabInstance: {fileID: 0} 194 | m_PrefabAsset: {fileID: 0} 195 | m_GameObject: {fileID: 86975700} 196 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 197 | m_LocalPosition: {x: 0, y: 0, z: -5} 198 | m_LocalScale: {x: 2, y: 2, z: 2} 199 | m_Children: [] 200 | m_Father: {fileID: 0} 201 | m_RootOrder: 3 202 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 203 | --- !u!1 &119160521 204 | GameObject: 205 | m_ObjectHideFlags: 0 206 | m_CorrespondingSourceObject: {fileID: 0} 207 | m_PrefabInstance: {fileID: 0} 208 | m_PrefabAsset: {fileID: 0} 209 | serializedVersion: 6 210 | m_Component: 211 | - component: {fileID: 119160524} 212 | - component: {fileID: 119160523} 213 | - component: {fileID: 119160522} 214 | - component: {fileID: 119160525} 215 | m_Layer: 0 216 | m_Name: Main Camera 217 | m_TagString: MainCamera 218 | m_Icon: {fileID: 0} 219 | m_NavMeshLayer: 0 220 | m_StaticEditorFlags: 0 221 | m_IsActive: 1 222 | --- !u!81 &119160522 223 | AudioListener: 224 | m_ObjectHideFlags: 0 225 | m_CorrespondingSourceObject: {fileID: 0} 226 | m_PrefabInstance: {fileID: 0} 227 | m_PrefabAsset: {fileID: 0} 228 | m_GameObject: {fileID: 119160521} 229 | m_Enabled: 1 230 | --- !u!20 &119160523 231 | Camera: 232 | m_ObjectHideFlags: 0 233 | m_CorrespondingSourceObject: {fileID: 0} 234 | m_PrefabInstance: {fileID: 0} 235 | m_PrefabAsset: {fileID: 0} 236 | m_GameObject: {fileID: 119160521} 237 | m_Enabled: 1 238 | serializedVersion: 2 239 | m_ClearFlags: 1 240 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 241 | m_projectionMatrixMode: 2 242 | m_GateFitMode: 2 243 | m_FOVAxisMode: 0 244 | m_SensorSize: {x: 504, y: 378} 245 | m_LensShift: {x: 0, y: 0} 246 | m_FocalLength: 421 247 | m_NormalizedViewPortRect: 248 | serializedVersion: 2 249 | x: 0 250 | y: 0 251 | width: 1 252 | height: 1 253 | near clip plane: 0.3 254 | far clip plane: 1000 255 | field of view: 48.353596 256 | orthographic: 0 257 | orthographic size: 5 258 | m_Depth: -1 259 | m_CullingMask: 260 | serializedVersion: 2 261 | m_Bits: 4294967295 262 | m_RenderingPath: 3 263 | m_TargetTexture: {fileID: 0} 264 | m_TargetDisplay: 0 265 | m_TargetEye: 3 266 | m_HDR: 1 267 | m_AllowMSAA: 1 268 | m_AllowDynamicResolution: 0 269 | m_ForceIntoRT: 0 270 | m_OcclusionCulling: 1 271 | m_StereoConvergence: 10 272 | m_StereoSeparation: 0.022 273 | --- !u!4 &119160524 274 | Transform: 275 | m_ObjectHideFlags: 0 276 | m_CorrespondingSourceObject: {fileID: 0} 277 | m_PrefabInstance: {fileID: 0} 278 | m_PrefabAsset: {fileID: 0} 279 | m_GameObject: {fileID: 119160521} 280 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 281 | m_LocalPosition: {x: 0, y: 0, z: -10} 282 | m_LocalScale: {x: 1, y: 1, z: 1} 283 | m_Children: [] 284 | m_Father: {fileID: 0} 285 | m_RootOrder: 0 286 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 287 | --- !u!114 &119160525 288 | MonoBehaviour: 289 | m_ObjectHideFlags: 0 290 | m_CorrespondingSourceObject: {fileID: 0} 291 | m_PrefabInstance: {fileID: 0} 292 | m_PrefabAsset: {fileID: 0} 293 | m_GameObject: {fileID: 119160521} 294 | m_Enabled: 1 295 | m_EditorHideFlags: 0 296 | m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} 297 | m_Name: 298 | m_EditorClassIdentifier: 299 | m_RenderShadows: 1 300 | m_RequiresDepthTextureOption: 2 301 | m_RequiresOpaqueTextureOption: 2 302 | m_CameraType: 0 303 | m_Cameras: [] 304 | m_RendererIndex: -1 305 | m_VolumeLayerMask: 306 | serializedVersion: 2 307 | m_Bits: 1 308 | m_VolumeTrigger: {fileID: 0} 309 | m_RenderPostProcessing: 0 310 | m_Antialiasing: 0 311 | m_AntialiasingQuality: 2 312 | m_StopNaN: 0 313 | m_Dithering: 0 314 | m_ClearDepth: 1 315 | m_RequiresDepthTexture: 0 316 | m_RequiresColorTexture: 0 317 | m_Version: 2 318 | --- !u!1 &231745995 319 | GameObject: 320 | m_ObjectHideFlags: 0 321 | m_CorrespondingSourceObject: {fileID: 0} 322 | m_PrefabInstance: {fileID: 0} 323 | m_PrefabAsset: {fileID: 0} 324 | serializedVersion: 6 325 | m_Component: 326 | - component: {fileID: 231745999} 327 | - component: {fileID: 231745998} 328 | - component: {fileID: 231745997} 329 | - component: {fileID: 231745996} 330 | m_Layer: 0 331 | m_Name: Quad 332 | m_TagString: Untagged 333 | m_Icon: {fileID: 0} 334 | m_NavMeshLayer: 0 335 | m_StaticEditorFlags: 0 336 | m_IsActive: 1 337 | --- !u!114 &231745996 338 | MonoBehaviour: 339 | m_ObjectHideFlags: 0 340 | m_CorrespondingSourceObject: {fileID: 0} 341 | m_PrefabInstance: {fileID: 0} 342 | m_PrefabAsset: {fileID: 0} 343 | m_GameObject: {fileID: 231745995} 344 | m_Enabled: 1 345 | m_EditorHideFlags: 0 346 | m_Script: {fileID: 11500000, guid: 69478877268193343b98a2bb86276199, type: 3} 347 | m_Name: 348 | m_EditorClassIdentifier: 349 | cam: {fileID: 119160523} 350 | width: 504 351 | height: 378 352 | image_paths: 353 | - 000.png 354 | - 001.png 355 | depth_paths: 356 | - depth_000 357 | - depth_001 358 | names: 359 | - triceratops 360 | - t-rex 361 | cube: {fileID: 86975700} 362 | --- !u!23 &231745997 363 | MeshRenderer: 364 | m_ObjectHideFlags: 0 365 | m_CorrespondingSourceObject: {fileID: 0} 366 | m_PrefabInstance: {fileID: 0} 367 | m_PrefabAsset: {fileID: 0} 368 | m_GameObject: {fileID: 231745995} 369 | m_Enabled: 1 370 | m_CastShadows: 1 371 | m_ReceiveShadows: 1 372 | m_DynamicOccludee: 1 373 | m_MotionVectors: 1 374 | m_LightProbeUsage: 1 375 | m_ReflectionProbeUsage: 1 376 | m_RayTracingMode: 2 377 | m_RenderingLayerMask: 1 378 | m_RendererPriority: 0 379 | m_Materials: 380 | - {fileID: 2100000, guid: 9aae056a6df592f4a94d7f54e7d2bcf6, type: 2} 381 | m_StaticBatchInfo: 382 | firstSubMesh: 0 383 | subMeshCount: 0 384 | m_StaticBatchRoot: {fileID: 0} 385 | m_ProbeAnchor: {fileID: 0} 386 | m_LightProbeVolumeOverride: {fileID: 0} 387 | m_ScaleInLightmap: 1 388 | m_ReceiveGI: 1 389 | m_PreserveUVs: 0 390 | m_IgnoreNormalsForChartDetection: 0 391 | m_ImportantGI: 0 392 | m_StitchLightmapSeams: 1 393 | m_SelectedEditorRenderState: 3 394 | m_MinimumChartSize: 4 395 | m_AutoUVMaxDistance: 0.5 396 | m_AutoUVMaxAngle: 89 397 | m_LightmapParameters: {fileID: 0} 398 | m_SortingLayerID: 0 399 | m_SortingLayer: 0 400 | m_SortingOrder: 0 401 | --- !u!33 &231745998 402 | MeshFilter: 403 | m_ObjectHideFlags: 0 404 | m_CorrespondingSourceObject: {fileID: 0} 405 | m_PrefabInstance: {fileID: 0} 406 | m_PrefabAsset: {fileID: 0} 407 | m_GameObject: {fileID: 231745995} 408 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 409 | --- !u!4 &231745999 410 | Transform: 411 | m_ObjectHideFlags: 0 412 | m_CorrespondingSourceObject: {fileID: 0} 413 | m_PrefabInstance: {fileID: 0} 414 | m_PrefabAsset: {fileID: 0} 415 | m_GameObject: {fileID: 231745995} 416 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 417 | m_LocalPosition: {x: 0, y: 0, z: -4.1} 418 | m_LocalScale: {x: 5.04, y: 3.78, z: 1} 419 | m_Children: [] 420 | m_Father: {fileID: 0} 421 | m_RootOrder: 2 422 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 423 | --- !u!1 &596391191 424 | GameObject: 425 | m_ObjectHideFlags: 0 426 | m_CorrespondingSourceObject: {fileID: 0} 427 | m_PrefabInstance: {fileID: 0} 428 | m_PrefabAsset: {fileID: 0} 429 | serializedVersion: 6 430 | m_Component: 431 | - component: {fileID: 596391193} 432 | - component: {fileID: 596391192} 433 | m_Layer: 0 434 | m_Name: Directional Light 435 | m_TagString: Untagged 436 | m_Icon: {fileID: 0} 437 | m_NavMeshLayer: 0 438 | m_StaticEditorFlags: 0 439 | m_IsActive: 1 440 | --- !u!108 &596391192 441 | Light: 442 | m_ObjectHideFlags: 0 443 | m_CorrespondingSourceObject: {fileID: 0} 444 | m_PrefabInstance: {fileID: 0} 445 | m_PrefabAsset: {fileID: 0} 446 | m_GameObject: {fileID: 596391191} 447 | m_Enabled: 1 448 | serializedVersion: 10 449 | m_Type: 1 450 | m_Shape: 0 451 | m_Color: {r: 1, g: 1, b: 1, a: 1} 452 | m_Intensity: 1 453 | m_Range: 10 454 | m_SpotAngle: 30 455 | m_InnerSpotAngle: 21.80208 456 | m_CookieSize: 10 457 | m_Shadows: 458 | m_Type: 1 459 | m_Resolution: -1 460 | m_CustomResolution: -1 461 | m_Strength: 1 462 | m_Bias: 0.05 463 | m_NormalBias: 0.4 464 | m_NearPlane: 0.2 465 | m_CullingMatrixOverride: 466 | e00: 1 467 | e01: 0 468 | e02: 0 469 | e03: 0 470 | e10: 0 471 | e11: 1 472 | e12: 0 473 | e13: 0 474 | e20: 0 475 | e21: 0 476 | e22: 1 477 | e23: 0 478 | e30: 0 479 | e31: 0 480 | e32: 0 481 | e33: 1 482 | m_UseCullingMatrixOverride: 0 483 | m_Cookie: {fileID: 0} 484 | m_DrawHalo: 0 485 | m_Flare: {fileID: 0} 486 | m_RenderMode: 0 487 | m_CullingMask: 488 | serializedVersion: 2 489 | m_Bits: 4294967295 490 | m_RenderingLayerMask: 1 491 | m_Lightmapping: 4 492 | m_LightShadowCasterMode: 0 493 | m_AreaSize: {x: 1, y: 1} 494 | m_BounceIntensity: 1 495 | m_ColorTemperature: 6570 496 | m_UseColorTemperature: 0 497 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 498 | m_UseBoundingSphereOverride: 0 499 | m_ShadowRadius: 0 500 | m_ShadowAngle: 0 501 | --- !u!4 &596391193 502 | Transform: 503 | m_ObjectHideFlags: 0 504 | m_CorrespondingSourceObject: {fileID: 0} 505 | m_PrefabInstance: {fileID: 0} 506 | m_PrefabAsset: {fileID: 0} 507 | m_GameObject: {fileID: 596391191} 508 | m_LocalRotation: {x: 0.17364816, y: 0, z: 0, w: 0.9848078} 509 | m_LocalPosition: {x: 0, y: 1.75, z: -18.73} 510 | m_LocalScale: {x: 1, y: 1, z: 1} 511 | m_Children: [] 512 | m_Father: {fileID: 0} 513 | m_RootOrder: 1 514 | m_LocalEulerAnglesHint: {x: 20, y: 0, z: 0} 515 | --- !u!1 &632946464 516 | GameObject: 517 | m_ObjectHideFlags: 0 518 | m_CorrespondingSourceObject: {fileID: 0} 519 | m_PrefabInstance: {fileID: 0} 520 | m_PrefabAsset: {fileID: 0} 521 | serializedVersion: 6 522 | m_Component: 523 | - component: {fileID: 632946468} 524 | - component: {fileID: 632946467} 525 | - component: {fileID: 632946466} 526 | - component: {fileID: 632946465} 527 | m_Layer: 0 528 | m_Name: Plane 529 | m_TagString: Untagged 530 | m_Icon: {fileID: 0} 531 | m_NavMeshLayer: 0 532 | m_StaticEditorFlags: 0 533 | m_IsActive: 0 534 | --- !u!64 &632946465 535 | MeshCollider: 536 | m_ObjectHideFlags: 0 537 | m_CorrespondingSourceObject: {fileID: 0} 538 | m_PrefabInstance: {fileID: 0} 539 | m_PrefabAsset: {fileID: 0} 540 | m_GameObject: {fileID: 632946464} 541 | m_Material: {fileID: 0} 542 | m_IsTrigger: 0 543 | m_Enabled: 1 544 | serializedVersion: 4 545 | m_Convex: 0 546 | m_CookingOptions: 30 547 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 548 | --- !u!23 &632946466 549 | MeshRenderer: 550 | m_ObjectHideFlags: 0 551 | m_CorrespondingSourceObject: {fileID: 0} 552 | m_PrefabInstance: {fileID: 0} 553 | m_PrefabAsset: {fileID: 0} 554 | m_GameObject: {fileID: 632946464} 555 | m_Enabled: 1 556 | m_CastShadows: 1 557 | m_ReceiveShadows: 1 558 | m_DynamicOccludee: 1 559 | m_MotionVectors: 1 560 | m_LightProbeUsage: 1 561 | m_ReflectionProbeUsage: 1 562 | m_RayTracingMode: 2 563 | m_RenderingLayerMask: 1 564 | m_RendererPriority: 0 565 | m_Materials: 566 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 567 | m_StaticBatchInfo: 568 | firstSubMesh: 0 569 | subMeshCount: 0 570 | m_StaticBatchRoot: {fileID: 0} 571 | m_ProbeAnchor: {fileID: 0} 572 | m_LightProbeVolumeOverride: {fileID: 0} 573 | m_ScaleInLightmap: 1 574 | m_ReceiveGI: 1 575 | m_PreserveUVs: 0 576 | m_IgnoreNormalsForChartDetection: 0 577 | m_ImportantGI: 0 578 | m_StitchLightmapSeams: 1 579 | m_SelectedEditorRenderState: 3 580 | m_MinimumChartSize: 4 581 | m_AutoUVMaxDistance: 0.5 582 | m_AutoUVMaxAngle: 89 583 | m_LightmapParameters: {fileID: 0} 584 | m_SortingLayerID: 0 585 | m_SortingLayer: 0 586 | m_SortingOrder: 0 587 | --- !u!33 &632946467 588 | MeshFilter: 589 | m_ObjectHideFlags: 0 590 | m_CorrespondingSourceObject: {fileID: 0} 591 | m_PrefabInstance: {fileID: 0} 592 | m_PrefabAsset: {fileID: 0} 593 | m_GameObject: {fileID: 632946464} 594 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 595 | --- !u!4 &632946468 596 | Transform: 597 | m_ObjectHideFlags: 0 598 | m_CorrespondingSourceObject: {fileID: 0} 599 | m_PrefabInstance: {fileID: 0} 600 | m_PrefabAsset: {fileID: 0} 601 | m_GameObject: {fileID: 632946464} 602 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 603 | m_LocalPosition: {x: 0, y: -4.08, z: 0} 604 | m_LocalScale: {x: 10, y: 10, z: 10} 605 | m_Children: [] 606 | m_Father: {fileID: 0} 607 | m_RootOrder: 4 608 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 609 | -------------------------------------------------------------------------------- /Assets/Scenes/MixedReality.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b58e4d7882a3144b88ad8c1c0d70e0d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/VolumeRender.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: 11 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: 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: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 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_UseShadowmask: 1 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 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1 &255321210 125 | GameObject: 126 | m_ObjectHideFlags: 0 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInstance: {fileID: 0} 129 | m_PrefabAsset: {fileID: 0} 130 | serializedVersion: 6 131 | m_Component: 132 | - component: {fileID: 255321212} 133 | - component: {fileID: 255321211} 134 | m_Layer: 0 135 | m_Name: Directional Light 136 | m_TagString: Untagged 137 | m_Icon: {fileID: 0} 138 | m_NavMeshLayer: 0 139 | m_StaticEditorFlags: 0 140 | m_IsActive: 1 141 | --- !u!108 &255321211 142 | Light: 143 | m_ObjectHideFlags: 0 144 | m_CorrespondingSourceObject: {fileID: 0} 145 | m_PrefabInstance: {fileID: 0} 146 | m_PrefabAsset: {fileID: 0} 147 | m_GameObject: {fileID: 255321210} 148 | m_Enabled: 1 149 | serializedVersion: 10 150 | m_Type: 1 151 | m_Shape: 0 152 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 153 | m_Intensity: 1 154 | m_Range: 10 155 | m_SpotAngle: 30 156 | m_InnerSpotAngle: 21.80208 157 | m_CookieSize: 10 158 | m_Shadows: 159 | m_Type: 2 160 | m_Resolution: -1 161 | m_CustomResolution: -1 162 | m_Strength: 1 163 | m_Bias: 0.05 164 | m_NormalBias: 0.4 165 | m_NearPlane: 0.2 166 | m_CullingMatrixOverride: 167 | e00: 1 168 | e01: 0 169 | e02: 0 170 | e03: 0 171 | e10: 0 172 | e11: 1 173 | e12: 0 174 | e13: 0 175 | e20: 0 176 | e21: 0 177 | e22: 1 178 | e23: 0 179 | e30: 0 180 | e31: 0 181 | e32: 0 182 | e33: 1 183 | m_UseCullingMatrixOverride: 0 184 | m_Cookie: {fileID: 0} 185 | m_DrawHalo: 0 186 | m_Flare: {fileID: 0} 187 | m_RenderMode: 0 188 | m_CullingMask: 189 | serializedVersion: 2 190 | m_Bits: 4294967295 191 | m_RenderingLayerMask: 1 192 | m_Lightmapping: 4 193 | m_LightShadowCasterMode: 0 194 | m_AreaSize: {x: 1, y: 1} 195 | m_BounceIntensity: 1 196 | m_ColorTemperature: 6570 197 | m_UseColorTemperature: 0 198 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 199 | m_UseBoundingSphereOverride: 0 200 | m_ShadowRadius: 0 201 | m_ShadowAngle: 0 202 | --- !u!4 &255321212 203 | Transform: 204 | m_ObjectHideFlags: 0 205 | m_CorrespondingSourceObject: {fileID: 0} 206 | m_PrefabInstance: {fileID: 0} 207 | m_PrefabAsset: {fileID: 0} 208 | m_GameObject: {fileID: 255321210} 209 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 210 | m_LocalPosition: {x: 0, y: 3, z: 0} 211 | m_LocalScale: {x: 1, y: 1, z: 1} 212 | m_Children: [] 213 | m_Father: {fileID: 0} 214 | m_RootOrder: 1 215 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 216 | --- !u!1 &305937862 217 | GameObject: 218 | m_ObjectHideFlags: 0 219 | m_CorrespondingSourceObject: {fileID: 0} 220 | m_PrefabInstance: {fileID: 0} 221 | m_PrefabAsset: {fileID: 0} 222 | serializedVersion: 6 223 | m_Component: 224 | - component: {fileID: 305937865} 225 | - component: {fileID: 305937864} 226 | - component: {fileID: 305937863} 227 | - component: {fileID: 305937866} 228 | - component: {fileID: 305937868} 229 | - component: {fileID: 305937867} 230 | m_Layer: 0 231 | m_Name: Main Camera 232 | m_TagString: MainCamera 233 | m_Icon: {fileID: 0} 234 | m_NavMeshLayer: 0 235 | m_StaticEditorFlags: 0 236 | m_IsActive: 1 237 | --- !u!81 &305937863 238 | AudioListener: 239 | m_ObjectHideFlags: 0 240 | m_CorrespondingSourceObject: {fileID: 0} 241 | m_PrefabInstance: {fileID: 0} 242 | m_PrefabAsset: {fileID: 0} 243 | m_GameObject: {fileID: 305937862} 244 | m_Enabled: 1 245 | --- !u!20 &305937864 246 | Camera: 247 | m_ObjectHideFlags: 0 248 | m_CorrespondingSourceObject: {fileID: 0} 249 | m_PrefabInstance: {fileID: 0} 250 | m_PrefabAsset: {fileID: 0} 251 | m_GameObject: {fileID: 305937862} 252 | m_Enabled: 1 253 | serializedVersion: 2 254 | m_ClearFlags: 1 255 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 256 | m_projectionMatrixMode: 1 257 | m_GateFitMode: 2 258 | m_FOVAxisMode: 0 259 | m_SensorSize: {x: 36, y: 24} 260 | m_LensShift: {x: 0, y: 0} 261 | m_FocalLength: 50 262 | m_NormalizedViewPortRect: 263 | serializedVersion: 2 264 | x: 0 265 | y: 0 266 | width: 1 267 | height: 1 268 | near clip plane: 0.3 269 | far clip plane: 1000 270 | field of view: 60 271 | orthographic: 0 272 | orthographic size: 5 273 | m_Depth: -1 274 | m_CullingMask: 275 | serializedVersion: 2 276 | m_Bits: 4294967295 277 | m_RenderingPath: -1 278 | m_TargetTexture: {fileID: 0} 279 | m_TargetDisplay: 0 280 | m_TargetEye: 3 281 | m_HDR: 1 282 | m_AllowMSAA: 1 283 | m_AllowDynamicResolution: 0 284 | m_ForceIntoRT: 0 285 | m_OcclusionCulling: 1 286 | m_StereoConvergence: 10 287 | m_StereoSeparation: 0.022 288 | --- !u!4 &305937865 289 | Transform: 290 | m_ObjectHideFlags: 0 291 | m_CorrespondingSourceObject: {fileID: 0} 292 | m_PrefabInstance: {fileID: 0} 293 | m_PrefabAsset: {fileID: 0} 294 | m_GameObject: {fileID: 305937862} 295 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 296 | m_LocalPosition: {x: 0, y: 0, z: -1.5} 297 | m_LocalScale: {x: 1, y: 1, z: 1} 298 | m_Children: [] 299 | m_Father: {fileID: 0} 300 | m_RootOrder: 0 301 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 302 | --- !u!114 &305937866 303 | MonoBehaviour: 304 | m_ObjectHideFlags: 0 305 | m_CorrespondingSourceObject: {fileID: 0} 306 | m_PrefabInstance: {fileID: 0} 307 | m_PrefabAsset: {fileID: 0} 308 | m_GameObject: {fileID: 305937862} 309 | m_Enabled: 0 310 | m_EditorHideFlags: 0 311 | m_Script: {fileID: 11500000, guid: 82b581ee78e77094480f113700170ead, type: 3} 312 | m_Name: 313 | m_EditorClassIdentifier: 314 | speed: 1.5 315 | radius: 0.2 316 | target: {fileID: 0} 317 | --- !u!114 &305937867 318 | MonoBehaviour: 319 | m_ObjectHideFlags: 0 320 | m_CorrespondingSourceObject: {fileID: 0} 321 | m_PrefabInstance: {fileID: 0} 322 | m_PrefabAsset: {fileID: 0} 323 | m_GameObject: {fileID: 305937862} 324 | m_Enabled: 1 325 | m_EditorHideFlags: 0 326 | m_Script: {fileID: 11500000, guid: cdca38a4a98a9684abed86364698de50, type: 3} 327 | m_Name: 328 | m_EditorClassIdentifier: 329 | lookSpeedH: 2 330 | lookSpeedV: 2 331 | zoomSpeed: 2 332 | dragSpeed: 6 333 | --- !u!114 &305937868 334 | MonoBehaviour: 335 | m_ObjectHideFlags: 0 336 | m_CorrespondingSourceObject: {fileID: 0} 337 | m_PrefabInstance: {fileID: 0} 338 | m_PrefabAsset: {fileID: 0} 339 | m_GameObject: {fileID: 305937862} 340 | m_Enabled: 1 341 | m_EditorHideFlags: 0 342 | m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} 343 | m_Name: 344 | m_EditorClassIdentifier: 345 | m_RenderShadows: 1 346 | m_RequiresDepthTextureOption: 2 347 | m_RequiresOpaqueTextureOption: 2 348 | m_CameraType: 0 349 | m_Cameras: [] 350 | m_RendererIndex: -1 351 | m_VolumeLayerMask: 352 | serializedVersion: 2 353 | m_Bits: 1 354 | m_VolumeTrigger: {fileID: 0} 355 | m_RenderPostProcessing: 0 356 | m_Antialiasing: 0 357 | m_AntialiasingQuality: 2 358 | m_StopNaN: 0 359 | m_Dithering: 0 360 | m_ClearDepth: 1 361 | m_RequiresDepthTexture: 0 362 | m_RequiresColorTexture: 0 363 | m_Version: 2 364 | --- !u!1 &371085527 365 | GameObject: 366 | m_ObjectHideFlags: 0 367 | m_CorrespondingSourceObject: {fileID: 0} 368 | m_PrefabInstance: {fileID: 0} 369 | m_PrefabAsset: {fileID: 0} 370 | serializedVersion: 6 371 | m_Component: 372 | - component: {fileID: 371085531} 373 | - component: {fileID: 371085530} 374 | - component: {fileID: 371085529} 375 | - component: {fileID: 371085532} 376 | - component: {fileID: 371085533} 377 | m_Layer: 0 378 | m_Name: smallObj 379 | m_TagString: Untagged 380 | m_Icon: {fileID: 0} 381 | m_NavMeshLayer: 0 382 | m_StaticEditorFlags: 0 383 | m_IsActive: 1 384 | --- !u!23 &371085529 385 | MeshRenderer: 386 | m_ObjectHideFlags: 0 387 | m_CorrespondingSourceObject: {fileID: 0} 388 | m_PrefabInstance: {fileID: 0} 389 | m_PrefabAsset: {fileID: 0} 390 | m_GameObject: {fileID: 371085527} 391 | m_Enabled: 1 392 | m_CastShadows: 1 393 | m_ReceiveShadows: 1 394 | m_DynamicOccludee: 1 395 | m_MotionVectors: 1 396 | m_LightProbeUsage: 1 397 | m_ReflectionProbeUsage: 1 398 | m_RayTracingMode: 2 399 | m_RenderingLayerMask: 1 400 | m_RendererPriority: 0 401 | m_Materials: 402 | - {fileID: 2100000, guid: 92694401378802e4e9dc8a61983f01c4, type: 2} 403 | m_StaticBatchInfo: 404 | firstSubMesh: 0 405 | subMeshCount: 0 406 | m_StaticBatchRoot: {fileID: 0} 407 | m_ProbeAnchor: {fileID: 0} 408 | m_LightProbeVolumeOverride: {fileID: 0} 409 | m_ScaleInLightmap: 1 410 | m_ReceiveGI: 1 411 | m_PreserveUVs: 0 412 | m_IgnoreNormalsForChartDetection: 0 413 | m_ImportantGI: 0 414 | m_StitchLightmapSeams: 1 415 | m_SelectedEditorRenderState: 3 416 | m_MinimumChartSize: 4 417 | m_AutoUVMaxDistance: 0.5 418 | m_AutoUVMaxAngle: 89 419 | m_LightmapParameters: {fileID: 0} 420 | m_SortingLayerID: 0 421 | m_SortingLayer: 0 422 | m_SortingOrder: 0 423 | --- !u!33 &371085530 424 | MeshFilter: 425 | m_ObjectHideFlags: 0 426 | m_CorrespondingSourceObject: {fileID: 0} 427 | m_PrefabInstance: {fileID: 0} 428 | m_PrefabAsset: {fileID: 0} 429 | m_GameObject: {fileID: 371085527} 430 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 431 | --- !u!4 &371085531 432 | Transform: 433 | m_ObjectHideFlags: 0 434 | m_CorrespondingSourceObject: {fileID: 0} 435 | m_PrefabInstance: {fileID: 0} 436 | m_PrefabAsset: {fileID: 0} 437 | m_GameObject: {fileID: 371085527} 438 | m_LocalRotation: {x: -0.122787856, y: 0.122787856, z: 0.6963643, w: 0.6963643} 439 | m_LocalPosition: {x: 0, y: 0, z: 0} 440 | m_LocalScale: {x: 1.5, y: -1.5, z: 1.5} 441 | m_Children: [] 442 | m_Father: {fileID: 0} 443 | m_RootOrder: 2 444 | m_LocalEulerAnglesHint: {x: -20, y: 0, z: 90} 445 | --- !u!114 &371085532 446 | MonoBehaviour: 447 | m_ObjectHideFlags: 0 448 | m_CorrespondingSourceObject: {fileID: 0} 449 | m_PrefabInstance: {fileID: 0} 450 | m_PrefabAsset: {fileID: 0} 451 | m_GameObject: {fileID: 371085527} 452 | m_Enabled: 1 453 | m_EditorHideFlags: 0 454 | m_Script: {fileID: 11500000, guid: c709940ff56c2a046b19162358b87444, type: 3} 455 | m_Name: 456 | m_EditorClassIdentifier: 457 | speed: 30 458 | --- !u!114 &371085533 459 | MonoBehaviour: 460 | m_ObjectHideFlags: 0 461 | m_CorrespondingSourceObject: {fileID: 0} 462 | m_PrefabInstance: {fileID: 0} 463 | m_PrefabAsset: {fileID: 0} 464 | m_GameObject: {fileID: 371085527} 465 | m_Enabled: 1 466 | m_EditorHideFlags: 0 467 | m_Script: {fileID: 11500000, guid: 33fc0120ccfe9d7448127bb2f8d4b85f, type: 3} 468 | m_Name: 469 | m_EditorClassIdentifier: 470 | cam: {fileID: 305937864} 471 | texs: 472 | - {fileID: 4849145913767034428, guid: 100b1def401e91547b8e2875718b6c23, type: 3} 473 | - {fileID: 4849145913767034428, guid: f63cb2b121bfd0f4b8f6b2a31535b4bc, type: 3} 474 | - {fileID: 4849145913767034428, guid: e24e33e273277464aa661bb4555fcbcb, type: 3} 475 | - {fileID: 4849145913767034428, guid: 5bb3f61422ad71449990075e5b50c039, type: 3} 476 | - {fileID: 4849145913767034428, guid: d534c68c5bc0e0c43ae71ad674c5d1d4, type: 3} 477 | - {fileID: 4849145913767034428, guid: 549379124d4eb3c4c99698bbc5706553, type: 3} 478 | - {fileID: 4849145913767034428, guid: 7210adaf5c3e73e44a6af1b9baee5f88, type: 3} 479 | --- !u!1 &520406675 480 | GameObject: 481 | m_ObjectHideFlags: 0 482 | m_CorrespondingSourceObject: {fileID: 0} 483 | m_PrefabInstance: {fileID: 0} 484 | m_PrefabAsset: {fileID: 0} 485 | serializedVersion: 6 486 | m_Component: 487 | - component: {fileID: 520406676} 488 | - component: {fileID: 520406678} 489 | - component: {fileID: 520406677} 490 | m_Layer: 5 491 | m_Name: icon 492 | m_TagString: Untagged 493 | m_Icon: {fileID: 0} 494 | m_NavMeshLayer: 0 495 | m_StaticEditorFlags: 0 496 | m_IsActive: 1 497 | --- !u!224 &520406676 498 | RectTransform: 499 | m_ObjectHideFlags: 0 500 | m_CorrespondingSourceObject: {fileID: 0} 501 | m_PrefabInstance: {fileID: 0} 502 | m_PrefabAsset: {fileID: 0} 503 | m_GameObject: {fileID: 520406675} 504 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 505 | m_LocalPosition: {x: 0, y: 0, z: 0} 506 | m_LocalScale: {x: 1, y: 1, z: 1} 507 | m_Children: [] 508 | m_Father: {fileID: 2073792032} 509 | m_RootOrder: 0 510 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 511 | m_AnchorMin: {x: 1, y: 0} 512 | m_AnchorMax: {x: 1, y: 0} 513 | m_AnchoredPosition: {x: -50, y: 50} 514 | m_SizeDelta: {x: 100, y: 100} 515 | m_Pivot: {x: 0.5, y: 0.5} 516 | --- !u!114 &520406677 517 | MonoBehaviour: 518 | m_ObjectHideFlags: 0 519 | m_CorrespondingSourceObject: {fileID: 0} 520 | m_PrefabInstance: {fileID: 0} 521 | m_PrefabAsset: {fileID: 0} 522 | m_GameObject: {fileID: 520406675} 523 | m_Enabled: 1 524 | m_EditorHideFlags: 0 525 | m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} 526 | m_Name: 527 | m_EditorClassIdentifier: 528 | m_Material: {fileID: 0} 529 | m_Color: {r: 1, g: 1, b: 1, a: 1} 530 | m_RaycastTarget: 1 531 | m_OnCullStateChanged: 532 | m_PersistentCalls: 533 | m_Calls: [] 534 | m_Texture: {fileID: 2800000, guid: 6d0d9f04ae407f34a8354e562d428612, type: 3} 535 | m_UVRect: 536 | serializedVersion: 2 537 | x: 0 538 | y: 0 539 | width: 1 540 | height: 1 541 | --- !u!222 &520406678 542 | CanvasRenderer: 543 | m_ObjectHideFlags: 0 544 | m_CorrespondingSourceObject: {fileID: 0} 545 | m_PrefabInstance: {fileID: 0} 546 | m_PrefabAsset: {fileID: 0} 547 | m_GameObject: {fileID: 520406675} 548 | m_CullTransparentMesh: 0 549 | --- !u!1 &1557275504 550 | GameObject: 551 | m_ObjectHideFlags: 0 552 | m_CorrespondingSourceObject: {fileID: 0} 553 | m_PrefabInstance: {fileID: 0} 554 | m_PrefabAsset: {fileID: 0} 555 | serializedVersion: 6 556 | m_Component: 557 | - component: {fileID: 1557275507} 558 | - component: {fileID: 1557275506} 559 | - component: {fileID: 1557275505} 560 | m_Layer: 0 561 | m_Name: EventSystem 562 | m_TagString: Untagged 563 | m_Icon: {fileID: 0} 564 | m_NavMeshLayer: 0 565 | m_StaticEditorFlags: 0 566 | m_IsActive: 1 567 | --- !u!114 &1557275505 568 | MonoBehaviour: 569 | m_ObjectHideFlags: 0 570 | m_CorrespondingSourceObject: {fileID: 0} 571 | m_PrefabInstance: {fileID: 0} 572 | m_PrefabAsset: {fileID: 0} 573 | m_GameObject: {fileID: 1557275504} 574 | m_Enabled: 1 575 | m_EditorHideFlags: 0 576 | m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} 577 | m_Name: 578 | m_EditorClassIdentifier: 579 | m_HorizontalAxis: Horizontal 580 | m_VerticalAxis: Vertical 581 | m_SubmitButton: Submit 582 | m_CancelButton: Cancel 583 | m_InputActionsPerSecond: 10 584 | m_RepeatDelay: 0.5 585 | m_ForceModuleActive: 0 586 | --- !u!114 &1557275506 587 | MonoBehaviour: 588 | m_ObjectHideFlags: 0 589 | m_CorrespondingSourceObject: {fileID: 0} 590 | m_PrefabInstance: {fileID: 0} 591 | m_PrefabAsset: {fileID: 0} 592 | m_GameObject: {fileID: 1557275504} 593 | m_Enabled: 1 594 | m_EditorHideFlags: 0 595 | m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} 596 | m_Name: 597 | m_EditorClassIdentifier: 598 | m_FirstSelected: {fileID: 0} 599 | m_sendNavigationEvents: 1 600 | m_DragThreshold: 10 601 | --- !u!4 &1557275507 602 | Transform: 603 | m_ObjectHideFlags: 0 604 | m_CorrespondingSourceObject: {fileID: 0} 605 | m_PrefabInstance: {fileID: 0} 606 | m_PrefabAsset: {fileID: 0} 607 | m_GameObject: {fileID: 1557275504} 608 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 609 | m_LocalPosition: {x: 0, y: 0, z: 0} 610 | m_LocalScale: {x: 1, y: 1, z: 1} 611 | m_Children: [] 612 | m_Father: {fileID: 0} 613 | m_RootOrder: 4 614 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 615 | --- !u!1 &2073792028 616 | GameObject: 617 | m_ObjectHideFlags: 0 618 | m_CorrespondingSourceObject: {fileID: 0} 619 | m_PrefabInstance: {fileID: 0} 620 | m_PrefabAsset: {fileID: 0} 621 | serializedVersion: 6 622 | m_Component: 623 | - component: {fileID: 2073792032} 624 | - component: {fileID: 2073792031} 625 | - component: {fileID: 2073792030} 626 | - component: {fileID: 2073792029} 627 | m_Layer: 5 628 | m_Name: Canvas 629 | m_TagString: Untagged 630 | m_Icon: {fileID: 0} 631 | m_NavMeshLayer: 0 632 | m_StaticEditorFlags: 0 633 | m_IsActive: 1 634 | --- !u!114 &2073792029 635 | MonoBehaviour: 636 | m_ObjectHideFlags: 0 637 | m_CorrespondingSourceObject: {fileID: 0} 638 | m_PrefabInstance: {fileID: 0} 639 | m_PrefabAsset: {fileID: 0} 640 | m_GameObject: {fileID: 2073792028} 641 | m_Enabled: 1 642 | m_EditorHideFlags: 0 643 | m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} 644 | m_Name: 645 | m_EditorClassIdentifier: 646 | m_IgnoreReversedGraphics: 1 647 | m_BlockingObjects: 0 648 | m_BlockingMask: 649 | serializedVersion: 2 650 | m_Bits: 4294967295 651 | --- !u!114 &2073792030 652 | MonoBehaviour: 653 | m_ObjectHideFlags: 0 654 | m_CorrespondingSourceObject: {fileID: 0} 655 | m_PrefabInstance: {fileID: 0} 656 | m_PrefabAsset: {fileID: 0} 657 | m_GameObject: {fileID: 2073792028} 658 | m_Enabled: 1 659 | m_EditorHideFlags: 0 660 | m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} 661 | m_Name: 662 | m_EditorClassIdentifier: 663 | m_UiScaleMode: 0 664 | m_ReferencePixelsPerUnit: 100 665 | m_ScaleFactor: 1 666 | m_ReferenceResolution: {x: 800, y: 600} 667 | m_ScreenMatchMode: 0 668 | m_MatchWidthOrHeight: 0 669 | m_PhysicalUnit: 3 670 | m_FallbackScreenDPI: 96 671 | m_DefaultSpriteDPI: 96 672 | m_DynamicPixelsPerUnit: 1 673 | --- !u!223 &2073792031 674 | Canvas: 675 | m_ObjectHideFlags: 0 676 | m_CorrespondingSourceObject: {fileID: 0} 677 | m_PrefabInstance: {fileID: 0} 678 | m_PrefabAsset: {fileID: 0} 679 | m_GameObject: {fileID: 2073792028} 680 | m_Enabled: 1 681 | serializedVersion: 3 682 | m_RenderMode: 0 683 | m_Camera: {fileID: 0} 684 | m_PlaneDistance: 100 685 | m_PixelPerfect: 0 686 | m_ReceivesEvents: 1 687 | m_OverrideSorting: 0 688 | m_OverridePixelPerfect: 0 689 | m_SortingBucketNormalizedSize: 0 690 | m_AdditionalShaderChannelsFlag: 0 691 | m_SortingLayerID: 0 692 | m_SortingOrder: 0 693 | m_TargetDisplay: 0 694 | --- !u!224 &2073792032 695 | RectTransform: 696 | m_ObjectHideFlags: 0 697 | m_CorrespondingSourceObject: {fileID: 0} 698 | m_PrefabInstance: {fileID: 0} 699 | m_PrefabAsset: {fileID: 0} 700 | m_GameObject: {fileID: 2073792028} 701 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 702 | m_LocalPosition: {x: 0, y: 0, z: 0} 703 | m_LocalScale: {x: 0, y: 0, z: 0} 704 | m_Children: 705 | - {fileID: 520406676} 706 | m_Father: {fileID: 0} 707 | m_RootOrder: 3 708 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 709 | m_AnchorMin: {x: 0, y: 0} 710 | m_AnchorMax: {x: 0, y: 0} 711 | m_AnchoredPosition: {x: 0, y: 0} 712 | m_SizeDelta: {x: 0, y: 0} 713 | m_Pivot: {x: 0, y: 0} 714 | -------------------------------------------------------------------------------- /Assets/Scenes/VolumeRender.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6fee02937ea849a439f17f363777b24b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a23f8a9c4eb5794da7ff5a88d9d10ce 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Shaders/Shad.shader: -------------------------------------------------------------------------------- 1 | Shader "MixedReality/Screen" // reference: http://tips.hecomi.com/entry/2016/07/26/013535 2 | { 3 | Properties 4 | { 5 | _MainTex ("Color and Depth Texture", 2D) = "white" {} 6 | } 7 | SubShader 8 | { 9 | Tags { "RenderType" = "Opaque" "DisableBatching" = "True" "Queue" = "Geometry+10" } 10 | Cull Off 11 | 12 | Pass 13 | { 14 | Tags { "LightMode" = "Deferred" } 15 | 16 | CGPROGRAM 17 | #pragma vertex vert 18 | #pragma fragment frag 19 | #include "UnityCG.cginc" 20 | 21 | struct appdata 22 | { 23 | float4 vertex : POSITION; 24 | float2 uv : TEXCOORD0; 25 | }; 26 | 27 | struct v2f 28 | { 29 | float4 pos : SV_POSITION; 30 | float2 uv : TEXCOORD0; 31 | }; 32 | 33 | struct GBufferOut 34 | { 35 | float4 diffuse : SV_Target0; // rgb: diffuse, a: occlusion 36 | float4 specular : SV_Target1; // rgb: specular, a: smoothness 37 | float4 normal : SV_Target2; // rgb: normal, a: unused 38 | float4 emission : SV_Target3; // rgb: emission, a: unused 39 | float depth : SV_Depth; 40 | }; 41 | 42 | sampler2D _MainTex; 43 | float4 _MainTex_ST; 44 | 45 | float GetDepth(float2 uv) 46 | { 47 | uv.y *= -1.0; // flip y axis 48 | float d = tex2D(_MainTex, uv).a; 49 | return 1/(1-d); 50 | } 51 | 52 | float3 GetWorldCoord(float2 uv) 53 | { 54 | float fact = 0.57735026919; // tan(30.0 deg), fov ~= 60.0 (deg) 55 | float z = GetDepth(uv); 56 | float u = 2 * (uv.x - 0.5); // scale to -1 ~ 1 57 | float v = 2 * (uv.y - 0.5); // scale to -1 ~ 1 58 | float x = u * fact * z; 59 | float y = v * fact * z; 60 | 61 | return float3(x, y, z); 62 | } 63 | 64 | float3 GetNormal(float2 uv) 65 | { 66 | float2 uvX = uv - float2(1, 0); 67 | float2 uvY = uv - float2(0, 1); 68 | 69 | float3 pos0 = GetWorldCoord(uv); 70 | float3 posX = GetWorldCoord(uvX); 71 | float3 posY = GetWorldCoord(uvY); 72 | 73 | float3 dirX = normalize(posX - pos0); 74 | float3 dirY = normalize(posY - pos0); 75 | 76 | return 0.5 + 0.5 * cross(dirY, dirX); 77 | } 78 | 79 | float GetDepthForBuffer(float2 uv) 80 | { 81 | float4 vpPos = mul(UNITY_MATRIX_VP, float4(GetWorldCoord(uv), 1.0)); 82 | return vpPos.z / vpPos.w; 83 | } 84 | 85 | v2f vert (appdata v) 86 | { 87 | v2f o; 88 | o.pos = UnityObjectToClipPos(v.vertex); 89 | o.uv = TRANSFORM_TEX(v.uv, _MainTex); 90 | 91 | return o; 92 | } 93 | 94 | GBufferOut frag (v2f i) 95 | { 96 | GBufferOut o; 97 | o.diffuse = tex2D(_MainTex, i.uv); 98 | o.specular = float4(0.0, 0.0, 0.0, 0.0); 99 | o.emission = float4(0.0, 0.0, 0.0, 0.0); 100 | o.normal = float4(GetNormal(i.uv), 1.0); 101 | o.depth = GetDepthForBuffer(i.uv); 102 | return o; 103 | } 104 | ENDCG 105 | } 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /Assets/Shaders/Shad.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8f01eb61c9458e4bbb9d342b282cf42 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Unlit_volumeShad2.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: Unlit_volumeShad2 11 | m_Shader: {fileID: 4800000, guid: 6ee1c5548a4af30439979b7f3f3c2ece, 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 | - _MainTex: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _NoiseTex: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _Transfer: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _Volume: 35 | m_Texture: {fileID: 4849145913767034428, guid: 100b1def401e91547b8e2875718b6c23, 36 | type: 3} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | m_Floats: 40 | - Vector1_C4EF7DB6: 30 41 | - Vector1_D32E39A6: 0.02 42 | - _Dissolve: 0 43 | - _Intensity: 0.077 44 | - _Iteration: 500 45 | - _Level: 0 46 | - _MaxX: 0.995 47 | - _MaxY: 1 48 | - _MaxZ: 1 49 | - _MinX: 0 50 | - _MinY: 0 51 | - _MinZ: 0 52 | m_Colors: 53 | - Color_FFB485C4: {r: 0, g: 13.67843, b: 16, a: 0} 54 | - _Color: {r: 1, g: 1, b: 1, a: 1} 55 | -------------------------------------------------------------------------------- /Assets/Shaders/Unlit_volumeShad2.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92694401378802e4e9dc8a61983f01c4 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Shaders/screen.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: screen 11 | m_Shader: {fileID: 4800000, guid: b8f01eb61c9458e4bbb9d342b282cf42, 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 | - _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 | -------------------------------------------------------------------------------- /Assets/Shaders/screen.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9aae056a6df592f4a94d7f54e7d2bcf6 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Shaders/volumeShad2.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/volumeShad2" // ref https://github.com/mattatz/unity-volume-rendering/blob/master/Assets/VolumeRendering/Shaders/VolumeRendering.cginc 2 | { 3 | Properties 4 | { 5 | [Header(Rendering)] 6 | _Volume("Volume", 3D) = "" {} 7 | _Iteration("Iteration", Int) = 10 8 | [MaterialToggle] _Dissolve("Dissolve", Float) = 0 9 | 10 | [Header(Ranges)] 11 | _MinX("MinX", Range(0, 1)) = 0.0 12 | _MaxX("MaxX", Range(0, 1)) = 1.0 13 | _MinY("MinY", Range(0, 1)) = 0.0 14 | _MaxY("MaxY", Range(0, 1)) = 1.0 15 | _MinZ("MinZ", Range(0, 1)) = 0.0 16 | _MaxZ("MaxZ", Range(0, 1)) = 1.0 17 | } 18 | SubShader 19 | { 20 | Tags 21 | { "Queue" = "Transparent" 22 | "RenderType" = "Transparent" 23 | } 24 | Cull Front 25 | ZWrite Off 26 | ZTest LEqual 27 | Blend SrcAlpha OneMinusSrcAlpha 28 | Lighting Off 29 | 30 | Pass 31 | { 32 | CGPROGRAM 33 | #pragma vertex vert 34 | #pragma fragment frag 35 | 36 | #include "UnityCG.cginc" 37 | 38 | struct appdata 39 | { 40 | float4 vertex : POSITION; 41 | }; 42 | 43 | struct v2f 44 | { 45 | float4 vertex : SV_POSITION; 46 | float4 localPos : TEXCOORD0; 47 | }; 48 | 49 | sampler3D _Volume; 50 | int _Iteration; 51 | fixed _MinX, _MaxX, _MinY, _MaxY, _MinZ, _MaxZ; 52 | fixed _Dissolve; 53 | 54 | float4 sample(float3 pos) // clip the volume 55 | { 56 | fixed x = step(pos.x, _MaxX) * step(_MinX, pos.x); 57 | fixed y = step(pos.y, _MaxY) * step(_MinY, pos.y); 58 | fixed z = step(pos.z, _MaxZ) * step(_MinZ, pos.z); 59 | return tex3D(_Volume, pos) * x * y * z; 60 | } 61 | 62 | v2f vert(appdata v) 63 | { 64 | v2f o; 65 | o.vertex = UnityObjectToClipPos(v.vertex); 66 | o.localPos = v.vertex; 67 | return o; 68 | } 69 | 70 | fixed4 frag(v2f i) : SV_Target 71 | { 72 | float3 rayOrigin = i.localPos + 0.5; 73 | float3 rayDir = ObjSpaceViewDir(i.localPos); 74 | float rayLength = length(rayDir); 75 | rayDir = normalize(rayDir); 76 | 77 | float4 finalColor = 0.0; 78 | float t = 1.732 / _Iteration; // step size for one iteration 79 | 80 | [loop] 81 | for (int j = 0; j < _Iteration; ++j) 82 | { 83 | float step = t * j; 84 | if (step > rayLength) // do not render volume that is behind the camera 85 | break; 86 | float3 curPos = rayOrigin; 87 | if (_Dissolve) { 88 | step *= (1 + sin(_Time.z / 2))*0.5; 89 | } 90 | curPos += rayDir * step; 91 | float4 color = sample(curPos); 92 | // use back to front composition 93 | finalColor.rgb = color.a * color.rgb + (1-color.a) * finalColor.rgb; 94 | finalColor.a = color.a + (1 - color.a) * finalColor.a; 95 | if (finalColor.a > 1) break; 96 | } 97 | return finalColor; 98 | 99 | } 100 | ENDCG 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /Assets/Shaders/volumeShad2.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ee1c5548a4af30439979b7f3f3c2ece 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/StreamingAssets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 63632e6d1bc708e48af770aada35129d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/StreamingAssets/000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwea123/nerf_Unity/ab4d03950a13794582224a884a00253a0d10a66c/Assets/StreamingAssets/000.png -------------------------------------------------------------------------------- /Assets/StreamingAssets/000.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1fa4aac867e1ee749947474a056a4152 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 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 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | spriteSheet: 74 | serializedVersion: 2 75 | sprites: [] 76 | outline: [] 77 | physicsShape: [] 78 | bones: [] 79 | spriteID: 80 | internalID: 0 81 | vertices: [] 82 | indices: 83 | edges: [] 84 | weights: [] 85 | secondaryTextures: [] 86 | spritePackingTag: 87 | pSDRemoveMatte: 0 88 | pSDShowRemoveMatteOption: 0 89 | userData: 90 | assetBundleName: 91 | assetBundleVariant: 92 | -------------------------------------------------------------------------------- /Assets/StreamingAssets/001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwea123/nerf_Unity/ab4d03950a13794582224a884a00253a0d10a66c/Assets/StreamingAssets/001.png -------------------------------------------------------------------------------- /Assets/StreamingAssets/001.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a355179e67fee24ebeade3b16f9a554 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 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 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | spriteSheet: 74 | serializedVersion: 2 75 | sprites: [] 76 | outline: [] 77 | physicsShape: [] 78 | bones: [] 79 | spriteID: 80 | internalID: 0 81 | vertices: [] 82 | indices: 83 | edges: [] 84 | weights: [] 85 | secondaryTextures: [] 86 | spritePackingTag: 87 | pSDRemoveMatte: 0 88 | pSDShowRemoveMatteOption: 0 89 | userData: 90 | assetBundleName: 91 | assetBundleVariant: 92 | -------------------------------------------------------------------------------- /Assets/StreamingAssets/depth_000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwea123/nerf_Unity/ab4d03950a13794582224a884a00253a0d10a66c/Assets/StreamingAssets/depth_000 -------------------------------------------------------------------------------- /Assets/StreamingAssets/depth_000.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37648acb57d9a3a4893ddbdb84a278a1 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/StreamingAssets/depth_001: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwea123/nerf_Unity/ab4d03950a13794582224a884a00253a0d10a66c/Assets/StreamingAssets/depth_001 -------------------------------------------------------------------------------- /Assets/StreamingAssets/depth_001.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e13155b55fd003e4f9503c866bd1034b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/SwitchScene.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class SwitchScene : MonoBehaviour 6 | { 7 | public Camera cam; 8 | public List texs; 9 | 10 | private Renderer rend; 11 | private Vector3 origCamPos; 12 | private Quaternion origCamRot; 13 | private float xmin=0, xmax=1, ymin=0, ymax=1, zmin=0, zmax=1; 14 | private bool dissolve; 15 | 16 | // Start is called before the first frame update 17 | void Start() 18 | { 19 | rend = GetComponent(); 20 | origCamPos = cam.transform.position; 21 | origCamRot = cam.transform.rotation; 22 | } 23 | 24 | // Update is called once per frame 25 | void Update() 26 | { 27 | 28 | } 29 | 30 | void OnGUI() 31 | { 32 | GUIStyle buttonStyle = new GUIStyle(GUI.skin.button) 33 | { 34 | fontSize = 20 35 | }; 36 | for (int i = 0; i < texs.Count; i++) 37 | { 38 | 39 | if (GUI.Button(new Rect(10, 10 + 50 * i, 120, 40), texs[i].ToString().Split(' ')[0], buttonStyle)) 40 | rend.material.SetTexture("_Volume", texs[i]); 41 | } 42 | GUIStyle toggleStyle = new GUIStyle(GUI.skin.toggle) 43 | { 44 | fontSize = 20 45 | }; 46 | toggleStyle.normal.textColor = Color.black; 47 | toggleStyle.hover.textColor = Color.black; 48 | toggleStyle.onNormal.textColor = Color.black; 49 | toggleStyle.onHover.textColor = Color.black; 50 | 51 | toggleStyle.border = new RectOffset(14, 0, 14, 0); 52 | toggleStyle.padding = new RectOffset(15, 0, 0, 0); 53 | dissolve = GUI.Toggle(new Rect(10, 10 + 50 * texs.Count, 250, 50), dissolve, "Dissolve effect", toggleStyle); 54 | rend.material.SetFloat("_Dissolve", dissolve?1:0); 55 | 56 | GUIStyle textStyle = new GUIStyle(GUI.skin.label) 57 | { 58 | fontSize = 20 59 | }; 60 | textStyle.normal.textColor = Color.black; 61 | //GUI.Label(new Rect(10, 200, 150, 150), "Right click:\nRotate\nMiddle click:\nMove\nWheel:\nZoom", textStyle); 62 | 63 | //GUI.Label(new Rect(740, 30, 150, 50), "Display ranges", textStyle); 64 | //xmin = GUI.HorizontalSlider(new Rect(740, 80, 120, 20), xmin, 0, 1); 65 | //rend.material.SetFloat("_MinX", xmin); 66 | //GUI.Label(new Rect(880, 75, 150, 150), "X min : "+string.Format("{0:0.00}", xmin)); 67 | //xmax = GUI.HorizontalSlider(new Rect(740, 110, 120, 20), xmax, 0, 1); 68 | //rend.material.SetFloat("_MaxX", xmax); 69 | //GUI.Label(new Rect(880, 105, 150, 150), "X max : " + string.Format("{0:0.00}", xmax)); 70 | //ymin = GUI.HorizontalSlider(new Rect(740, 140, 120, 20), ymin, 0, 1); 71 | //rend.material.SetFloat("_MinY", ymin); 72 | //GUI.Label(new Rect(880, 135, 150, 150), "Y min : " + string.Format("{0:0.00}", ymin)); 73 | //ymax = GUI.HorizontalSlider(new Rect(740, 170, 120, 20), ymax, 0, 1); 74 | //rend.material.SetFloat("_MaxY", ymax); 75 | //GUI.Label(new Rect(880, 165, 150, 150), "Y max : " + string.Format("{0:0.00}", ymax)); 76 | //zmin = GUI.HorizontalSlider(new Rect(740, 200, 120, 20), zmin, 0, 1); 77 | //rend.material.SetFloat("_MinZ", zmin); 78 | //GUI.Label(new Rect(880, 195, 150, 150), "Z min : " + string.Format("{0:0.00}", zmin)); 79 | //zmax = GUI.HorizontalSlider(new Rect(740, 230, 120, 20), zmax, 0, 1); 80 | //rend.material.SetFloat("_MaxZ", zmax); 81 | //GUI.Label(new Rect(880, 225, 150, 150), "Z max : " + string.Format("{0:0.00}", zmax)); 82 | 83 | //if (GUI.Button(new Rect(10, 350, 150, 40), "Reset camera", buttonStyle)) 84 | //{ 85 | // cam.transform.SetPositionAndRotation(origCamPos, origCamRot); 86 | //} 87 | 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /Assets/SwitchScene.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33fc0120ccfe9d7448127bb2f8d4b85f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/SwitchScene2.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class SwitchScene2 : MonoBehaviour 6 | { 7 | public Camera cam; 8 | public ParticleSystem snow; 9 | public List meshes; 10 | 11 | private bool snow_ = false; 12 | private Vector3 origCamPos; 13 | private Quaternion origCamRot; 14 | 15 | // Start is called before the first frame update 16 | void Start() 17 | { 18 | if (snow.isPlaying) 19 | snow.Stop(); 20 | origCamPos = cam.transform.position; 21 | origCamRot = cam.transform.rotation; 22 | } 23 | 24 | // Update is called once per frame 25 | void Update() 26 | { 27 | 28 | } 29 | 30 | void OnGUI() 31 | { 32 | GUIStyle buttonStyle = new GUIStyle(GUI.skin.button) 33 | { 34 | fontSize = 20 35 | }; 36 | for (int i = 0; i < meshes.Count; i++) 37 | { 38 | if (GUI.Button(new Rect(10, 10 + 50 * i, 120, 40), meshes[i].ToString().Split(' ')[0], buttonStyle)) 39 | { 40 | meshes[i].SetActive(true); 41 | for (int j = 0; j < meshes.Count; j++) 42 | if (j != i) 43 | meshes[j].SetActive(false); 44 | } 45 | } 46 | GUIStyle toggleStyle = new GUIStyle(GUI.skin.toggle) 47 | { 48 | fontSize = 20 49 | }; 50 | toggleStyle.normal.textColor = Color.black; 51 | toggleStyle.hover.textColor = Color.black; 52 | toggleStyle.onNormal.textColor = Color.black; 53 | toggleStyle.onHover.textColor = Color.black; 54 | 55 | toggleStyle.border = new RectOffset(14, 0, 14, 0); 56 | toggleStyle.padding = new RectOffset(15, 0, 0, 0); 57 | snow_ = GUI.Toggle(new Rect(10, 10 + 50 * meshes.Count, 250, 50), snow_, "Snow effect", toggleStyle); 58 | if (snow_ && !snow.isPlaying) 59 | snow.Play(); 60 | else if (!snow_ && snow.isPlaying) 61 | snow.Stop(); 62 | 63 | GUIStyle textStyle = new GUIStyle(GUI.skin.label) 64 | { 65 | fontSize = 20 66 | }; 67 | textStyle.normal.textColor = Color.black; 68 | GUI.Label(new Rect(10, 200, 150, 150), "Right click:\nRotate\nMiddle click:\nMove\nWheel:\nZoom", textStyle); 69 | 70 | if (GUI.Button(new Rect(10, 350, 150, 40), "Reset camera", buttonStyle)) 71 | { 72 | cam.transform.SetPositionAndRotation(origCamPos, origCamRot); 73 | } 74 | 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Assets/SwitchScene2.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45829db6cabf0d043a9a88c9c383c425 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/drums.vol.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5bb3f61422ad71449990075e5b50c039 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 19b8968e701f87a47b366c08b10fbec7, type: 3} 11 | size: 512 12 | -------------------------------------------------------------------------------- /Assets/hotdog.vol.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f63cb2b121bfd0f4b8f6b2a31535b4bc 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 19b8968e701f87a47b366c08b10fbec7, type: 3} 11 | size: 512 12 | -------------------------------------------------------------------------------- /Assets/lego.vol.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 100b1def401e91547b8e2875718b6c23 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 19b8968e701f87a47b366c08b10fbec7, type: 3} 11 | size: 512 12 | -------------------------------------------------------------------------------- /Assets/lego_lowres.ply.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f0701646ae7e9843b385cb33273ff7c 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 183c1cb276390b14e883dae29f585dfa, type: 3} 11 | _containerType: 0 12 | -------------------------------------------------------------------------------- /Assets/materials.vol.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e24e33e273277464aa661bb4555fcbcb 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 19b8968e701f87a47b366c08b10fbec7, type: 3} 11 | size: 512 12 | -------------------------------------------------------------------------------- /Assets/plant.ply.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0ff0ef2d643eeb4d8a7b5da59caa8bb 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 183c1cb276390b14e883dae29f585dfa, type: 3} 11 | _containerType: 0 12 | -------------------------------------------------------------------------------- /Assets/plant.vol.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7210adaf5c3e73e44a6af1b9baee5f88 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 19b8968e701f87a47b366c08b10fbec7, type: 3} 11 | size: 512 12 | -------------------------------------------------------------------------------- /Assets/ship.vol.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d534c68c5bc0e0c43ae71ad674c5d1d4 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 19b8968e701f87a47b366c08b10fbec7, type: 3} 11 | size: 512 12 | -------------------------------------------------------------------------------- /Assets/silica.ply.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c13a1cdd9688ef4eb9930754e7d77d0 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 183c1cb276390b14e883dae29f585dfa, type: 3} 11 | _containerType: 0 12 | -------------------------------------------------------------------------------- /Assets/silica.vol.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 549379124d4eb3c4c99698bbc5706553 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 19b8968e701f87a47b366c08b10fbec7, type: 3} 11 | size: 512 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 AI葵 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 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.collab-proxy": "1.2.16", 4 | "com.unity.ext.nunit": "1.0.0", 5 | "com.unity.ide.rider": "1.1.4", 6 | "com.unity.ide.vscode": "1.1.4", 7 | "com.unity.render-pipelines.lightweight": "7.3.1", 8 | "com.unity.shadergraph": "7.3.1", 9 | "com.unity.test-framework": "1.1.13", 10 | "com.unity.textmeshpro": "2.0.1", 11 | "com.unity.timeline": "1.2.6", 12 | "com.unity.ugui": "1.0.0", 13 | "com.unity.modules.ai": "1.0.0", 14 | "com.unity.modules.androidjni": "1.0.0", 15 | "com.unity.modules.animation": "1.0.0", 16 | "com.unity.modules.assetbundle": "1.0.0", 17 | "com.unity.modules.audio": "1.0.0", 18 | "com.unity.modules.cloth": "1.0.0", 19 | "com.unity.modules.director": "1.0.0", 20 | "com.unity.modules.imageconversion": "1.0.0", 21 | "com.unity.modules.imgui": "1.0.0", 22 | "com.unity.modules.jsonserialize": "1.0.0", 23 | "com.unity.modules.particlesystem": "1.0.0", 24 | "com.unity.modules.physics": "1.0.0", 25 | "com.unity.modules.physics2d": "1.0.0", 26 | "com.unity.modules.screencapture": "1.0.0", 27 | "com.unity.modules.terrain": "1.0.0", 28 | "com.unity.modules.terrainphysics": "1.0.0", 29 | "com.unity.modules.tilemap": "1.0.0", 30 | "com.unity.modules.ui": "1.0.0", 31 | "com.unity.modules.uielements": "1.0.0", 32 | "com.unity.modules.umbra": "1.0.0", 33 | "com.unity.modules.unityanalytics": "1.0.0", 34 | "com.unity.modules.unitywebrequest": "1.0.0", 35 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 36 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 37 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 38 | "com.unity.modules.unitywebrequestwww": "1.0.0", 39 | "com.unity.modules.vehicles": "1.0.0", 40 | "com.unity.modules.video": "1.0.0", 41 | "com.unity.modules.vr": "1.0.0", 42 | "com.unity.modules.wind": "1.0.0", 43 | "com.unity.modules.xr": "1.0.0" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /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: 0 9 | path: Assets/Scenes/VolumeRender.unity 10 | guid: 6fee02937ea849a439f17f363777b24b 11 | - enabled: 0 12 | path: Assets/Scenes/MeshRender.unity 13 | guid: 246522a6e51e90c4b90c8903646dcaf9 14 | - enabled: 1 15 | path: Assets/Scenes/MixedReality.unity 16 | guid: 4b58e4d7882a3144b88ad8c1c0d70e0d 17 | m_configObjects: {} 18 | -------------------------------------------------------------------------------- /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: 9 7 | m_ExternalVersionControlSupport: Hidden Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 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: 1 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /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 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} 40 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 41 | m_PreloadedShaders: [] 42 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 43 | type: 0} 44 | m_CustomRenderPipeline: {fileID: 11400000, guid: 1c629ac5675a2bd4eacd1a4cf4a5284e, 45 | type: 2} 46 | m_TransparencySortMode: 0 47 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 48 | m_DefaultRenderingPath: 1 49 | m_DefaultMobileRenderingPath: 1 50 | m_TierSettings: [] 51 | m_LightmapStripping: 0 52 | m_FogStripping: 0 53 | m_InstancingStripping: 0 54 | m_LightmapKeepPlain: 1 55 | m_LightmapKeepDirCombined: 1 56 | m_LightmapKeepDynamicPlain: 1 57 | m_LightmapKeepDynamicDirCombined: 1 58 | m_LightmapKeepShadowMask: 1 59 | m_LightmapKeepSubtractive: 1 60 | m_FogKeepLinear: 1 61 | m_FogKeepExp: 1 62 | m_FogKeepExp2: 1 63 | m_AlbedoSwatchInfos: [] 64 | m_LightsUseLinearIntensity: 0 65 | m_LightsUseColorTemperature: 0 66 | m_LogWhenShaderIsCompiled: 0 67 | m_AllowEnlightenSupportForUpgradedProject: 1 68 | -------------------------------------------------------------------------------- /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 | - serializedVersion: 3 297 | m_Name: Enable Debug Button 1 298 | descriptiveName: 299 | descriptiveNegativeName: 300 | negativeButton: 301 | positiveButton: left ctrl 302 | altNegativeButton: 303 | altPositiveButton: joystick button 8 304 | gravity: 0 305 | dead: 0 306 | sensitivity: 0 307 | snap: 0 308 | invert: 0 309 | type: 0 310 | axis: 0 311 | joyNum: 0 312 | - serializedVersion: 3 313 | m_Name: Enable Debug Button 2 314 | descriptiveName: 315 | descriptiveNegativeName: 316 | negativeButton: 317 | positiveButton: backspace 318 | altNegativeButton: 319 | altPositiveButton: joystick button 9 320 | gravity: 0 321 | dead: 0 322 | sensitivity: 0 323 | snap: 0 324 | invert: 0 325 | type: 0 326 | axis: 0 327 | joyNum: 0 328 | - serializedVersion: 3 329 | m_Name: Debug Reset 330 | descriptiveName: 331 | descriptiveNegativeName: 332 | negativeButton: 333 | positiveButton: left alt 334 | altNegativeButton: 335 | altPositiveButton: joystick button 1 336 | gravity: 0 337 | dead: 0 338 | sensitivity: 0 339 | snap: 0 340 | invert: 0 341 | type: 0 342 | axis: 0 343 | joyNum: 0 344 | - serializedVersion: 3 345 | m_Name: Debug Next 346 | descriptiveName: 347 | descriptiveNegativeName: 348 | negativeButton: 349 | positiveButton: page down 350 | altNegativeButton: 351 | altPositiveButton: joystick button 5 352 | gravity: 0 353 | dead: 0 354 | sensitivity: 0 355 | snap: 0 356 | invert: 0 357 | type: 0 358 | axis: 0 359 | joyNum: 0 360 | - serializedVersion: 3 361 | m_Name: Debug Previous 362 | descriptiveName: 363 | descriptiveNegativeName: 364 | negativeButton: 365 | positiveButton: page up 366 | altNegativeButton: 367 | altPositiveButton: joystick button 4 368 | gravity: 0 369 | dead: 0 370 | sensitivity: 0 371 | snap: 0 372 | invert: 0 373 | type: 0 374 | axis: 0 375 | joyNum: 0 376 | - serializedVersion: 3 377 | m_Name: Debug Validate 378 | descriptiveName: 379 | descriptiveNegativeName: 380 | negativeButton: 381 | positiveButton: return 382 | altNegativeButton: 383 | altPositiveButton: joystick button 0 384 | gravity: 0 385 | dead: 0 386 | sensitivity: 0 387 | snap: 0 388 | invert: 0 389 | type: 0 390 | axis: 0 391 | joyNum: 0 392 | - serializedVersion: 3 393 | m_Name: Debug Persistent 394 | descriptiveName: 395 | descriptiveNegativeName: 396 | negativeButton: 397 | positiveButton: right shift 398 | altNegativeButton: 399 | altPositiveButton: joystick button 2 400 | gravity: 0 401 | dead: 0 402 | sensitivity: 0 403 | snap: 0 404 | invert: 0 405 | type: 0 406 | axis: 0 407 | joyNum: 0 408 | - serializedVersion: 3 409 | m_Name: Debug Multiplier 410 | descriptiveName: 411 | descriptiveNegativeName: 412 | negativeButton: 413 | positiveButton: left shift 414 | altNegativeButton: 415 | altPositiveButton: joystick button 3 416 | gravity: 0 417 | dead: 0 418 | sensitivity: 0 419 | snap: 0 420 | invert: 0 421 | type: 0 422 | axis: 0 423 | joyNum: 0 424 | - serializedVersion: 3 425 | m_Name: Debug Horizontal 426 | descriptiveName: 427 | descriptiveNegativeName: 428 | negativeButton: left 429 | positiveButton: right 430 | altNegativeButton: 431 | altPositiveButton: 432 | gravity: 1000 433 | dead: 0.001 434 | sensitivity: 1000 435 | snap: 0 436 | invert: 0 437 | type: 0 438 | axis: 0 439 | joyNum: 0 440 | - serializedVersion: 3 441 | m_Name: Debug Vertical 442 | descriptiveName: 443 | descriptiveNegativeName: 444 | negativeButton: down 445 | positiveButton: up 446 | altNegativeButton: 447 | altPositiveButton: 448 | gravity: 1000 449 | dead: 0.001 450 | sensitivity: 1000 451 | snap: 0 452 | invert: 0 453 | type: 0 454 | axis: 0 455 | joyNum: 0 456 | - serializedVersion: 3 457 | m_Name: Debug Vertical 458 | descriptiveName: 459 | descriptiveNegativeName: 460 | negativeButton: down 461 | positiveButton: up 462 | altNegativeButton: 463 | altPositiveButton: 464 | gravity: 1000 465 | dead: 0.001 466 | sensitivity: 1000 467 | snap: 0 468 | invert: 0 469 | type: 2 470 | axis: 6 471 | joyNum: 0 472 | - serializedVersion: 3 473 | m_Name: Debug Horizontal 474 | descriptiveName: 475 | descriptiveNegativeName: 476 | negativeButton: left 477 | positiveButton: right 478 | altNegativeButton: 479 | altPositiveButton: 480 | gravity: 1000 481 | dead: 0.001 482 | sensitivity: 1000 483 | snap: 0 484 | invert: 0 485 | type: 2 486 | axis: 5 487 | joyNum: 0 488 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 20 7 | productGUID: 2db83969bd3630a49af09ff7d05079d9 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: DepthRender 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: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | iosUseCustomAppBackgroundBehavior: 0 56 | iosAllowHTTPDownload: 1 57 | allowedAutorotateToPortrait: 1 58 | allowedAutorotateToPortraitUpsideDown: 1 59 | allowedAutorotateToLandscapeRight: 1 60 | allowedAutorotateToLandscapeLeft: 1 61 | useOSAutorotation: 1 62 | use32BitDisplayBuffer: 1 63 | preserveFramebufferAlpha: 0 64 | disableDepthAndStencilBuffers: 0 65 | androidStartInFullscreen: 1 66 | androidRenderOutsideSafeArea: 1 67 | androidUseSwappy: 0 68 | androidBlitType: 1 69 | defaultIsNativeResolution: 1 70 | macRetinaSupport: 1 71 | runInBackground: 1 72 | captureSingleScreen: 0 73 | muteOtherAudioSources: 0 74 | Prepare IOS For Recording: 0 75 | Force IOS Speakers When Recording: 0 76 | deferSystemGesturesMode: 0 77 | hideHomeButton: 0 78 | submitAnalytics: 1 79 | usePlayerLog: 1 80 | bakeCollisionMeshes: 0 81 | forceSingleInstance: 0 82 | useFlipModelSwapchain: 1 83 | resizableWindow: 0 84 | useMacAppStoreValidation: 0 85 | macAppStoreCategory: public.app-category.games 86 | gpuSkinning: 1 87 | xboxPIXTextureCapture: 0 88 | xboxEnableAvatar: 0 89 | xboxEnableKinect: 0 90 | xboxEnableKinectAutoTracking: 0 91 | xboxEnableFitness: 0 92 | visibleInBackground: 1 93 | allowFullscreenSwitch: 1 94 | fullscreenMode: 1 95 | xboxSpeechDB: 0 96 | xboxEnableHeadOrientation: 0 97 | xboxEnableGuest: 0 98 | xboxEnablePIXSampling: 0 99 | metalFramebufferOnly: 0 100 | xboxOneResolution: 0 101 | xboxOneSResolution: 0 102 | xboxOneXResolution: 3 103 | xboxOneMonoLoggingLevel: 0 104 | xboxOneLoggingLevel: 1 105 | xboxOneDisableEsram: 0 106 | xboxOneEnableTypeOptimization: 0 107 | xboxOnePresentImmediateThreshold: 0 108 | switchQueueCommandMemory: 0 109 | switchQueueControlMemory: 16384 110 | switchQueueComputeMemory: 262144 111 | switchNVNShaderPoolsGranularity: 33554432 112 | switchNVNDefaultPoolsGranularity: 16777216 113 | switchNVNOtherPoolsGranularity: 16777216 114 | vulkanNumSwapchainBuffers: 3 115 | vulkanEnableSetSRGBWrite: 0 116 | m_SupportedAspectRatios: 117 | 4:3: 1 118 | 5:4: 1 119 | 16:10: 1 120 | 16:9: 1 121 | Others: 1 122 | bundleVersion: 0.1 123 | preloadedAssets: [] 124 | metroInputSource: 0 125 | wsaTransparentSwapchain: 0 126 | m_HolographicPauseOnTrackingLoss: 1 127 | xboxOneDisableKinectGpuReservation: 1 128 | xboxOneEnable7thCore: 1 129 | vrSettings: 130 | cardboard: 131 | depthFormat: 0 132 | enableTransitionView: 0 133 | daydream: 134 | depthFormat: 0 135 | useSustainedPerformanceMode: 0 136 | enableVideoLayer: 0 137 | useProtectedVideoMemory: 0 138 | minimumSupportedHeadTracking: 0 139 | maximumSupportedHeadTracking: 1 140 | hololens: 141 | depthFormat: 1 142 | depthBufferSharingEnabled: 1 143 | lumin: 144 | depthFormat: 0 145 | frameTiming: 2 146 | enableGLCache: 0 147 | glCacheMaxBlobSize: 524288 148 | glCacheMaxFileSize: 8388608 149 | oculus: 150 | sharedDepthBuffer: 1 151 | dashSupport: 1 152 | lowOverheadMode: 0 153 | protectedContext: 0 154 | v2Signing: 0 155 | enable360StereoCapture: 0 156 | isWsaHolographicRemotingEnabled: 0 157 | enableFrameTimingStats: 0 158 | useHDRDisplay: 0 159 | D3DHDRBitDepth: 0 160 | m_ColorGamuts: 00000000 161 | targetPixelDensity: 30 162 | resolutionScalingMode: 0 163 | androidSupportedAspectRatio: 1 164 | androidMaxAspectRatio: 2.1 165 | applicationIdentifier: {} 166 | buildNumber: {} 167 | AndroidBundleVersionCode: 1 168 | AndroidMinSdkVersion: 19 169 | AndroidTargetSdkVersion: 0 170 | AndroidPreferredInstallLocation: 1 171 | aotOptions: 172 | stripEngineCode: 1 173 | iPhoneStrippingLevel: 0 174 | iPhoneScriptCallOptimization: 0 175 | ForceInternetPermission: 0 176 | ForceSDCardPermission: 0 177 | CreateWallpaper: 0 178 | APKExpansionFiles: 0 179 | keepLoadedShadersAlive: 0 180 | StripUnusedMeshComponents: 1 181 | VertexChannelCompressionMask: 4054 182 | iPhoneSdkVersion: 988 183 | iOSTargetOSVersionString: 10.0 184 | tvOSSdkVersion: 0 185 | tvOSRequireExtendedGameController: 0 186 | tvOSTargetOSVersionString: 10.0 187 | uIPrerenderedIcon: 0 188 | uIRequiresPersistentWiFi: 0 189 | uIRequiresFullScreen: 1 190 | uIStatusBarHidden: 1 191 | uIExitOnSuspend: 0 192 | uIStatusBarStyle: 0 193 | iPhoneSplashScreen: {fileID: 0} 194 | iPhoneHighResSplashScreen: {fileID: 0} 195 | iPhoneTallHighResSplashScreen: {fileID: 0} 196 | iPhone47inSplashScreen: {fileID: 0} 197 | iPhone55inPortraitSplashScreen: {fileID: 0} 198 | iPhone55inLandscapeSplashScreen: {fileID: 0} 199 | iPhone58inPortraitSplashScreen: {fileID: 0} 200 | iPhone58inLandscapeSplashScreen: {fileID: 0} 201 | iPadPortraitSplashScreen: {fileID: 0} 202 | iPadHighResPortraitSplashScreen: {fileID: 0} 203 | iPadLandscapeSplashScreen: {fileID: 0} 204 | iPadHighResLandscapeSplashScreen: {fileID: 0} 205 | iPhone65inPortraitSplashScreen: {fileID: 0} 206 | iPhone65inLandscapeSplashScreen: {fileID: 0} 207 | iPhone61inPortraitSplashScreen: {fileID: 0} 208 | iPhone61inLandscapeSplashScreen: {fileID: 0} 209 | appleTVSplashScreen: {fileID: 0} 210 | appleTVSplashScreen2x: {fileID: 0} 211 | tvOSSmallIconLayers: [] 212 | tvOSSmallIconLayers2x: [] 213 | tvOSLargeIconLayers: [] 214 | tvOSLargeIconLayers2x: [] 215 | tvOSTopShelfImageLayers: [] 216 | tvOSTopShelfImageLayers2x: [] 217 | tvOSTopShelfImageWideLayers: [] 218 | tvOSTopShelfImageWideLayers2x: [] 219 | iOSLaunchScreenType: 0 220 | iOSLaunchScreenPortrait: {fileID: 0} 221 | iOSLaunchScreenLandscape: {fileID: 0} 222 | iOSLaunchScreenBackgroundColor: 223 | serializedVersion: 2 224 | rgba: 0 225 | iOSLaunchScreenFillPct: 100 226 | iOSLaunchScreenSize: 100 227 | iOSLaunchScreenCustomXibPath: 228 | iOSLaunchScreeniPadType: 0 229 | iOSLaunchScreeniPadImage: {fileID: 0} 230 | iOSLaunchScreeniPadBackgroundColor: 231 | serializedVersion: 2 232 | rgba: 0 233 | iOSLaunchScreeniPadFillPct: 100 234 | iOSLaunchScreeniPadSize: 100 235 | iOSLaunchScreeniPadCustomXibPath: 236 | iOSUseLaunchScreenStoryboard: 0 237 | iOSLaunchScreenCustomStoryboardPath: 238 | iOSDeviceRequirements: [] 239 | iOSURLSchemes: [] 240 | iOSBackgroundModes: 0 241 | iOSMetalForceHardShadows: 0 242 | metalEditorSupport: 1 243 | metalAPIValidation: 1 244 | iOSRenderExtraFrameOnPause: 0 245 | appleDeveloperTeamID: 246 | iOSManualSigningProvisioningProfileID: 247 | tvOSManualSigningProvisioningProfileID: 248 | iOSManualSigningProvisioningProfileType: 0 249 | tvOSManualSigningProvisioningProfileType: 0 250 | appleEnableAutomaticSigning: 0 251 | iOSRequireARKit: 0 252 | iOSAutomaticallyDetectAndAddCapabilities: 1 253 | appleEnableProMotion: 0 254 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 255 | templatePackageId: com.unity.template.3d@3.1.2 256 | templateDefaultScene: Assets/Scenes/SampleScene.unity 257 | AndroidTargetArchitectures: 1 258 | AndroidSplashScreenScale: 0 259 | androidSplashScreen: {fileID: 0} 260 | AndroidKeystoreName: '{inproject}: ' 261 | AndroidKeyaliasName: 262 | AndroidBuildApkPerCpuArchitecture: 0 263 | AndroidTVCompatibility: 0 264 | AndroidIsGame: 1 265 | AndroidEnableTango: 0 266 | androidEnableBanner: 1 267 | androidUseLowAccuracyLocation: 0 268 | androidUseCustomKeystore: 0 269 | m_AndroidBanners: 270 | - width: 320 271 | height: 180 272 | banner: {fileID: 0} 273 | androidGamepadSupportLevel: 0 274 | AndroidValidateAppBundleSize: 1 275 | AndroidAppBundleSizeToValidate: 150 276 | m_BuildTargetIcons: [] 277 | m_BuildTargetPlatformIcons: [] 278 | m_BuildTargetBatching: 279 | - m_BuildTarget: Standalone 280 | m_StaticBatching: 1 281 | m_DynamicBatching: 0 282 | - m_BuildTarget: tvOS 283 | m_StaticBatching: 1 284 | m_DynamicBatching: 0 285 | - m_BuildTarget: Android 286 | m_StaticBatching: 1 287 | m_DynamicBatching: 0 288 | - m_BuildTarget: iPhone 289 | m_StaticBatching: 1 290 | m_DynamicBatching: 0 291 | - m_BuildTarget: WebGL 292 | m_StaticBatching: 0 293 | m_DynamicBatching: 0 294 | m_BuildTargetGraphicsJobs: 295 | - m_BuildTarget: MacStandaloneSupport 296 | m_GraphicsJobs: 0 297 | - m_BuildTarget: Switch 298 | m_GraphicsJobs: 0 299 | - m_BuildTarget: MetroSupport 300 | m_GraphicsJobs: 0 301 | - m_BuildTarget: AppleTVSupport 302 | m_GraphicsJobs: 0 303 | - m_BuildTarget: BJMSupport 304 | m_GraphicsJobs: 0 305 | - m_BuildTarget: LinuxStandaloneSupport 306 | m_GraphicsJobs: 0 307 | - m_BuildTarget: PS4Player 308 | m_GraphicsJobs: 0 309 | - m_BuildTarget: iOSSupport 310 | m_GraphicsJobs: 0 311 | - m_BuildTarget: WindowsStandaloneSupport 312 | m_GraphicsJobs: 0 313 | - m_BuildTarget: XboxOnePlayer 314 | m_GraphicsJobs: 0 315 | - m_BuildTarget: LuminSupport 316 | m_GraphicsJobs: 0 317 | - m_BuildTarget: AndroidPlayer 318 | m_GraphicsJobs: 0 319 | - m_BuildTarget: WebGLSupport 320 | m_GraphicsJobs: 0 321 | m_BuildTargetGraphicsJobMode: 322 | - m_BuildTarget: PS4Player 323 | m_GraphicsJobMode: 0 324 | - m_BuildTarget: XboxOnePlayer 325 | m_GraphicsJobMode: 0 326 | m_BuildTargetGraphicsAPIs: 327 | - m_BuildTarget: AndroidPlayer 328 | m_APIs: 150000000b000000 329 | m_Automatic: 0 330 | - m_BuildTarget: iOSSupport 331 | m_APIs: 10000000 332 | m_Automatic: 1 333 | - m_BuildTarget: AppleTVSupport 334 | m_APIs: 10000000 335 | m_Automatic: 0 336 | - m_BuildTarget: WebGLSupport 337 | m_APIs: 0b000000 338 | m_Automatic: 1 339 | m_BuildTargetVRSettings: 340 | - m_BuildTarget: Standalone 341 | m_Enabled: 0 342 | m_Devices: 343 | - Oculus 344 | - OpenVR 345 | openGLRequireES31: 0 346 | openGLRequireES31AEP: 0 347 | openGLRequireES32: 0 348 | m_TemplateCustomTags: {} 349 | mobileMTRendering: 350 | Android: 1 351 | iPhone: 1 352 | tvOS: 1 353 | m_BuildTargetGroupLightmapEncodingQuality: [] 354 | m_BuildTargetGroupLightmapSettings: [] 355 | playModeTestRunnerEnabled: 0 356 | runPlayModeTestAsEditModeTest: 0 357 | actionOnDotNetUnhandledException: 1 358 | enableInternalProfiler: 0 359 | logObjCUncaughtExceptions: 1 360 | enableCrashReportAPI: 0 361 | cameraUsageDescription: 362 | locationUsageDescription: 363 | microphoneUsageDescription: 364 | switchNetLibKey: 365 | switchSocketMemoryPoolSize: 6144 366 | switchSocketAllocatorPoolSize: 128 367 | switchSocketConcurrencyLimit: 14 368 | switchScreenResolutionBehavior: 2 369 | switchUseCPUProfiler: 0 370 | switchApplicationID: 0x01004b9000490000 371 | switchNSODependencies: 372 | switchTitleNames_0: 373 | switchTitleNames_1: 374 | switchTitleNames_2: 375 | switchTitleNames_3: 376 | switchTitleNames_4: 377 | switchTitleNames_5: 378 | switchTitleNames_6: 379 | switchTitleNames_7: 380 | switchTitleNames_8: 381 | switchTitleNames_9: 382 | switchTitleNames_10: 383 | switchTitleNames_11: 384 | switchTitleNames_12: 385 | switchTitleNames_13: 386 | switchTitleNames_14: 387 | switchPublisherNames_0: 388 | switchPublisherNames_1: 389 | switchPublisherNames_2: 390 | switchPublisherNames_3: 391 | switchPublisherNames_4: 392 | switchPublisherNames_5: 393 | switchPublisherNames_6: 394 | switchPublisherNames_7: 395 | switchPublisherNames_8: 396 | switchPublisherNames_9: 397 | switchPublisherNames_10: 398 | switchPublisherNames_11: 399 | switchPublisherNames_12: 400 | switchPublisherNames_13: 401 | switchPublisherNames_14: 402 | switchIcons_0: {fileID: 0} 403 | switchIcons_1: {fileID: 0} 404 | switchIcons_2: {fileID: 0} 405 | switchIcons_3: {fileID: 0} 406 | switchIcons_4: {fileID: 0} 407 | switchIcons_5: {fileID: 0} 408 | switchIcons_6: {fileID: 0} 409 | switchIcons_7: {fileID: 0} 410 | switchIcons_8: {fileID: 0} 411 | switchIcons_9: {fileID: 0} 412 | switchIcons_10: {fileID: 0} 413 | switchIcons_11: {fileID: 0} 414 | switchIcons_12: {fileID: 0} 415 | switchIcons_13: {fileID: 0} 416 | switchIcons_14: {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 | switchManualHTML: 433 | switchAccessibleURLs: 434 | switchLegalInformation: 435 | switchMainThreadStackSize: 1048576 436 | switchPresenceGroupId: 437 | switchLogoHandling: 0 438 | switchReleaseVersion: 0 439 | switchDisplayVersion: 1.0.0 440 | switchStartupUserAccount: 0 441 | switchTouchScreenUsage: 0 442 | switchSupportedLanguagesMask: 0 443 | switchLogoType: 0 444 | switchApplicationErrorCodeCategory: 445 | switchUserAccountSaveDataSize: 0 446 | switchUserAccountSaveDataJournalSize: 0 447 | switchApplicationAttribute: 0 448 | switchCardSpecSize: -1 449 | switchCardSpecClock: -1 450 | switchRatingsMask: 0 451 | switchRatingsInt_0: 0 452 | switchRatingsInt_1: 0 453 | switchRatingsInt_2: 0 454 | switchRatingsInt_3: 0 455 | switchRatingsInt_4: 0 456 | switchRatingsInt_5: 0 457 | switchRatingsInt_6: 0 458 | switchRatingsInt_7: 0 459 | switchRatingsInt_8: 0 460 | switchRatingsInt_9: 0 461 | switchRatingsInt_10: 0 462 | switchRatingsInt_11: 0 463 | switchRatingsInt_12: 0 464 | switchLocalCommunicationIds_0: 465 | switchLocalCommunicationIds_1: 466 | switchLocalCommunicationIds_2: 467 | switchLocalCommunicationIds_3: 468 | switchLocalCommunicationIds_4: 469 | switchLocalCommunicationIds_5: 470 | switchLocalCommunicationIds_6: 471 | switchLocalCommunicationIds_7: 472 | switchParentalControl: 0 473 | switchAllowsScreenshot: 1 474 | switchAllowsVideoCapturing: 1 475 | switchAllowsRuntimeAddOnContentInstall: 0 476 | switchDataLossConfirmation: 0 477 | switchUserAccountLockEnabled: 0 478 | switchSystemResourceMemory: 16777216 479 | switchSupportedNpadStyles: 22 480 | switchNativeFsCacheSize: 32 481 | switchIsHoldTypeHorizontal: 0 482 | switchSupportedNpadCount: 8 483 | switchSocketConfigEnabled: 0 484 | switchTcpInitialSendBufferSize: 32 485 | switchTcpInitialReceiveBufferSize: 64 486 | switchTcpAutoSendBufferSizeMax: 256 487 | switchTcpAutoReceiveBufferSizeMax: 256 488 | switchUdpSendBufferSize: 9 489 | switchUdpReceiveBufferSize: 42 490 | switchSocketBufferEfficiency: 4 491 | switchSocketInitializeEnabled: 1 492 | switchNetworkInterfaceManagerInitializeEnabled: 1 493 | switchPlayerConnectionEnabled: 1 494 | ps4NPAgeRating: 12 495 | ps4NPTitleSecret: 496 | ps4NPTrophyPackPath: 497 | ps4ParentalLevel: 11 498 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 499 | ps4Category: 0 500 | ps4MasterVersion: 01.00 501 | ps4AppVersion: 01.00 502 | ps4AppType: 0 503 | ps4ParamSfxPath: 504 | ps4VideoOutPixelFormat: 0 505 | ps4VideoOutInitialWidth: 1920 506 | ps4VideoOutBaseModeInitialWidth: 1920 507 | ps4VideoOutReprojectionRate: 60 508 | ps4PronunciationXMLPath: 509 | ps4PronunciationSIGPath: 510 | ps4BackgroundImagePath: 511 | ps4StartupImagePath: 512 | ps4StartupImagesFolder: 513 | ps4IconImagesFolder: 514 | ps4SaveDataImagePath: 515 | ps4SdkOverride: 516 | ps4BGMPath: 517 | ps4ShareFilePath: 518 | ps4ShareOverlayImagePath: 519 | ps4PrivacyGuardImagePath: 520 | ps4NPtitleDatPath: 521 | ps4RemotePlayKeyAssignment: -1 522 | ps4RemotePlayKeyMappingDir: 523 | ps4PlayTogetherPlayerCount: 0 524 | ps4EnterButtonAssignment: 1 525 | ps4ApplicationParam1: 0 526 | ps4ApplicationParam2: 0 527 | ps4ApplicationParam3: 0 528 | ps4ApplicationParam4: 0 529 | ps4DownloadDataSize: 0 530 | ps4GarlicHeapSize: 2048 531 | ps4ProGarlicHeapSize: 2560 532 | playerPrefsMaxSize: 32768 533 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 534 | ps4pnSessions: 1 535 | ps4pnPresence: 1 536 | ps4pnFriends: 1 537 | ps4pnGameCustomData: 1 538 | playerPrefsSupport: 0 539 | enableApplicationExit: 0 540 | resetTempFolder: 1 541 | restrictedAudioUsageRights: 0 542 | ps4UseResolutionFallback: 0 543 | ps4ReprojectionSupport: 0 544 | ps4UseAudio3dBackend: 0 545 | ps4UseLowGarlicFragmentationMode: 1 546 | ps4SocialScreenEnabled: 0 547 | ps4ScriptOptimizationLevel: 0 548 | ps4Audio3dVirtualSpeakerCount: 14 549 | ps4attribCpuUsage: 0 550 | ps4PatchPkgPath: 551 | ps4PatchLatestPkgPath: 552 | ps4PatchChangeinfoPath: 553 | ps4PatchDayOne: 0 554 | ps4attribUserManagement: 0 555 | ps4attribMoveSupport: 0 556 | ps4attrib3DSupport: 0 557 | ps4attribShareSupport: 0 558 | ps4attribExclusiveVR: 0 559 | ps4disableAutoHideSplash: 0 560 | ps4videoRecordingFeaturesUsed: 0 561 | ps4contentSearchFeaturesUsed: 0 562 | ps4attribEyeToEyeDistanceSettingVR: 0 563 | ps4IncludedModules: [] 564 | ps4attribVROutputEnabled: 0 565 | monoEnv: 566 | splashScreenBackgroundSourceLandscape: {fileID: 0} 567 | splashScreenBackgroundSourcePortrait: {fileID: 0} 568 | blurSplashScreenBackground: 1 569 | spritePackerPolicy: 570 | webGLMemorySize: 16 571 | webGLExceptionSupport: 1 572 | webGLNameFilesAsHashes: 0 573 | webGLDataCaching: 1 574 | webGLDebugSymbols: 0 575 | webGLEmscriptenArgs: 576 | webGLModulesDirectory: 577 | webGLTemplate: APPLICATION:Default 578 | webGLAnalyzeBuildSize: 0 579 | webGLUseEmbeddedResources: 0 580 | webGLCompressionFormat: 1 581 | webGLLinkerTarget: 1 582 | webGLThreadsSupport: 0 583 | webGLWasmStreaming: 0 584 | scriptingDefineSymbols: 585 | 1: UNITY_POST_PROCESSING_STACK_V2 586 | 7: UNITY_POST_PROCESSING_STACK_V2 587 | 13: UNITY_POST_PROCESSING_STACK_V2 588 | 19: UNITY_POST_PROCESSING_STACK_V2 589 | 21: UNITY_POST_PROCESSING_STACK_V2 590 | 25: UNITY_POST_PROCESSING_STACK_V2 591 | 26: UNITY_POST_PROCESSING_STACK_V2 592 | 27: UNITY_POST_PROCESSING_STACK_V2 593 | 28: UNITY_POST_PROCESSING_STACK_V2 594 | 29: UNITY_POST_PROCESSING_STACK_V2 595 | platformArchitecture: {} 596 | scriptingBackend: {} 597 | il2cppCompilerConfiguration: {} 598 | managedStrippingLevel: {} 599 | incrementalIl2cppBuild: {} 600 | allowUnsafeCode: 0 601 | additionalIl2CppArgs: 602 | scriptingRuntimeVersion: 1 603 | gcIncremental: 0 604 | gcWBarrierValidation: 0 605 | apiCompatibilityLevelPerPlatform: {} 606 | m_RenderingPath: 1 607 | m_MobileRenderingPath: 1 608 | metroPackageName: Template_3D 609 | metroPackageVersion: 610 | metroCertificatePath: 611 | metroCertificatePassword: 612 | metroCertificateSubject: 613 | metroCertificateIssuer: 614 | metroCertificateNotAfter: 0000000000000000 615 | metroApplicationDescription: Template_3D 616 | wsaImages: {} 617 | metroTileShortName: 618 | metroTileShowName: 0 619 | metroMediumTileShowName: 0 620 | metroLargeTileShowName: 0 621 | metroWideTileShowName: 0 622 | metroSupportStreamingInstall: 0 623 | metroLastRequiredScene: 0 624 | metroDefaultTileSize: 1 625 | metroTileForegroundText: 2 626 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 627 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 628 | a: 1} 629 | metroSplashScreenUseBackgroundColor: 0 630 | platformCapabilities: {} 631 | metroTargetDeviceFamilies: {} 632 | metroFTAName: 633 | metroFTAFileTypes: [] 634 | metroProtocolName: 635 | XboxOneProductId: 636 | XboxOneUpdateKey: 637 | XboxOneSandboxId: 638 | XboxOneContentId: 639 | XboxOneTitleId: 640 | XboxOneSCId: 641 | XboxOneGameOsOverridePath: 642 | XboxOnePackagingOverridePath: 643 | XboxOneAppManifestOverridePath: 644 | XboxOneVersion: 1.0.0.0 645 | XboxOnePackageEncryption: 0 646 | XboxOnePackageUpdateGranularity: 2 647 | XboxOneDescription: 648 | XboxOneLanguage: 649 | - enus 650 | XboxOneCapability: [] 651 | XboxOneGameRating: {} 652 | XboxOneIsContentPackage: 0 653 | XboxOneEnableGPUVariability: 1 654 | XboxOneSockets: {} 655 | XboxOneSplashScreen: {fileID: 0} 656 | XboxOneAllowedProductIds: [] 657 | XboxOnePersistentLocalStorageSize: 0 658 | XboxOneXTitleMemory: 8 659 | XboxOneOverrideIdentityName: 660 | vrEditorSettings: 661 | daydream: 662 | daydreamIconForeground: {fileID: 0} 663 | daydreamIconBackground: {fileID: 0} 664 | cloudServicesEnabled: 665 | UNet: 1 666 | luminIcon: 667 | m_Name: 668 | m_ModelFolderPath: 669 | m_PortalFolderPath: 670 | luminCert: 671 | m_CertPath: 672 | m_SignPackage: 1 673 | luminIsChannelApp: 0 674 | luminVersion: 675 | m_VersionCode: 1 676 | m_VersionName: 677 | apiCompatibilityLevel: 6 678 | cloudProjectId: 679 | framebufferDepthMemorylessMode: 0 680 | projectName: 681 | organizationId: 682 | cloudEnabled: 0 683 | enableNativePlatformBackendsForNewInputSystem: 0 684 | disableOldInputManagerSupport: 0 685 | legacyClampBlendShapeWeights: 0 686 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.3.9f1 2 | m_EditorVersionWithRevision: 2019.3.9f1 (e6e740a1c473) 3 | -------------------------------------------------------------------------------- /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: 2 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | - serializedVersion: 2 46 | name: Low 47 | pixelLightCount: 0 48 | shadows: 0 49 | shadowResolution: 0 50 | shadowProjection: 1 51 | shadowCascades: 1 52 | shadowDistance: 20 53 | shadowNearPlaneOffset: 3 54 | shadowCascade2Split: 0.33333334 55 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 56 | shadowmaskMode: 0 57 | skinWeights: 2 58 | textureQuality: 0 59 | anisotropicTextures: 0 60 | antiAliasing: 0 61 | softParticles: 0 62 | softVegetation: 0 63 | realtimeReflectionProbes: 0 64 | billboardsFaceCameraPosition: 0 65 | vSyncCount: 0 66 | lodBias: 0.4 67 | maximumLODLevel: 0 68 | streamingMipmapsActive: 0 69 | streamingMipmapsAddAllCameras: 1 70 | streamingMipmapsMemoryBudget: 512 71 | streamingMipmapsRenderersPerFrame: 512 72 | streamingMipmapsMaxLevelReduction: 2 73 | streamingMipmapsMaxFileIORequests: 1024 74 | particleRaycastBudget: 16 75 | asyncUploadTimeSlice: 2 76 | asyncUploadBufferSize: 16 77 | asyncUploadPersistentBuffer: 1 78 | resolutionScalingFixedDPIFactor: 1 79 | customRenderPipeline: {fileID: 0} 80 | excludedTargetPlatforms: [] 81 | - serializedVersion: 2 82 | name: Medium 83 | pixelLightCount: 1 84 | shadows: 1 85 | shadowResolution: 0 86 | shadowProjection: 1 87 | shadowCascades: 1 88 | shadowDistance: 20 89 | shadowNearPlaneOffset: 3 90 | shadowCascade2Split: 0.33333334 91 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 92 | shadowmaskMode: 0 93 | skinWeights: 2 94 | textureQuality: 0 95 | anisotropicTextures: 1 96 | antiAliasing: 0 97 | softParticles: 0 98 | softVegetation: 0 99 | realtimeReflectionProbes: 0 100 | billboardsFaceCameraPosition: 0 101 | vSyncCount: 1 102 | lodBias: 0.7 103 | maximumLODLevel: 0 104 | streamingMipmapsActive: 0 105 | streamingMipmapsAddAllCameras: 1 106 | streamingMipmapsMemoryBudget: 512 107 | streamingMipmapsRenderersPerFrame: 512 108 | streamingMipmapsMaxLevelReduction: 2 109 | streamingMipmapsMaxFileIORequests: 1024 110 | particleRaycastBudget: 64 111 | asyncUploadTimeSlice: 2 112 | asyncUploadBufferSize: 16 113 | asyncUploadPersistentBuffer: 1 114 | resolutionScalingFixedDPIFactor: 1 115 | customRenderPipeline: {fileID: 0} 116 | excludedTargetPlatforms: [] 117 | - serializedVersion: 2 118 | name: High 119 | pixelLightCount: 2 120 | shadows: 2 121 | shadowResolution: 1 122 | shadowProjection: 1 123 | shadowCascades: 2 124 | shadowDistance: 40 125 | shadowNearPlaneOffset: 3 126 | shadowCascade2Split: 0.33333334 127 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 128 | shadowmaskMode: 1 129 | skinWeights: 2 130 | textureQuality: 0 131 | anisotropicTextures: 1 132 | antiAliasing: 0 133 | softParticles: 0 134 | softVegetation: 1 135 | realtimeReflectionProbes: 1 136 | billboardsFaceCameraPosition: 1 137 | vSyncCount: 1 138 | lodBias: 1 139 | maximumLODLevel: 0 140 | streamingMipmapsActive: 0 141 | streamingMipmapsAddAllCameras: 1 142 | streamingMipmapsMemoryBudget: 512 143 | streamingMipmapsRenderersPerFrame: 512 144 | streamingMipmapsMaxLevelReduction: 2 145 | streamingMipmapsMaxFileIORequests: 1024 146 | particleRaycastBudget: 256 147 | asyncUploadTimeSlice: 2 148 | asyncUploadBufferSize: 16 149 | asyncUploadPersistentBuffer: 1 150 | resolutionScalingFixedDPIFactor: 1 151 | customRenderPipeline: {fileID: 0} 152 | excludedTargetPlatforms: [] 153 | - serializedVersion: 2 154 | name: Very High 155 | pixelLightCount: 3 156 | shadows: 2 157 | shadowResolution: 2 158 | shadowProjection: 1 159 | shadowCascades: 2 160 | shadowDistance: 70 161 | shadowNearPlaneOffset: 3 162 | shadowCascade2Split: 0.33333334 163 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 164 | shadowmaskMode: 1 165 | skinWeights: 4 166 | textureQuality: 0 167 | anisotropicTextures: 2 168 | antiAliasing: 2 169 | softParticles: 1 170 | softVegetation: 1 171 | realtimeReflectionProbes: 1 172 | billboardsFaceCameraPosition: 1 173 | vSyncCount: 1 174 | lodBias: 1.5 175 | maximumLODLevel: 0 176 | streamingMipmapsActive: 0 177 | streamingMipmapsAddAllCameras: 1 178 | streamingMipmapsMemoryBudget: 512 179 | streamingMipmapsRenderersPerFrame: 512 180 | streamingMipmapsMaxLevelReduction: 2 181 | streamingMipmapsMaxFileIORequests: 1024 182 | particleRaycastBudget: 1024 183 | asyncUploadTimeSlice: 2 184 | asyncUploadBufferSize: 16 185 | asyncUploadPersistentBuffer: 1 186 | resolutionScalingFixedDPIFactor: 1 187 | customRenderPipeline: {fileID: 0} 188 | excludedTargetPlatforms: [] 189 | - serializedVersion: 2 190 | name: Ultra 191 | pixelLightCount: 4 192 | shadows: 2 193 | shadowResolution: 2 194 | shadowProjection: 1 195 | shadowCascades: 4 196 | shadowDistance: 150 197 | shadowNearPlaneOffset: 3 198 | shadowCascade2Split: 0.33333334 199 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 200 | shadowmaskMode: 1 201 | skinWeights: 4 202 | textureQuality: 0 203 | anisotropicTextures: 2 204 | antiAliasing: 0 205 | softParticles: 1 206 | softVegetation: 1 207 | realtimeReflectionProbes: 1 208 | billboardsFaceCameraPosition: 1 209 | vSyncCount: 1 210 | lodBias: 2 211 | maximumLODLevel: 0 212 | streamingMipmapsActive: 0 213 | streamingMipmapsAddAllCameras: 1 214 | streamingMipmapsMemoryBudget: 512 215 | streamingMipmapsRenderersPerFrame: 512 216 | streamingMipmapsMaxLevelReduction: 2 217 | streamingMipmapsMaxFileIORequests: 1024 218 | particleRaycastBudget: 4096 219 | asyncUploadTimeSlice: 2 220 | asyncUploadBufferSize: 16 221 | asyncUploadPersistentBuffer: 1 222 | resolutionScalingFixedDPIFactor: 1 223 | customRenderPipeline: {fileID: 0} 224 | excludedTargetPlatforms: [] 225 | m_PerPlatformDefaultQuality: 226 | Android: 2 227 | Lumin: 5 228 | Nintendo 3DS: 5 229 | Nintendo Switch: 5 230 | PS4: 5 231 | PSP2: 2 232 | Standalone: 5 233 | WebGL: 2 234 | Windows Store Apps: 5 235 | XboxOne: 5 236 | iPhone: 2 237 | tvOS: 2 238 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ProjectSettings/URPProjectSettings.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: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_LastMaterialVersion: 1 16 | -------------------------------------------------------------------------------- /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_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nerf_Unity 2 | 3 | ### :gem: [**Project page**](https://kwea123.github.io/nerf_pl/) (live demo!) 4 | 5 | Unity projects for my implementation of [nerf_pl (Neural Radiance Fields)](https://github.com/kwea123/nerf_pl) 6 | 7 | Update : Now you can view the volume from **inside**! See [video](https://youtu.be/JJfG2G5ebv4) 8 | 9 | ### Tutorial and demo videos 10 | 11 | 12 | 13 | 14 | # Installation and usage 15 | 16 | This project is built on Unity 2019.3.9f1 on **Windows**. It contains 3 scenes (under `Scenes/` folder): 17 | * [MeshRender](#meshrender) 18 | * [MixedReality](#mixedreality) 19 | * [VolumeRender](#volumerender) 20 | 21 | Due to large size of the files, I put the assets in [release](https://github.com/kwea123/nerf_Unity/releases), you need to download from there and import to Unity. **Make sure you download them and put under `Assets/` before opening Unity.** Follow the instructions below for each scene: 22 | 23 | ### If you want to use your own data, please see [this](https://github.com/kwea123/nerf_pl/blob/master/README_Unity.md) and [videos](https://www.youtube.com/playlist?list=PLDV2CyUo4q-K02pNEyDr7DYpTQuka3mbV) to train on your own data first. 24 | 25 | ## MeshRender 26 | 27 | Render reconstructed meshes. 28 | ![image](https://user-images.githubusercontent.com/11364490/82660030-91807900-9c64-11ea-8f4f-7ac3c57f7d9e.png) 29 | 30 | ### Data preparation 31 | 32 | 1. Download the mesh files (`*.ply`) from [here](https://github.com/kwea123/nerf_Unity/releases) 33 | 2. Follow the below image to add the mesh to scene: 34 | * Select gameobject 35 | * Drag mesh into the missing parts 36 | ![image](https://user-images.githubusercontent.com/11364490/82660456-5df21e80-9c65-11ea-95c2-732fa4fed936.png) 37 | 38 | ## MixedReality 39 | 40 | Render a real scene with correct depth values, where you can add virtual objects and get accurate occlusion effect (visual effect only). 41 | ![image](https://user-images.githubusercontent.com/11364490/82661303-b8d84580-9c66-11ea-8477-4e9f49192a08.png) 42 | 43 | ### Data preparation 44 | If you're using linux, it seems `StreamingAssets` cannot be correctly imported [#2](/../../issues/2). In this case, try to manually enter the path to files into the missing parts. 45 | 46 | ## VolumeRender 47 | Volume render a virtual object. 48 | 49 | ![image](https://user-images.githubusercontent.com/11364490/82661894-d954cf80-9c67-11ea-916f-d441b522ecc1.png) 50 | 51 | ### Data preparation 52 | 53 | 1. Download the volume files (`*.vol`) from [here](https://github.com/kwea123/nerf_Unity/releases) 54 | 2. Follow the below image to add the volume to scene: 55 | * Select gameobject 56 | * Drag vol into the missing part 57 | ![image](https://user-images.githubusercontent.com/11364490/82661695-72371b00-9c67-11ea-96cd-4f1972fdf48b.png) 58 | --------------------------------------------------------------------------------