├── .gitignore ├── .idea └── .idea.My project │ └── .idea │ ├── .gitignore │ ├── encodings.xml │ └── indexLayout.xml ├── Assets ├── _Assets.meta ├── _Assets │ ├── Diagoanl object.mtl │ ├── Diagoanl object.mtl.meta │ ├── Diagoanl object.obj │ ├── Diagoanl object.obj.meta │ ├── ExampleMaterial.mat │ ├── ExampleMaterial.mat.meta │ ├── ExampleObject.mtl │ ├── ExampleObject.mtl.meta │ ├── ExampleObject.obj │ ├── ExampleObject.obj.meta │ ├── ExampleObject2.mtl │ ├── ExampleObject2.mtl.meta │ ├── ExampleObject2.obj │ ├── ExampleObject2.obj.meta │ ├── ExampleObject3.mtl │ ├── ExampleObject3.mtl.meta │ ├── ExampleObject3.obj │ ├── ExampleObject3.obj.meta │ ├── ExampleObject4.mtl │ ├── ExampleObject4.mtl.meta │ ├── ExampleObject4.obj │ ├── ExampleObject4.obj.meta │ ├── head_material.mat │ ├── head_material.mat.meta │ ├── male_head.obj │ ├── male_head.obj.meta │ ├── viking_room.mat │ ├── viking_room.mat.meta │ ├── viking_room.obj │ ├── viking_room.obj.meta │ ├── viking_room.png │ └── viking_room.png.meta ├── _Scripts.meta ├── _Scripts │ ├── BVHConstructor.cs │ ├── BVHConstructor.cs.meta │ ├── ComputeBufferSorter.cs │ ├── ComputeBufferSorter.cs.meta │ ├── Constants.cs │ ├── Constants.cs.meta │ ├── DataBuffer.cs │ ├── DataBuffer.cs.meta │ ├── MeshBufferContainer.cs │ ├── MeshBufferContainer.cs.meta │ ├── RaytracingMeshDrawer.cs │ ├── RaytracingMeshDrawer.cs.meta │ ├── SceneDataTypes.cs │ ├── SceneDataTypes.cs.meta │ ├── ShaderContainer.cs │ ├── ShaderContainer.cs.meta │ ├── _debug.meta │ ├── _debug │ │ ├── _debugComputeShaderTester.cs │ │ ├── _debugComputeShaderTester.cs.meta │ │ ├── _debugRayBoxIntersectionTester.cs │ │ └── _debugRayBoxIntersectionTester.cs.meta │ ├── _utils.meta │ └── _utils │ │ ├── Utils.cs │ │ └── Utils.cs.meta ├── _Shaders.meta ├── _Shaders │ ├── BVH.meta │ ├── BVH │ │ ├── BVH.compute │ │ └── BVH.compute.meta │ ├── Constants.cginc │ ├── Constants.cginc.meta │ ├── ImageComposer.shader │ ├── ImageComposer.shader.meta │ ├── Raytracing.meta │ ├── Raytracing │ │ ├── Raytracing.compute │ │ └── Raytracing.compute.meta │ ├── Sorting.meta │ ├── Sorting │ │ ├── GlobalRadixSort.compute │ │ ├── GlobalRadixSort.compute.meta │ │ ├── LocalRadixSort.compute │ │ ├── LocalRadixSort.compute.meta │ │ ├── Scan.compute │ │ └── Scan.compute.meta │ ├── _debug.meta │ └── _debug │ │ ├── debugShader.compute │ │ └── debugShader.compute.meta ├── __Scenes.meta └── __Scenes │ ├── Scene.unity │ └── Scene.unity.meta ├── Packages ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── MemorySettings.asset ├── NavMeshAreas.asset ├── PackageManagerSettings.asset ├── Packages │ └── com.unity.testtools.codecoverage │ │ └── Settings.json ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── SceneTemplateSettings.json ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset ├── XRSettings.asset └── boot.config └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | 13 | # MemoryCaptures can get excessive in size. 14 | # They also could contain extremely sensitive data 15 | /[Mm]emoryCaptures/ 16 | 17 | # Recordings can get excessive in size 18 | /[Rr]ecordings/ 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 | .idea/ 30 | 31 | # Gradle cache directory 32 | .gradle/ 33 | 34 | # Autogenerated VS/MD/Consulo solution and project files 35 | ExportedObj/ 36 | .consulo/ 37 | *.csproj 38 | *.unityproj 39 | *.sln 40 | *.suo 41 | *.tmp 42 | *.user 43 | *.userprefs 44 | *.pidb 45 | *.booproj 46 | *.svd 47 | *.pdb 48 | *.mdb 49 | *.opendb 50 | *.VC.db 51 | 52 | # Unity3D generated meta files 53 | *.pidb.meta 54 | *.pdb.meta 55 | *.mdb.meta 56 | 57 | # Unity3D generated file on crash reports 58 | sysinfo.txt 59 | 60 | # Builds 61 | *.apk 62 | *.aab 63 | *.unitypackage 64 | *.app 65 | 66 | # Crashlytics generated file 67 | crashlytics-build.properties 68 | 69 | # Packed Addressables 70 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 71 | 72 | # Temporary auto-generated Android Assets 73 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 74 | /[Aa]ssets/[Ss]treamingAssets/aa/* -------------------------------------------------------------------------------- /.idea/.idea.My project/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Rider ignored files 5 | /modules.xml 6 | /projectSettingsUpdater.xml 7 | /.idea.My project.iml 8 | /contentModel.xml 9 | -------------------------------------------------------------------------------- /.idea/.idea.My project/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/.idea.My project/.idea/indexLayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Assets/_Assets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c32c9fe09ccbba24eba64cd3e35306ae 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Assets/Diagoanl object.mtl: -------------------------------------------------------------------------------- 1 | newmtl initialShadingGroup 2 | illum 4 3 | Kd 0.50 0.50 0.50 4 | Ka 0.00 0.00 0.00 5 | Tf 1.00 1.00 1.00 6 | Ni 1.00 7 | -------------------------------------------------------------------------------- /Assets/_Assets/Diagoanl object.mtl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9164be3816d984d4a8e7f36d6d47017f 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Assets/Diagoanl object.obj: -------------------------------------------------------------------------------- 1 | # This file uses centimeters as units for non-parametric coordinates. 2 | 3 | mtllib Diagoanl object.mtl 4 | g default 5 | v -5.000000 -5.000000 0.000000 6 | v -4.000000 -5.000000 0.000000 7 | v -5.000000 -4.000000 0.000000 8 | v -4.000000 -4.000000 0.000000 9 | v -3.000000 -4.000000 0.000000 10 | v -4.000000 -3.000000 0.000000 11 | v -3.000000 -3.000000 0.000000 12 | v -2.000000 -3.000000 0.000000 13 | v -3.000000 -2.000000 0.000000 14 | v -2.000000 -2.000000 0.000000 15 | v -1.000000 -2.000000 0.000000 16 | v -2.000000 -1.000000 0.000000 17 | v -1.000000 -1.000000 0.000000 18 | v 0.000000 -1.000000 0.000000 19 | v -1.000000 0.000000 0.000000 20 | v 0.000000 0.000000 0.000000 21 | v 1.000000 0.000000 0.000000 22 | v 0.000000 1.000000 0.000000 23 | v 1.000000 1.000000 0.000000 24 | v 2.000000 1.000000 0.000000 25 | v 1.000000 2.000000 0.000000 26 | v 2.000000 2.000000 0.000000 27 | v 3.000000 2.000000 0.000000 28 | v 2.000000 3.000000 0.000000 29 | v 3.000000 3.000000 0.000000 30 | v 4.000000 3.000000 0.000000 31 | v 3.000000 4.000000 0.000000 32 | v 4.000000 4.000000 0.000000 33 | v 5.000000 4.000000 0.000000 34 | v 4.000000 5.000000 0.000000 35 | vt 0.375000 0.000000 36 | vt 0.400000 0.000000 37 | vt 0.375000 0.025000 38 | vt 0.400000 0.025000 39 | vt 0.425000 0.025000 40 | vt 0.400000 0.050000 41 | vt 0.425000 0.050000 42 | vt 0.450000 0.050000 43 | vt 0.425000 0.075000 44 | vt 0.450000 0.075000 45 | vt 0.475000 0.075000 46 | vt 0.450000 0.100000 47 | vt 0.475000 0.100000 48 | vt 0.500000 0.100000 49 | vt 0.475000 0.125000 50 | vt 0.500000 0.125000 51 | vt 0.525000 0.125000 52 | vt 0.500000 0.150000 53 | vt 0.525000 0.150000 54 | vt 0.550000 0.150000 55 | vt 0.525000 0.175000 56 | vt 0.550000 0.175000 57 | vt 0.575000 0.175000 58 | vt 0.550000 0.200000 59 | vt 0.575000 0.200000 60 | vt 0.600000 0.200000 61 | vt 0.575000 0.225000 62 | vt 0.600000 0.225000 63 | vt 0.625000 0.225000 64 | vt 0.600000 0.250000 65 | vn 0.000000 0.000000 1.000000 66 | vn 0.000000 0.000000 1.000000 67 | vn 0.000000 0.000000 1.000000 68 | vn 0.000000 0.000000 1.000000 69 | vn 0.000000 0.000000 1.000000 70 | vn 0.000000 0.000000 1.000000 71 | vn 0.000000 0.000000 1.000000 72 | vn 0.000000 0.000000 1.000000 73 | vn 0.000000 0.000000 1.000000 74 | vn 0.000000 0.000000 1.000000 75 | vn 0.000000 0.000000 1.000000 76 | vn 0.000000 0.000000 1.000000 77 | vn 0.000000 0.000000 1.000000 78 | vn 0.000000 0.000000 1.000000 79 | vn 0.000000 0.000000 1.000000 80 | vn 0.000000 0.000000 1.000000 81 | vn 0.000000 0.000000 1.000000 82 | vn 0.000000 0.000000 1.000000 83 | vn 0.000000 0.000000 1.000000 84 | vn 0.000000 0.000000 1.000000 85 | vn 0.000000 0.000000 1.000000 86 | vn 0.000000 0.000000 1.000000 87 | vn 0.000000 0.000000 1.000000 88 | vn 0.000000 0.000000 1.000000 89 | vn 0.000000 0.000000 1.000000 90 | vn 0.000000 0.000000 1.000000 91 | vn 0.000000 0.000000 1.000000 92 | vn 0.000000 0.000000 1.000000 93 | vn 0.000000 0.000000 1.000000 94 | vn 0.000000 0.000000 1.000000 95 | s off 96 | g pCube1 97 | usemtl initialShadingGroup 98 | f 1/1/1 2/2/2 3/3/3 99 | f 4/4/4 5/5/5 6/6/6 100 | f 7/7/7 8/8/8 9/9/9 101 | f 10/10/10 11/11/11 12/12/12 102 | f 13/13/13 14/14/14 15/15/15 103 | f 16/16/16 17/17/17 18/18/18 104 | f 19/19/19 20/20/20 21/21/21 105 | f 22/22/22 23/23/23 24/24/24 106 | f 25/25/25 26/26/26 27/27/27 107 | f 28/28/28 29/29/29 30/30/30 108 | -------------------------------------------------------------------------------- /Assets/_Assets/Diagoanl object.obj.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be3b1cebdceea2d428ef848b3d2eeac7 3 | ModelImporter: 4 | serializedVersion: 21202 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 0 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 1 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 0 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importVisibility: 1 44 | importBlendShapes: 1 45 | importCameras: 1 46 | importLights: 1 47 | nodeNameCollisionStrategy: 1 48 | fileIdsGeneration: 2 49 | swapUVChannels: 0 50 | generateSecondaryUV: 0 51 | useFileUnits: 1 52 | keepQuads: 0 53 | weldVertices: 1 54 | bakeAxisConversion: 0 55 | preserveHierarchy: 0 56 | skinWeightsMode: 0 57 | maxBonesPerVertex: 4 58 | minBoneWeight: 0.001 59 | optimizeBones: 1 60 | meshOptimizationFlags: -1 61 | indexFormat: 0 62 | secondaryUVAngleDistortion: 8 63 | secondaryUVAreaDistortion: 15.000001 64 | secondaryUVHardAngle: 88 65 | secondaryUVMarginMethod: 1 66 | secondaryUVMinLightmapResolution: 40 67 | secondaryUVMinObjectScale: 1 68 | secondaryUVPackMargin: 4 69 | useFileScale: 1 70 | tangentSpace: 71 | normalSmoothAngle: 60 72 | normalImportMode: 0 73 | tangentImportMode: 3 74 | normalCalculationMode: 4 75 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 76 | blendShapeNormalImportMode: 1 77 | normalSmoothingSource: 0 78 | referencedClips: [] 79 | importAnimation: 0 80 | humanDescription: 81 | serializedVersion: 3 82 | human: [] 83 | skeleton: [] 84 | armTwist: 0.5 85 | foreArmTwist: 0.5 86 | upperLegTwist: 0.5 87 | legTwist: 0.5 88 | armStretch: 0.05 89 | legStretch: 0.05 90 | feetSpacing: 0 91 | globalScale: 1 92 | rootMotionBoneName: 93 | hasTranslationDoF: 0 94 | hasExtraRoot: 0 95 | skeletonHasParents: 1 96 | lastHumanDescriptionAvatarSource: {instanceID: 0} 97 | autoGenerateAvatarMappingIfUnspecified: 1 98 | animationType: 0 99 | humanoidOversampling: 1 100 | avatarSetup: 0 101 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 102 | additionalBone: 0 103 | userData: 104 | assetBundleName: 105 | assetBundleVariant: 106 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: ExampleMaterial 11 | m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ValidKeywords: [] 13 | m_InvalidKeywords: [] 14 | m_LightmapFlags: 4 15 | m_EnableInstancingVariants: 0 16 | m_DoubleSidedGI: 0 17 | m_CustomRenderQueue: -1 18 | stringTagMap: {} 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailAlbedoMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailMask: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailNormalMap: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _EmissionMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _MainTex: 44 | m_Texture: {fileID: 2800000, guid: b80fd47413dfb4945b9abc5905c53fbc, type: 3} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MetallicGlossMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _OcclusionMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _ParallaxMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | m_Ints: [] 60 | m_Floats: 61 | - _BumpScale: 1 62 | - _Cutoff: 0.5 63 | - _DetailNormalMapScale: 1 64 | - _DstBlend: 0 65 | - _GlossMapScale: 1 66 | - _Glossiness: 0.5 67 | - _GlossyReflections: 1 68 | - _Metallic: 0 69 | - _Mode: 0 70 | - _OcclusionStrength: 1 71 | - _Parallax: 0.02 72 | - _SmoothnessTextureChannel: 0 73 | - _SpecularHighlights: 1 74 | - _SrcBlend: 1 75 | - _UVSec: 0 76 | - _ZWrite: 1 77 | m_Colors: 78 | - _Color: {r: 0.54187435, g: 0.5701992, b: 0.9339623, a: 1} 79 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 80 | m_BuildTextureStacks: [] 81 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 03450fe907202b54380ac1a9e4193c6d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleObject.mtl: -------------------------------------------------------------------------------- 1 | newmtl initialShadingGroup 2 | illum 4 3 | Kd 0.50 0.50 0.50 4 | Ka 0.00 0.00 0.00 5 | Tf 1.00 1.00 1.00 6 | Ni 1.00 7 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleObject.mtl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e274e01a60585cc49a12660ffa3ce226 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleObject.obj: -------------------------------------------------------------------------------- 1 | # This file uses centimeters as units for non-parametric coordinates. 2 | 3 | mtllib ExampleObject.mtl 4 | g default 5 | v -1.500000 -2.500000 0.000000 6 | v -0.500000 -2.500000 0.000000 7 | v 0.500000 -2.500000 0.000000 8 | v 1.500000 -2.500000 0.000000 9 | v 2.500000 -2.500000 0.000000 10 | v -2.500000 -1.500000 0.000000 11 | v -1.500000 -1.500000 0.000000 12 | v -0.500000 -1.500000 0.000000 13 | v 0.500000 -1.500000 0.000000 14 | v 1.500000 -1.500000 0.000000 15 | v 2.500000 -1.500000 0.000000 16 | v -2.500000 -0.500000 0.000000 17 | v -1.500000 -0.500000 0.000000 18 | v -0.500000 -0.500000 0.000000 19 | v 0.500000 -0.500000 0.000000 20 | v 1.500000 -0.500000 0.000000 21 | v 2.500000 -0.500000 0.000000 22 | v -2.500000 0.500000 0.000000 23 | v -1.500000 0.500000 0.000000 24 | v -0.500000 0.500000 0.000000 25 | v 0.500000 0.500000 0.000000 26 | v 1.500000 0.500000 0.000000 27 | v 2.500000 0.500000 0.000000 28 | v -4.431625 2.595483 0.000000 29 | v -1.500000 1.500000 0.000000 30 | v -0.500000 1.500000 0.000000 31 | v 0.500000 1.500000 0.000000 32 | v 2.133447 2.931503 0.000000 33 | v 2.664129 2.083932 0.000000 34 | v -3.526416 3.020451 0.000000 35 | v -1.500000 2.500000 0.000000 36 | v -0.500000 2.500000 0.000000 37 | v 0.500000 2.500000 0.000000 38 | v 2.981018 3.462186 0.000000 39 | v 1.500000 1.500000 -0.000000 40 | v 1.500000 1.500000 0.000000 41 | v -2.500000 1.500000 0.000000 42 | v -4.006657 1.690274 0.000000 43 | v -1.500000 1.500000 0.000000 44 | v -4.525651 -1.727627 0.000000 45 | v -3.665516 -2.237693 0.000000 46 | v -1.500000 -1.500000 0.000000 47 | v -1.500000 -1.500000 0.000000 48 | v -4.015586 -0.867492 0.000000 49 | vt 0.375000 0.050000 50 | vt 0.425000 0.000000 51 | vt 0.425000 0.050000 52 | vt 0.475000 0.000000 53 | vt 0.475000 0.050000 54 | vt 0.525000 0.000000 55 | vt 0.525000 0.050000 56 | vt 0.575000 0.000000 57 | vt 0.575000 0.050000 58 | vt 0.625000 0.000000 59 | vt 0.625000 0.050000 60 | vt 0.375000 0.100000 61 | vt 0.425000 0.100000 62 | vt 0.475000 0.100000 63 | vt 0.525000 0.100000 64 | vt 0.575000 0.100000 65 | vt 0.375000 0.150000 66 | vt 0.425000 0.150000 67 | vt 0.475000 0.150000 68 | vt 0.525000 0.150000 69 | vt 0.625000 0.100000 70 | vt 0.575000 0.150000 71 | vt 0.375000 0.200000 72 | vt 0.425000 0.200000 73 | vt 0.475000 0.200000 74 | vt 0.525000 0.200000 75 | vt 0.625000 0.150000 76 | vt 0.575000 0.200000 77 | vt 0.375000 0.250000 78 | vt 0.425000 0.250000 79 | vt 0.475000 0.250000 80 | vt 0.525000 0.250000 81 | vt 0.625000 0.200000 82 | vt 0.575000 0.250000 83 | vt 0.575000 0.200000 84 | vt 0.575000 0.200000 85 | vt 0.375000 0.200000 86 | vt 0.425000 0.200000 87 | vt 0.425000 0.200000 88 | vt 0.375000 0.050000 89 | vt 0.425000 0.050000 90 | vt 0.425000 0.050000 91 | vt 0.425000 0.050000 92 | vt 0.375000 0.100000 93 | vn 0.000000 0.000000 1.000000 94 | vn 0.000000 0.000000 1.000000 95 | vn 0.000000 0.000000 1.000000 96 | vn 0.000000 0.000000 1.000000 97 | vn 0.000000 0.000000 1.000000 98 | vn 0.000000 0.000000 1.000000 99 | vn 0.000000 0.000000 1.000000 100 | vn 0.000000 0.000000 1.000000 101 | vn 0.000000 0.000000 1.000000 102 | vn 0.000000 0.000000 1.000000 103 | vn 0.000000 0.000000 1.000000 104 | vn 0.000000 0.000000 1.000000 105 | vn 0.000000 0.000000 1.000000 106 | vn 0.000000 0.000000 1.000000 107 | vn 0.000000 0.000000 1.000000 108 | vn 0.000000 0.000000 1.000000 109 | vn 0.000000 0.000000 1.000000 110 | vn 0.000000 0.000000 1.000000 111 | vn 0.000000 0.000000 1.000000 112 | vn 0.000000 0.000000 1.000000 113 | vn 0.000000 0.000000 1.000000 114 | vn 0.000000 0.000000 1.000000 115 | vn 0.000000 0.000000 1.000000 116 | vn 0.000000 0.000000 1.000000 117 | vn 0.000000 0.000000 1.000000 118 | vn 0.000000 0.000000 1.000000 119 | vn 0.000000 0.000000 1.000000 120 | vn 0.000000 0.000000 1.000000 121 | vn 0.000000 0.000000 1.000000 122 | vn 0.000000 0.000000 1.000000 123 | vn 0.000000 0.000000 1.000000 124 | vn 0.000000 0.000000 1.000000 125 | vn 0.000000 0.000000 1.000000 126 | vn 0.000000 0.000000 1.000000 127 | vn 0.000000 0.000000 1.000000 128 | vn 0.000000 0.000000 1.000000 129 | vn 0.000000 0.000000 1.000000 130 | vn 0.000000 0.000000 1.000000 131 | vn 0.000000 0.000000 1.000000 132 | vn 0.000000 0.000000 1.000000 133 | vn 0.000000 0.000000 1.000000 134 | vn 0.000000 0.000000 1.000000 135 | vn 0.000000 0.000000 1.000000 136 | vn 0.000000 0.000000 1.000000 137 | vn 0.000000 0.000000 1.000000 138 | vn 0.000000 0.000000 1.000000 139 | vn 0.000000 0.000000 1.000000 140 | vn 0.000000 0.000000 1.000000 141 | vn 0.000000 0.000000 1.000000 142 | vn 0.000000 0.000000 1.000000 143 | vn 0.000000 0.000000 1.000000 144 | vn 0.000000 0.000000 1.000000 145 | vn 0.000000 0.000000 1.000000 146 | vn 0.000000 0.000000 1.000000 147 | vn 0.000000 0.000000 1.000000 148 | vn 0.000000 0.000000 1.000000 149 | vn 0.000000 0.000000 1.000000 150 | vn 0.000000 0.000000 1.000000 151 | vn 0.000000 0.000000 1.000000 152 | vn 0.000000 0.000000 1.000000 153 | vn 0.000000 0.000000 1.000000 154 | vn 0.000000 0.000000 1.000000 155 | vn 0.000000 0.000000 1.000000 156 | vn 0.000000 0.000000 1.000000 157 | vn 0.000000 0.000000 1.000000 158 | vn 0.000000 0.000000 1.000000 159 | vn 0.000000 0.000000 1.000000 160 | vn 0.000000 0.000000 1.000000 161 | vn 0.000000 0.000000 1.000000 162 | vn 0.000000 0.000000 1.000000 163 | vn 0.000000 0.000000 1.000000 164 | vn 0.000000 0.000000 1.000000 165 | vn 0.000000 0.000000 1.000000 166 | vn 0.000000 0.000000 1.000000 167 | vn 0.000000 0.000000 1.000000 168 | s off 169 | g ExampleObject:pCube1 170 | usemtl initialShadingGroup 171 | f 6/1/1 1/2/2 43/43/3 172 | f 42/41/4 2/4/5 8/5/6 173 | f 8/5/7 3/6/8 9/7/9 174 | f 9/7/10 4/8/11 10/9/12 175 | f 10/9/13 5/10/14 11/11/15 176 | f 40/40/16 41/42/17 44/44/18 177 | f 7/3/19 8/5/20 13/13/21 178 | f 8/5/22 9/7/23 14/14/24 179 | f 9/7/25 10/9/26 15/15/27 180 | f 10/9/28 11/11/29 16/16/30 181 | f 12/12/31 13/13/32 18/17/33 182 | f 13/13/34 14/14/35 19/18/36 183 | f 14/14/37 15/15/38 20/19/39 184 | f 15/15/40 16/16/41 21/20/42 185 | f 16/16/43 17/21/44 22/22/45 186 | f 18/17/46 19/18/47 37/37/48 187 | f 19/18/49 20/19/50 39/39/51 188 | f 20/19/52 21/20/53 26/25/54 189 | f 21/20/55 22/22/56 27/26/57 190 | f 22/22/58 23/27/59 36/36/60 191 | f 24/23/61 38/38/62 30/29/63 192 | f 25/24/64 26/25/65 31/30/66 193 | f 26/25/67 27/26/68 32/31/69 194 | f 27/26/70 35/35/71 33/32/72 195 | f 28/28/73 29/33/74 34/34/75 196 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleObject.obj.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65b494bcd976acb439826372cf3559b9 3 | ModelImporter: 4 | serializedVersion: 21202 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 0 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 1 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 1 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importVisibility: 1 44 | importBlendShapes: 1 45 | importCameras: 1 46 | importLights: 1 47 | nodeNameCollisionStrategy: 1 48 | fileIdsGeneration: 2 49 | swapUVChannels: 0 50 | generateSecondaryUV: 0 51 | useFileUnits: 1 52 | keepQuads: 0 53 | weldVertices: 1 54 | bakeAxisConversion: 0 55 | preserveHierarchy: 0 56 | skinWeightsMode: 0 57 | maxBonesPerVertex: 4 58 | minBoneWeight: 0.001 59 | optimizeBones: 1 60 | meshOptimizationFlags: -1 61 | indexFormat: 0 62 | secondaryUVAngleDistortion: 8 63 | secondaryUVAreaDistortion: 15.000001 64 | secondaryUVHardAngle: 88 65 | secondaryUVMarginMethod: 1 66 | secondaryUVMinLightmapResolution: 40 67 | secondaryUVMinObjectScale: 1 68 | secondaryUVPackMargin: 4 69 | useFileScale: 1 70 | tangentSpace: 71 | normalSmoothAngle: 60 72 | normalImportMode: 0 73 | tangentImportMode: 3 74 | normalCalculationMode: 4 75 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 76 | blendShapeNormalImportMode: 1 77 | normalSmoothingSource: 0 78 | referencedClips: [] 79 | importAnimation: 0 80 | humanDescription: 81 | serializedVersion: 3 82 | human: [] 83 | skeleton: [] 84 | armTwist: 0.5 85 | foreArmTwist: 0.5 86 | upperLegTwist: 0.5 87 | legTwist: 0.5 88 | armStretch: 0.05 89 | legStretch: 0.05 90 | feetSpacing: 0 91 | globalScale: 1 92 | rootMotionBoneName: 93 | hasTranslationDoF: 0 94 | hasExtraRoot: 0 95 | skeletonHasParents: 1 96 | lastHumanDescriptionAvatarSource: {instanceID: 0} 97 | autoGenerateAvatarMappingIfUnspecified: 1 98 | animationType: 0 99 | humanoidOversampling: 1 100 | avatarSetup: 0 101 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 102 | additionalBone: 0 103 | userData: 104 | assetBundleName: 105 | assetBundleVariant: 106 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleObject2.mtl: -------------------------------------------------------------------------------- 1 | newmtl initialShadingGroup 2 | illum 4 3 | Kd 0.50 0.50 0.50 4 | Ka 0.00 0.00 0.00 5 | Tf 1.00 1.00 1.00 6 | Ni 1.00 7 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleObject2.mtl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9bb33d4d30608549b751c8f3f3bded7 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleObject2.obj: -------------------------------------------------------------------------------- 1 | # This file uses centimeters as units for non-parametric coordinates. 2 | 3 | mtllib ExampleObject2.mtl 4 | g default 5 | v -6.510198 0.860905 0.000000 6 | v -4.000000 -0.500000 0.000000 7 | v -2.620971 -2.034016 0.000000 8 | v -5.000432 2.492371 0.000000 9 | v -1.898026 -0.715245 0.000000 10 | v 1.232886 -1.950445 0.000000 11 | v 0.280739 3.413568 0.000000 12 | v 1.182580 0.042456 0.000000 13 | v 3.709752 -2.755025 0.000000 14 | v 3.825197 -1.211208 -0.105734 15 | v 3.171437 1.060884 0.000000 16 | v -5.685992 1.427195 0.000000 17 | v -4.094349 -0.995888 0.000000 18 | v -2.682936 1.380574 0.000000 19 | v -1.290087 2.917536 0.000000 20 | v 0.554811 -1.623731 0.000000 21 | v 0.298008 1.999155 0.000000 22 | v 0.396578 0.412021 0.000000 23 | v 1.768402 2.481805 0.000000 24 | v 3.249163 3.313697 0.000000 25 | v 4.134995 0.793384 0.000000 26 | v -4.890345 -1.601190 0.000000 27 | v -5.943908 0.036699 0.000000 28 | v -3.294639 0.589486 0.000000 29 | v -3.000000 -0.500000 0.000000 30 | v -2.172809 2.447639 0.000000 31 | v -1.620971 -2.034016 0.000000 32 | v -0.092997 -2.385533 0.000000 33 | v -4.000432 2.492371 0.000000 34 | v 0.298008 0.999155 0.000000 35 | v -0.898026 -0.715245 0.000000 36 | v 0.396578 -0.587979 0.000000 37 | v 2.232886 -1.950445 0.000000 38 | v 2.495940 1.795737 0.000000 39 | v 1.280739 3.413568 0.000000 40 | v 4.203001 3.013376 0.000000 41 | v 1.845692 -0.706064 0.000000 42 | v 4.088909 -1.829693 0.000000 43 | v 4.604859 -0.589992 -0.026883 44 | v -4.699652 -0.199892 0.000000 45 | v -4.000000 0.500000 0.000000 46 | v -3.474024 1.992276 0.000000 47 | v -2.620971 -1.034016 0.000000 48 | v -1.759984 3.800257 0.000000 49 | v -5.000432 3.492371 0.000000 50 | v -0.206992 -0.975922 0.000000 51 | v -1.898026 0.284755 0.000000 52 | v -0.701992 1.999155 0.000000 53 | v 1.232886 -0.950445 0.000000 54 | v -0.603422 0.412021 0.000000 55 | v 0.280739 4.413568 0.000000 56 | v 1.082334 1.754267 0.000000 57 | v 1.931100 0.705568 0.000000 58 | v 2.948841 2.359859 0.000000 59 | v 2.784420 -2.375869 0.000000 60 | v 3.199376 -0.442598 0.026883 61 | v 4.402494 1.756942 0.000000 62 | vt 0.050972 0.503989 63 | vt 0.096726 0.400068 64 | vt 0.117564 0.575390 65 | vt 0.197257 0.370237 66 | vt 0.181850 0.193554 67 | vt 0.246163 0.269873 68 | vt 0.253787 0.332398 69 | vt 0.334583 0.332398 70 | vt 0.253787 0.458484 71 | vt 0.296284 0.646638 72 | vt 0.310777 0.469766 73 | vt 0.360201 0.569511 74 | vt 0.365207 0.138980 75 | vt 0.446004 0.138980 76 | vt 0.365207 0.265066 77 | vt 0.434772 0.874599 78 | vt 0.401417 0.704053 79 | vt 0.472738 0.763300 80 | vt 0.172955 0.709693 81 | vt 0.253752 0.709693 82 | vt 0.172955 0.835779 83 | vt 0.560248 0.272391 84 | vt 0.569458 0.094659 85 | vt 0.621799 0.190711 86 | vt 0.423619 0.305259 87 | vt 0.504415 0.305259 88 | vt 0.423619 0.431344 89 | vt 0.520254 0.647506 90 | vt 0.601050 0.521420 91 | vt 0.601050 0.647506 92 | vt 0.676585 0.149517 93 | vt 0.757381 0.149517 94 | vt 0.676585 0.275603 95 | vt 0.528218 0.447391 96 | vt 0.609014 0.321305 97 | vt 0.609014 0.447391 98 | vt 0.599655 0.825843 99 | vt 0.680451 0.825843 100 | vt 0.599655 0.951929 101 | vt 0.664421 0.616629 102 | vt 0.778635 0.621858 103 | vt 0.719853 0.708361 104 | vt 0.672520 0.400794 105 | vt 0.726098 0.306416 106 | vt 0.732998 0.484403 107 | vt 0.815228 0.692985 108 | vt 0.916560 0.775384 109 | vt 0.839493 0.813251 110 | vt 0.876707 0.048071 111 | vt 0.907341 0.164743 112 | vt 0.801943 0.095878 113 | vt 0.886034 0.242725 114 | vt 0.949028 0.321051 115 | vt 0.835470 0.339635 116 | vt 0.932678 0.616966 117 | vt 0.833213 0.529203 118 | vt 0.911065 0.495475 119 | vn 0.000000 0.000000 1.000000 120 | vn 0.000000 0.000000 1.000000 121 | vn 0.000000 0.000000 1.000000 122 | vn 0.000000 0.000000 1.000000 123 | vn 0.000000 0.000000 1.000000 124 | vn 0.000000 0.000000 1.000000 125 | vn 0.000000 0.000000 1.000000 126 | vn 0.000000 0.000000 1.000000 127 | vn 0.000000 0.000000 1.000000 128 | vn 0.000000 0.000000 1.000000 129 | vn 0.000000 0.000000 1.000000 130 | vn 0.000000 0.000000 1.000000 131 | vn 0.000000 0.000000 1.000000 132 | vn 0.000000 0.000000 1.000000 133 | vn 0.000000 0.000000 1.000000 134 | vn 0.000000 0.000000 1.000000 135 | vn 0.000000 0.000000 1.000000 136 | vn 0.000000 0.000000 1.000000 137 | vn 0.000000 0.000000 1.000000 138 | vn 0.000000 0.000000 1.000000 139 | vn 0.000000 0.000000 1.000000 140 | vn 0.000000 0.000000 1.000000 141 | vn 0.000000 0.000000 1.000000 142 | vn 0.000000 0.000000 1.000000 143 | vn 0.000000 0.000000 1.000000 144 | vn 0.000000 0.000000 1.000000 145 | vn 0.000000 0.000000 1.000000 146 | vn 0.000000 0.000000 1.000000 147 | vn 0.000000 0.000000 1.000000 148 | vn 0.000000 0.000000 1.000000 149 | vn 0.000000 0.000000 1.000000 150 | vn 0.000000 0.000000 1.000000 151 | vn 0.000000 0.000000 1.000000 152 | vn 0.000000 0.000000 1.000000 153 | vn 0.000000 0.000000 1.000000 154 | vn 0.000000 0.000000 1.000000 155 | vn 0.000000 0.000000 1.000000 156 | vn 0.000000 0.000000 1.000000 157 | vn 0.000000 0.000000 1.000000 158 | vn 0.000000 0.000000 1.000000 159 | vn 0.000000 0.000000 1.000000 160 | vn 0.000000 0.000000 1.000000 161 | vn 0.000000 0.000000 1.000000 162 | vn 0.000000 0.000000 1.000000 163 | vn 0.000000 0.000000 1.000000 164 | vn 0.000000 0.000000 1.000000 165 | vn 0.000000 0.000000 1.000000 166 | vn 0.000000 0.000000 1.000000 167 | vn 0.000000 0.000000 1.000000 168 | vn 0.000000 0.000000 1.000000 169 | vn 0.000000 0.000000 1.000000 170 | vn 0.021778 -0.152743 0.988026 171 | vn 0.021778 -0.152744 0.988026 172 | vn 0.021778 -0.152744 0.988026 173 | vn 0.000000 0.000000 1.000000 174 | vn 0.000000 0.000000 1.000000 175 | vn 0.000000 0.000000 1.000000 176 | s off 177 | g pCube1 178 | usemtl initialShadingGroup 179 | f 1/1/1 23/2/2 12/3/3 180 | f 40/4/4 22/5/5 13/6/6 181 | f 2/7/7 25/8/8 41/9/9 182 | f 42/10/10 24/11/11 14/12/12 183 | f 3/13/13 27/14/14 43/15/15 184 | f 44/16/16 26/17/17 15/18/18 185 | f 4/19/19 29/20/20 45/21/21 186 | f 46/22/22 28/23/23 16/24/24 187 | f 5/25/25 31/26/26 47/27/27 188 | f 48/28/28 30/29/29 17/30/30 189 | f 6/31/31 33/32/32 49/33/33 190 | f 50/34/34 32/35/35 18/36/36 191 | f 7/37/37 35/38/38 51/39/39 192 | f 52/40/40 34/41/41 19/42/42 193 | f 8/43/43 37/44/44 53/45/45 194 | f 54/46/46 36/47/47 20/48/48 195 | f 9/49/49 38/50/50 55/51/51 196 | f 10/52/52 39/53/53 56/54/54 197 | f 57/55/55 11/56/56 21/57/57 198 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleObject2.obj.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72142b7b186115746bcf294a1d75f9d2 3 | ModelImporter: 4 | serializedVersion: 21202 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 0 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 1 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 1 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importVisibility: 1 44 | importBlendShapes: 1 45 | importCameras: 1 46 | importLights: 1 47 | nodeNameCollisionStrategy: 1 48 | fileIdsGeneration: 2 49 | swapUVChannels: 0 50 | generateSecondaryUV: 0 51 | useFileUnits: 1 52 | keepQuads: 0 53 | weldVertices: 1 54 | bakeAxisConversion: 0 55 | preserveHierarchy: 0 56 | skinWeightsMode: 0 57 | maxBonesPerVertex: 4 58 | minBoneWeight: 0.001 59 | optimizeBones: 1 60 | meshOptimizationFlags: -1 61 | indexFormat: 0 62 | secondaryUVAngleDistortion: 8 63 | secondaryUVAreaDistortion: 15.000001 64 | secondaryUVHardAngle: 88 65 | secondaryUVMarginMethod: 1 66 | secondaryUVMinLightmapResolution: 40 67 | secondaryUVMinObjectScale: 1 68 | secondaryUVPackMargin: 4 69 | useFileScale: 1 70 | tangentSpace: 71 | normalSmoothAngle: 60 72 | normalImportMode: 0 73 | tangentImportMode: 3 74 | normalCalculationMode: 4 75 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 76 | blendShapeNormalImportMode: 1 77 | normalSmoothingSource: 0 78 | referencedClips: [] 79 | importAnimation: 0 80 | humanDescription: 81 | serializedVersion: 3 82 | human: [] 83 | skeleton: [] 84 | armTwist: 0.5 85 | foreArmTwist: 0.5 86 | upperLegTwist: 0.5 87 | legTwist: 0.5 88 | armStretch: 0.05 89 | legStretch: 0.05 90 | feetSpacing: 0 91 | globalScale: 1 92 | rootMotionBoneName: 93 | hasTranslationDoF: 0 94 | hasExtraRoot: 0 95 | skeletonHasParents: 1 96 | lastHumanDescriptionAvatarSource: {instanceID: 0} 97 | autoGenerateAvatarMappingIfUnspecified: 1 98 | animationType: 0 99 | humanoidOversampling: 1 100 | avatarSetup: 0 101 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 102 | additionalBone: 0 103 | userData: 104 | assetBundleName: 105 | assetBundleVariant: 106 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleObject3.mtl: -------------------------------------------------------------------------------- 1 | newmtl initialShadingGroup 2 | illum 4 3 | Kd 0.50 0.50 0.50 4 | Ka 0.00 0.00 0.00 5 | Tf 1.00 1.00 1.00 6 | Ni 1.00 7 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleObject3.mtl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61fbb169c438b4a45b3229ccc4c51ff4 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleObject3.obj.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d7f8cafa3f2ae64a8c4a80d14c71f7e 3 | ModelImporter: 4 | serializedVersion: 21202 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 2 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 1 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 1 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importVisibility: 1 44 | importBlendShapes: 1 45 | importCameras: 1 46 | importLights: 1 47 | nodeNameCollisionStrategy: 1 48 | fileIdsGeneration: 2 49 | swapUVChannels: 0 50 | generateSecondaryUV: 0 51 | useFileUnits: 1 52 | keepQuads: 0 53 | weldVertices: 1 54 | bakeAxisConversion: 0 55 | preserveHierarchy: 0 56 | skinWeightsMode: 0 57 | maxBonesPerVertex: 4 58 | minBoneWeight: 0.001 59 | optimizeBones: 1 60 | meshOptimizationFlags: -1 61 | indexFormat: 0 62 | secondaryUVAngleDistortion: 8 63 | secondaryUVAreaDistortion: 15.000001 64 | secondaryUVHardAngle: 88 65 | secondaryUVMarginMethod: 1 66 | secondaryUVMinLightmapResolution: 40 67 | secondaryUVMinObjectScale: 1 68 | secondaryUVPackMargin: 4 69 | useFileScale: 1 70 | tangentSpace: 71 | normalSmoothAngle: 60 72 | normalImportMode: 0 73 | tangentImportMode: 3 74 | normalCalculationMode: 4 75 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 76 | blendShapeNormalImportMode: 1 77 | normalSmoothingSource: 0 78 | referencedClips: [] 79 | importAnimation: 0 80 | humanDescription: 81 | serializedVersion: 3 82 | human: [] 83 | skeleton: [] 84 | armTwist: 0.5 85 | foreArmTwist: 0.5 86 | upperLegTwist: 0.5 87 | legTwist: 0.5 88 | armStretch: 0.05 89 | legStretch: 0.05 90 | feetSpacing: 0 91 | globalScale: 1 92 | rootMotionBoneName: 93 | hasTranslationDoF: 0 94 | hasExtraRoot: 0 95 | skeletonHasParents: 1 96 | lastHumanDescriptionAvatarSource: {instanceID: 0} 97 | autoGenerateAvatarMappingIfUnspecified: 1 98 | animationType: 2 99 | humanoidOversampling: 1 100 | avatarSetup: 0 101 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 102 | additionalBone: 0 103 | userData: 104 | assetBundleName: 105 | assetBundleVariant: 106 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleObject4.mtl: -------------------------------------------------------------------------------- 1 | newmtl initialShadingGroup 2 | illum 4 3 | Kd 0.50 0.50 0.50 4 | Ka 0.00 0.00 0.00 5 | Tf 1.00 1.00 1.00 6 | Ni 1.00 7 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleObject4.mtl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64a512b2fb6b761449c8c680e0216667 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Assets/ExampleObject4.obj.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 328bfe7101428304d87e0a579a0d20fa 3 | ModelImporter: 4 | serializedVersion: 21202 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 2 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 1 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 1 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importVisibility: 1 44 | importBlendShapes: 1 45 | importCameras: 1 46 | importLights: 1 47 | nodeNameCollisionStrategy: 1 48 | fileIdsGeneration: 2 49 | swapUVChannels: 0 50 | generateSecondaryUV: 0 51 | useFileUnits: 1 52 | keepQuads: 0 53 | weldVertices: 1 54 | bakeAxisConversion: 0 55 | preserveHierarchy: 0 56 | skinWeightsMode: 0 57 | maxBonesPerVertex: 4 58 | minBoneWeight: 0.001 59 | optimizeBones: 1 60 | meshOptimizationFlags: -1 61 | indexFormat: 0 62 | secondaryUVAngleDistortion: 8 63 | secondaryUVAreaDistortion: 15.000001 64 | secondaryUVHardAngle: 88 65 | secondaryUVMarginMethod: 1 66 | secondaryUVMinLightmapResolution: 40 67 | secondaryUVMinObjectScale: 1 68 | secondaryUVPackMargin: 4 69 | useFileScale: 1 70 | tangentSpace: 71 | normalSmoothAngle: 60 72 | normalImportMode: 1 73 | tangentImportMode: 3 74 | normalCalculationMode: 4 75 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 76 | blendShapeNormalImportMode: 1 77 | normalSmoothingSource: 0 78 | referencedClips: [] 79 | importAnimation: 0 80 | humanDescription: 81 | serializedVersion: 3 82 | human: [] 83 | skeleton: [] 84 | armTwist: 0.5 85 | foreArmTwist: 0.5 86 | upperLegTwist: 0.5 87 | legTwist: 0.5 88 | armStretch: 0.05 89 | legStretch: 0.05 90 | feetSpacing: 0 91 | globalScale: 1 92 | rootMotionBoneName: 93 | hasTranslationDoF: 0 94 | hasExtraRoot: 0 95 | skeletonHasParents: 1 96 | lastHumanDescriptionAvatarSource: {instanceID: 0} 97 | autoGenerateAvatarMappingIfUnspecified: 1 98 | animationType: 2 99 | humanoidOversampling: 1 100 | avatarSetup: 0 101 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 102 | additionalBone: 0 103 | userData: 104 | assetBundleName: 105 | assetBundleVariant: 106 | -------------------------------------------------------------------------------- /Assets/_Assets/head_material.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: head_material 11 | m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ValidKeywords: [] 13 | m_InvalidKeywords: [] 14 | m_LightmapFlags: 4 15 | m_EnableInstancingVariants: 0 16 | m_DoubleSidedGI: 0 17 | m_CustomRenderQueue: -1 18 | stringTagMap: {} 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailAlbedoMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailMask: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailNormalMap: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _EmissionMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _MainTex: 44 | m_Texture: {fileID: 2800000, guid: b80fd47413dfb4945b9abc5905c53fbc, type: 3} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MetallicGlossMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _OcclusionMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _ParallaxMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | m_Ints: [] 60 | m_Floats: 61 | - _BumpScale: 1 62 | - _Cutoff: 0.5 63 | - _DetailNormalMapScale: 1 64 | - _DstBlend: 0 65 | - _GlossMapScale: 1 66 | - _Glossiness: 0.5 67 | - _GlossyReflections: 1 68 | - _Metallic: 0 69 | - _Mode: 0 70 | - _OcclusionStrength: 1 71 | - _Parallax: 0.02 72 | - _SmoothnessTextureChannel: 0 73 | - _SpecularHighlights: 1 74 | - _SrcBlend: 1 75 | - _UVSec: 0 76 | - _ZWrite: 1 77 | m_Colors: 78 | - _Color: {r: 1, g: 1, b: 1, a: 1} 79 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 80 | m_BuildTextureStacks: [] 81 | -------------------------------------------------------------------------------- /Assets/_Assets/head_material.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0c0f01cc8a62f14e990fb1f73491984 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Assets/male_head.obj.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b762c8485f8ea2a45aed3467216478ac 3 | ModelImporter: 4 | serializedVersion: 21202 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 0 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 1 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 1 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importVisibility: 1 44 | importBlendShapes: 1 45 | importCameras: 1 46 | importLights: 1 47 | nodeNameCollisionStrategy: 1 48 | fileIdsGeneration: 2 49 | swapUVChannels: 0 50 | generateSecondaryUV: 0 51 | useFileUnits: 1 52 | keepQuads: 0 53 | weldVertices: 1 54 | bakeAxisConversion: 0 55 | preserveHierarchy: 0 56 | skinWeightsMode: 0 57 | maxBonesPerVertex: 4 58 | minBoneWeight: 0.001 59 | optimizeBones: 1 60 | meshOptimizationFlags: -1 61 | indexFormat: 0 62 | secondaryUVAngleDistortion: 8 63 | secondaryUVAreaDistortion: 15.000001 64 | secondaryUVHardAngle: 88 65 | secondaryUVMarginMethod: 1 66 | secondaryUVMinLightmapResolution: 40 67 | secondaryUVMinObjectScale: 1 68 | secondaryUVPackMargin: 4 69 | useFileScale: 1 70 | tangentSpace: 71 | normalSmoothAngle: 60 72 | normalImportMode: 0 73 | tangentImportMode: 3 74 | normalCalculationMode: 4 75 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 76 | blendShapeNormalImportMode: 1 77 | normalSmoothingSource: 0 78 | referencedClips: [] 79 | importAnimation: 0 80 | humanDescription: 81 | serializedVersion: 3 82 | human: [] 83 | skeleton: [] 84 | armTwist: 0.5 85 | foreArmTwist: 0.5 86 | upperLegTwist: 0.5 87 | legTwist: 0.5 88 | armStretch: 0.05 89 | legStretch: 0.05 90 | feetSpacing: 0 91 | globalScale: 1 92 | rootMotionBoneName: 93 | hasTranslationDoF: 0 94 | hasExtraRoot: 0 95 | skeletonHasParents: 1 96 | lastHumanDescriptionAvatarSource: {instanceID: 0} 97 | autoGenerateAvatarMappingIfUnspecified: 1 98 | animationType: 0 99 | humanoidOversampling: 1 100 | avatarSetup: 0 101 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 102 | additionalBone: 0 103 | userData: 104 | assetBundleName: 105 | assetBundleVariant: 106 | -------------------------------------------------------------------------------- /Assets/_Assets/viking_room.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: viking_room 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ValidKeywords: [] 13 | m_InvalidKeywords: [] 14 | m_LightmapFlags: 4 15 | m_EnableInstancingVariants: 0 16 | m_DoubleSidedGI: 0 17 | m_CustomRenderQueue: -1 18 | stringTagMap: {} 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailAlbedoMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailMask: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailNormalMap: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _EmissionMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _MainTex: 44 | m_Texture: {fileID: 2800000, guid: b80fd47413dfb4945b9abc5905c53fbc, type: 3} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MetallicGlossMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _OcclusionMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _ParallaxMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | m_Ints: [] 60 | m_Floats: 61 | - _BumpScale: 1 62 | - _Cutoff: 0.5 63 | - _DetailNormalMapScale: 1 64 | - _DstBlend: 0 65 | - _GlossMapScale: 1 66 | - _Glossiness: 0.5 67 | - _GlossyReflections: 1 68 | - _Metallic: 0 69 | - _Mode: 0 70 | - _OcclusionStrength: 1 71 | - _Parallax: 0.02 72 | - _SmoothnessTextureChannel: 0 73 | - _SpecularHighlights: 1 74 | - _SrcBlend: 1 75 | - _UVSec: 0 76 | - _ZWrite: 1 77 | m_Colors: 78 | - _Color: {r: 1, g: 1, b: 1, a: 1} 79 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 80 | m_BuildTextureStacks: [] 81 | -------------------------------------------------------------------------------- /Assets/_Assets/viking_room.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e4df17bfc5700e948919369636f32a5a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Assets/viking_room.obj.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18e33e97a38e97f4c8e2997452f6bc42 3 | ModelImporter: 4 | serializedVersion: 21202 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 2 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 1 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 1 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importVisibility: 1 44 | importBlendShapes: 1 45 | importCameras: 1 46 | importLights: 1 47 | nodeNameCollisionStrategy: 1 48 | fileIdsGeneration: 2 49 | swapUVChannels: 0 50 | generateSecondaryUV: 0 51 | useFileUnits: 1 52 | keepQuads: 0 53 | weldVertices: 1 54 | bakeAxisConversion: 0 55 | preserveHierarchy: 0 56 | skinWeightsMode: 0 57 | maxBonesPerVertex: 4 58 | minBoneWeight: 0.001 59 | optimizeBones: 1 60 | meshOptimizationFlags: -1 61 | indexFormat: 0 62 | secondaryUVAngleDistortion: 8 63 | secondaryUVAreaDistortion: 15.000001 64 | secondaryUVHardAngle: 88 65 | secondaryUVMarginMethod: 1 66 | secondaryUVMinLightmapResolution: 40 67 | secondaryUVMinObjectScale: 1 68 | secondaryUVPackMargin: 4 69 | useFileScale: 1 70 | tangentSpace: 71 | normalSmoothAngle: 60 72 | normalImportMode: 0 73 | tangentImportMode: 3 74 | normalCalculationMode: 4 75 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 76 | blendShapeNormalImportMode: 1 77 | normalSmoothingSource: 0 78 | referencedClips: [] 79 | importAnimation: 0 80 | humanDescription: 81 | serializedVersion: 3 82 | human: [] 83 | skeleton: [] 84 | armTwist: 0.5 85 | foreArmTwist: 0.5 86 | upperLegTwist: 0.5 87 | legTwist: 0.5 88 | armStretch: 0.05 89 | legStretch: 0.05 90 | feetSpacing: 0 91 | globalScale: 1 92 | rootMotionBoneName: 93 | hasTranslationDoF: 0 94 | hasExtraRoot: 0 95 | skeletonHasParents: 1 96 | lastHumanDescriptionAvatarSource: {instanceID: 0} 97 | autoGenerateAvatarMappingIfUnspecified: 1 98 | animationType: 2 99 | humanoidOversampling: 1 100 | avatarSetup: 0 101 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 102 | additionalBone: 0 103 | userData: 104 | assetBundleName: 105 | assetBundleVariant: 106 | -------------------------------------------------------------------------------- /Assets/_Assets/viking_room.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drzhn/UnitySimpleRaytracing/809bf21e96bfa8eaea0ac14352ab08358bc3d61f/Assets/_Assets/viking_room.png -------------------------------------------------------------------------------- /Assets/_Assets/viking_room.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b80fd47413dfb4945b9abc5905c53fbc 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 0 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | spriteSheet: 80 | serializedVersion: 2 81 | sprites: [] 82 | outline: [] 83 | physicsShape: [] 84 | bones: [] 85 | spriteID: 86 | internalID: 0 87 | vertices: [] 88 | indices: 89 | edges: [] 90 | weights: [] 91 | secondaryTextures: [] 92 | nameFileIdTable: {} 93 | spritePackingTag: 94 | pSDRemoveMatte: 0 95 | pSDShowRemoveMatteOption: 0 96 | userData: 97 | assetBundleName: 98 | assetBundleVariant: 99 | -------------------------------------------------------------------------------- /Assets/_Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b94e2b78c699d6641ac483176c7e2aad 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Scripts/BVHConstructor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Runtime.InteropServices; 5 | using UnityEngine; 6 | 7 | public class BVHConstructor : IDisposable 8 | { 9 | private readonly ComputeBuffer _sortedMortonCodes; 10 | private readonly ComputeBuffer _sortedTriangleIndices; 11 | private readonly ComputeBuffer _triangleAABB; 12 | 13 | private readonly ComputeBuffer _internalNodes; // size = THREADS_PER_BLOCK * BLOCK_SIZE - 1 14 | private readonly ComputeBuffer _leafNodes; // size = THREADS_PER_BLOCK * BLOCK_SIZE 15 | private readonly ComputeBuffer _bvhData; // size = THREADS_PER_BLOCK * BLOCK_SIZE 16 | private readonly DataBuffer _atomics; // size = THREADS_PER_BLOCK * BLOCK_SIZE 17 | 18 | private readonly ComputeShader _bvhShader; 19 | private readonly int _treeConstructionKernel; 20 | private readonly int _bvhConstructionKernel; 21 | 22 | private readonly uint _trianglesCount; 23 | 24 | public BVHConstructor( 25 | uint trianglesCount, 26 | ComputeBuffer sortedMortonCodes, 27 | ComputeBuffer sortedTriangleIndices, 28 | ComputeBuffer triangleAABB, 29 | ComputeBuffer internalNodes, 30 | ComputeBuffer leafNodes, 31 | ComputeBuffer BVHData, 32 | IShaderContainer container) 33 | { 34 | _sortedMortonCodes = sortedMortonCodes; 35 | _sortedTriangleIndices = sortedTriangleIndices; 36 | _triangleAABB = triangleAABB; 37 | 38 | _internalNodes = internalNodes; 39 | _leafNodes = leafNodes; 40 | _bvhData = BVHData; 41 | _atomics = new DataBuffer(Constants.DATA_ARRAY_COUNT, 0); 42 | _trianglesCount = trianglesCount; 43 | 44 | _bvhShader = container.BVH.BVHShader; 45 | _treeConstructionKernel = _bvhShader.FindKernel("TreeConstructor"); 46 | _bvhConstructionKernel = _bvhShader.FindKernel("BVHConstructor"); 47 | 48 | _bvhShader.SetInt("trianglesCount", (int)trianglesCount); 49 | _bvhShader.SetBuffer(_treeConstructionKernel, "sortedMortonCodes", _sortedMortonCodes); 50 | _bvhShader.SetBuffer(_treeConstructionKernel, "internalNodes", _internalNodes); 51 | _bvhShader.SetBuffer(_treeConstructionKernel, "leafNodes", _leafNodes); 52 | 53 | _bvhShader.SetBuffer(_bvhConstructionKernel, "internalNodes", _internalNodes); 54 | _bvhShader.SetBuffer(_bvhConstructionKernel, "leafNodes", _leafNodes); 55 | _bvhShader.SetBuffer(_bvhConstructionKernel, "triangleAABB", _triangleAABB); 56 | _bvhShader.SetBuffer(_bvhConstructionKernel, "sortedTriangleIndices", _sortedTriangleIndices); 57 | _bvhShader.SetBuffer(_bvhConstructionKernel, "atomicsData", _atomics.DeviceBuffer); 58 | _bvhShader.SetBuffer(_bvhConstructionKernel, "BVHData", _bvhData); 59 | } 60 | 61 | public void ConstructTree() 62 | { 63 | _bvhShader.Dispatch(_treeConstructionKernel, Constants.BLOCK_SIZE, 1, 1); 64 | } 65 | 66 | public void ConstructBVH() 67 | { 68 | _bvhShader.Dispatch(_bvhConstructionKernel, Constants.BLOCK_SIZE, 1, 1); 69 | } 70 | 71 | public void Dispose() 72 | { 73 | _atomics.Dispose(); 74 | } 75 | } -------------------------------------------------------------------------------- /Assets/_Scripts/BVHConstructor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cdad28826d282c6478bf9641dd2dbd17 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/ComputeBufferSorter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Runtime.InteropServices; 6 | using System.Text; 7 | using UnityEngine; 8 | using Random = UnityEngine.Random; 9 | 10 | public class ComputeBufferSorter : IDisposable where TKey: struct, IComparable where TValue: struct 11 | { 12 | private readonly ComputeShader _localRadixSortShader; 13 | private readonly ComputeShader _globalRadixSortShader; 14 | private readonly ComputeShader _scanShader; 15 | 16 | private readonly int _localRadixKernel; 17 | private readonly int _preScanKernel; 18 | private readonly int _blockSumKernel; 19 | private readonly int _globalScanKernel; 20 | private readonly int _globalRadixKernel; 21 | 22 | private readonly ComputeBuffer _keys; 23 | private readonly ComputeBuffer _values; 24 | 25 | private readonly DataBuffer _sortedBlocksKeysData; 26 | private readonly DataBuffer _sortedBlocksValuesData; 27 | private readonly DataBuffer _offsetsData; 28 | private readonly DataBuffer _sizesData; 29 | private readonly DataBuffer _sizesPrefixSumData; 30 | 31 | private readonly TKey[] _unsortedKeysLocalData = new TKey[Constants.DATA_ARRAY_COUNT]; 32 | private readonly TKey[] _sortedKeysLocalData = new TKey[Constants.DATA_ARRAY_COUNT]; 33 | private readonly uint[] _sizesLocalDataBeforeScan = new uint[Constants.BUCKET_SIZE * Constants.BLOCK_SIZE]; 34 | 35 | // private readonly uint[] _sortedBlockLocalData = new uint[Constants.DATA_ARRAY_COUNT]; 36 | // private readonly uint[] _sortedLocalData = new uint[Constants.DATA_ARRAY_COUNT]; 37 | // private readonly uint[] _offsetsLocalData = new uint[Constants.BUCKET_SIZE * Constants.BLOCK_SIZE]; 38 | // private readonly uint[] _sizesLocalDataAfterScan = new uint[Constants.BUCKET_SIZE * Constants.BLOCK_SIZE]; 39 | // private readonly uint[] _sizesPrefixSumLocalData = new uint[Constants.BLOCK_SIZE / (Constants.THREADS_PER_BLOCK / Constants.BUCKET_SIZE)]; 40 | 41 | private readonly Dictionary _debugDataDictionary = new(256); 42 | private readonly uint _dataLength; 43 | 44 | public ComputeBufferSorter(uint dataLength, ComputeBuffer keys, ComputeBuffer values, IShaderContainer shaderContainer) 45 | { 46 | _keys = keys; 47 | _values = values; 48 | 49 | _dataLength = dataLength; 50 | 51 | _localRadixSortShader = shaderContainer.Sorting.LocalRadixSortShader; 52 | _globalRadixSortShader = shaderContainer.Sorting.GlobalRadixSortShader; 53 | _scanShader = shaderContainer.Sorting.ScanShader; 54 | 55 | 56 | _sortedBlocksKeysData = new DataBuffer(Constants.DATA_ARRAY_COUNT); 57 | _sortedBlocksValuesData = new DataBuffer(Constants.DATA_ARRAY_COUNT); 58 | _offsetsData = new DataBuffer(Constants.BUCKET_SIZE * Constants.BLOCK_SIZE); 59 | _sizesData = new DataBuffer(Constants.BUCKET_SIZE * Constants.BLOCK_SIZE); 60 | _sizesPrefixSumData = new DataBuffer(Constants.BLOCK_SIZE / (Constants.THREADS_PER_BLOCK / Constants.BUCKET_SIZE)); 61 | 62 | // Set data 63 | 64 | _localRadixKernel = _localRadixSortShader.FindKernel("LocalRadixSort"); 65 | _localRadixSortShader.SetBuffer(_localRadixKernel, "keysData", _keys); 66 | _localRadixSortShader.SetBuffer(_localRadixKernel, "valuesData", _values); 67 | _localRadixSortShader.SetBuffer(_localRadixKernel, "sortedBlocksKeysData", _sortedBlocksKeysData.DeviceBuffer); 68 | _localRadixSortShader.SetBuffer(_localRadixKernel, "sortedBlocksValuesData", _sortedBlocksValuesData.DeviceBuffer); 69 | _localRadixSortShader.SetBuffer(_localRadixKernel, "offsetsData", _offsetsData.DeviceBuffer); 70 | _localRadixSortShader.SetBuffer(_localRadixKernel, "sizesData", _sizesData.DeviceBuffer); 71 | 72 | 73 | _preScanKernel = _scanShader.FindKernel("PreScan"); 74 | _blockSumKernel = _scanShader.FindKernel("BlockSum"); 75 | _globalScanKernel = _scanShader.FindKernel("GlobalScan"); 76 | _scanShader.SetBuffer(_preScanKernel, "data", _sizesData.DeviceBuffer); 77 | _scanShader.SetBuffer(_preScanKernel, "blockSumsData", _sizesPrefixSumData.DeviceBuffer); 78 | _scanShader.SetBuffer(_blockSumKernel, "blockSumsData", _sizesPrefixSumData.DeviceBuffer); 79 | _scanShader.SetBuffer(_globalScanKernel, "data", _sizesData.DeviceBuffer); 80 | _scanShader.SetBuffer(_globalScanKernel, "blockSumsData", _sizesPrefixSumData.DeviceBuffer); 81 | 82 | _globalRadixKernel = _globalRadixSortShader.FindKernel("GlobalRadixSort"); 83 | _globalRadixSortShader.SetBuffer(_globalRadixKernel, "sortedBlocksKeysData", _sortedBlocksKeysData.DeviceBuffer); 84 | _globalRadixSortShader.SetBuffer(_globalRadixKernel, "sortedBlocksValuesData", _sortedBlocksValuesData.DeviceBuffer); 85 | _globalRadixSortShader.SetBuffer(_globalRadixKernel, "offsetsData", _offsetsData.DeviceBuffer); 86 | _globalRadixSortShader.SetBuffer(_globalRadixKernel, "sizesData", _sizesData.DeviceBuffer); 87 | _globalRadixSortShader.SetBuffer(_globalRadixKernel, "sortedKeysData", _keys); 88 | _globalRadixSortShader.SetBuffer(_globalRadixKernel, "sortedValuesData", _values); 89 | 90 | // debug data 91 | 92 | _keys.GetData(_unsortedKeysLocalData); 93 | 94 | for (uint i = 0; i < 256; i++) 95 | { 96 | _debugDataDictionary.Add(i, 0); 97 | } 98 | } 99 | 100 | public void Sort() 101 | { 102 | for (int bitOffset = 0; bitOffset < 32; bitOffset += Constants.RADIX) 103 | { 104 | _localRadixSortShader.SetInt("bitOffset", bitOffset); 105 | _globalRadixSortShader.SetInt("bitOffset", bitOffset); 106 | 107 | _localRadixSortShader.Dispatch(_localRadixKernel, Constants.BLOCK_SIZE, 1, 1); 108 | 109 | _sizesData.DeviceBuffer.GetData(_sizesLocalDataBeforeScan); 110 | // Debug.Log("Sizes before scan: " + Utils.ArrayToString(_sizesLocalDataBeforeScan)); 111 | 112 | _scanShader.Dispatch(_preScanKernel, Constants.BLOCK_SIZE / (Constants.THREADS_PER_BLOCK / Constants.BUCKET_SIZE), 1, 1); 113 | _scanShader.Dispatch(_blockSumKernel, 1, 1, 1); 114 | _scanShader.Dispatch(_globalScanKernel, Constants.BLOCK_SIZE / (Constants.THREADS_PER_BLOCK / Constants.BUCKET_SIZE), 1, 1); 115 | 116 | _globalRadixSortShader.Dispatch(_globalRadixKernel, Constants.BLOCK_SIZE, 1, 1); 117 | 118 | GetIntermediateDataBack(); 119 | ValidateIntermediateData(bitOffset); 120 | } 121 | 122 | GetSortedDataBack(); 123 | // PrintData(); 124 | 125 | ValidateSortedData(); 126 | } 127 | 128 | void GetIntermediateDataBack() 129 | { 130 | _sortedBlocksKeysData.GetData(); 131 | _offsetsData.GetData(); 132 | _sizesData.GetData(); 133 | _sizesPrefixSumData.GetData(); 134 | } 135 | 136 | void GetSortedDataBack() 137 | { 138 | _keys.GetData(_sortedKeysLocalData); 139 | } 140 | 141 | void PrintData() 142 | { 143 | Debug.Log("Unsorted data: " + Utils.ArrayToString(_unsortedKeysLocalData)); 144 | Debug.Log("Sorted data: " + Utils.ArrayToString(_sortedKeysLocalData)); 145 | Debug.Log("Offsets local data: " + Utils.ArrayToString(_offsetsData.LocalBuffer)); 146 | Debug.Log("Sizes after scan: " + Utils.ArrayToString(_sizesData.LocalBuffer)); 147 | Debug.Log("Sizes prefix sum after scan: " + Utils.ArrayToString(_sizesPrefixSumData.LocalBuffer)); 148 | } 149 | 150 | void ValidateSortedData() 151 | { 152 | // does output sorted data actually sorted? 153 | StringBuilder s = new StringBuilder(""); 154 | int countNonUniqueElements = 0; 155 | for (uint i = 1; i < _dataLength; i++) 156 | { 157 | 158 | if (_sortedKeysLocalData[i].CompareTo(_sortedKeysLocalData[i - 1]) < 0) 159 | { 160 | Debug.LogError("Output data has unsorted element on index " + i); 161 | return; 162 | } 163 | 164 | if (_sortedKeysLocalData[i].Equals(_sortedKeysLocalData[i - 1])) 165 | { 166 | s.Append($"{i}, "); 167 | countNonUniqueElements++; 168 | } 169 | } 170 | 171 | Debug.Log("Output data is sorted"); 172 | if (countNonUniqueElements > 0) 173 | { 174 | s.Insert(0, $"Output data has {countNonUniqueElements} non-unique element on indices: "); 175 | Debug.Log(s.ToString()); 176 | } 177 | } 178 | 179 | uint GetRadix(TKey value, int bitOffset) 180 | { 181 | if (value is uint) 182 | { 183 | return (Convert.ToUInt32(value) >> bitOffset) & (Constants.BUCKET_SIZE - 1); 184 | } 185 | if (value is ulong) 186 | { 187 | return (uint)((Convert.ToUInt64(value) >> bitOffset) & (Constants.BUCKET_SIZE - 1)); 188 | } 189 | 190 | throw new Exception(); 191 | } 192 | 193 | void ValidateIntermediateData(int bitOffset) 194 | { 195 | for (uint i = 0; i < 256; i++) 196 | { 197 | _debugDataDictionary[i] = 0; 198 | } 199 | 200 | // does output sorted data contains all of the elements from input unsorted data? 201 | for (uint i = 0; i < Constants.DATA_ARRAY_COUNT; i++) 202 | { 203 | _debugDataDictionary[GetRadix(_sortedBlocksKeysData[i], bitOffset)]++; 204 | } 205 | 206 | for (uint i = 0; i < Constants.DATA_ARRAY_COUNT; i++) 207 | { 208 | _debugDataDictionary[GetRadix(_unsortedKeysLocalData[i], bitOffset)]--; 209 | } 210 | 211 | if (_debugDataDictionary.All(x => x.Value == 0)) 212 | { 213 | //Debug.Log("Output data contains all of the elements from input array"); 214 | } 215 | else 216 | { 217 | Debug.LogError("Output data does not contain all of the elements from input array"); 218 | } 219 | 220 | for (uint i = 0; i < 256; i++) 221 | { 222 | _debugDataDictionary[i] = 0; 223 | } 224 | 225 | // Does sizes calculated correctly? 226 | 227 | bool hasError = false; 228 | for (uint i = 0; i < Constants.BLOCK_SIZE; i++) 229 | { 230 | for (uint j = 0; j < Constants.THREADS_PER_BLOCK; j++) 231 | { 232 | _debugDataDictionary[GetRadix(_sortedBlocksKeysData[i * Constants.THREADS_PER_BLOCK + j], bitOffset)]++; 233 | } 234 | 235 | for (uint k = 0; k < 256; k++) 236 | { 237 | if (_debugDataDictionary[k] != _sizesLocalDataBeforeScan[i + k * Constants.BLOCK_SIZE]) 238 | { 239 | Debug.LogError("In block " + i + " amount of " + k + " is " + _debugDataDictionary[k] + ", not " + _sizesLocalDataBeforeScan[i + k * Constants.BLOCK_SIZE]); 240 | hasError = true; 241 | break; 242 | } 243 | } 244 | 245 | for (uint k = 0; k < 256; k++) 246 | { 247 | _debugDataDictionary[k] = 0; 248 | } 249 | 250 | if (hasError) 251 | { 252 | break; 253 | } 254 | } 255 | 256 | // Does block prefix sum calculated correctly? 257 | bool hasSizesPrefixSumError = false; 258 | for (var i = 1; i < _sizesData.LocalBuffer.Length; i++) 259 | { 260 | if (_sizesData.LocalBuffer[i] != _sizesLocalDataBeforeScan[i - 1] + _sizesData.LocalBuffer[i - 1]) 261 | { 262 | Debug.LogError("Scan operation incorrect at index " + i + ": " + _sizesData.LocalBuffer[i] + " != " + _sizesLocalDataBeforeScan[i - 1] + " + " + _sizesData.LocalBuffer[i - 1]); 263 | hasSizesPrefixSumError = true; 264 | break; 265 | } 266 | } 267 | 268 | if (!hasSizesPrefixSumError) 269 | { 270 | Debug.Log($"Scan operation for bit offset {bitOffset} is correct"); 271 | } 272 | } 273 | 274 | public void Dispose() 275 | { 276 | _sortedBlocksKeysData.Dispose(); 277 | _sortedBlocksValuesData.Dispose(); 278 | _offsetsData.Dispose(); 279 | _sizesData.Dispose(); 280 | _sizesPrefixSumData.Dispose(); 281 | } 282 | } -------------------------------------------------------------------------------- /Assets/_Scripts/ComputeBufferSorter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38341b17049daa841bd62433f5df2d02 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/Constants.cs: -------------------------------------------------------------------------------- 1 | public static class Constants 2 | { 3 | public const int THREADS_PER_BLOCK = 1024; 4 | public const int BLOCK_SIZE = 512; 5 | public const int ELEM_PER_THREAD = 1; // TODO later 6 | public const int DATA_ARRAY_COUNT = ELEM_PER_THREAD * THREADS_PER_BLOCK * BLOCK_SIZE; 7 | 8 | public const int RADIX = 8; 9 | public const int BUCKET_SIZE = 1 << 8; 10 | } -------------------------------------------------------------------------------- /Assets/_Scripts/Constants.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a718a4abdb1d4904ebe1e7eda292e119 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/DataBuffer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | using UnityEngine; 4 | 5 | public class DataBuffer : IDisposable where T : struct 6 | { 7 | public ComputeBuffer DeviceBuffer => _deviceBuffer; 8 | public T[] LocalBuffer => _localBuffer; 9 | 10 | private readonly ComputeBuffer _deviceBuffer; 11 | private readonly T[] _localBuffer; 12 | private bool _synced; 13 | 14 | public DataBuffer(int size, T initialValue) : this(size) 15 | { 16 | for (int i = 0; i < size; i++) 17 | { 18 | _localBuffer[i] = initialValue; 19 | } 20 | 21 | _deviceBuffer.SetData(_localBuffer); 22 | _synced = true; 23 | } 24 | 25 | public DataBuffer(int size) 26 | { 27 | _deviceBuffer = new ComputeBuffer(size, Marshal.SizeOf(typeof(T)), ComputeBufferType.Structured); 28 | _localBuffer = new T[size]; 29 | _synced = false; 30 | } 31 | 32 | public T this[uint i] 33 | { 34 | get 35 | { 36 | if (!_synced) 37 | { 38 | GetData(); 39 | } 40 | 41 | return _localBuffer[i]; 42 | } 43 | set 44 | { 45 | _localBuffer[i] = value; 46 | _synced = false; 47 | } 48 | } 49 | 50 | public void GetData() 51 | { 52 | _deviceBuffer.GetData(_localBuffer); 53 | _synced = true; 54 | } 55 | 56 | public void Sync() 57 | { 58 | _deviceBuffer.SetData(_localBuffer); 59 | _synced = true; 60 | } 61 | 62 | public override string ToString() 63 | { 64 | if (!_synced) 65 | { 66 | GetData(); 67 | } 68 | 69 | return Utils.ArrayToString(_localBuffer).ToString(); 70 | } 71 | 72 | public void Dispose() 73 | { 74 | _deviceBuffer.Release(); 75 | } 76 | } -------------------------------------------------------------------------------- /Assets/_Scripts/DataBuffer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1455af6748553848abb5814b047221d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/MeshBufferContainer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | using UnityEngine; 4 | 5 | public class MeshBufferContainer : IDisposable 6 | { 7 | // TODO reduce scene data for finding AABB scene in runtime 8 | 9 | private static readonly float size = 125f; 10 | 11 | private static readonly AABB Whole = new AABB() 12 | { 13 | min = Vector3.one * -1 * size, 14 | max = Vector3.one * size 15 | }; 16 | 17 | public ComputeBuffer Keys => _keysBuffer.DeviceBuffer; 18 | public uint[] KeysData => _keysBuffer.LocalBuffer; 19 | public ComputeBuffer TriangleIndex => _triangleIndexBuffer.DeviceBuffer; 20 | public ComputeBuffer TriangleData => _triangleDataBuffer.DeviceBuffer; 21 | public ComputeBuffer TriangleAABB => _triangleAABBBuffer.DeviceBuffer; 22 | public ComputeBuffer BvhData => _bvhDataBuffer.DeviceBuffer; 23 | public ComputeBuffer BvhLeafNode => _bvhLeafNodesBuffer.DeviceBuffer; 24 | public ComputeBuffer BvhInternalNode => _bvhInternalNodesBuffer.DeviceBuffer; 25 | 26 | public AABB[] TriangleAABBLocalData => _triangleAABBBuffer.LocalBuffer; 27 | public AABB[] BVHLocalData => _bvhDataBuffer.LocalBuffer; 28 | public LeafNode[] BvhLeafNodeLocalData => _bvhLeafNodesBuffer.LocalBuffer; 29 | public InternalNode[] BvhInternalNodeLocalData => _bvhInternalNodesBuffer.LocalBuffer; 30 | public uint TrianglesLength => _trianglesLength; 31 | 32 | private static uint ExpandBits(uint v) 33 | { 34 | v = (v * 0x00010001u) & 0xFF0000FFu; 35 | v = (v * 0x00000101u) & 0x0F00F00Fu; 36 | v = (v * 0x00000011u) & 0xC30C30C3u; 37 | v = (v * 0x00000005u) & 0x49249249u; 38 | return v; 39 | } 40 | 41 | private static uint Morton3D(float x, float y, float z) 42 | { 43 | x = Math.Min(Math.Max(x * 1024.0f, 0.0f), 1023.0f); 44 | y = Math.Min(Math.Max(y * 1024.0f, 0.0f), 1023.0f); 45 | z = Math.Min(Math.Max(z * 1024.0f, 0.0f), 1023.0f); 46 | uint xx = ExpandBits((uint)x); 47 | uint yy = ExpandBits((uint)y); 48 | uint zz = ExpandBits((uint)z); 49 | return xx * 4 + yy * 2 + zz; 50 | } 51 | 52 | private static void GetCentroidAndAABB(Vector3 a, Vector3 b, Vector3 c, out Vector3 centroid, out AABB aabb) 53 | { 54 | Vector3 min = new Vector3( 55 | Math.Min(Math.Min(a.x, b.x), c.x) - 0.001f, 56 | Math.Min(Math.Min(a.y, b.y), c.y) - 0.001f, 57 | Math.Min(Math.Min(a.z, b.z), c.z) - 0.001f 58 | ); 59 | Vector3 max = new Vector3( 60 | Math.Max(Math.Max(a.x, b.x), c.x) + 0.001f, 61 | Math.Max(Math.Max(a.y, b.y), c.y) + 0.001f, 62 | Math.Max(Math.Max(a.z, b.z), c.z) + 0.001f 63 | ); 64 | 65 | centroid = (min + max) * 0.5f; 66 | aabb = new AABB 67 | { 68 | min = min, 69 | max = max 70 | }; 71 | } 72 | 73 | private static Vector3 NormalizeCentroid(Vector3 centroid) 74 | { 75 | Vector3 ret = centroid; 76 | ret.x -= Whole.min.x; 77 | ret.y -= Whole.min.y; 78 | ret.z -= Whole.min.z; 79 | ret.x /= (Whole.max.x - Whole.min.x); 80 | ret.y /= (Whole.max.y - Whole.min.y); 81 | ret.z /= (Whole.max.z - Whole.min.z); 82 | return ret; 83 | } 84 | 85 | private readonly uint _trianglesLength; 86 | 87 | private readonly DataBuffer _keysBuffer; 88 | private readonly DataBuffer _triangleIndexBuffer; 89 | private readonly DataBuffer _triangleDataBuffer; 90 | private readonly DataBuffer _triangleAABBBuffer; 91 | 92 | private readonly DataBuffer _bvhDataBuffer; 93 | private readonly DataBuffer _bvhLeafNodesBuffer; 94 | private readonly DataBuffer _bvhInternalNodesBuffer; 95 | 96 | public MeshBufferContainer(Mesh mesh) // TODO multiple meshes 97 | { 98 | if (Marshal.SizeOf(typeof(Triangle)) != 128) 99 | { 100 | Debug.LogError("Triangle struct size = " + Marshal.SizeOf(typeof(Triangle)) + ", not 128"); 101 | } 102 | 103 | if (Marshal.SizeOf(typeof(AABB)) != 32) 104 | { 105 | Debug.LogError("AABB struct size = " + Marshal.SizeOf(typeof(AABB)) + ", not 32"); 106 | } 107 | 108 | _keysBuffer = new DataBuffer(Constants.DATA_ARRAY_COUNT, uint.MaxValue); 109 | _triangleIndexBuffer = new DataBuffer(Constants.DATA_ARRAY_COUNT, uint.MaxValue); 110 | _triangleDataBuffer = new DataBuffer(Constants.DATA_ARRAY_COUNT); 111 | _triangleAABBBuffer = new DataBuffer(Constants.DATA_ARRAY_COUNT); 112 | 113 | _bvhDataBuffer = new DataBuffer(Constants.DATA_ARRAY_COUNT); 114 | _bvhLeafNodesBuffer = new DataBuffer(Constants.DATA_ARRAY_COUNT, LeafNode.NullLeaf); 115 | _bvhInternalNodesBuffer = new DataBuffer(Constants.DATA_ARRAY_COUNT, InternalNode.NullLeaf); 116 | 117 | Vector3[] vertices = mesh.vertices; 118 | int[] triangles = mesh.triangles; 119 | Vector2[] uvs = mesh.uv; 120 | Vector3[] normals = mesh.normals; 121 | _trianglesLength = (uint)triangles.Length / 3; 122 | 123 | for (uint i = 0; i < _trianglesLength; i++) 124 | { 125 | Vector3 a = vertices[triangles[i * 3 + 0]]; 126 | Vector3 b = vertices[triangles[i * 3 + 1]]; 127 | Vector3 c = vertices[triangles[i * 3 + 2]]; 128 | GetCentroidAndAABB(a, b, c, out var centroid, out var aabb); 129 | centroid = NormalizeCentroid(centroid); 130 | uint mortonCode = Morton3D(centroid.x, centroid.y, centroid.z); 131 | _keysBuffer[i] = mortonCode; 132 | _triangleIndexBuffer[i] = i; 133 | _triangleDataBuffer[i] = new Triangle 134 | { 135 | a = a, 136 | b = b, 137 | c = c, 138 | a_uv = uvs[triangles[i * 3 + 0]], 139 | b_uv = uvs[triangles[i * 3 + 1]], 140 | c_uv = uvs[triangles[i * 3 + 2]], 141 | a_normal = normals[triangles[i * 3 + 0]], 142 | b_normal = normals[triangles[i * 3 + 1]], 143 | c_normal = normals[triangles[i * 3 + 2]], 144 | }; 145 | _triangleAABBBuffer[i] = aabb; 146 | } 147 | 148 | _keysBuffer.Sync(); 149 | _triangleIndexBuffer.Sync(); 150 | _triangleDataBuffer.Sync(); 151 | _triangleAABBBuffer.Sync(); 152 | } 153 | 154 | public void DistributeKeys() 155 | { 156 | _keysBuffer.GetData(); 157 | 158 | uint newCurrentValue = 0; 159 | uint oldCurrentValue = _keysBuffer.LocalBuffer[0]; 160 | _keysBuffer.LocalBuffer[0] = newCurrentValue; 161 | for (uint i = 1; i < _trianglesLength; i++) 162 | { 163 | newCurrentValue += Math.Max(_keysBuffer.LocalBuffer[i] - oldCurrentValue, 1); 164 | oldCurrentValue = _keysBuffer.LocalBuffer[i]; 165 | _keysBuffer.LocalBuffer[i] = newCurrentValue; 166 | } 167 | 168 | _keysBuffer.Sync(); 169 | } 170 | 171 | public void GetAllGpuData() 172 | { 173 | _keysBuffer.GetData(); 174 | _triangleIndexBuffer.GetData(); 175 | _triangleDataBuffer.GetData(); 176 | _triangleAABBBuffer.GetData(); 177 | _bvhDataBuffer.GetData(); 178 | _bvhLeafNodesBuffer.GetData(); 179 | _bvhInternalNodesBuffer.GetData(); 180 | 181 | for (uint i = 0; i < _trianglesLength; i++) 182 | { 183 | if (_bvhLeafNodesBuffer[i].index == 0xFFFFFFFF && _bvhLeafNodesBuffer[i].parent == 0xFFFFFFFF) 184 | { 185 | Debug.LogErrorFormat("LEAF CORRUPTED {0}", i); 186 | } 187 | } 188 | 189 | for (uint i = 0; i < _trianglesLength - 1; i++) 190 | { 191 | if (_bvhInternalNodesBuffer[i].index == 0xFFFFFFFF && _bvhInternalNodesBuffer[i].parent == 0xFFFFFFFF) 192 | { 193 | Debug.LogErrorFormat("INTERNAL CORRUPTED {0}", i); 194 | } 195 | } 196 | } 197 | 198 | public void PrintData() 199 | { 200 | Debug.Log(_keysBuffer); 201 | Debug.Log(_bvhInternalNodesBuffer); 202 | Debug.Log(_bvhLeafNodesBuffer); 203 | Debug.Log(_bvhDataBuffer); 204 | } 205 | 206 | 207 | public void Dispose() 208 | { 209 | _keysBuffer.Dispose(); 210 | _triangleIndexBuffer.Dispose(); 211 | _triangleDataBuffer.Dispose(); 212 | _triangleAABBBuffer.Dispose(); 213 | _bvhDataBuffer.Dispose(); 214 | _bvhLeafNodesBuffer.Dispose(); 215 | _bvhInternalNodesBuffer.Dispose(); 216 | } 217 | } -------------------------------------------------------------------------------- /Assets/_Scripts/MeshBufferContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b308a53233090434492f423b39aba808 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/RaytracingMeshDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UnityEngine.Experimental.Rendering; 6 | using Random = UnityEngine.Random; 7 | 8 | [RequireComponent(typeof(Camera))] 9 | public class RaytracingMeshDrawer : MonoBehaviour 10 | { 11 | [SerializeField] [Range(0, 6365)] private int _indexToCheck; 12 | [SerializeField] private Shader _imageComposer; 13 | [SerializeField] private Mesh _mesh; 14 | [SerializeField] private ShaderContainer _shaderContainer; 15 | [SerializeField] private Texture _meshTexture; 16 | 17 | private ComputeShader _objectDrawer; 18 | private int _objectDrawerKernel; 19 | 20 | private Camera _camera; 21 | 22 | private MeshBufferContainer _container; 23 | private ComputeBufferSorter _sorter; 24 | private BVHConstructor _bvhConstructor; 25 | private RenderTexture _renderTexture; 26 | private Material _imageComposerMaterial; 27 | private static readonly int ObjectTexture = Shader.PropertyToID("_ObjectTexture"); 28 | 29 | 30 | void Awake() 31 | { 32 | _camera = GetComponent(); 33 | 34 | _container = new MeshBufferContainer(_mesh); 35 | Debug.Log("Triangles Length " + _container.TrianglesLength); 36 | _sorter = new ComputeBufferSorter(_container.TrianglesLength, _container.Keys, _container.TriangleIndex, _shaderContainer); 37 | _sorter.Sort(); 38 | 39 | _container.DistributeKeys(); 40 | 41 | _bvhConstructor = new BVHConstructor(_container.TrianglesLength, 42 | _container.Keys, 43 | _container.TriangleIndex, 44 | _container.TriangleAABB, 45 | _container.BvhInternalNode, 46 | _container.BvhLeafNode, 47 | _container.BvhData, 48 | _shaderContainer); 49 | 50 | _bvhConstructor.ConstructTree(); 51 | _bvhConstructor.ConstructBVH(); 52 | 53 | _container.GetAllGpuData(); 54 | _container.PrintData(); 55 | 56 | _renderTexture = new RenderTexture(Screen.width, Screen.height, GraphicsFormat.R16G16B16A16_SFloat, GraphicsFormat.D32_SFloat); 57 | _renderTexture.enableRandomWrite = true; 58 | 59 | _objectDrawer = _shaderContainer.Raytracing; 60 | _objectDrawerKernel = _objectDrawer.FindKernel("Raytracing"); 61 | 62 | 63 | _objectDrawer.SetTexture(_objectDrawerKernel, "_outputTexture", _renderTexture); 64 | _objectDrawer.SetTexture(_objectDrawerKernel, "_meshTexture", _meshTexture); 65 | _objectDrawer.SetBuffer(_objectDrawerKernel, "sortedTriangleIndices", _container.TriangleIndex); 66 | _objectDrawer.SetBuffer(_objectDrawerKernel, "triangleAABB", _container.TriangleAABB); 67 | _objectDrawer.SetBuffer(_objectDrawerKernel, "internalNodes", _container.BvhInternalNode); 68 | _objectDrawer.SetBuffer(_objectDrawerKernel, "leafNodes", _container.BvhLeafNode); 69 | _objectDrawer.SetBuffer(_objectDrawerKernel, "bvhData", _container.BvhData); 70 | _objectDrawer.SetBuffer(_objectDrawerKernel, "triangleData", _container.TriangleData); 71 | 72 | _imageComposerMaterial = new Material(_imageComposer); 73 | _imageComposerMaterial.SetTexture(ObjectTexture, _renderTexture); 74 | } 75 | 76 | private void Update() 77 | { 78 | _objectDrawer.SetInt("screenWidth", Screen.width); 79 | _objectDrawer.SetInt("screenHeight", Screen.height); 80 | _objectDrawer.SetFloat("cameraFov", Mathf.Tan(_camera.fieldOfView * Mathf.Deg2Rad / 2)); 81 | _objectDrawer.SetMatrix("cameraToWorldMatrix", _camera.cameraToWorldMatrix); 82 | 83 | _objectDrawer.Dispatch(_objectDrawerKernel, (Screen.width / 32) + 1, (Screen.height / 32) + 1, 1); 84 | } 85 | 86 | private void OnRenderImage(RenderTexture src, RenderTexture dest) 87 | { 88 | Graphics.Blit(src, dest, _imageComposerMaterial); 89 | } 90 | 91 | 92 | private void DrawAABB(AABB aabb, float random = 1) 93 | { 94 | Vector3 center = (aabb.min + aabb.max) / 2; 95 | Gizmos.DrawWireCube((aabb.min + aabb.max) / 2, (aabb.max - aabb.min) * random); 96 | } 97 | 98 | private void OnDrawGizmos() 99 | { 100 | if (_container == null) return; 101 | 102 | for (int i = 0; i < _container.TrianglesLength; i++) 103 | { 104 | AABB aabb = _container.TriangleAABBLocalData[i]; 105 | DrawAABB(aabb); 106 | } 107 | 108 | Gizmos.color = Color.red; 109 | 110 | for (int i = 0; i < _container.TrianglesLength - 1; i++) 111 | { 112 | AABB aabb = _container.BVHLocalData[i]; 113 | DrawAABB(aabb, 1.2f); // Random.Range(1, 1.1f)); 114 | } 115 | // DrawAABB(_container.BVHLocalData[0], 1.05f); // Random.Range(1, 1.1f)); 116 | } 117 | 118 | private void OnDestroy() 119 | { 120 | _sorter.Dispose(); 121 | _container.Dispose(); 122 | _bvhConstructor.Dispose(); 123 | } 124 | } -------------------------------------------------------------------------------- /Assets/_Scripts/RaytracingMeshDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ee18e1658fd6b241864c6938e8f3dc7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/SceneDataTypes.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using UnityEngine; 3 | 4 | [StructLayout(LayoutKind.Sequential, Pack = 16)] 5 | public struct AABB 6 | { 7 | public Vector3 min; 8 | public float _dummy0; 9 | public Vector3 max; 10 | public float _dummy1; 11 | 12 | public override string ToString() 13 | { 14 | return $"min:{min}, max:{max}"; 15 | } 16 | } 17 | 18 | [StructLayout(LayoutKind.Sequential, Pack = 16)] 19 | public struct Triangle 20 | { 21 | public Vector3 a; 22 | float _dummy0; 23 | public Vector3 b; 24 | float _dummy1; 25 | public Vector3 c; 26 | float _dummy2; 27 | public Vector2 a_uv; 28 | public Vector2 b_uv; 29 | public Vector2 c_uv; 30 | Vector2 _dummy3; 31 | 32 | public Vector3 a_normal; 33 | float _dummy4; 34 | public Vector3 b_normal; 35 | float _dummy5; 36 | public Vector3 c_normal; 37 | float _dummy6; 38 | 39 | 40 | // TODO texture index, etc 41 | } 42 | 43 | [StructLayout(LayoutKind.Sequential, Pack = 16)] 44 | public struct InternalNode 45 | { 46 | public uint leftNode; 47 | public uint leftNodeType; 48 | public uint rightNode; 49 | public uint rightNodeType; 50 | public uint parent; 51 | public uint index; 52 | 53 | public override string ToString() 54 | { 55 | string GetNodeType(uint type) 56 | { 57 | return type == 0 ? "I" : "L"; 58 | } 59 | 60 | return $"index:{index}, left:{leftNode} {GetNodeType(leftNodeType)}, right:{rightNode} {GetNodeType(rightNodeType)}, parent:{parent}\n"; 61 | } 62 | 63 | public static InternalNode NullLeaf = new InternalNode() 64 | { 65 | leftNode = 0xFFFFFFFF, 66 | leftNodeType = 0xFFFFFFFF, 67 | rightNode = 0xFFFFFFFF, 68 | rightNodeType = 0xFFFFFFFF, 69 | parent = 0xFFFFFFFF, 70 | index = 0xFFFFFFFF 71 | }; 72 | }; 73 | 74 | [StructLayout(LayoutKind.Sequential, Pack = 16)] 75 | public struct LeafNode 76 | { 77 | public uint parent; 78 | public uint index; 79 | 80 | public override string ToString() 81 | { 82 | return $"index:{index}, parent:{parent}\n"; 83 | } 84 | 85 | public static LeafNode NullLeaf = new LeafNode() 86 | { 87 | parent = 0xFFFFFFFF, 88 | index = 0xFFFFFFFF 89 | }; 90 | }; -------------------------------------------------------------------------------- /Assets/_Scripts/SceneDataTypes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ccdb83a77e0c93a49a330bc95422f250 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/ShaderContainer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | public interface IShaderContainer 7 | { 8 | public SortingShaderContainer Sorting { get; } 9 | public BVHShaderContainer BVH { get; } 10 | } 11 | 12 | [Serializable] 13 | public class SortingShaderContainer 14 | { 15 | public ComputeShader LocalRadixSortShader => _localRadixSortShader; 16 | public ComputeShader ScanShader => _scanShader; 17 | public ComputeShader GlobalRadixSortShader => _globalRadixSortShader; 18 | 19 | [SerializeField] private ComputeShader _localRadixSortShader; 20 | [SerializeField] private ComputeShader _scanShader; 21 | [SerializeField] private ComputeShader _globalRadixSortShader; 22 | } 23 | 24 | [Serializable] 25 | public class BVHShaderContainer 26 | { 27 | public ComputeShader BVHShader => _BVHShader; 28 | [SerializeField] private ComputeShader _BVHShader; 29 | } 30 | 31 | [Serializable] 32 | public class ShaderContainer : MonoBehaviour, IShaderContainer 33 | { 34 | public SortingShaderContainer Sorting => _sorting; 35 | public BVHShaderContainer BVH => _bvh; 36 | public ComputeShader Raytracing => _raytracing; 37 | 38 | [SerializeField] private SortingShaderContainer _sorting; 39 | [SerializeField] private BVHShaderContainer _bvh; 40 | [SerializeField] private ComputeShader _raytracing; 41 | } -------------------------------------------------------------------------------- /Assets/_Scripts/ShaderContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42366c1f1545f7f45a5d9f796fe9673e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/_debug.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c82a7498fbd1c1b49809630edd5d5dad 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Scripts/_debug/_debugComputeShaderTester.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using UnityEngine; 6 | 7 | public class _debugComputeShaderTester : MonoBehaviour 8 | { 9 | [SerializeField] private ComputeShader _computeShader; 10 | private int _computeShaderKernel; 11 | 12 | private const int BUFFER_SIZE = 128; 13 | private ComputeBuffer _buffer; 14 | private ulong [] _bufferData = new ulong [BUFFER_SIZE]; 15 | 16 | void Awake() 17 | { 18 | _buffer = new ComputeBuffer(BUFFER_SIZE, sizeof(ulong), ComputeBufferType.Structured); 19 | 20 | _computeShaderKernel = _computeShader.FindKernel("CSMain"); 21 | _computeShader.SetBuffer(_computeShaderKernel, "_buffer", _buffer); 22 | 23 | _computeShader.Dispatch(_computeShaderKernel, 1, 1, 1); 24 | 25 | _buffer.GetData(_bufferData); 26 | Debug.Log(Utils.ArrayToString(_bufferData)); 27 | } 28 | 29 | private void OnDestroy() 30 | { 31 | _buffer.Release(); 32 | } 33 | } -------------------------------------------------------------------------------- /Assets/_Scripts/_debug/_debugComputeShaderTester.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eed1ce01831835647b8a4d9c4a45ebc5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/_debug/_debugRayBoxIntersectionTester.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | public class _debugRayBoxIntersectionTester : MonoBehaviour 7 | { 8 | [SerializeField] private Vector3 _boxMin; 9 | [SerializeField] private Vector3 _boxMax; 10 | private Transform _box; 11 | private Transform _ray; 12 | 13 | void Start() 14 | { 15 | _box = new GameObject("Box").transform; 16 | _ray = new GameObject("Ray").transform; 17 | _ray.position = new Vector3(0, 0, 40); 18 | } 19 | 20 | private struct Box 21 | { 22 | public Vector3 min; 23 | public Vector3 max; 24 | } 25 | 26 | private struct Ray 27 | { 28 | public Vector3 origin; 29 | public Vector3 dir; 30 | public Vector3 inv_dir; 31 | } 32 | 33 | bool RayBoxIntersection(Box b, Ray r) 34 | { 35 | Vector3 t1 = Vector3.Scale(b.min - r.origin, r.inv_dir); 36 | Vector3 t2 = Vector3.Scale(b.max - r.origin, r.inv_dir); 37 | 38 | Vector3 tmin1 = Vector3.Min(t1, t2); 39 | Vector3 tmax1 = Vector3.Max(t1, t2); 40 | 41 | float tmin = Mathf.Max(tmin1.x, tmin1.y, tmin1.z); 42 | float tmax = Mathf.Min(tmax1.x, tmax1.y, tmax1.z); 43 | 44 | return tmax > tmin && tmax > 0; 45 | } 46 | 47 | void Update() 48 | { 49 | Box box = new Box() 50 | { 51 | min = _boxMin, 52 | max = _boxMax 53 | }; 54 | Ray ray = new Ray() 55 | { 56 | origin = _ray.position, 57 | dir = _ray.forward, 58 | inv_dir = new Vector3(1 / _ray.forward.x, 1 / _ray.forward.y, 1 / _ray.forward.z) 59 | }; 60 | if (RayBoxIntersection(box, ray)) 61 | { 62 | Debug.DrawLine(_ray.position, _ray.position + _ray.forward * 10f, Color.red); 63 | } 64 | else 65 | { 66 | Debug.DrawLine(_ray.position, _ray.position + _ray.forward * 10f, Color.blue); 67 | } 68 | } 69 | 70 | private void OnDrawGizmos() 71 | { 72 | if (_box == null) return; 73 | Gizmos.color = Color.red; 74 | Gizmos.DrawWireCube((_boxMax + _boxMin) / 2, _boxMax - _boxMin); 75 | } 76 | } -------------------------------------------------------------------------------- /Assets/_Scripts/_debug/_debugRayBoxIntersectionTester.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fdeb27d5096061a4caa99ce0ba5f2e85 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/_utils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b73ff3bd0cd2dbe4ea13fe3a2ffb7cb9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Scripts/_utils/Utils.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using UnityEngine; 5 | 6 | public class Utils 7 | { 8 | public static StringBuilder ArrayToString(uint[] array, uint maxElements = 4096) 9 | { 10 | StringBuilder builder = new StringBuilder(""); 11 | for (var i = 0; i < array.Length; i++) 12 | { 13 | if (i >= maxElements) break; 14 | builder.Append(array[i] + " "); 15 | } 16 | 17 | return builder; 18 | } 19 | 20 | 21 | public static StringBuilder ArrayToString(T[] array, uint maxElements = 4096) 22 | { 23 | StringBuilder builder = new StringBuilder(""); 24 | for (var i = 0; i < array.Length; i++) 25 | { 26 | if (i >= maxElements) break; 27 | builder.Append(array[i] + " "); 28 | } 29 | 30 | return builder; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Assets/_Scripts/_utils/Utils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b64859da29432ff479c4e15108fcf211 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81bb421c8dcd7d447bbc16cb405ebf71 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Shaders/BVH.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5defd655fb17a0c47979b96a07b02eab 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Shaders/BVH/BVH.compute: -------------------------------------------------------------------------------- 1 | #pragma use_dxc 2 | #pragma kernel TreeConstructor 3 | #pragma kernel BVHConstructor 4 | 5 | #include 6 | 7 | uniform int trianglesCount; 8 | 9 | StructuredBuffer sortedMortonCodes; // size = THREADS_PER_BLOCK * BLOCK_SIZE 10 | StructuredBuffer sortedTriangleIndices; // size = THREADS_PER_BLOCK * BLOCK_SIZE```` 11 | StructuredBuffer triangleAABB; // size = THREADS_PER_BLOCK * BLOCK_SIZE 12 | 13 | RWStructuredBuffer internalNodes; // size = THREADS_PER_BLOCK * BLOCK_SIZE - 1 14 | RWStructuredBuffer leafNodes; // size = THREADS_PER_BLOCK * BLOCK_SIZE 15 | RWStructuredBuffer atomicsData; // size = THREADS_PER_BLOCK * BLOCK_SIZE 16 | RWStructuredBuffer BVHData; // size = THREADS_PER_BLOCK * BLOCK_SIZE - 1 17 | 18 | inline uint clz32(uint v) 19 | { 20 | return 31 - firstbithigh(v); 21 | } 22 | 23 | inline int delta(int x, int y, int numObjects) 24 | { 25 | if (x >= 0 && x <= numObjects - 1 && y >= 0 && y <= numObjects - 1) 26 | { 27 | const uint x_code = sortedMortonCodes[x]; 28 | const uint y_code = sortedMortonCodes[y]; 29 | // we guarantee that x_code != y_code 30 | return clz32(x_code ^ y_code); 31 | } 32 | return -1; 33 | } 34 | 35 | inline int2 DetermineRange(int numObjects, int idx) 36 | { 37 | const int d = sign(delta(idx, idx + 1, numObjects) - delta(idx, idx - 1, numObjects)); 38 | const int dmin = delta(idx, idx - d, numObjects); 39 | uint lmax = 2; 40 | while (delta(idx, idx + lmax * d, numObjects) > dmin) 41 | lmax = lmax * 2; 42 | int l = 0; 43 | for (uint t = lmax / 2; t >= 1; t /= 2) 44 | { 45 | if (delta(idx, idx + (l + t) * d, numObjects) > dmin) 46 | l += t; 47 | } 48 | 49 | const int j = idx + l * d; 50 | int2 range = int2(min(idx, j), max(idx, j)); 51 | return range; 52 | } 53 | 54 | inline int FindSplit(int first, int last) 55 | { 56 | // Identical Morton codes => split the range in the middle. 57 | 58 | const uint firstCode = sortedMortonCodes[first]; 59 | const uint lastCode = sortedMortonCodes[last]; 60 | 61 | if (firstCode == lastCode) 62 | return (first + last) >> 1; 63 | 64 | // Calculate the number of highest bits that are the same 65 | // for all objects, using the count-leading-zeros intrinsic. 66 | 67 | const int commonPrefix = clz32(firstCode ^ lastCode); 68 | 69 | // Use binary search to find where the next bit differs. 70 | // Specifically, we are looking for the highest object that 71 | // shares more than commonPrefix bits with the first one. 72 | 73 | int split = first; // initial guess 74 | int step = last - first; 75 | 76 | do 77 | { 78 | step = (step + 1) >> 1; // exponential decrease 79 | const int newSplit = split + step; // proposed new position 80 | 81 | if (newSplit < last) 82 | { 83 | const uint splitCode = sortedMortonCodes[newSplit]; 84 | const int splitPrefix = clz32(firstCode ^ splitCode); 85 | if (splitPrefix > commonPrefix) 86 | split = newSplit; // accept proposal 87 | } 88 | } 89 | while (step > 1); 90 | 91 | return split; 92 | } 93 | 94 | [numthreads(THREADS_PER_BLOCK,1,1)] 95 | void TreeConstructor(uint3 id : SV_DispatchThreadID) 96 | { 97 | const uint threadId = id.x; 98 | const uint _trianglesCount = trianglesCount; 99 | AllMemoryBarrierWithGroupSync(); 100 | 101 | if (threadId < _trianglesCount - 1) 102 | { 103 | int2 range = DetermineRange(_trianglesCount, threadId); 104 | const int first = range.x; 105 | const int last = range.y; 106 | 107 | // Determine where to split the range. 108 | 109 | const int split = FindSplit(first, last); 110 | 111 | internalNodes[threadId].index = threadId; 112 | 113 | // Select childA. 114 | if (split == first) 115 | { 116 | const LeafNode node = { 117 | threadId, 118 | split 119 | }; 120 | leafNodes[split] = node; 121 | internalNodes[threadId].leftNode = split; 122 | internalNodes[threadId].leftNodeType = LEAF_NODE; 123 | } 124 | else 125 | { 126 | internalNodes[split].parent = threadId; 127 | internalNodes[threadId].leftNode = split; 128 | internalNodes[threadId].leftNodeType = INTERNAL_NODE; 129 | } 130 | 131 | // Select childB. 132 | if (split + 1 == last) 133 | { 134 | const LeafNode node = { 135 | threadId, 136 | split + 1 137 | }; 138 | leafNodes[split + 1] = node; 139 | internalNodes[threadId].rightNode = split + 1; 140 | internalNodes[threadId].rightNodeType = LEAF_NODE; 141 | } 142 | else 143 | { 144 | internalNodes[split + 1].parent = threadId; 145 | internalNodes[threadId].rightNode = split + 1; 146 | internalNodes[threadId].rightNodeType = INTERNAL_NODE; 147 | } 148 | } 149 | } 150 | 151 | 152 | inline AABB MergeAABB(AABB left, AABB right) 153 | { 154 | AABB ret; 155 | ret.min = float3( 156 | min(left.min.x, right.min.x), 157 | min(left.min.y, right.min.y), 158 | min(left.min.z, right.min.z) 159 | ); 160 | 161 | ret.max = float3( 162 | max(left.max.x, right.max.x), 163 | max(left.max.y, right.max.y), 164 | max(left.max.z, right.max.z) 165 | ); 166 | 167 | ret._dummy0 = 0; 168 | ret._dummy1 = 0; 169 | return ret; 170 | } 171 | 172 | [numthreads(THREADS_PER_BLOCK,1,1)] 173 | void BVHConstructor(uint3 id : SV_DispatchThreadID) 174 | { 175 | const uint threadId = id.x; 176 | const uint _trianglesCount = trianglesCount; 177 | AllMemoryBarrierWithGroupSync(); 178 | 179 | if (threadId < _trianglesCount) 180 | { 181 | uint parent = leafNodes[threadId].parent; 182 | while (parent != 0xFFFFFFFF) 183 | { 184 | uint old = 0; 185 | InterlockedCompareExchange(atomicsData[parent], 0, 1, old); 186 | if (old == 0) 187 | { 188 | break; 189 | } 190 | 191 | const uint leftId = internalNodes[parent].leftNode; 192 | const uint leftType = internalNodes[parent].leftNodeType; 193 | const uint rightId = internalNodes[parent].rightNode; 194 | const uint rightType = internalNodes[parent].rightNodeType; 195 | 196 | AABB leftAABB; 197 | if (leftType == INTERNAL_NODE) 198 | { 199 | leftAABB = BVHData[leftId]; 200 | } 201 | else 202 | { 203 | leftAABB = triangleAABB[sortedTriangleIndices[leftId]]; 204 | } 205 | AABB rightAABB; 206 | if (rightType == INTERNAL_NODE) 207 | { 208 | rightAABB = BVHData[rightId]; 209 | } 210 | else 211 | { 212 | rightAABB = triangleAABB[sortedTriangleIndices[rightId]]; 213 | } 214 | 215 | BVHData[parent] = MergeAABB(leftAABB, rightAABB); 216 | 217 | parent = internalNodes[parent].parent; 218 | } 219 | } 220 | } 221 | -------------------------------------------------------------------------------- /Assets/_Shaders/BVH/BVH.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ff237d40748d0544bda3a2fe3327b0c 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | preprocessorOverride: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Shaders/Constants.cginc: -------------------------------------------------------------------------------- 1 | #define RADIX 8 2 | #define BUCKET_SIZE 256 // 2 ^ RADIX 3 | #define BLOCK_SIZE 512 4 | #define THREADS_PER_BLOCK 1024 5 | #define WARP_SIZE 32 6 | 7 | #define MAX_FLOAT 0x7F7FFFFF 8 | 9 | struct AABB 10 | { 11 | float3 min; 12 | float _dummy0; 13 | float3 max; 14 | float _dummy1; 15 | }; 16 | 17 | #define INTERNAL_NODE 0 18 | #define LEAF_NODE 1 19 | 20 | struct InternalNode 21 | { 22 | uint leftNode; 23 | uint leftNodeType; // TODO combine node types in one 4 byte word 24 | uint rightNode; 25 | uint rightNodeType; 26 | uint parent; 27 | uint index; 28 | }; 29 | 30 | struct LeafNode 31 | { 32 | uint parent; 33 | uint index; 34 | }; 35 | 36 | struct Triangle 37 | { 38 | float3 a; 39 | float _dummy0; 40 | float3 b; 41 | float _dummy1; 42 | float3 c; 43 | float _dummy2; 44 | float2 a_uv; 45 | float2 b_uv; 46 | float2 c_uv; 47 | float2 _dummy3; 48 | float3 a_normal; 49 | float _dummy4; 50 | float3 b_normal; 51 | float _dummy5; 52 | float3 c_normal; 53 | float _dummy6; 54 | }; 55 | -------------------------------------------------------------------------------- /Assets/_Shaders/Constants.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 701d67f73acdab94e9fb012a94029335 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Shaders/ImageComposer.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/ImageComposer" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Texture", 2D) = "white" {} 6 | _ObjectTexture ("Texture", 2D) = "white" {} 7 | } 8 | SubShader 9 | { 10 | // No culling or depth 11 | Cull Off ZWrite Off ZTest Always 12 | 13 | Pass 14 | { 15 | CGPROGRAM 16 | #pragma vertex vert 17 | #pragma fragment frag 18 | 19 | #include "UnityCG.cginc" 20 | 21 | struct appdata 22 | { 23 | float4 vertex : POSITION; 24 | float2 uv : TEXCOORD0; 25 | }; 26 | 27 | struct v2f 28 | { 29 | float2 uv : TEXCOORD0; 30 | float4 vertex : SV_POSITION; 31 | }; 32 | 33 | v2f vert(appdata v) 34 | { 35 | v2f o; 36 | o.vertex = UnityObjectToClipPos(v.vertex); 37 | o.uv = v.uv; 38 | return o; 39 | } 40 | 41 | sampler2D _MainTex; 42 | sampler2D _ObjectTexture; 43 | 44 | fixed4 frag(v2f i) : SV_Target 45 | { 46 | fixed4 col = tex2D(_MainTex, i.uv); 47 | fixed4 colObject = tex2D(_ObjectTexture, i.uv); 48 | 49 | fixed3 ret = lerp(col.rgb, colObject.rgb, colObject.a); 50 | 51 | // col.rgb = 1 - col.rgb; 52 | return fixed4(ret,1); 53 | } 54 | ENDCG 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /Assets/_Shaders/ImageComposer.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76cfc730dfa640c4ebed28afb85badb8 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/_Shaders/Raytracing.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7f7448becd093f41aa9823374f3530a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Shaders/Raytracing/Raytracing.compute: -------------------------------------------------------------------------------- 1 | #pragma use_dxc 2 | #pragma kernel Raytracing 3 | 4 | #include 5 | #include 6 | 7 | StructuredBuffer sortedTriangleIndices; // size = THREADS_PER_BLOCK * BLOCK_SIZE 8 | StructuredBuffer triangleAABB; // size = THREADS_PER_BLOCK * BLOCK_SIZE 9 | StructuredBuffer internalNodes; // size = THREADS_PER_BLOCK * BLOCK_SIZE - 1 10 | StructuredBuffer leafNodes; // size = THREADS_PER_BLOCK * BLOCK_SIZE 11 | StructuredBuffer bvhData; // size = THREADS_PER_BLOCK * BLOCK_SIZE - 1 12 | StructuredBuffer triangleData; // size = THREADS_PER_BLOCK * BLOCK_SIZE 13 | Texture2D _meshTexture; 14 | SamplerState linearClampSampler; 15 | 16 | RWTexture2D _outputTexture; 17 | 18 | uniform int screenWidth; 19 | uniform int screenHeight; 20 | uniform float cameraFov; 21 | uniform float4x4 cameraToWorldMatrix; 22 | 23 | struct Ray 24 | { 25 | float3 origin; 26 | float3 dir; 27 | float3 inv_dir; 28 | }; 29 | 30 | struct RaycastResult 31 | { 32 | float distance; 33 | uint triangleIndex; 34 | float2 uv; 35 | }; 36 | 37 | RaycastResult RayTriangleIntersection(float3 orig, float3 dir, float3 v0, float3 v1, float3 v2) 38 | { 39 | RaycastResult result; 40 | 41 | const float3 e1 = v1 - v0; 42 | const float3 e2 = v2 - v0; 43 | 44 | const float3 pvec = cross(dir, e2); 45 | const float det = dot(e1, pvec); 46 | 47 | if (det < 1e-8 && det > -1e-8) 48 | { 49 | result.distance = MAX_FLOAT; 50 | return result; 51 | } 52 | 53 | const float inv_det = 1 / det; 54 | const float3 tvec = orig - v0; 55 | const float u = dot(tvec, pvec) * inv_det; 56 | if (u < 0 || u > 1) 57 | { 58 | result.distance = MAX_FLOAT; 59 | return result; 60 | } 61 | 62 | const float3 qvec = cross(tvec, e1); 63 | const float v = dot(dir, qvec) * inv_det; 64 | if (v < 0 || u + v > 1) 65 | { 66 | result.distance = MAX_FLOAT; 67 | return result; 68 | } 69 | 70 | result.distance = dot(e2, qvec) * inv_det; 71 | result.uv = float2(u, v); 72 | return result; 73 | } 74 | 75 | bool RayBoxIntersection(AABB b, Ray r) 76 | { 77 | const float3 t1 = (b.min - r.origin) * r.inv_dir; 78 | const float3 t2 = (b.max - r.origin) * r.inv_dir; 79 | 80 | const float3 tmin1 = min(t1, t2); 81 | const float3 tmax1 = max(t1, t2); 82 | 83 | const float tmin = max(tmin1.x, max(tmin1.y, tmin1.z)); 84 | const float tmax = min(tmax1.x, min(tmax1.y, tmax1.z)); 85 | 86 | return tmax > tmin && tmax > 0; 87 | } 88 | 89 | RaycastResult CheckTriangle(uint triangleIndex, Ray ray, RaycastResult result) 90 | { 91 | if (RayBoxIntersection(triangleAABB[triangleIndex], ray)) 92 | { 93 | const Triangle t = triangleData[triangleIndex]; 94 | RaycastResult newResult = RayTriangleIntersection(ray.origin, ray.dir, t.a, t.b, t.c); 95 | if (newResult.distance < result.distance) 96 | { 97 | newResult.triangleIndex = triangleIndex; 98 | return newResult; 99 | } 100 | return result; 101 | } 102 | return result; 103 | } 104 | 105 | [numthreads(32,32,1)] 106 | void Raytracing(uint3 id : SV_DispatchThreadID) 107 | { 108 | const float near = _ProjectionParams.y; 109 | const float fov = cameraFov; 110 | const float height = 2 * near * fov; 111 | const float width = screenWidth * height / screenHeight; 112 | 113 | float3 origin = float3(0, 0, 0); 114 | float3 dir = float3( 115 | -width / 2 + width / screenWidth * (id.x + 0.5), 116 | -height / 2 + height / screenHeight * (id.y + 0.5), 117 | -near 118 | ); 119 | 120 | origin = mul(cameraToWorldMatrix, float4(origin, 1)).xyz; 121 | dir = mul(cameraToWorldMatrix, float4(dir, 0)).xyz; 122 | 123 | Ray ray; 124 | ray.origin = origin; 125 | ray.dir = normalize(dir); 126 | ray.inv_dir = 1 / ray.dir; 127 | 128 | RaycastResult result; 129 | result.distance = MAX_FLOAT; 130 | result.triangleIndex = 0; 131 | result.uv = float2(0, 0); 132 | 133 | uint stack[64]; 134 | uint currentStackIndex = 0; 135 | stack[currentStackIndex] = 0; 136 | currentStackIndex = 1; 137 | 138 | while (currentStackIndex != 0) 139 | { 140 | currentStackIndex --; 141 | const uint index = stack[currentStackIndex]; 142 | 143 | if (!RayBoxIntersection(bvhData[index], ray)) 144 | { 145 | continue; 146 | } 147 | 148 | const uint leftIndex = internalNodes[index].leftNode; 149 | const uint leftType = internalNodes[index].leftNodeType; 150 | 151 | if (leftType == INTERNAL_NODE) 152 | { 153 | stack[currentStackIndex] = leftIndex; 154 | currentStackIndex++; 155 | } 156 | else 157 | { 158 | const uint triangleIndex = sortedTriangleIndices[leafNodes[leftIndex].index]; 159 | result = CheckTriangle(triangleIndex, ray, result); 160 | } 161 | 162 | const uint rightIndex = internalNodes[index].rightNode; 163 | const uint rightType = internalNodes[index].rightNodeType; 164 | 165 | 166 | if (rightType == INTERNAL_NODE) 167 | { 168 | stack[currentStackIndex] = rightIndex; 169 | currentStackIndex ++; 170 | } 171 | else 172 | { 173 | const uint triangleIndex = sortedTriangleIndices[leafNodes[rightIndex].index]; 174 | result = CheckTriangle(triangleIndex, ray, result); 175 | } 176 | } 177 | 178 | const Triangle t = triangleData[result.triangleIndex]; 179 | const float2 uv = (1 - result.uv.x - result.uv.y) * t.a_uv + result.uv.x * t.b_uv + result.uv.y * t.c_uv; 180 | const float3 normal = (1 - result.uv.x - result.uv.y) * t.a_normal + result.uv.x * t.b_normal + result.uv.y * t.c_normal; 181 | const float lightDir = normalize(float3(1,1,1)); 182 | 183 | float3 color = _meshTexture.SampleLevel(linearClampSampler, uv, 0) * max(0.4, dot(lightDir, normal)); 184 | _outputTexture[id.xy] = float4(color, result.distance != MAX_FLOAT); 185 | } 186 | -------------------------------------------------------------------------------- /Assets/_Shaders/Raytracing/Raytracing.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd902741a2aa2a14d95bccc622c77147 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | preprocessorOverride: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Shaders/Sorting.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a710bbd0f322c264395b33c3affd253b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Shaders/Sorting/GlobalRadixSort.compute: -------------------------------------------------------------------------------- 1 | #pragma use_dxc 2 | #pragma kernel GlobalRadixSort 3 | 4 | #include 5 | 6 | StructuredBuffer sortedBlocksKeysData; // size = THREADS_PER_BLOCK * BLOCK_SIZE 7 | StructuredBuffer sortedBlocksValuesData; // size = THREADS_PER_BLOCK * BLOCK_SIZE 8 | 9 | StructuredBuffer offsetsData; // size = BLOCK_SIZE * BUCKET_SIZE 10 | StructuredBuffer sizesData; // size = BLOCK_SIZE * BUCKET_SIZE 11 | 12 | RWStructuredBuffer sortedKeysData; // size = THREADS_PER_BLOCK * BLOCK_SIZE 13 | RWStructuredBuffer sortedValuesData; // size = THREADS_PER_BLOCK * BLOCK_SIZE 14 | 15 | uniform int bitOffset; 16 | 17 | groupshared uint offsetsTile[BUCKET_SIZE]; 18 | groupshared uint sizesTile[BUCKET_SIZE]; 19 | 20 | [numthreads(THREADS_PER_BLOCK,1,1)] 21 | void GlobalRadixSort(uint3 tid : SV_GroupThreadID, uint3 gid : SV_GroupID) 22 | { 23 | const uint threadId = tid.x; 24 | const uint groupId = gid.x; 25 | 26 | const uint key = sortedBlocksKeysData[groupId * THREADS_PER_BLOCK + threadId]; 27 | const uint value = sortedBlocksValuesData[groupId * THREADS_PER_BLOCK + threadId]; 28 | if (threadId < BUCKET_SIZE) 29 | { 30 | offsetsTile[threadId] = offsetsData[groupId * BUCKET_SIZE + threadId]; 31 | sizesTile[threadId] = sizesData[groupId + threadId * BLOCK_SIZE]; 32 | } 33 | AllMemoryBarrierWithGroupSync(); 34 | 35 | const uint radix = (key >> bitOffset) & (BUCKET_SIZE - 1); 36 | const uint indexOutput = sizesTile[radix] + threadId - offsetsTile[radix]; 37 | 38 | sortedKeysData[indexOutput] = key; 39 | sortedValuesData[indexOutput] = value; 40 | } 41 | -------------------------------------------------------------------------------- /Assets/_Shaders/Sorting/GlobalRadixSort.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c47efd69e3337942ae5790d70241555 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | preprocessorOverride: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Shaders/Sorting/LocalRadixSort.compute: -------------------------------------------------------------------------------- 1 | #pragma use_dxc 2 | #pragma kernel LocalRadixSort 3 | 4 | #include 5 | 6 | StructuredBuffer keysData; // size = THREADS_PER_BLOCK * BLOCK_SIZE 7 | StructuredBuffer valuesData; // size = THREADS_PER_BLOCK * BLOCK_SIZE 8 | 9 | 10 | RWStructuredBuffer sortedBlocksKeysData; // size = THREADS_PER_BLOCK * BLOCK_SIZE 11 | RWStructuredBuffer sortedBlocksValuesData; // size = THREADS_PER_BLOCK * BLOCK_SIZE 12 | 13 | RWStructuredBuffer offsetsData; // size = BLOCK_SIZE * BUCKET_SIZE 14 | RWStructuredBuffer sizesData; // size = BLOCK_SIZE * BUCKET_SIZE 15 | 16 | uniform int bitOffset; 17 | 18 | groupshared uint sortTile[THREADS_PER_BLOCK]; 19 | groupshared uint valuesTile[THREADS_PER_BLOCK]; 20 | 21 | groupshared uint scanTile[THREADS_PER_BLOCK / WARP_SIZE]; 22 | groupshared uint falseTotal; 23 | 24 | groupshared uint radixTile[THREADS_PER_BLOCK]; 25 | groupshared uint offsetsTile[BUCKET_SIZE]; 26 | groupshared uint sizesTile[BUCKET_SIZE]; 27 | 28 | 29 | inline uint IntraBlockScan(uint threadId, bool pred0) 30 | { 31 | const uint warpIdx = threadId / WARP_SIZE; 32 | const uint laneIdx = threadId % WARP_SIZE; 33 | const uint warpResult = WavePrefixCountBits(pred0); 34 | const uint predResult = pred0; 35 | 36 | GroupMemoryBarrierWithGroupSync(); 37 | if (laneIdx == WARP_SIZE - 1) 38 | { 39 | scanTile[warpIdx] = warpResult + predResult; 40 | } 41 | GroupMemoryBarrierWithGroupSync(); 42 | 43 | if (threadId < WARP_SIZE) 44 | { 45 | const uint prefixSum = scanTile[threadId]; 46 | scanTile[threadId] = WavePrefixSum(prefixSum); 47 | } 48 | GroupMemoryBarrierWithGroupSync(); 49 | 50 | return warpResult + scanTile[warpIdx]; 51 | } 52 | 53 | [numthreads(THREADS_PER_BLOCK,1,1)] 54 | void LocalRadixSort(uint3 tid : SV_GroupThreadID, uint3 gid : SV_GroupID) 55 | { 56 | const uint threadId = tid.x; 57 | const uint groupId = gid.x; 58 | 59 | sortTile[threadId] = keysData[groupId * THREADS_PER_BLOCK + threadId]; 60 | valuesTile[threadId] = valuesData[groupId * THREADS_PER_BLOCK + threadId]; 61 | 62 | AllMemoryBarrierWithGroupSync(); 63 | 64 | for (uint shift = bitOffset; shift < bitOffset + RADIX; shift++) 65 | { 66 | uint predResult = 0; 67 | 68 | const uint key = sortTile[threadId]; 69 | const uint value =valuesTile[threadId]; 70 | 71 | const bool pred = (key >> shift) & 1; 72 | 73 | predResult += pred; 74 | 75 | GroupMemoryBarrierWithGroupSync(); 76 | 77 | const uint trueBefore = IntraBlockScan(threadId, pred); 78 | 79 | // GroupMemoryBarrierWithGroupSync(); 80 | 81 | if (threadId == THREADS_PER_BLOCK - 1) 82 | { 83 | falseTotal = THREADS_PER_BLOCK - (trueBefore + predResult); 84 | } 85 | GroupMemoryBarrierWithGroupSync(); 86 | 87 | sortTile[pred ? trueBefore + falseTotal : threadId - trueBefore] = key; 88 | valuesTile[pred ? trueBefore + falseTotal : threadId - trueBefore] = value; 89 | 90 | GroupMemoryBarrierWithGroupSync(); 91 | } 92 | 93 | GroupMemoryBarrierWithGroupSync(); 94 | 95 | const uint key = sortTile[threadId]; 96 | const uint value = valuesTile[threadId]; 97 | GroupMemoryBarrierWithGroupSync(); 98 | 99 | sortedBlocksKeysData[groupId * THREADS_PER_BLOCK + threadId] = key; 100 | sortedBlocksValuesData[groupId * THREADS_PER_BLOCK + threadId] = value; 101 | 102 | radixTile[threadId] = (key >> bitOffset) & (BUCKET_SIZE - 1); 103 | 104 | if (threadId < BUCKET_SIZE) 105 | { 106 | offsetsTile[threadId] = 0; 107 | sizesTile[threadId] = 0; 108 | } 109 | GroupMemoryBarrierWithGroupSync(); 110 | 111 | if (threadId > 0 && radixTile[threadId - 1] != radixTile[threadId]) 112 | { 113 | offsetsTile[radixTile[threadId]] = threadId; 114 | } 115 | GroupMemoryBarrierWithGroupSync(); 116 | 117 | if (threadId > 0 && radixTile[threadId - 1] != radixTile[threadId]) 118 | { 119 | uint radix = radixTile[threadId - 1]; 120 | sizesTile[radix] = threadId - offsetsTile[radix]; 121 | } 122 | if (threadId == THREADS_PER_BLOCK - 1) 123 | { 124 | uint radix = radixTile[THREADS_PER_BLOCK - 1]; 125 | sizesTile[radix] = THREADS_PER_BLOCK - offsetsTile[radix]; 126 | } 127 | 128 | GroupMemoryBarrierWithGroupSync(); 129 | if (threadId < BUCKET_SIZE) 130 | { 131 | offsetsData[groupId * BUCKET_SIZE + threadId] = offsetsTile[threadId]; 132 | sizesData[groupId + threadId * BLOCK_SIZE] = sizesTile[threadId]; 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /Assets/_Shaders/Sorting/LocalRadixSort.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed509731e311c304fb647ecc28dd7d61 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | preprocessorOverride: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Shaders/Sorting/Scan.compute: -------------------------------------------------------------------------------- 1 | #pragma use_dxc 2 | #pragma kernel PreScan 3 | #pragma kernel BlockSum 4 | #pragma kernel GlobalScan 5 | 6 | #include 7 | 8 | RWStructuredBuffer data; // size = BUCKET_SIZE * BLOCK_SIZE 9 | RWStructuredBuffer blockSumsData; // size = BLOCK_SIZE / (THREADS_PER_BLOCK / BUCKET_SIZE) 10 | 11 | groupshared uint scanTile[THREADS_PER_BLOCK / WARP_SIZE]; 12 | groupshared uint blockSumsTile[(BLOCK_SIZE / (THREADS_PER_BLOCK / BUCKET_SIZE)) / WARP_SIZE]; 13 | 14 | 15 | [numthreads(THREADS_PER_BLOCK,1,1)] 16 | void PreScan(uint3 tid : SV_GroupThreadID, uint3 gid : SV_GroupID) 17 | { 18 | const uint threadId = tid.x; 19 | const uint groupId = gid.x; 20 | const uint warpId = threadId / WARP_SIZE; 21 | const uint laneId = threadId % WARP_SIZE; 22 | 23 | const uint element = data[groupId * THREADS_PER_BLOCK + threadId]; 24 | AllMemoryBarrierWithGroupSync(); 25 | const uint wavePrefix = WavePrefixSum(element); 26 | 27 | if (laneId == WARP_SIZE - 1) 28 | { 29 | scanTile[warpId] = wavePrefix + element; 30 | } 31 | GroupMemoryBarrierWithGroupSync(); 32 | 33 | if (threadId < THREADS_PER_BLOCK / WARP_SIZE) 34 | { 35 | const uint warpSum = scanTile[threadId]; 36 | GroupMemoryBarrier(); 37 | const uint warpPrefix = WavePrefixSum(warpSum); 38 | scanTile[threadId] = warpPrefix; 39 | 40 | if (threadId == THREADS_PER_BLOCK / WARP_SIZE - 1) 41 | { 42 | blockSumsData[groupId] = warpPrefix + warpSum; 43 | } 44 | } 45 | 46 | GroupMemoryBarrierWithGroupSync(); 47 | data[groupId * THREADS_PER_BLOCK + threadId] = wavePrefix + scanTile[warpId]; 48 | } 49 | 50 | [numthreads(BLOCK_SIZE / (THREADS_PER_BLOCK / BUCKET_SIZE),1,1)] 51 | void BlockSum(uint3 tid : SV_GroupThreadID, uint3 gid : SV_GroupID) 52 | { 53 | // our data has THREADS_PER_BLOCK * BLOCK_SIZE elements. 54 | // each block in LocalRadixSort step produces 2 ^ RADIX = BUCKET_SIZE elements 55 | // so, whole number of sizesData array will be BLOCK_SIZE * BUCKET_SIZE elements 56 | // here each block process THREADS_PER_BLOCK elements 57 | // so, number of blocks will be BLOCK_SIZE / (THREADS_PER_BLOCK / BUCKET_SIZE) 58 | const uint blockSize = BLOCK_SIZE / (THREADS_PER_BLOCK / BUCKET_SIZE); 59 | 60 | const uint threadId = tid.x; 61 | const uint warpId = threadId / WARP_SIZE; 62 | const uint laneId = threadId % WARP_SIZE; 63 | 64 | const uint element = blockSumsData[threadId]; 65 | AllMemoryBarrierWithGroupSync(); 66 | const uint wavePrefix = WavePrefixSum(element); 67 | 68 | if (laneId == WARP_SIZE - 1) 69 | { 70 | scanTile[warpId] = wavePrefix + element; 71 | } 72 | GroupMemoryBarrierWithGroupSync(); 73 | 74 | if (threadId < blockSize / WARP_SIZE) 75 | { 76 | const uint warpSum = scanTile[threadId]; 77 | GroupMemoryBarrier(); 78 | const uint warpPrefix = WavePrefixSum(warpSum); 79 | scanTile[threadId] = warpPrefix; 80 | } 81 | 82 | GroupMemoryBarrierWithGroupSync(); 83 | blockSumsData[threadId] = wavePrefix + scanTile[warpId]; 84 | } 85 | 86 | [numthreads(THREADS_PER_BLOCK,1,1)] 87 | void GlobalScan(uint3 tid : SV_GroupThreadID, uint3 gid : SV_GroupID) 88 | { 89 | const uint threadId = tid.x; 90 | const uint groupId = gid.x; 91 | 92 | const uint element = data[groupId * THREADS_PER_BLOCK + threadId]; 93 | const uint blockSum = blockSumsData[groupId]; 94 | AllMemoryBarrierWithGroupSync(); 95 | data[groupId * THREADS_PER_BLOCK + threadId] = element + blockSum; 96 | } 97 | -------------------------------------------------------------------------------- /Assets/_Shaders/Sorting/Scan.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fff207dbb65fa8c4a95ddc91c780ddf8 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | preprocessorOverride: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Shaders/_debug.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08b4de4835aeb254db25e7b8db0aff21 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Shaders/_debug/debugShader.compute: -------------------------------------------------------------------------------- 1 | #pragma use_dxc 2 | #pragma kernel CSMain 3 | 4 | RWStructuredBuffer _buffer; // size = THREADS_PER_BLOCK * BLOCK_SIZE 5 | 6 | [numthreads(128,1,1)] 7 | void CSMain(uint3 id : SV_DispatchThreadID) 8 | { 9 | const uint threadId = id.x; 10 | const uint64_t a = 1<<33; 11 | _buffer[threadId] = sizeof(uint64_t);//63 - firstbithigh(a); 12 | } 13 | -------------------------------------------------------------------------------- /Assets/_Shaders/_debug/debugShader.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 812be4f63e2378848b8c9726ece9284d 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | preprocessorOverride: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/__Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ea315d0fd7389c41b19996891e99ae3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/__Scenes/Scene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 705507994} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &143164575 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 143164576} 135 | - component: {fileID: 143164577} 136 | m_Layer: 0 137 | m_Name: _debug 138 | m_TagString: Untagged 139 | m_Icon: {fileID: 0} 140 | m_NavMeshLayer: 0 141 | m_StaticEditorFlags: 0 142 | m_IsActive: 0 143 | --- !u!4 &143164576 144 | Transform: 145 | m_ObjectHideFlags: 0 146 | m_CorrespondingSourceObject: {fileID: 0} 147 | m_PrefabInstance: {fileID: 0} 148 | m_PrefabAsset: {fileID: 0} 149 | m_GameObject: {fileID: 143164575} 150 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 151 | m_LocalPosition: {x: 0, y: 0, z: 0} 152 | m_LocalScale: {x: 1, y: 1, z: 1} 153 | m_ConstrainProportionsScale: 0 154 | m_Children: [] 155 | m_Father: {fileID: 0} 156 | m_RootOrder: 4 157 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 158 | --- !u!114 &143164577 159 | MonoBehaviour: 160 | m_ObjectHideFlags: 0 161 | m_CorrespondingSourceObject: {fileID: 0} 162 | m_PrefabInstance: {fileID: 0} 163 | m_PrefabAsset: {fileID: 0} 164 | m_GameObject: {fileID: 143164575} 165 | m_Enabled: 1 166 | m_EditorHideFlags: 0 167 | m_Script: {fileID: 11500000, guid: eed1ce01831835647b8a4d9c4a45ebc5, type: 3} 168 | m_Name: 169 | m_EditorClassIdentifier: 170 | _computeShader: {fileID: 7200000, guid: 812be4f63e2378848b8c9726ece9284d, type: 3} 171 | --- !u!1 &705507993 172 | GameObject: 173 | m_ObjectHideFlags: 0 174 | m_CorrespondingSourceObject: {fileID: 0} 175 | m_PrefabInstance: {fileID: 0} 176 | m_PrefabAsset: {fileID: 0} 177 | serializedVersion: 6 178 | m_Component: 179 | - component: {fileID: 705507995} 180 | - component: {fileID: 705507994} 181 | m_Layer: 0 182 | m_Name: Directional Light 183 | m_TagString: Untagged 184 | m_Icon: {fileID: 0} 185 | m_NavMeshLayer: 0 186 | m_StaticEditorFlags: 0 187 | m_IsActive: 1 188 | --- !u!108 &705507994 189 | Light: 190 | m_ObjectHideFlags: 0 191 | m_CorrespondingSourceObject: {fileID: 0} 192 | m_PrefabInstance: {fileID: 0} 193 | m_PrefabAsset: {fileID: 0} 194 | m_GameObject: {fileID: 705507993} 195 | m_Enabled: 1 196 | serializedVersion: 10 197 | m_Type: 1 198 | m_Shape: 0 199 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 200 | m_Intensity: 1 201 | m_Range: 10 202 | m_SpotAngle: 30 203 | m_InnerSpotAngle: 21.80208 204 | m_CookieSize: 10 205 | m_Shadows: 206 | m_Type: 2 207 | m_Resolution: -1 208 | m_CustomResolution: -1 209 | m_Strength: 1 210 | m_Bias: 0.05 211 | m_NormalBias: 0.4 212 | m_NearPlane: 0.2 213 | m_CullingMatrixOverride: 214 | e00: 1 215 | e01: 0 216 | e02: 0 217 | e03: 0 218 | e10: 0 219 | e11: 1 220 | e12: 0 221 | e13: 0 222 | e20: 0 223 | e21: 0 224 | e22: 1 225 | e23: 0 226 | e30: 0 227 | e31: 0 228 | e32: 0 229 | e33: 1 230 | m_UseCullingMatrixOverride: 0 231 | m_Cookie: {fileID: 0} 232 | m_DrawHalo: 0 233 | m_Flare: {fileID: 0} 234 | m_RenderMode: 0 235 | m_CullingMask: 236 | serializedVersion: 2 237 | m_Bits: 4294967295 238 | m_RenderingLayerMask: 1 239 | m_Lightmapping: 1 240 | m_LightShadowCasterMode: 0 241 | m_AreaSize: {x: 1, y: 1} 242 | m_BounceIntensity: 1 243 | m_ColorTemperature: 6570 244 | m_UseColorTemperature: 0 245 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 246 | m_UseBoundingSphereOverride: 0 247 | m_UseViewFrustumForShadowCasterCull: 1 248 | m_ShadowRadius: 0 249 | m_ShadowAngle: 0 250 | --- !u!4 &705507995 251 | Transform: 252 | m_ObjectHideFlags: 0 253 | m_CorrespondingSourceObject: {fileID: 0} 254 | m_PrefabInstance: {fileID: 0} 255 | m_PrefabAsset: {fileID: 0} 256 | m_GameObject: {fileID: 705507993} 257 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 258 | m_LocalPosition: {x: -9.54, y: 3, z: 0} 259 | m_LocalScale: {x: 1, y: 1, z: 1} 260 | m_ConstrainProportionsScale: 0 261 | m_Children: [] 262 | m_Father: {fileID: 0} 263 | m_RootOrder: 1 264 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 265 | --- !u!1 &963194225 266 | GameObject: 267 | m_ObjectHideFlags: 0 268 | m_CorrespondingSourceObject: {fileID: 0} 269 | m_PrefabInstance: {fileID: 0} 270 | m_PrefabAsset: {fileID: 0} 271 | serializedVersion: 6 272 | m_Component: 273 | - component: {fileID: 963194228} 274 | - component: {fileID: 963194227} 275 | - component: {fileID: 963194226} 276 | - component: {fileID: 963194229} 277 | m_Layer: 0 278 | m_Name: Main Camera 279 | m_TagString: MainCamera 280 | m_Icon: {fileID: 0} 281 | m_NavMeshLayer: 0 282 | m_StaticEditorFlags: 0 283 | m_IsActive: 1 284 | --- !u!81 &963194226 285 | AudioListener: 286 | m_ObjectHideFlags: 0 287 | m_CorrespondingSourceObject: {fileID: 0} 288 | m_PrefabInstance: {fileID: 0} 289 | m_PrefabAsset: {fileID: 0} 290 | m_GameObject: {fileID: 963194225} 291 | m_Enabled: 1 292 | --- !u!20 &963194227 293 | Camera: 294 | m_ObjectHideFlags: 0 295 | m_CorrespondingSourceObject: {fileID: 0} 296 | m_PrefabInstance: {fileID: 0} 297 | m_PrefabAsset: {fileID: 0} 298 | m_GameObject: {fileID: 963194225} 299 | m_Enabled: 1 300 | serializedVersion: 2 301 | m_ClearFlags: 1 302 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 303 | m_projectionMatrixMode: 1 304 | m_GateFitMode: 2 305 | m_FOVAxisMode: 0 306 | m_SensorSize: {x: 36, y: 24} 307 | m_LensShift: {x: 0, y: 0} 308 | m_FocalLength: 50 309 | m_NormalizedViewPortRect: 310 | serializedVersion: 2 311 | x: 0 312 | y: 0 313 | width: 1 314 | height: 1 315 | near clip plane: 0.3 316 | far clip plane: 1000 317 | field of view: 60 318 | orthographic: 0 319 | orthographic size: 5 320 | m_Depth: -1 321 | m_CullingMask: 322 | serializedVersion: 2 323 | m_Bits: 4294967295 324 | m_RenderingPath: -1 325 | m_TargetTexture: {fileID: 0} 326 | m_TargetDisplay: 0 327 | m_TargetEye: 3 328 | m_HDR: 1 329 | m_AllowMSAA: 1 330 | m_AllowDynamicResolution: 0 331 | m_ForceIntoRT: 0 332 | m_OcclusionCulling: 1 333 | m_StereoConvergence: 10 334 | m_StereoSeparation: 0.022 335 | --- !u!4 &963194228 336 | Transform: 337 | m_ObjectHideFlags: 0 338 | m_CorrespondingSourceObject: {fileID: 0} 339 | m_PrefabInstance: {fileID: 0} 340 | m_PrefabAsset: {fileID: 0} 341 | m_GameObject: {fileID: 963194225} 342 | m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} 343 | m_LocalPosition: {x: 0, y: 0, z: 15.7} 344 | m_LocalScale: {x: 1, y: 1, z: 1} 345 | m_ConstrainProportionsScale: 0 346 | m_Children: [] 347 | m_Father: {fileID: 0} 348 | m_RootOrder: 0 349 | m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} 350 | --- !u!114 &963194229 351 | MonoBehaviour: 352 | m_ObjectHideFlags: 0 353 | m_CorrespondingSourceObject: {fileID: 0} 354 | m_PrefabInstance: {fileID: 0} 355 | m_PrefabAsset: {fileID: 0} 356 | m_GameObject: {fileID: 963194225} 357 | m_Enabled: 1 358 | m_EditorHideFlags: 0 359 | m_Script: {fileID: 11500000, guid: 9ee18e1658fd6b241864c6938e8f3dc7, type: 3} 360 | m_Name: 361 | m_EditorClassIdentifier: 362 | _indexToCheck: 0 363 | _imageComposer: {fileID: 4800000, guid: 76cfc730dfa640c4ebed28afb85badb8, type: 3} 364 | _mesh: {fileID: 7629811779324647873, guid: 6d7f8cafa3f2ae64a8c4a80d14c71f7e, type: 3} 365 | _shaderContainer: {fileID: 2000843035} 366 | _meshTexture: {fileID: 2800000, guid: b80fd47413dfb4945b9abc5905c53fbc, type: 3} 367 | --- !u!1 &1230734815 368 | GameObject: 369 | m_ObjectHideFlags: 0 370 | m_CorrespondingSourceObject: {fileID: 0} 371 | m_PrefabInstance: {fileID: 0} 372 | m_PrefabAsset: {fileID: 0} 373 | serializedVersion: 6 374 | m_Component: 375 | - component: {fileID: 1230734817} 376 | - component: {fileID: 1230734816} 377 | m_Layer: 0 378 | m_Name: _debugRayBoxIntersectionTest 379 | m_TagString: Untagged 380 | m_Icon: {fileID: 0} 381 | m_NavMeshLayer: 0 382 | m_StaticEditorFlags: 0 383 | m_IsActive: 0 384 | --- !u!114 &1230734816 385 | MonoBehaviour: 386 | m_ObjectHideFlags: 0 387 | m_CorrespondingSourceObject: {fileID: 0} 388 | m_PrefabInstance: {fileID: 0} 389 | m_PrefabAsset: {fileID: 0} 390 | m_GameObject: {fileID: 1230734815} 391 | m_Enabled: 1 392 | m_EditorHideFlags: 0 393 | m_Script: {fileID: 11500000, guid: fdeb27d5096061a4caa99ce0ba5f2e85, type: 3} 394 | m_Name: 395 | m_EditorClassIdentifier: 396 | _boxMin: {x: -5, y: -1, z: 48} 397 | _boxMax: {x: 5, y: 1, z: 52} 398 | --- !u!4 &1230734817 399 | Transform: 400 | m_ObjectHideFlags: 0 401 | m_CorrespondingSourceObject: {fileID: 0} 402 | m_PrefabInstance: {fileID: 0} 403 | m_PrefabAsset: {fileID: 0} 404 | m_GameObject: {fileID: 1230734815} 405 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 406 | m_LocalPosition: {x: 0, y: 0, z: 0} 407 | m_LocalScale: {x: 1, y: 1, z: 1} 408 | m_ConstrainProportionsScale: 0 409 | m_Children: [] 410 | m_Father: {fileID: 0} 411 | m_RootOrder: 5 412 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 413 | --- !u!1 &1613152079 414 | GameObject: 415 | m_ObjectHideFlags: 0 416 | m_CorrespondingSourceObject: {fileID: 0} 417 | m_PrefabInstance: {fileID: 0} 418 | m_PrefabAsset: {fileID: 0} 419 | serializedVersion: 6 420 | m_Component: 421 | - component: {fileID: 1613152082} 422 | - component: {fileID: 1613152081} 423 | - component: {fileID: 1613152080} 424 | m_Layer: 0 425 | m_Name: ExampleObject 426 | m_TagString: Untagged 427 | m_Icon: {fileID: 0} 428 | m_NavMeshLayer: 0 429 | m_StaticEditorFlags: 0 430 | m_IsActive: 0 431 | --- !u!23 &1613152080 432 | MeshRenderer: 433 | m_ObjectHideFlags: 0 434 | m_CorrespondingSourceObject: {fileID: 0} 435 | m_PrefabInstance: {fileID: 0} 436 | m_PrefabAsset: {fileID: 0} 437 | m_GameObject: {fileID: 1613152079} 438 | m_Enabled: 1 439 | m_CastShadows: 1 440 | m_ReceiveShadows: 1 441 | m_DynamicOccludee: 1 442 | m_StaticShadowCaster: 0 443 | m_MotionVectors: 1 444 | m_LightProbeUsage: 1 445 | m_ReflectionProbeUsage: 1 446 | m_RayTracingMode: 2 447 | m_RayTraceProcedural: 0 448 | m_RenderingLayerMask: 1 449 | m_RendererPriority: 0 450 | m_Materials: 451 | - {fileID: 2100000, guid: b0c0f01cc8a62f14e990fb1f73491984, type: 2} 452 | m_StaticBatchInfo: 453 | firstSubMesh: 0 454 | subMeshCount: 0 455 | m_StaticBatchRoot: {fileID: 0} 456 | m_ProbeAnchor: {fileID: 0} 457 | m_LightProbeVolumeOverride: {fileID: 0} 458 | m_ScaleInLightmap: 1 459 | m_ReceiveGI: 1 460 | m_PreserveUVs: 0 461 | m_IgnoreNormalsForChartDetection: 0 462 | m_ImportantGI: 0 463 | m_StitchLightmapSeams: 1 464 | m_SelectedEditorRenderState: 3 465 | m_MinimumChartSize: 4 466 | m_AutoUVMaxDistance: 0.5 467 | m_AutoUVMaxAngle: 89 468 | m_LightmapParameters: {fileID: 0} 469 | m_SortingLayerID: 0 470 | m_SortingLayer: 0 471 | m_SortingOrder: 0 472 | m_AdditionalVertexStreams: {fileID: 0} 473 | --- !u!33 &1613152081 474 | MeshFilter: 475 | m_ObjectHideFlags: 0 476 | m_CorrespondingSourceObject: {fileID: 0} 477 | m_PrefabInstance: {fileID: 0} 478 | m_PrefabAsset: {fileID: 0} 479 | m_GameObject: {fileID: 1613152079} 480 | m_Mesh: {fileID: 2540817853737639666, guid: 328bfe7101428304d87e0a579a0d20fa, type: 3} 481 | --- !u!4 &1613152082 482 | Transform: 483 | m_ObjectHideFlags: 0 484 | m_CorrespondingSourceObject: {fileID: 0} 485 | m_PrefabInstance: {fileID: 0} 486 | m_PrefabAsset: {fileID: 0} 487 | m_GameObject: {fileID: 1613152079} 488 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 489 | m_LocalPosition: {x: 0, y: 0, z: 0} 490 | m_LocalScale: {x: 1, y: 1, z: 1} 491 | m_ConstrainProportionsScale: 0 492 | m_Children: [] 493 | m_Father: {fileID: 0} 494 | m_RootOrder: 2 495 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 496 | --- !u!1 &2000843034 497 | GameObject: 498 | m_ObjectHideFlags: 0 499 | m_CorrespondingSourceObject: {fileID: 0} 500 | m_PrefabInstance: {fileID: 0} 501 | m_PrefabAsset: {fileID: 0} 502 | serializedVersion: 6 503 | m_Component: 504 | - component: {fileID: 2000843036} 505 | - component: {fileID: 2000843035} 506 | m_Layer: 0 507 | m_Name: ShaderContainer 508 | m_TagString: Untagged 509 | m_Icon: {fileID: 0} 510 | m_NavMeshLayer: 0 511 | m_StaticEditorFlags: 0 512 | m_IsActive: 1 513 | --- !u!114 &2000843035 514 | MonoBehaviour: 515 | m_ObjectHideFlags: 0 516 | m_CorrespondingSourceObject: {fileID: 0} 517 | m_PrefabInstance: {fileID: 0} 518 | m_PrefabAsset: {fileID: 0} 519 | m_GameObject: {fileID: 2000843034} 520 | m_Enabled: 1 521 | m_EditorHideFlags: 0 522 | m_Script: {fileID: 11500000, guid: 42366c1f1545f7f45a5d9f796fe9673e, type: 3} 523 | m_Name: 524 | m_EditorClassIdentifier: 525 | _sorting: 526 | _localRadixSortShader: {fileID: 7200000, guid: ed509731e311c304fb647ecc28dd7d61, type: 3} 527 | _scanShader: {fileID: 7200000, guid: fff207dbb65fa8c4a95ddc91c780ddf8, type: 3} 528 | _globalRadixSortShader: {fileID: 7200000, guid: 1c47efd69e3337942ae5790d70241555, type: 3} 529 | _bvh: 530 | _BVHShader: {fileID: 7200000, guid: 6ff237d40748d0544bda3a2fe3327b0c, type: 3} 531 | _raytracing: {fileID: 7200000, guid: bd902741a2aa2a14d95bccc622c77147, type: 3} 532 | --- !u!4 &2000843036 533 | Transform: 534 | m_ObjectHideFlags: 0 535 | m_CorrespondingSourceObject: {fileID: 0} 536 | m_PrefabInstance: {fileID: 0} 537 | m_PrefabAsset: {fileID: 0} 538 | m_GameObject: {fileID: 2000843034} 539 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 540 | m_LocalPosition: {x: -0.58574635, y: 0.61568713, z: 0.35023928} 541 | m_LocalScale: {x: 1, y: 1, z: 1} 542 | m_ConstrainProportionsScale: 0 543 | m_Children: [] 544 | m_Father: {fileID: 0} 545 | m_RootOrder: 3 546 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 547 | -------------------------------------------------------------------------------- /Assets/__Scenes/Scene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.feature.development": "1.0.1", 4 | "com.unity.ide.rider": "3.0.15", 5 | "com.unity.modules.ai": "1.0.0", 6 | "com.unity.modules.androidjni": "1.0.0", 7 | "com.unity.modules.animation": "1.0.0", 8 | "com.unity.modules.assetbundle": "1.0.0", 9 | "com.unity.modules.audio": "1.0.0", 10 | "com.unity.modules.cloth": "1.0.0", 11 | "com.unity.modules.director": "1.0.0", 12 | "com.unity.modules.imageconversion": "1.0.0", 13 | "com.unity.modules.imgui": "1.0.0", 14 | "com.unity.modules.jsonserialize": "1.0.0", 15 | "com.unity.modules.particlesystem": "1.0.0", 16 | "com.unity.modules.physics": "1.0.0", 17 | "com.unity.modules.physics2d": "1.0.0", 18 | "com.unity.modules.screencapture": "1.0.0", 19 | "com.unity.modules.terrain": "1.0.0", 20 | "com.unity.modules.terrainphysics": "1.0.0", 21 | "com.unity.modules.tilemap": "1.0.0", 22 | "com.unity.modules.ui": "1.0.0", 23 | "com.unity.modules.uielements": "1.0.0", 24 | "com.unity.modules.umbra": "1.0.0", 25 | "com.unity.modules.unityanalytics": "1.0.0", 26 | "com.unity.modules.unitywebrequest": "1.0.0", 27 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 28 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 29 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 30 | "com.unity.modules.unitywebrequestwww": "1.0.0", 31 | "com.unity.modules.vehicles": "1.0.0", 32 | "com.unity.modules.video": "1.0.0", 33 | "com.unity.modules.vr": "1.0.0", 34 | "com.unity.modules.wind": "1.0.0", 35 | "com.unity.modules.xr": "1.0.0" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.editorcoroutines": { 4 | "version": "1.0.0", 5 | "depth": 1, 6 | "source": "registry", 7 | "dependencies": {}, 8 | "url": "https://packages.unity.com" 9 | }, 10 | "com.unity.ext.nunit": { 11 | "version": "1.0.6", 12 | "depth": 1, 13 | "source": "registry", 14 | "dependencies": {}, 15 | "url": "https://packages.unity.com" 16 | }, 17 | "com.unity.feature.development": { 18 | "version": "1.0.1", 19 | "depth": 0, 20 | "source": "builtin", 21 | "dependencies": { 22 | "com.unity.ide.visualstudio": "2.0.15", 23 | "com.unity.ide.rider": "3.0.14", 24 | "com.unity.ide.vscode": "1.2.5", 25 | "com.unity.editorcoroutines": "1.0.0", 26 | "com.unity.performance.profile-analyzer": "1.1.1", 27 | "com.unity.test-framework": "1.1.31", 28 | "com.unity.testtools.codecoverage": "1.0.1" 29 | } 30 | }, 31 | "com.unity.ide.rider": { 32 | "version": "3.0.15", 33 | "depth": 0, 34 | "source": "registry", 35 | "dependencies": { 36 | "com.unity.ext.nunit": "1.0.6" 37 | }, 38 | "url": "https://packages.unity.com" 39 | }, 40 | "com.unity.ide.visualstudio": { 41 | "version": "2.0.15", 42 | "depth": 1, 43 | "source": "registry", 44 | "dependencies": { 45 | "com.unity.test-framework": "1.1.9" 46 | }, 47 | "url": "https://packages.unity.com" 48 | }, 49 | "com.unity.ide.vscode": { 50 | "version": "1.2.5", 51 | "depth": 1, 52 | "source": "registry", 53 | "dependencies": {}, 54 | "url": "https://packages.unity.com" 55 | }, 56 | "com.unity.performance.profile-analyzer": { 57 | "version": "1.1.1", 58 | "depth": 1, 59 | "source": "registry", 60 | "dependencies": {}, 61 | "url": "https://packages.unity.com" 62 | }, 63 | "com.unity.settings-manager": { 64 | "version": "1.0.3", 65 | "depth": 2, 66 | "source": "registry", 67 | "dependencies": {}, 68 | "url": "https://packages.unity.com" 69 | }, 70 | "com.unity.test-framework": { 71 | "version": "1.1.31", 72 | "depth": 1, 73 | "source": "registry", 74 | "dependencies": { 75 | "com.unity.ext.nunit": "1.0.6", 76 | "com.unity.modules.imgui": "1.0.0", 77 | "com.unity.modules.jsonserialize": "1.0.0" 78 | }, 79 | "url": "https://packages.unity.com" 80 | }, 81 | "com.unity.testtools.codecoverage": { 82 | "version": "1.0.1", 83 | "depth": 1, 84 | "source": "registry", 85 | "dependencies": { 86 | "com.unity.test-framework": "1.0.16", 87 | "com.unity.settings-manager": "1.0.1" 88 | }, 89 | "url": "https://packages.unity.com" 90 | }, 91 | "com.unity.modules.ai": { 92 | "version": "1.0.0", 93 | "depth": 0, 94 | "source": "builtin", 95 | "dependencies": {} 96 | }, 97 | "com.unity.modules.androidjni": { 98 | "version": "1.0.0", 99 | "depth": 0, 100 | "source": "builtin", 101 | "dependencies": {} 102 | }, 103 | "com.unity.modules.animation": { 104 | "version": "1.0.0", 105 | "depth": 0, 106 | "source": "builtin", 107 | "dependencies": {} 108 | }, 109 | "com.unity.modules.assetbundle": { 110 | "version": "1.0.0", 111 | "depth": 0, 112 | "source": "builtin", 113 | "dependencies": {} 114 | }, 115 | "com.unity.modules.audio": { 116 | "version": "1.0.0", 117 | "depth": 0, 118 | "source": "builtin", 119 | "dependencies": {} 120 | }, 121 | "com.unity.modules.cloth": { 122 | "version": "1.0.0", 123 | "depth": 0, 124 | "source": "builtin", 125 | "dependencies": { 126 | "com.unity.modules.physics": "1.0.0" 127 | } 128 | }, 129 | "com.unity.modules.director": { 130 | "version": "1.0.0", 131 | "depth": 0, 132 | "source": "builtin", 133 | "dependencies": { 134 | "com.unity.modules.audio": "1.0.0", 135 | "com.unity.modules.animation": "1.0.0" 136 | } 137 | }, 138 | "com.unity.modules.imageconversion": { 139 | "version": "1.0.0", 140 | "depth": 0, 141 | "source": "builtin", 142 | "dependencies": {} 143 | }, 144 | "com.unity.modules.imgui": { 145 | "version": "1.0.0", 146 | "depth": 0, 147 | "source": "builtin", 148 | "dependencies": {} 149 | }, 150 | "com.unity.modules.jsonserialize": { 151 | "version": "1.0.0", 152 | "depth": 0, 153 | "source": "builtin", 154 | "dependencies": {} 155 | }, 156 | "com.unity.modules.particlesystem": { 157 | "version": "1.0.0", 158 | "depth": 0, 159 | "source": "builtin", 160 | "dependencies": {} 161 | }, 162 | "com.unity.modules.physics": { 163 | "version": "1.0.0", 164 | "depth": 0, 165 | "source": "builtin", 166 | "dependencies": {} 167 | }, 168 | "com.unity.modules.physics2d": { 169 | "version": "1.0.0", 170 | "depth": 0, 171 | "source": "builtin", 172 | "dependencies": {} 173 | }, 174 | "com.unity.modules.screencapture": { 175 | "version": "1.0.0", 176 | "depth": 0, 177 | "source": "builtin", 178 | "dependencies": { 179 | "com.unity.modules.imageconversion": "1.0.0" 180 | } 181 | }, 182 | "com.unity.modules.subsystems": { 183 | "version": "1.0.0", 184 | "depth": 1, 185 | "source": "builtin", 186 | "dependencies": { 187 | "com.unity.modules.jsonserialize": "1.0.0" 188 | } 189 | }, 190 | "com.unity.modules.terrain": { 191 | "version": "1.0.0", 192 | "depth": 0, 193 | "source": "builtin", 194 | "dependencies": {} 195 | }, 196 | "com.unity.modules.terrainphysics": { 197 | "version": "1.0.0", 198 | "depth": 0, 199 | "source": "builtin", 200 | "dependencies": { 201 | "com.unity.modules.physics": "1.0.0", 202 | "com.unity.modules.terrain": "1.0.0" 203 | } 204 | }, 205 | "com.unity.modules.tilemap": { 206 | "version": "1.0.0", 207 | "depth": 0, 208 | "source": "builtin", 209 | "dependencies": { 210 | "com.unity.modules.physics2d": "1.0.0" 211 | } 212 | }, 213 | "com.unity.modules.ui": { 214 | "version": "1.0.0", 215 | "depth": 0, 216 | "source": "builtin", 217 | "dependencies": {} 218 | }, 219 | "com.unity.modules.uielements": { 220 | "version": "1.0.0", 221 | "depth": 0, 222 | "source": "builtin", 223 | "dependencies": { 224 | "com.unity.modules.ui": "1.0.0", 225 | "com.unity.modules.imgui": "1.0.0", 226 | "com.unity.modules.jsonserialize": "1.0.0", 227 | "com.unity.modules.uielementsnative": "1.0.0" 228 | } 229 | }, 230 | "com.unity.modules.uielementsnative": { 231 | "version": "1.0.0", 232 | "depth": 1, 233 | "source": "builtin", 234 | "dependencies": { 235 | "com.unity.modules.ui": "1.0.0", 236 | "com.unity.modules.imgui": "1.0.0", 237 | "com.unity.modules.jsonserialize": "1.0.0" 238 | } 239 | }, 240 | "com.unity.modules.umbra": { 241 | "version": "1.0.0", 242 | "depth": 0, 243 | "source": "builtin", 244 | "dependencies": {} 245 | }, 246 | "com.unity.modules.unityanalytics": { 247 | "version": "1.0.0", 248 | "depth": 0, 249 | "source": "builtin", 250 | "dependencies": { 251 | "com.unity.modules.unitywebrequest": "1.0.0", 252 | "com.unity.modules.jsonserialize": "1.0.0" 253 | } 254 | }, 255 | "com.unity.modules.unitywebrequest": { 256 | "version": "1.0.0", 257 | "depth": 0, 258 | "source": "builtin", 259 | "dependencies": {} 260 | }, 261 | "com.unity.modules.unitywebrequestassetbundle": { 262 | "version": "1.0.0", 263 | "depth": 0, 264 | "source": "builtin", 265 | "dependencies": { 266 | "com.unity.modules.assetbundle": "1.0.0", 267 | "com.unity.modules.unitywebrequest": "1.0.0" 268 | } 269 | }, 270 | "com.unity.modules.unitywebrequestaudio": { 271 | "version": "1.0.0", 272 | "depth": 0, 273 | "source": "builtin", 274 | "dependencies": { 275 | "com.unity.modules.unitywebrequest": "1.0.0", 276 | "com.unity.modules.audio": "1.0.0" 277 | } 278 | }, 279 | "com.unity.modules.unitywebrequesttexture": { 280 | "version": "1.0.0", 281 | "depth": 0, 282 | "source": "builtin", 283 | "dependencies": { 284 | "com.unity.modules.unitywebrequest": "1.0.0", 285 | "com.unity.modules.imageconversion": "1.0.0" 286 | } 287 | }, 288 | "com.unity.modules.unitywebrequestwww": { 289 | "version": "1.0.0", 290 | "depth": 0, 291 | "source": "builtin", 292 | "dependencies": { 293 | "com.unity.modules.unitywebrequest": "1.0.0", 294 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 295 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 296 | "com.unity.modules.audio": "1.0.0", 297 | "com.unity.modules.assetbundle": "1.0.0", 298 | "com.unity.modules.imageconversion": "1.0.0" 299 | } 300 | }, 301 | "com.unity.modules.vehicles": { 302 | "version": "1.0.0", 303 | "depth": 0, 304 | "source": "builtin", 305 | "dependencies": { 306 | "com.unity.modules.physics": "1.0.0" 307 | } 308 | }, 309 | "com.unity.modules.video": { 310 | "version": "1.0.0", 311 | "depth": 0, 312 | "source": "builtin", 313 | "dependencies": { 314 | "com.unity.modules.audio": "1.0.0", 315 | "com.unity.modules.ui": "1.0.0", 316 | "com.unity.modules.unitywebrequest": "1.0.0" 317 | } 318 | }, 319 | "com.unity.modules.vr": { 320 | "version": "1.0.0", 321 | "depth": 0, 322 | "source": "builtin", 323 | "dependencies": { 324 | "com.unity.modules.jsonserialize": "1.0.0", 325 | "com.unity.modules.physics": "1.0.0", 326 | "com.unity.modules.xr": "1.0.0" 327 | } 328 | }, 329 | "com.unity.modules.wind": { 330 | "version": "1.0.0", 331 | "depth": 0, 332 | "source": "builtin", 333 | "dependencies": {} 334 | }, 335 | "com.unity.modules.xr": { 336 | "version": "1.0.0", 337 | "depth": 0, 338 | "source": "builtin", 339 | "dependencies": { 340 | "com.unity.modules.physics": "1.0.0", 341 | "com.unity.modules.jsonserialize": "1.0.0", 342 | "com.unity.modules.subsystems": "1.0.0" 343 | } 344 | } 345 | } 346 | } 347 | -------------------------------------------------------------------------------- /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: 1 9 | path: Assets/__Scenes/Scene.unity 10 | guid: 9fc0d4010bbf28b4594072e72b8655ab 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 31 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | m_LogWhenShaderIsCompiled: 0 63 | m_AllowEnlightenSupportForUpgradedProject: 0 64 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /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/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreReleasePackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | m_SeeAllPackageVersions: 0 20 | oneTimeWarningShown: 0 21 | m_Registries: 22 | - m_Id: main 23 | m_Name: 24 | m_Url: https://packages.unity.com 25 | m_Scopes: [] 26 | m_IsDefault: 1 27 | m_Capabilities: 7 28 | m_UserSelectedRegistryName: 29 | m_UserAddingNewScopedRegistry: 0 30 | m_RegistryInfoDraft: 31 | m_Modified: 0 32 | m_ErrorMessage: 33 | m_UserModificationsInstanceId: -830 34 | m_OriginalInstanceId: -832 35 | m_LoadAssets: 0 36 | -------------------------------------------------------------------------------- /ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "m_Name": "Settings", 3 | "m_Path": "ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json", 4 | "m_Dictionary": { 5 | "m_DictionaryValues": [] 6 | } 7 | } -------------------------------------------------------------------------------- /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: 23 7 | productGUID: 945f88038d71b1144ad4b227e45a60f3 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: My project 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: 1024 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | mipStripping: 0 53 | numberOfMipsStripped: 0 54 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 55 | iosShowActivityIndicatorOnLoading: -1 56 | androidShowActivityIndicatorOnLoading: -1 57 | iosUseCustomAppBackgroundBehavior: 0 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidStartInFullscreen: 1 68 | androidRenderOutsideSafeArea: 1 69 | androidUseSwappy: 1 70 | androidBlitType: 0 71 | androidResizableWindow: 0 72 | androidDefaultWindowWidth: 1920 73 | androidDefaultWindowHeight: 1080 74 | androidMinimumWindowWidth: 400 75 | androidMinimumWindowHeight: 300 76 | androidFullscreenMode: 1 77 | defaultIsNativeResolution: 1 78 | macRetinaSupport: 1 79 | runInBackground: 1 80 | captureSingleScreen: 0 81 | muteOtherAudioSources: 0 82 | Prepare IOS For Recording: 0 83 | Force IOS Speakers When Recording: 0 84 | deferSystemGesturesMode: 0 85 | hideHomeButton: 0 86 | submitAnalytics: 1 87 | usePlayerLog: 1 88 | bakeCollisionMeshes: 0 89 | forceSingleInstance: 0 90 | useFlipModelSwapchain: 1 91 | resizableWindow: 0 92 | useMacAppStoreValidation: 0 93 | macAppStoreCategory: public.app-category.games 94 | gpuSkinning: 1 95 | xboxPIXTextureCapture: 0 96 | xboxEnableAvatar: 0 97 | xboxEnableKinect: 0 98 | xboxEnableKinectAutoTracking: 0 99 | xboxEnableFitness: 0 100 | visibleInBackground: 1 101 | allowFullscreenSwitch: 1 102 | fullscreenMode: 3 103 | xboxSpeechDB: 0 104 | xboxEnableHeadOrientation: 0 105 | xboxEnableGuest: 0 106 | xboxEnablePIXSampling: 0 107 | metalFramebufferOnly: 0 108 | xboxOneResolution: 0 109 | xboxOneSResolution: 0 110 | xboxOneXResolution: 3 111 | xboxOneMonoLoggingLevel: 0 112 | xboxOneLoggingLevel: 1 113 | xboxOneDisableEsram: 0 114 | xboxOneEnableTypeOptimization: 0 115 | xboxOnePresentImmediateThreshold: 0 116 | switchQueueCommandMemory: 0 117 | switchQueueControlMemory: 16384 118 | switchQueueComputeMemory: 262144 119 | switchNVNShaderPoolsGranularity: 33554432 120 | switchNVNDefaultPoolsGranularity: 16777216 121 | switchNVNOtherPoolsGranularity: 16777216 122 | switchNVNMaxPublicTextureIDCount: 0 123 | switchNVNMaxPublicSamplerIDCount: 0 124 | stadiaPresentMode: 0 125 | stadiaTargetFramerate: 0 126 | vulkanNumSwapchainBuffers: 3 127 | vulkanEnableSetSRGBWrite: 0 128 | vulkanEnablePreTransform: 1 129 | vulkanEnableLateAcquireNextImage: 0 130 | vulkanEnableCommandBufferRecycling: 1 131 | m_SupportedAspectRatios: 132 | 4:3: 1 133 | 5:4: 1 134 | 16:10: 1 135 | 16:9: 1 136 | Others: 1 137 | bundleVersion: 0.1 138 | preloadedAssets: [] 139 | metroInputSource: 0 140 | wsaTransparentSwapchain: 0 141 | m_HolographicPauseOnTrackingLoss: 1 142 | xboxOneDisableKinectGpuReservation: 1 143 | xboxOneEnable7thCore: 1 144 | vrSettings: 145 | enable360StereoCapture: 0 146 | isWsaHolographicRemotingEnabled: 0 147 | enableFrameTimingStats: 0 148 | enableOpenGLProfilerGPURecorders: 1 149 | useHDRDisplay: 0 150 | D3DHDRBitDepth: 0 151 | m_ColorGamuts: 00000000 152 | targetPixelDensity: 30 153 | resolutionScalingMode: 0 154 | resetResolutionOnWindowResize: 0 155 | androidSupportedAspectRatio: 1 156 | androidMaxAspectRatio: 2.1 157 | applicationIdentifier: 158 | Standalone: com.DefaultCompany.My-project 159 | buildNumber: 160 | Standalone: 0 161 | iPhone: 0 162 | tvOS: 0 163 | overrideDefaultApplicationIdentifier: 0 164 | AndroidBundleVersionCode: 1 165 | AndroidMinSdkVersion: 22 166 | AndroidTargetSdkVersion: 0 167 | AndroidPreferredInstallLocation: 1 168 | aotOptions: 169 | stripEngineCode: 1 170 | iPhoneStrippingLevel: 0 171 | iPhoneScriptCallOptimization: 0 172 | ForceInternetPermission: 0 173 | ForceSDCardPermission: 0 174 | CreateWallpaper: 0 175 | APKExpansionFiles: 0 176 | keepLoadedShadersAlive: 0 177 | StripUnusedMeshComponents: 1 178 | VertexChannelCompressionMask: 4054 179 | iPhoneSdkVersion: 988 180 | iOSTargetOSVersionString: 11.0 181 | tvOSSdkVersion: 0 182 | tvOSRequireExtendedGameController: 0 183 | tvOSTargetOSVersionString: 11.0 184 | uIPrerenderedIcon: 0 185 | uIRequiresPersistentWiFi: 0 186 | uIRequiresFullScreen: 1 187 | uIStatusBarHidden: 1 188 | uIExitOnSuspend: 0 189 | uIStatusBarStyle: 0 190 | appleTVSplashScreen: {fileID: 0} 191 | appleTVSplashScreen2x: {fileID: 0} 192 | tvOSSmallIconLayers: [] 193 | tvOSSmallIconLayers2x: [] 194 | tvOSLargeIconLayers: [] 195 | tvOSLargeIconLayers2x: [] 196 | tvOSTopShelfImageLayers: [] 197 | tvOSTopShelfImageLayers2x: [] 198 | tvOSTopShelfImageWideLayers: [] 199 | tvOSTopShelfImageWideLayers2x: [] 200 | iOSLaunchScreenType: 0 201 | iOSLaunchScreenPortrait: {fileID: 0} 202 | iOSLaunchScreenLandscape: {fileID: 0} 203 | iOSLaunchScreenBackgroundColor: 204 | serializedVersion: 2 205 | rgba: 0 206 | iOSLaunchScreenFillPct: 100 207 | iOSLaunchScreenSize: 100 208 | iOSLaunchScreenCustomXibPath: 209 | iOSLaunchScreeniPadType: 0 210 | iOSLaunchScreeniPadImage: {fileID: 0} 211 | iOSLaunchScreeniPadBackgroundColor: 212 | serializedVersion: 2 213 | rgba: 0 214 | iOSLaunchScreeniPadFillPct: 100 215 | iOSLaunchScreeniPadSize: 100 216 | iOSLaunchScreeniPadCustomXibPath: 217 | iOSLaunchScreenCustomStoryboardPath: 218 | iOSLaunchScreeniPadCustomStoryboardPath: 219 | iOSDeviceRequirements: [] 220 | iOSURLSchemes: [] 221 | macOSURLSchemes: [] 222 | iOSBackgroundModes: 0 223 | iOSMetalForceHardShadows: 0 224 | metalEditorSupport: 1 225 | metalAPIValidation: 1 226 | iOSRenderExtraFrameOnPause: 0 227 | iosCopyPluginsCodeInsteadOfSymlink: 0 228 | appleDeveloperTeamID: 229 | iOSManualSigningProvisioningProfileID: 230 | tvOSManualSigningProvisioningProfileID: 231 | iOSManualSigningProvisioningProfileType: 0 232 | tvOSManualSigningProvisioningProfileType: 0 233 | appleEnableAutomaticSigning: 0 234 | iOSRequireARKit: 0 235 | iOSAutomaticallyDetectAndAddCapabilities: 1 236 | appleEnableProMotion: 0 237 | shaderPrecisionModel: 0 238 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 239 | templatePackageId: com.unity.template.3d@8.1.0 240 | templateDefaultScene: Assets/Scenes/SampleScene.unity 241 | useCustomMainManifest: 0 242 | useCustomLauncherManifest: 0 243 | useCustomMainGradleTemplate: 0 244 | useCustomLauncherGradleManifest: 0 245 | useCustomBaseGradleTemplate: 0 246 | useCustomGradlePropertiesTemplate: 0 247 | useCustomProguardFile: 0 248 | AndroidTargetArchitectures: 1 249 | AndroidTargetDevices: 0 250 | AndroidSplashScreenScale: 0 251 | androidSplashScreen: {fileID: 0} 252 | AndroidKeystoreName: 253 | AndroidKeyaliasName: 254 | AndroidBuildApkPerCpuArchitecture: 0 255 | AndroidTVCompatibility: 0 256 | AndroidIsGame: 1 257 | AndroidEnableTango: 0 258 | androidEnableBanner: 1 259 | androidUseLowAccuracyLocation: 0 260 | androidUseCustomKeystore: 0 261 | m_AndroidBanners: 262 | - width: 320 263 | height: 180 264 | banner: {fileID: 0} 265 | androidGamepadSupportLevel: 0 266 | chromeosInputEmulation: 1 267 | AndroidMinifyWithR8: 0 268 | AndroidMinifyRelease: 0 269 | AndroidMinifyDebug: 0 270 | AndroidValidateAppBundleSize: 1 271 | AndroidAppBundleSizeToValidate: 150 272 | m_BuildTargetIcons: [] 273 | m_BuildTargetPlatformIcons: [] 274 | m_BuildTargetBatching: 275 | - m_BuildTarget: Standalone 276 | m_StaticBatching: 1 277 | m_DynamicBatching: 0 278 | - m_BuildTarget: tvOS 279 | m_StaticBatching: 1 280 | m_DynamicBatching: 0 281 | - m_BuildTarget: Android 282 | m_StaticBatching: 1 283 | m_DynamicBatching: 0 284 | - m_BuildTarget: iPhone 285 | m_StaticBatching: 1 286 | m_DynamicBatching: 0 287 | - m_BuildTarget: WebGL 288 | m_StaticBatching: 0 289 | m_DynamicBatching: 0 290 | m_BuildTargetGraphicsJobs: 291 | - m_BuildTarget: MacStandaloneSupport 292 | m_GraphicsJobs: 0 293 | - m_BuildTarget: Switch 294 | m_GraphicsJobs: 1 295 | - m_BuildTarget: MetroSupport 296 | m_GraphicsJobs: 1 297 | - m_BuildTarget: AppleTVSupport 298 | m_GraphicsJobs: 0 299 | - m_BuildTarget: BJMSupport 300 | m_GraphicsJobs: 1 301 | - m_BuildTarget: LinuxStandaloneSupport 302 | m_GraphicsJobs: 1 303 | - m_BuildTarget: PS4Player 304 | m_GraphicsJobs: 1 305 | - m_BuildTarget: iOSSupport 306 | m_GraphicsJobs: 0 307 | - m_BuildTarget: WindowsStandaloneSupport 308 | m_GraphicsJobs: 1 309 | - m_BuildTarget: XboxOnePlayer 310 | m_GraphicsJobs: 1 311 | - m_BuildTarget: LuminSupport 312 | m_GraphicsJobs: 0 313 | - m_BuildTarget: AndroidPlayer 314 | m_GraphicsJobs: 0 315 | - m_BuildTarget: WebGLSupport 316 | m_GraphicsJobs: 0 317 | m_BuildTargetGraphicsJobMode: 318 | - m_BuildTarget: PS4Player 319 | m_GraphicsJobMode: 0 320 | - m_BuildTarget: XboxOnePlayer 321 | m_GraphicsJobMode: 0 322 | m_BuildTargetGraphicsAPIs: 323 | - m_BuildTarget: AndroidPlayer 324 | m_APIs: 150000000b000000 325 | m_Automatic: 1 326 | - m_BuildTarget: iOSSupport 327 | m_APIs: 10000000 328 | m_Automatic: 1 329 | - m_BuildTarget: AppleTVSupport 330 | m_APIs: 10000000 331 | m_Automatic: 1 332 | - m_BuildTarget: WebGLSupport 333 | m_APIs: 0b000000 334 | m_Automatic: 1 335 | - m_BuildTarget: WindowsStandaloneSupport 336 | m_APIs: 1200000002000000 337 | m_Automatic: 0 338 | - m_BuildTarget: MacStandaloneSupport 339 | m_APIs: 10000000 340 | m_Automatic: 1 341 | - m_BuildTarget: LinuxStandaloneSupport 342 | m_APIs: 11000000 343 | m_Automatic: 0 344 | m_BuildTargetVRSettings: 345 | - m_BuildTarget: Standalone 346 | m_Enabled: 0 347 | m_Devices: 348 | - Oculus 349 | - OpenVR 350 | openGLRequireES31: 0 351 | openGLRequireES31AEP: 0 352 | openGLRequireES32: 0 353 | m_TemplateCustomTags: {} 354 | mobileMTRendering: 355 | Android: 1 356 | iPhone: 1 357 | tvOS: 1 358 | m_BuildTargetGroupLightmapEncodingQuality: 359 | - m_BuildTarget: Android 360 | m_EncodingQuality: 1 361 | - m_BuildTarget: iPhone 362 | m_EncodingQuality: 1 363 | - m_BuildTarget: tvOS 364 | m_EncodingQuality: 1 365 | m_BuildTargetGroupLightmapSettings: [] 366 | m_BuildTargetNormalMapEncoding: 367 | - m_BuildTarget: Android 368 | m_Encoding: 1 369 | - m_BuildTarget: iPhone 370 | m_Encoding: 1 371 | - m_BuildTarget: tvOS 372 | m_Encoding: 1 373 | m_BuildTargetDefaultTextureCompressionFormat: 374 | - m_BuildTarget: Android 375 | m_Format: 3 376 | playModeTestRunnerEnabled: 0 377 | runPlayModeTestAsEditModeTest: 0 378 | actionOnDotNetUnhandledException: 1 379 | enableInternalProfiler: 0 380 | logObjCUncaughtExceptions: 1 381 | enableCrashReportAPI: 0 382 | cameraUsageDescription: 383 | locationUsageDescription: 384 | microphoneUsageDescription: 385 | bluetoothUsageDescription: 386 | switchNMETAOverride: 387 | switchNetLibKey: 388 | switchSocketMemoryPoolSize: 6144 389 | switchSocketAllocatorPoolSize: 128 390 | switchSocketConcurrencyLimit: 14 391 | switchScreenResolutionBehavior: 2 392 | switchUseCPUProfiler: 0 393 | switchUseGOLDLinker: 0 394 | switchLTOSetting: 0 395 | switchApplicationID: 0x01004b9000490000 396 | switchNSODependencies: 397 | switchTitleNames_0: 398 | switchTitleNames_1: 399 | switchTitleNames_2: 400 | switchTitleNames_3: 401 | switchTitleNames_4: 402 | switchTitleNames_5: 403 | switchTitleNames_6: 404 | switchTitleNames_7: 405 | switchTitleNames_8: 406 | switchTitleNames_9: 407 | switchTitleNames_10: 408 | switchTitleNames_11: 409 | switchTitleNames_12: 410 | switchTitleNames_13: 411 | switchTitleNames_14: 412 | switchTitleNames_15: 413 | switchPublisherNames_0: 414 | switchPublisherNames_1: 415 | switchPublisherNames_2: 416 | switchPublisherNames_3: 417 | switchPublisherNames_4: 418 | switchPublisherNames_5: 419 | switchPublisherNames_6: 420 | switchPublisherNames_7: 421 | switchPublisherNames_8: 422 | switchPublisherNames_9: 423 | switchPublisherNames_10: 424 | switchPublisherNames_11: 425 | switchPublisherNames_12: 426 | switchPublisherNames_13: 427 | switchPublisherNames_14: 428 | switchPublisherNames_15: 429 | switchIcons_0: {fileID: 0} 430 | switchIcons_1: {fileID: 0} 431 | switchIcons_2: {fileID: 0} 432 | switchIcons_3: {fileID: 0} 433 | switchIcons_4: {fileID: 0} 434 | switchIcons_5: {fileID: 0} 435 | switchIcons_6: {fileID: 0} 436 | switchIcons_7: {fileID: 0} 437 | switchIcons_8: {fileID: 0} 438 | switchIcons_9: {fileID: 0} 439 | switchIcons_10: {fileID: 0} 440 | switchIcons_11: {fileID: 0} 441 | switchIcons_12: {fileID: 0} 442 | switchIcons_13: {fileID: 0} 443 | switchIcons_14: {fileID: 0} 444 | switchIcons_15: {fileID: 0} 445 | switchSmallIcons_0: {fileID: 0} 446 | switchSmallIcons_1: {fileID: 0} 447 | switchSmallIcons_2: {fileID: 0} 448 | switchSmallIcons_3: {fileID: 0} 449 | switchSmallIcons_4: {fileID: 0} 450 | switchSmallIcons_5: {fileID: 0} 451 | switchSmallIcons_6: {fileID: 0} 452 | switchSmallIcons_7: {fileID: 0} 453 | switchSmallIcons_8: {fileID: 0} 454 | switchSmallIcons_9: {fileID: 0} 455 | switchSmallIcons_10: {fileID: 0} 456 | switchSmallIcons_11: {fileID: 0} 457 | switchSmallIcons_12: {fileID: 0} 458 | switchSmallIcons_13: {fileID: 0} 459 | switchSmallIcons_14: {fileID: 0} 460 | switchSmallIcons_15: {fileID: 0} 461 | switchManualHTML: 462 | switchAccessibleURLs: 463 | switchLegalInformation: 464 | switchMainThreadStackSize: 1048576 465 | switchPresenceGroupId: 466 | switchLogoHandling: 0 467 | switchReleaseVersion: 0 468 | switchDisplayVersion: 1.0.0 469 | switchStartupUserAccount: 0 470 | switchTouchScreenUsage: 0 471 | switchSupportedLanguagesMask: 0 472 | switchLogoType: 0 473 | switchApplicationErrorCodeCategory: 474 | switchUserAccountSaveDataSize: 0 475 | switchUserAccountSaveDataJournalSize: 0 476 | switchApplicationAttribute: 0 477 | switchCardSpecSize: -1 478 | switchCardSpecClock: -1 479 | switchRatingsMask: 0 480 | switchRatingsInt_0: 0 481 | switchRatingsInt_1: 0 482 | switchRatingsInt_2: 0 483 | switchRatingsInt_3: 0 484 | switchRatingsInt_4: 0 485 | switchRatingsInt_5: 0 486 | switchRatingsInt_6: 0 487 | switchRatingsInt_7: 0 488 | switchRatingsInt_8: 0 489 | switchRatingsInt_9: 0 490 | switchRatingsInt_10: 0 491 | switchRatingsInt_11: 0 492 | switchRatingsInt_12: 0 493 | switchLocalCommunicationIds_0: 494 | switchLocalCommunicationIds_1: 495 | switchLocalCommunicationIds_2: 496 | switchLocalCommunicationIds_3: 497 | switchLocalCommunicationIds_4: 498 | switchLocalCommunicationIds_5: 499 | switchLocalCommunicationIds_6: 500 | switchLocalCommunicationIds_7: 501 | switchParentalControl: 0 502 | switchAllowsScreenshot: 1 503 | switchAllowsVideoCapturing: 1 504 | switchAllowsRuntimeAddOnContentInstall: 0 505 | switchDataLossConfirmation: 0 506 | switchUserAccountLockEnabled: 0 507 | switchSystemResourceMemory: 16777216 508 | switchSupportedNpadStyles: 22 509 | switchNativeFsCacheSize: 32 510 | switchIsHoldTypeHorizontal: 0 511 | switchSupportedNpadCount: 8 512 | switchSocketConfigEnabled: 0 513 | switchTcpInitialSendBufferSize: 32 514 | switchTcpInitialReceiveBufferSize: 64 515 | switchTcpAutoSendBufferSizeMax: 256 516 | switchTcpAutoReceiveBufferSizeMax: 256 517 | switchUdpSendBufferSize: 9 518 | switchUdpReceiveBufferSize: 42 519 | switchSocketBufferEfficiency: 4 520 | switchSocketInitializeEnabled: 1 521 | switchNetworkInterfaceManagerInitializeEnabled: 1 522 | switchPlayerConnectionEnabled: 1 523 | switchUseNewStyleFilepaths: 0 524 | switchUseMicroSleepForYield: 1 525 | switchEnableRamDiskSupport: 0 526 | switchMicroSleepForYieldTime: 25 527 | switchRamDiskSpaceSize: 12 528 | ps4NPAgeRating: 12 529 | ps4NPTitleSecret: 530 | ps4NPTrophyPackPath: 531 | ps4ParentalLevel: 11 532 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 533 | ps4Category: 0 534 | ps4MasterVersion: 01.00 535 | ps4AppVersion: 01.00 536 | ps4AppType: 0 537 | ps4ParamSfxPath: 538 | ps4VideoOutPixelFormat: 0 539 | ps4VideoOutInitialWidth: 1920 540 | ps4VideoOutBaseModeInitialWidth: 1920 541 | ps4VideoOutReprojectionRate: 60 542 | ps4PronunciationXMLPath: 543 | ps4PronunciationSIGPath: 544 | ps4BackgroundImagePath: 545 | ps4StartupImagePath: 546 | ps4StartupImagesFolder: 547 | ps4IconImagesFolder: 548 | ps4SaveDataImagePath: 549 | ps4SdkOverride: 550 | ps4BGMPath: 551 | ps4ShareFilePath: 552 | ps4ShareOverlayImagePath: 553 | ps4PrivacyGuardImagePath: 554 | ps4ExtraSceSysFile: 555 | ps4NPtitleDatPath: 556 | ps4RemotePlayKeyAssignment: -1 557 | ps4RemotePlayKeyMappingDir: 558 | ps4PlayTogetherPlayerCount: 0 559 | ps4EnterButtonAssignment: 1 560 | ps4ApplicationParam1: 0 561 | ps4ApplicationParam2: 0 562 | ps4ApplicationParam3: 0 563 | ps4ApplicationParam4: 0 564 | ps4DownloadDataSize: 0 565 | ps4GarlicHeapSize: 2048 566 | ps4ProGarlicHeapSize: 2560 567 | playerPrefsMaxSize: 32768 568 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 569 | ps4pnSessions: 1 570 | ps4pnPresence: 1 571 | ps4pnFriends: 1 572 | ps4pnGameCustomData: 1 573 | playerPrefsSupport: 0 574 | enableApplicationExit: 0 575 | resetTempFolder: 1 576 | restrictedAudioUsageRights: 0 577 | ps4UseResolutionFallback: 0 578 | ps4ReprojectionSupport: 0 579 | ps4UseAudio3dBackend: 0 580 | ps4UseLowGarlicFragmentationMode: 1 581 | ps4SocialScreenEnabled: 0 582 | ps4ScriptOptimizationLevel: 0 583 | ps4Audio3dVirtualSpeakerCount: 14 584 | ps4attribCpuUsage: 0 585 | ps4PatchPkgPath: 586 | ps4PatchLatestPkgPath: 587 | ps4PatchChangeinfoPath: 588 | ps4PatchDayOne: 0 589 | ps4attribUserManagement: 0 590 | ps4attribMoveSupport: 0 591 | ps4attrib3DSupport: 0 592 | ps4attribShareSupport: 0 593 | ps4attribExclusiveVR: 0 594 | ps4disableAutoHideSplash: 0 595 | ps4videoRecordingFeaturesUsed: 0 596 | ps4contentSearchFeaturesUsed: 0 597 | ps4CompatibilityPS5: 0 598 | ps4GPU800MHz: 1 599 | ps4attribEyeToEyeDistanceSettingVR: 0 600 | ps4IncludedModules: [] 601 | ps4attribVROutputEnabled: 0 602 | monoEnv: 603 | splashScreenBackgroundSourceLandscape: {fileID: 0} 604 | splashScreenBackgroundSourcePortrait: {fileID: 0} 605 | blurSplashScreenBackground: 1 606 | spritePackerPolicy: 607 | webGLMemorySize: 16 608 | webGLExceptionSupport: 1 609 | webGLNameFilesAsHashes: 0 610 | webGLDataCaching: 1 611 | webGLDebugSymbols: 0 612 | webGLEmscriptenArgs: 613 | webGLModulesDirectory: 614 | webGLTemplate: APPLICATION:Default 615 | webGLAnalyzeBuildSize: 0 616 | webGLUseEmbeddedResources: 0 617 | webGLCompressionFormat: 1 618 | webGLWasmArithmeticExceptions: 0 619 | webGLLinkerTarget: 1 620 | webGLThreadsSupport: 0 621 | webGLDecompressionFallback: 0 622 | scriptingDefineSymbols: {} 623 | additionalCompilerArguments: {} 624 | platformArchitecture: {} 625 | scriptingBackend: {} 626 | il2cppCompilerConfiguration: {} 627 | managedStrippingLevel: {} 628 | incrementalIl2cppBuild: {} 629 | suppressCommonWarnings: 1 630 | allowUnsafeCode: 0 631 | useDeterministicCompilation: 1 632 | enableRoslynAnalyzers: 1 633 | additionalIl2CppArgs: 634 | scriptingRuntimeVersion: 1 635 | gcIncremental: 1 636 | assemblyVersionValidation: 1 637 | gcWBarrierValidation: 0 638 | apiCompatibilityLevelPerPlatform: {} 639 | m_RenderingPath: 1 640 | m_MobileRenderingPath: 1 641 | metroPackageName: Template_3D 642 | metroPackageVersion: 643 | metroCertificatePath: 644 | metroCertificatePassword: 645 | metroCertificateSubject: 646 | metroCertificateIssuer: 647 | metroCertificateNotAfter: 0000000000000000 648 | metroApplicationDescription: Template_3D 649 | wsaImages: {} 650 | metroTileShortName: 651 | metroTileShowName: 0 652 | metroMediumTileShowName: 0 653 | metroLargeTileShowName: 0 654 | metroWideTileShowName: 0 655 | metroSupportStreamingInstall: 0 656 | metroLastRequiredScene: 0 657 | metroDefaultTileSize: 1 658 | metroTileForegroundText: 2 659 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 660 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 661 | metroSplashScreenUseBackgroundColor: 0 662 | platformCapabilities: {} 663 | metroTargetDeviceFamilies: {} 664 | metroFTAName: 665 | metroFTAFileTypes: [] 666 | metroProtocolName: 667 | vcxProjDefaultLanguage: 668 | XboxOneProductId: 669 | XboxOneUpdateKey: 670 | XboxOneSandboxId: 671 | XboxOneContentId: 672 | XboxOneTitleId: 673 | XboxOneSCId: 674 | XboxOneGameOsOverridePath: 675 | XboxOnePackagingOverridePath: 676 | XboxOneAppManifestOverridePath: 677 | XboxOneVersion: 1.0.0.0 678 | XboxOnePackageEncryption: 0 679 | XboxOnePackageUpdateGranularity: 2 680 | XboxOneDescription: 681 | XboxOneLanguage: 682 | - enus 683 | XboxOneCapability: [] 684 | XboxOneGameRating: {} 685 | XboxOneIsContentPackage: 0 686 | XboxOneEnhancedXboxCompatibilityMode: 0 687 | XboxOneEnableGPUVariability: 1 688 | XboxOneSockets: {} 689 | XboxOneSplashScreen: {fileID: 0} 690 | XboxOneAllowedProductIds: [] 691 | XboxOnePersistentLocalStorageSize: 0 692 | XboxOneXTitleMemory: 8 693 | XboxOneOverrideIdentityName: 694 | XboxOneOverrideIdentityPublisher: 695 | vrEditorSettings: {} 696 | cloudServicesEnabled: 697 | UNet: 1 698 | luminIcon: 699 | m_Name: 700 | m_ModelFolderPath: 701 | m_PortalFolderPath: 702 | luminCert: 703 | m_CertPath: 704 | m_SignPackage: 1 705 | luminIsChannelApp: 0 706 | luminVersion: 707 | m_VersionCode: 1 708 | m_VersionName: 709 | apiCompatibilityLevel: 6 710 | activeInputHandler: 0 711 | cloudProjectId: 712 | framebufferDepthMemorylessMode: 0 713 | qualitySettingsNames: [] 714 | projectName: 715 | organizationId: 716 | cloudEnabled: 0 717 | legacyClampBlendShapeWeights: 0 718 | playerDataPath: 719 | forceSRGBBlit: 1 720 | virtualTexturingSupportEnabled: 0 721 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2021.3.4f1 2 | m_EditorVersionWithRevision: 2021.3.4f1 (cb45f9cae8b7) 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: 5 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: 2 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 | Server: 0 233 | Stadia: 5 234 | Standalone: 5 235 | WebGL: 3 236 | Windows Store Apps: 5 237 | XboxOne: 5 238 | iPhone: 2 239 | tvOS: 2 240 | -------------------------------------------------------------------------------- /ProjectSettings/SceneTemplateSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "templatePinStates": [], 3 | "dependencyTypeInfos": [ 4 | { 5 | "userAdded": false, 6 | "type": "UnityEngine.AnimationClip", 7 | "ignore": false, 8 | "defaultInstantiationMode": 0, 9 | "supportsModification": true 10 | }, 11 | { 12 | "userAdded": false, 13 | "type": "UnityEditor.Animations.AnimatorController", 14 | "ignore": false, 15 | "defaultInstantiationMode": 0, 16 | "supportsModification": true 17 | }, 18 | { 19 | "userAdded": false, 20 | "type": "UnityEngine.AnimatorOverrideController", 21 | "ignore": false, 22 | "defaultInstantiationMode": 0, 23 | "supportsModification": true 24 | }, 25 | { 26 | "userAdded": false, 27 | "type": "UnityEditor.Audio.AudioMixerController", 28 | "ignore": false, 29 | "defaultInstantiationMode": 0, 30 | "supportsModification": true 31 | }, 32 | { 33 | "userAdded": false, 34 | "type": "UnityEngine.ComputeShader", 35 | "ignore": true, 36 | "defaultInstantiationMode": 1, 37 | "supportsModification": true 38 | }, 39 | { 40 | "userAdded": false, 41 | "type": "UnityEngine.Cubemap", 42 | "ignore": false, 43 | "defaultInstantiationMode": 0, 44 | "supportsModification": true 45 | }, 46 | { 47 | "userAdded": false, 48 | "type": "UnityEngine.GameObject", 49 | "ignore": false, 50 | "defaultInstantiationMode": 0, 51 | "supportsModification": true 52 | }, 53 | { 54 | "userAdded": false, 55 | "type": "UnityEditor.LightingDataAsset", 56 | "ignore": false, 57 | "defaultInstantiationMode": 0, 58 | "supportsModification": false 59 | }, 60 | { 61 | "userAdded": false, 62 | "type": "UnityEngine.LightingSettings", 63 | "ignore": false, 64 | "defaultInstantiationMode": 0, 65 | "supportsModification": true 66 | }, 67 | { 68 | "userAdded": false, 69 | "type": "UnityEngine.Material", 70 | "ignore": false, 71 | "defaultInstantiationMode": 0, 72 | "supportsModification": true 73 | }, 74 | { 75 | "userAdded": false, 76 | "type": "UnityEditor.MonoScript", 77 | "ignore": true, 78 | "defaultInstantiationMode": 1, 79 | "supportsModification": true 80 | }, 81 | { 82 | "userAdded": false, 83 | "type": "UnityEngine.PhysicMaterial", 84 | "ignore": false, 85 | "defaultInstantiationMode": 0, 86 | "supportsModification": true 87 | }, 88 | { 89 | "userAdded": false, 90 | "type": "UnityEngine.PhysicsMaterial2D", 91 | "ignore": false, 92 | "defaultInstantiationMode": 0, 93 | "supportsModification": true 94 | }, 95 | { 96 | "userAdded": false, 97 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", 98 | "ignore": false, 99 | "defaultInstantiationMode": 0, 100 | "supportsModification": true 101 | }, 102 | { 103 | "userAdded": false, 104 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", 105 | "ignore": false, 106 | "defaultInstantiationMode": 0, 107 | "supportsModification": true 108 | }, 109 | { 110 | "userAdded": false, 111 | "type": "UnityEngine.Rendering.VolumeProfile", 112 | "ignore": false, 113 | "defaultInstantiationMode": 0, 114 | "supportsModification": true 115 | }, 116 | { 117 | "userAdded": false, 118 | "type": "UnityEditor.SceneAsset", 119 | "ignore": false, 120 | "defaultInstantiationMode": 0, 121 | "supportsModification": false 122 | }, 123 | { 124 | "userAdded": false, 125 | "type": "UnityEngine.Shader", 126 | "ignore": true, 127 | "defaultInstantiationMode": 1, 128 | "supportsModification": true 129 | }, 130 | { 131 | "userAdded": false, 132 | "type": "UnityEngine.ShaderVariantCollection", 133 | "ignore": true, 134 | "defaultInstantiationMode": 1, 135 | "supportsModification": true 136 | }, 137 | { 138 | "userAdded": false, 139 | "type": "UnityEngine.Texture", 140 | "ignore": false, 141 | "defaultInstantiationMode": 0, 142 | "supportsModification": true 143 | }, 144 | { 145 | "userAdded": false, 146 | "type": "UnityEngine.Texture2D", 147 | "ignore": false, 148 | "defaultInstantiationMode": 0, 149 | "supportsModification": true 150 | }, 151 | { 152 | "userAdded": false, 153 | "type": "UnityEngine.Timeline.TimelineAsset", 154 | "ignore": false, 155 | "defaultInstantiationMode": 0, 156 | "supportsModification": true 157 | } 158 | ], 159 | "defaultDependencyTypeInfo": { 160 | "userAdded": false, 161 | "type": "", 162 | "ignore": false, 163 | "defaultInstantiationMode": 1, 164 | "supportsModification": true 165 | }, 166 | "newSceneOverride": 0 167 | } -------------------------------------------------------------------------------- /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/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | UnityAdsSettings: 27 | m_Enabled: 0 28 | m_InitializeOnStartup: 1 29 | m_TestMode: 0 30 | m_IosGameId: 31 | m_AndroidGameId: 32 | m_GameIds: {} 33 | m_GameId: 34 | PerformanceReportingSettings: 35 | m_Enabled: 0 36 | -------------------------------------------------------------------------------- /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/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /ProjectSettings/boot.config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drzhn/UnitySimpleRaytracing/809bf21e96bfa8eaea0ac14352ab08358bc3d61f/ProjectSettings/boot.config -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnitySimpleRaytracing 2 | 3 | Software raytracing implementation on the GPU (BVH building and traversal). Used LBVH+radix sort on the spatial subdivision part. 4 | 5 | Based on these articles 6 | - N. Satish, M. Harris and M. Garland, "Designing efficient sorting algorithms for manycore GPUs," 2009 IEEE International Symposium on Parallel & Distributed Processing, Rome, Italy, 2009, pp. 1-10 7 | - https://developer.nvidia.com/blog/thinking-parallel-part-iii-tree-construction-gpu/ 8 | 9 | **WARNING**: for GPU sorting part I used new HLSL wave intrinsics for scan stage. So it's obligation to run this project on Nvidia GPUs because of lane size equal to 32. 10 | --------------------------------------------------------------------------------