├── .gitignore ├── .vscode └── settings.json ├── Assets ├── Materials.meta ├── Materials │ ├── Ground.mat │ ├── Ground.mat.meta │ ├── Sky.mat │ ├── Sky.mat.meta │ ├── Water.mat │ └── Water.mat.meta ├── Models.meta ├── Models │ ├── box.fbx │ ├── box.fbx.meta │ ├── sphere_like.fbx │ └── sphere_like.fbx.meta ├── Scenes.meta ├── Scenes │ ├── PrefixSum.unity │ ├── PrefixSum.unity.meta │ ├── SampleScene.unity │ ├── SampleScene.unity.meta │ ├── SampleScene_Profiles.meta │ └── SampleScene_Profiles │ │ ├── Post Processing Volume Profile.asset │ │ └── Post Processing Volume Profile.asset.meta ├── Scripts.meta ├── Scripts │ ├── CameraController.cs │ ├── CameraController.cs.meta │ ├── PrefixSum.cginc │ ├── PrefixSum.cginc.meta │ ├── PrefixSum.compute │ ├── PrefixSum.compute.meta │ ├── PrefixSumTest.cs │ ├── PrefixSumTest.cs.meta │ ├── Sim.compute │ ├── Sim.compute.meta │ ├── Solver.cs │ ├── Solver.cs.meta │ ├── Spheres.shader │ └── Spheres.shader.meta ├── Textures.meta └── Textures │ ├── shanghai_riverside_2k.exr │ └── shanghai_riverside_2k.exr.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 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.suo 39 | *.tmp 40 | *.user 41 | *.userprefs 42 | *.pidb 43 | *.booproj 44 | *.svd 45 | *.pdb 46 | *.mdb 47 | *.opendb 48 | *.VC.db 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.aab 61 | *.unitypackage 62 | *.app 63 | 64 | # Crashlytics generated file 65 | crashlytics-build.properties 66 | 67 | # Packed Addressables 68 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 69 | 70 | # Temporary auto-generated Android Assets 71 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 72 | /[Aa]ssets/[Ss]treamingAssets/aa/* -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": 3 | { 4 | "**/.DS_Store":true, 5 | "**/.git":true, 6 | "**/.gitmodules":true, 7 | "**/*.booproj":true, 8 | "**/*.pidb":true, 9 | "**/*.suo":true, 10 | "**/*.user":true, 11 | "**/*.userprefs":true, 12 | "**/*.unityproj":true, 13 | "**/*.dll":true, 14 | "**/*.exe":true, 15 | "**/*.pdf":true, 16 | "**/*.mid":true, 17 | "**/*.midi":true, 18 | "**/*.wav":true, 19 | "**/*.gif":true, 20 | "**/*.ico":true, 21 | "**/*.jpg":true, 22 | "**/*.jpeg":true, 23 | "**/*.png":true, 24 | "**/*.psd":true, 25 | "**/*.tga":true, 26 | "**/*.tif":true, 27 | "**/*.tiff":true, 28 | "**/*.3ds":true, 29 | "**/*.3DS":true, 30 | "**/*.fbx":true, 31 | "**/*.FBX":true, 32 | "**/*.lxo":true, 33 | "**/*.LXO":true, 34 | "**/*.ma":true, 35 | "**/*.MA":true, 36 | "**/*.obj":true, 37 | "**/*.OBJ":true, 38 | "**/*.asset":true, 39 | "**/*.cubemap":true, 40 | "**/*.flare":true, 41 | "**/*.mat":true, 42 | "**/*.meta":true, 43 | "**/*.prefab":true, 44 | "**/*.unity":true, 45 | "build/":true, 46 | "Build/":true, 47 | "Library/":true, 48 | "library/":true, 49 | "obj/":true, 50 | "Obj/":true, 51 | "ProjectSettings/":true, 52 | "temp/":true, 53 | "Temp/":true 54 | } 55 | } -------------------------------------------------------------------------------- /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b575d671747b9d45b5cee990b382ee3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Ground.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: Ground 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: 10000, y: 10000} 42 | m_Offset: {x: 0, y: 0} 43 | - _MainTex: 44 | m_Texture: {fileID: 10309, guid: 0000000000000000f000000000000000, type: 0} 45 | m_Scale: {x: 10000, y: 10000} 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.238 67 | - _GlossyReflections: 1 68 | - _Metallic: 0.196 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.46226418, g: 0.46226418, b: 0.46226418, a: 1} 79 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 80 | m_BuildTextureStacks: [] 81 | -------------------------------------------------------------------------------- /Assets/Materials/Ground.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7c9973d16156aab4b8fe0fb5aa92f12c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Sky.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: Sky 11 | m_Shader: {fileID: 103, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ValidKeywords: [] 13 | m_InvalidKeywords: 14 | - _MAPPING_LATITUDE_LONGITUDE_LAYOUT 15 | m_LightmapFlags: 4 16 | m_EnableInstancingVariants: 0 17 | m_DoubleSidedGI: 0 18 | m_CustomRenderQueue: -1 19 | stringTagMap: {} 20 | disabledShaderPasses: [] 21 | m_SavedProperties: 22 | serializedVersion: 3 23 | m_TexEnvs: 24 | - _BumpMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailAlbedoMap: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailMask: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _DetailNormalMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _EmissionMap: 41 | m_Texture: {fileID: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MainTex: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _MetallicGlossMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _OcclusionMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | - _ParallaxMap: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | - _Tex: 61 | m_Texture: {fileID: 8900000, guid: 728dc8f45ec6bf240a3ff67e66721746, type: 3} 62 | m_Scale: {x: 1, y: 1} 63 | m_Offset: {x: 0, y: 0} 64 | m_Ints: [] 65 | m_Floats: 66 | - _BumpScale: 1 67 | - _Cutoff: 0.5 68 | - _DetailNormalMapScale: 1 69 | - _DstBlend: 0 70 | - _Exposure: 1 71 | - _GlossMapScale: 1 72 | - _Glossiness: 0.5 73 | - _GlossyReflections: 1 74 | - _ImageType: 0 75 | - _Layout: 0 76 | - _Mapping: 1 77 | - _Metallic: 0 78 | - _MirrorOnBack: 0 79 | - _Mode: 0 80 | - _OcclusionStrength: 1 81 | - _Parallax: 0.02 82 | - _Rotation: 0 83 | - _SmoothnessTextureChannel: 0 84 | - _SpecularHighlights: 1 85 | - _SrcBlend: 1 86 | - _UVSec: 0 87 | - _ZWrite: 1 88 | m_Colors: 89 | - _Color: {r: 1, g: 1, b: 1, a: 1} 90 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 91 | - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 92 | m_BuildTextureStacks: [] 93 | -------------------------------------------------------------------------------- /Assets/Materials/Sky.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 30cffb0b5c677ae4283cb59548ad245e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Water.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: Water 11 | m_Shader: {fileID: 4800000, guid: d422c3fc5e6461b4da80424ed4deb459, type: 3} 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 | - _EnvMap: 44 | m_Texture: {fileID: 8900000, guid: 728dc8f45ec6bf240a3ff67e66721746, type: 3} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MainTex: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _MetallicGlossMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _OcclusionMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _ParallaxMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | m_Ints: [] 64 | m_Floats: 65 | - _BumpScale: 1 66 | - _Cutoff: 0.5 67 | - _DetailNormalMapScale: 1 68 | - _DstBlend: 0 69 | - _GlossMapScale: 1 70 | - _Glossiness: 0.5 71 | - _GlossyReflections: 1 72 | - _Metallic: 0 73 | - _Mode: 0 74 | - _OcclusionStrength: 1 75 | - _Parallax: 0.02 76 | - _PhongExponent: 128 77 | - _SmoothnessTextureChannel: 0 78 | - _SpecularHighlights: 1 79 | - _SrcBlend: 1 80 | - _UVSec: 0 81 | - _ZWrite: 1 82 | m_Colors: 83 | - _Color: {r: 1, g: 1, b: 1, a: 1} 84 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 85 | - _FoamColor: {r: 1, g: 1, b: 1, a: 1} 86 | - _PrimaryColor: {r: 0, g: 0.64705884, b: 0.92156863, a: 1} 87 | - _SecondaryColor: {r: 0.043137256, g: 0.22745098, b: 0.50980395, a: 1} 88 | - _SpecularColor: {r: 1, g: 0.91764706, b: 0.78039217, a: 1} 89 | m_BuildTextureStacks: [] 90 | -------------------------------------------------------------------------------- /Assets/Materials/Water.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6378f3d1b6e448e41ae0a514bce49add 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd8a743db27094447b11c6296e2b0ba3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Models/box.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aren227/unity-fluid-simulation/f9202a97a754f46bcb854253a9f8f9e374ee5e5c/Assets/Models/box.fbx -------------------------------------------------------------------------------- /Assets/Models/box.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 32591c72e19b392408b392f27e87e875 3 | ModelImporter: 4 | serializedVersion: 21300 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: 0 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 100 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: 1 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 | remapMaterialsIfMaterialImportModeIsNone: 0 103 | additionalBone: 0 104 | userData: 105 | assetBundleName: 106 | assetBundleVariant: 107 | -------------------------------------------------------------------------------- /Assets/Models/sphere_like.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aren227/unity-fluid-simulation/f9202a97a754f46bcb854253a9f8f9e374ee5e5c/Assets/Models/sphere_like.fbx -------------------------------------------------------------------------------- /Assets/Models/sphere_like.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e4bf80ccc13306e4597dd4ace78528f5 3 | ModelImporter: 4 | serializedVersion: 21300 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: 0 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 100 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: 1 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 | remapMaterialsIfMaterialImportModeIsNone: 0 103 | additionalBone: 0 104 | userData: 105 | assetBundleName: 106 | assetBundleVariant: 107 | -------------------------------------------------------------------------------- /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/PrefixSum.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.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: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_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 &465609336 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: 465609338} 135 | - component: {fileID: 465609337} 136 | m_Layer: 0 137 | m_Name: Test 138 | m_TagString: Untagged 139 | m_Icon: {fileID: 0} 140 | m_NavMeshLayer: 0 141 | m_StaticEditorFlags: 0 142 | m_IsActive: 1 143 | --- !u!114 &465609337 144 | MonoBehaviour: 145 | m_ObjectHideFlags: 0 146 | m_CorrespondingSourceObject: {fileID: 0} 147 | m_PrefabInstance: {fileID: 0} 148 | m_PrefabAsset: {fileID: 0} 149 | m_GameObject: {fileID: 465609336} 150 | m_Enabled: 1 151 | m_EditorHideFlags: 0 152 | m_Script: {fileID: 11500000, guid: 25938156b07f26947aabd8faa6f958c7, type: 3} 153 | m_Name: 154 | m_EditorClassIdentifier: 155 | computeShader: {fileID: 7200000, guid: 39c7ace557333ee4ba60a6da15ada308, type: 3} 156 | --- !u!4 &465609338 157 | Transform: 158 | m_ObjectHideFlags: 0 159 | m_CorrespondingSourceObject: {fileID: 0} 160 | m_PrefabInstance: {fileID: 0} 161 | m_PrefabAsset: {fileID: 0} 162 | m_GameObject: {fileID: 465609336} 163 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 164 | m_LocalPosition: {x: 0, y: 0, z: 0} 165 | m_LocalScale: {x: 1, y: 1, z: 1} 166 | m_ConstrainProportionsScale: 0 167 | m_Children: [] 168 | m_Father: {fileID: 0} 169 | m_RootOrder: 2 170 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 171 | --- !u!1 &888958280 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: 888958283} 180 | - component: {fileID: 888958282} 181 | - component: {fileID: 888958281} 182 | m_Layer: 0 183 | m_Name: Main Camera 184 | m_TagString: MainCamera 185 | m_Icon: {fileID: 0} 186 | m_NavMeshLayer: 0 187 | m_StaticEditorFlags: 0 188 | m_IsActive: 1 189 | --- !u!81 &888958281 190 | AudioListener: 191 | m_ObjectHideFlags: 0 192 | m_CorrespondingSourceObject: {fileID: 0} 193 | m_PrefabInstance: {fileID: 0} 194 | m_PrefabAsset: {fileID: 0} 195 | m_GameObject: {fileID: 888958280} 196 | m_Enabled: 1 197 | --- !u!20 &888958282 198 | Camera: 199 | m_ObjectHideFlags: 0 200 | m_CorrespondingSourceObject: {fileID: 0} 201 | m_PrefabInstance: {fileID: 0} 202 | m_PrefabAsset: {fileID: 0} 203 | m_GameObject: {fileID: 888958280} 204 | m_Enabled: 1 205 | serializedVersion: 2 206 | m_ClearFlags: 1 207 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 208 | m_projectionMatrixMode: 1 209 | m_GateFitMode: 2 210 | m_FOVAxisMode: 0 211 | m_SensorSize: {x: 36, y: 24} 212 | m_LensShift: {x: 0, y: 0} 213 | m_FocalLength: 50 214 | m_NormalizedViewPortRect: 215 | serializedVersion: 2 216 | x: 0 217 | y: 0 218 | width: 1 219 | height: 1 220 | near clip plane: 0.3 221 | far clip plane: 1000 222 | field of view: 60 223 | orthographic: 0 224 | orthographic size: 5 225 | m_Depth: -1 226 | m_CullingMask: 227 | serializedVersion: 2 228 | m_Bits: 4294967295 229 | m_RenderingPath: -1 230 | m_TargetTexture: {fileID: 0} 231 | m_TargetDisplay: 0 232 | m_TargetEye: 3 233 | m_HDR: 1 234 | m_AllowMSAA: 1 235 | m_AllowDynamicResolution: 0 236 | m_ForceIntoRT: 0 237 | m_OcclusionCulling: 1 238 | m_StereoConvergence: 10 239 | m_StereoSeparation: 0.022 240 | --- !u!4 &888958283 241 | Transform: 242 | m_ObjectHideFlags: 0 243 | m_CorrespondingSourceObject: {fileID: 0} 244 | m_PrefabInstance: {fileID: 0} 245 | m_PrefabAsset: {fileID: 0} 246 | m_GameObject: {fileID: 888958280} 247 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 248 | m_LocalPosition: {x: 0, y: 1, z: -10} 249 | m_LocalScale: {x: 1, y: 1, z: 1} 250 | m_ConstrainProportionsScale: 0 251 | m_Children: [] 252 | m_Father: {fileID: 0} 253 | m_RootOrder: 0 254 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 255 | --- !u!1 &1511897025 256 | GameObject: 257 | m_ObjectHideFlags: 0 258 | m_CorrespondingSourceObject: {fileID: 0} 259 | m_PrefabInstance: {fileID: 0} 260 | m_PrefabAsset: {fileID: 0} 261 | serializedVersion: 6 262 | m_Component: 263 | - component: {fileID: 1511897027} 264 | - component: {fileID: 1511897026} 265 | m_Layer: 0 266 | m_Name: Directional Light 267 | m_TagString: Untagged 268 | m_Icon: {fileID: 0} 269 | m_NavMeshLayer: 0 270 | m_StaticEditorFlags: 0 271 | m_IsActive: 1 272 | --- !u!108 &1511897026 273 | Light: 274 | m_ObjectHideFlags: 0 275 | m_CorrespondingSourceObject: {fileID: 0} 276 | m_PrefabInstance: {fileID: 0} 277 | m_PrefabAsset: {fileID: 0} 278 | m_GameObject: {fileID: 1511897025} 279 | m_Enabled: 1 280 | serializedVersion: 10 281 | m_Type: 1 282 | m_Shape: 0 283 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 284 | m_Intensity: 1 285 | m_Range: 10 286 | m_SpotAngle: 30 287 | m_InnerSpotAngle: 21.80208 288 | m_CookieSize: 10 289 | m_Shadows: 290 | m_Type: 2 291 | m_Resolution: -1 292 | m_CustomResolution: -1 293 | m_Strength: 1 294 | m_Bias: 0.05 295 | m_NormalBias: 0.4 296 | m_NearPlane: 0.2 297 | m_CullingMatrixOverride: 298 | e00: 1 299 | e01: 0 300 | e02: 0 301 | e03: 0 302 | e10: 0 303 | e11: 1 304 | e12: 0 305 | e13: 0 306 | e20: 0 307 | e21: 0 308 | e22: 1 309 | e23: 0 310 | e30: 0 311 | e31: 0 312 | e32: 0 313 | e33: 1 314 | m_UseCullingMatrixOverride: 0 315 | m_Cookie: {fileID: 0} 316 | m_DrawHalo: 0 317 | m_Flare: {fileID: 0} 318 | m_RenderMode: 0 319 | m_CullingMask: 320 | serializedVersion: 2 321 | m_Bits: 4294967295 322 | m_RenderingLayerMask: 1 323 | m_Lightmapping: 4 324 | m_LightShadowCasterMode: 0 325 | m_AreaSize: {x: 1, y: 1} 326 | m_BounceIntensity: 1 327 | m_ColorTemperature: 6570 328 | m_UseColorTemperature: 0 329 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 330 | m_UseBoundingSphereOverride: 0 331 | m_UseViewFrustumForShadowCasterCull: 1 332 | m_ShadowRadius: 0 333 | m_ShadowAngle: 0 334 | --- !u!4 &1511897027 335 | Transform: 336 | m_ObjectHideFlags: 0 337 | m_CorrespondingSourceObject: {fileID: 0} 338 | m_PrefabInstance: {fileID: 0} 339 | m_PrefabAsset: {fileID: 0} 340 | m_GameObject: {fileID: 1511897025} 341 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 342 | m_LocalPosition: {x: 0, y: 3, z: 0} 343 | m_LocalScale: {x: 1, y: 1, z: 1} 344 | m_ConstrainProportionsScale: 0 345 | m_Children: [] 346 | m_Father: {fileID: 0} 347 | m_RootOrder: 1 348 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 349 | -------------------------------------------------------------------------------- /Assets/Scenes/PrefixSum.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e715c7ae79b77e541878ecbc759a7ca1 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 2100000, guid: 30cffb0b5c677ae4283cb59548ad245e, type: 2} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 705507994} 41 | m_IndirectSpecularColor: {r: 0.50937635, g: 0.5351189, b: 0.5508484, 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 &439758681 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: 439758682} 135 | - component: {fileID: 439758684} 136 | - component: {fileID: 439758683} 137 | m_Layer: 31 138 | m_Name: Post Processing Volume 139 | m_TagString: Untagged 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!4 &439758682 145 | Transform: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 439758681} 151 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 152 | m_LocalPosition: {x: 0, y: 0, z: 0} 153 | m_LocalScale: {x: 1, y: 1, z: 1} 154 | m_ConstrainProportionsScale: 0 155 | m_Children: [] 156 | m_Father: {fileID: 963194228} 157 | m_RootOrder: 0 158 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 159 | --- !u!114 &439758683 160 | MonoBehaviour: 161 | m_ObjectHideFlags: 0 162 | m_CorrespondingSourceObject: {fileID: 0} 163 | m_PrefabInstance: {fileID: 0} 164 | m_PrefabAsset: {fileID: 0} 165 | m_GameObject: {fileID: 439758681} 166 | m_Enabled: 1 167 | m_EditorHideFlags: 0 168 | m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3} 169 | m_Name: 170 | m_EditorClassIdentifier: 171 | sharedProfile: {fileID: 11400000, guid: c239025c31ca253429b68a3e0f2d9cd2, type: 2} 172 | isGlobal: 0 173 | blendDistance: 0 174 | weight: 1 175 | priority: 0 176 | --- !u!65 &439758684 177 | BoxCollider: 178 | m_ObjectHideFlags: 0 179 | m_CorrespondingSourceObject: {fileID: 0} 180 | m_PrefabInstance: {fileID: 0} 181 | m_PrefabAsset: {fileID: 0} 182 | m_GameObject: {fileID: 439758681} 183 | m_Material: {fileID: 0} 184 | m_IsTrigger: 0 185 | m_Enabled: 1 186 | serializedVersion: 2 187 | m_Size: {x: 1, y: 1, z: 1} 188 | m_Center: {x: 0, y: 0, z: 0} 189 | --- !u!1 &705507993 190 | GameObject: 191 | m_ObjectHideFlags: 0 192 | m_CorrespondingSourceObject: {fileID: 0} 193 | m_PrefabInstance: {fileID: 0} 194 | m_PrefabAsset: {fileID: 0} 195 | serializedVersion: 6 196 | m_Component: 197 | - component: {fileID: 705507995} 198 | - component: {fileID: 705507994} 199 | m_Layer: 0 200 | m_Name: Directional Light 201 | m_TagString: Untagged 202 | m_Icon: {fileID: 0} 203 | m_NavMeshLayer: 0 204 | m_StaticEditorFlags: 0 205 | m_IsActive: 1 206 | --- !u!108 &705507994 207 | Light: 208 | m_ObjectHideFlags: 0 209 | m_CorrespondingSourceObject: {fileID: 0} 210 | m_PrefabInstance: {fileID: 0} 211 | m_PrefabAsset: {fileID: 0} 212 | m_GameObject: {fileID: 705507993} 213 | m_Enabled: 1 214 | serializedVersion: 10 215 | m_Type: 1 216 | m_Shape: 0 217 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 218 | m_Intensity: 1 219 | m_Range: 10 220 | m_SpotAngle: 30 221 | m_InnerSpotAngle: 21.80208 222 | m_CookieSize: 10 223 | m_Shadows: 224 | m_Type: 2 225 | m_Resolution: -1 226 | m_CustomResolution: -1 227 | m_Strength: 1 228 | m_Bias: 0.05 229 | m_NormalBias: 0.4 230 | m_NearPlane: 0.2 231 | m_CullingMatrixOverride: 232 | e00: 1 233 | e01: 0 234 | e02: 0 235 | e03: 0 236 | e10: 0 237 | e11: 1 238 | e12: 0 239 | e13: 0 240 | e20: 0 241 | e21: 0 242 | e22: 1 243 | e23: 0 244 | e30: 0 245 | e31: 0 246 | e32: 0 247 | e33: 1 248 | m_UseCullingMatrixOverride: 0 249 | m_Cookie: {fileID: 0} 250 | m_DrawHalo: 0 251 | m_Flare: {fileID: 0} 252 | m_RenderMode: 0 253 | m_CullingMask: 254 | serializedVersion: 2 255 | m_Bits: 4294967295 256 | m_RenderingLayerMask: 1 257 | m_Lightmapping: 1 258 | m_LightShadowCasterMode: 0 259 | m_AreaSize: {x: 1, y: 1} 260 | m_BounceIntensity: 1 261 | m_ColorTemperature: 6570 262 | m_UseColorTemperature: 0 263 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 264 | m_UseBoundingSphereOverride: 0 265 | m_UseViewFrustumForShadowCasterCull: 1 266 | m_ShadowRadius: 0 267 | m_ShadowAngle: 0 268 | --- !u!4 &705507995 269 | Transform: 270 | m_ObjectHideFlags: 0 271 | m_CorrespondingSourceObject: {fileID: 0} 272 | m_PrefabInstance: {fileID: 0} 273 | m_PrefabAsset: {fileID: 0} 274 | m_GameObject: {fileID: 705507993} 275 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 276 | m_LocalPosition: {x: 0, y: 3, z: 0} 277 | m_LocalScale: {x: 1, y: 1, z: 1} 278 | m_ConstrainProportionsScale: 0 279 | m_Children: [] 280 | m_Father: {fileID: 0} 281 | m_RootOrder: 1 282 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 283 | --- !u!1 &963194225 284 | GameObject: 285 | m_ObjectHideFlags: 0 286 | m_CorrespondingSourceObject: {fileID: 0} 287 | m_PrefabInstance: {fileID: 0} 288 | m_PrefabAsset: {fileID: 0} 289 | serializedVersion: 6 290 | m_Component: 291 | - component: {fileID: 963194228} 292 | - component: {fileID: 963194227} 293 | - component: {fileID: 963194226} 294 | - component: {fileID: 963194230} 295 | - component: {fileID: 963194229} 296 | - component: {fileID: 963194231} 297 | m_Layer: 0 298 | m_Name: Main Camera 299 | m_TagString: MainCamera 300 | m_Icon: {fileID: 0} 301 | m_NavMeshLayer: 0 302 | m_StaticEditorFlags: 0 303 | m_IsActive: 1 304 | --- !u!81 &963194226 305 | AudioListener: 306 | m_ObjectHideFlags: 0 307 | m_CorrespondingSourceObject: {fileID: 0} 308 | m_PrefabInstance: {fileID: 0} 309 | m_PrefabAsset: {fileID: 0} 310 | m_GameObject: {fileID: 963194225} 311 | m_Enabled: 1 312 | --- !u!20 &963194227 313 | Camera: 314 | m_ObjectHideFlags: 0 315 | m_CorrespondingSourceObject: {fileID: 0} 316 | m_PrefabInstance: {fileID: 0} 317 | m_PrefabAsset: {fileID: 0} 318 | m_GameObject: {fileID: 963194225} 319 | m_Enabled: 1 320 | serializedVersion: 2 321 | m_ClearFlags: 1 322 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 323 | m_projectionMatrixMode: 1 324 | m_GateFitMode: 2 325 | m_FOVAxisMode: 0 326 | m_SensorSize: {x: 36, y: 24} 327 | m_LensShift: {x: 0, y: 0} 328 | m_FocalLength: 50 329 | m_NormalizedViewPortRect: 330 | serializedVersion: 2 331 | x: 0 332 | y: 0 333 | width: 1 334 | height: 1 335 | near clip plane: 0.3 336 | far clip plane: 1000 337 | field of view: 60 338 | orthographic: 0 339 | orthographic size: 5 340 | m_Depth: -1 341 | m_CullingMask: 342 | serializedVersion: 2 343 | m_Bits: 4294967295 344 | m_RenderingPath: -1 345 | m_TargetTexture: {fileID: 0} 346 | m_TargetDisplay: 0 347 | m_TargetEye: 3 348 | m_HDR: 1 349 | m_AllowMSAA: 1 350 | m_AllowDynamicResolution: 0 351 | m_ForceIntoRT: 0 352 | m_OcclusionCulling: 1 353 | m_StereoConvergence: 10 354 | m_StereoSeparation: 0.022 355 | --- !u!4 &963194228 356 | Transform: 357 | m_ObjectHideFlags: 0 358 | m_CorrespondingSourceObject: {fileID: 0} 359 | m_PrefabInstance: {fileID: 0} 360 | m_PrefabAsset: {fileID: 0} 361 | m_GameObject: {fileID: 963194225} 362 | m_LocalRotation: {x: 0.2655561, y: 0, z: 0, w: 0.9640955} 363 | m_LocalPosition: {x: 0, y: 55.4, z: -89.2} 364 | m_LocalScale: {x: 1, y: 1, z: 1} 365 | m_ConstrainProportionsScale: 0 366 | m_Children: 367 | - {fileID: 439758682} 368 | m_Father: {fileID: 0} 369 | m_RootOrder: 0 370 | m_LocalEulerAnglesHint: {x: 30.8, y: 0, z: 0} 371 | --- !u!114 &963194229 372 | MonoBehaviour: 373 | m_ObjectHideFlags: 0 374 | m_CorrespondingSourceObject: {fileID: 0} 375 | m_PrefabInstance: {fileID: 0} 376 | m_PrefabAsset: {fileID: 0} 377 | m_GameObject: {fileID: 963194225} 378 | m_Enabled: 1 379 | m_EditorHideFlags: 0 380 | m_Script: {fileID: 11500000, guid: 7632611a3bb3d1244804dcbf01056fb5, type: 3} 381 | m_Name: 382 | m_EditorClassIdentifier: 383 | numParticles: 1048576 384 | initSize: 37 385 | radius: 1 386 | gasConstant: 10 387 | restDensity: 1 388 | mass: 0.1 389 | density: 1 390 | viscosity: 0.02 391 | gravity: 10 392 | deltaTime: 0.025 393 | minBounds: {x: -50, y: 0, z: -50} 394 | maxBounds: {x: 50, y: 100, z: 50} 395 | solverShader: {fileID: 7200000, guid: f4000e3305ec3b14b8f7b31781bb32dd, type: 3} 396 | renderShader: {fileID: 4800000, guid: d422c3fc5e6461b4da80424ed4deb459, type: 3} 397 | renderMat: {fileID: 2100000, guid: 6378f3d1b6e448e41ae0a514bce49add, type: 2} 398 | particleMesh: {fileID: -5495902117074765545, guid: 32591c72e19b392408b392f27e87e875, type: 3} 399 | particleRenderSize: 0.5 400 | sphereMesh: {fileID: 289301614986012343, guid: e4bf80ccc13306e4597dd4ace78528f5, type: 3} 401 | primaryColor: {r: 0, g: 0.64705884, b: 0.92156863, a: 1} 402 | secondaryColor: {r: 0.043137256, g: 0.22745098, b: 0.50980395, a: 1} 403 | moveParticles: 10 404 | --- !u!114 &963194230 405 | MonoBehaviour: 406 | m_ObjectHideFlags: 0 407 | m_CorrespondingSourceObject: {fileID: 0} 408 | m_PrefabInstance: {fileID: 0} 409 | m_PrefabAsset: {fileID: 0} 410 | m_GameObject: {fileID: 963194225} 411 | m_Enabled: 1 412 | m_EditorHideFlags: 0 413 | m_Script: {fileID: 11500000, guid: 52e35391032640b4ab70cd956b140d49, type: 3} 414 | m_Name: 415 | m_EditorClassIdentifier: 416 | --- !u!114 &963194231 417 | MonoBehaviour: 418 | m_ObjectHideFlags: 0 419 | m_CorrespondingSourceObject: {fileID: 0} 420 | m_PrefabInstance: {fileID: 0} 421 | m_PrefabAsset: {fileID: 0} 422 | m_GameObject: {fileID: 963194225} 423 | m_Enabled: 1 424 | m_EditorHideFlags: 0 425 | m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3} 426 | m_Name: 427 | m_EditorClassIdentifier: 428 | volumeTrigger: {fileID: 963194228} 429 | volumeLayer: 430 | serializedVersion: 2 431 | m_Bits: 2147483648 432 | stopNaNPropagation: 1 433 | finalBlitToCameraTarget: 0 434 | antialiasingMode: 0 435 | temporalAntialiasing: 436 | jitterSpread: 0.75 437 | sharpness: 0.25 438 | stationaryBlending: 0.95 439 | motionBlending: 0.85 440 | subpixelMorphologicalAntialiasing: 441 | quality: 2 442 | fastApproximateAntialiasing: 443 | fastMode: 0 444 | keepAlpha: 0 445 | fog: 446 | enabled: 1 447 | excludeSkybox: 1 448 | debugLayer: 449 | lightMeter: 450 | width: 512 451 | height: 256 452 | showCurves: 1 453 | histogram: 454 | width: 512 455 | height: 256 456 | channel: 3 457 | waveform: 458 | exposure: 0.12 459 | height: 256 460 | vectorscope: 461 | size: 256 462 | exposure: 0.12 463 | overlaySettings: 464 | linearDepth: 0 465 | motionColorIntensity: 4 466 | motionGridSize: 64 467 | colorBlindnessType: 0 468 | colorBlindnessStrength: 1 469 | m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2} 470 | m_ShowToolkit: 1 471 | m_ShowCustomSorter: 1 472 | breakBeforeColorGrading: 0 473 | m_BeforeTransparentBundles: [] 474 | m_BeforeStackBundles: [] 475 | m_AfterStackBundles: [] 476 | --- !u!1 &2118514187 477 | GameObject: 478 | m_ObjectHideFlags: 0 479 | m_CorrespondingSourceObject: {fileID: 0} 480 | m_PrefabInstance: {fileID: 0} 481 | m_PrefabAsset: {fileID: 0} 482 | serializedVersion: 6 483 | m_Component: 484 | - component: {fileID: 2118514191} 485 | - component: {fileID: 2118514190} 486 | - component: {fileID: 2118514189} 487 | - component: {fileID: 2118514188} 488 | m_Layer: 0 489 | m_Name: Plane 490 | m_TagString: Untagged 491 | m_Icon: {fileID: 0} 492 | m_NavMeshLayer: 0 493 | m_StaticEditorFlags: 0 494 | m_IsActive: 1 495 | --- !u!64 &2118514188 496 | MeshCollider: 497 | m_ObjectHideFlags: 0 498 | m_CorrespondingSourceObject: {fileID: 0} 499 | m_PrefabInstance: {fileID: 0} 500 | m_PrefabAsset: {fileID: 0} 501 | m_GameObject: {fileID: 2118514187} 502 | m_Material: {fileID: 0} 503 | m_IsTrigger: 0 504 | m_Enabled: 1 505 | serializedVersion: 4 506 | m_Convex: 0 507 | m_CookingOptions: 30 508 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 509 | --- !u!23 &2118514189 510 | MeshRenderer: 511 | m_ObjectHideFlags: 0 512 | m_CorrespondingSourceObject: {fileID: 0} 513 | m_PrefabInstance: {fileID: 0} 514 | m_PrefabAsset: {fileID: 0} 515 | m_GameObject: {fileID: 2118514187} 516 | m_Enabled: 1 517 | m_CastShadows: 1 518 | m_ReceiveShadows: 1 519 | m_DynamicOccludee: 1 520 | m_StaticShadowCaster: 0 521 | m_MotionVectors: 1 522 | m_LightProbeUsage: 1 523 | m_ReflectionProbeUsage: 1 524 | m_RayTracingMode: 2 525 | m_RayTraceProcedural: 0 526 | m_RenderingLayerMask: 1 527 | m_RendererPriority: 0 528 | m_Materials: 529 | - {fileID: 2100000, guid: 7c9973d16156aab4b8fe0fb5aa92f12c, type: 2} 530 | m_StaticBatchInfo: 531 | firstSubMesh: 0 532 | subMeshCount: 0 533 | m_StaticBatchRoot: {fileID: 0} 534 | m_ProbeAnchor: {fileID: 0} 535 | m_LightProbeVolumeOverride: {fileID: 0} 536 | m_ScaleInLightmap: 1 537 | m_ReceiveGI: 1 538 | m_PreserveUVs: 0 539 | m_IgnoreNormalsForChartDetection: 0 540 | m_ImportantGI: 0 541 | m_StitchLightmapSeams: 1 542 | m_SelectedEditorRenderState: 3 543 | m_MinimumChartSize: 4 544 | m_AutoUVMaxDistance: 0.5 545 | m_AutoUVMaxAngle: 89 546 | m_LightmapParameters: {fileID: 0} 547 | m_SortingLayerID: 0 548 | m_SortingLayer: 0 549 | m_SortingOrder: 0 550 | m_AdditionalVertexStreams: {fileID: 0} 551 | --- !u!33 &2118514190 552 | MeshFilter: 553 | m_ObjectHideFlags: 0 554 | m_CorrespondingSourceObject: {fileID: 0} 555 | m_PrefabInstance: {fileID: 0} 556 | m_PrefabAsset: {fileID: 0} 557 | m_GameObject: {fileID: 2118514187} 558 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 559 | --- !u!4 &2118514191 560 | Transform: 561 | m_ObjectHideFlags: 0 562 | m_CorrespondingSourceObject: {fileID: 0} 563 | m_PrefabInstance: {fileID: 0} 564 | m_PrefabAsset: {fileID: 0} 565 | m_GameObject: {fileID: 2118514187} 566 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 567 | m_LocalPosition: {x: 0, y: 0, z: 0} 568 | m_LocalScale: {x: 5000, y: 5000, z: 5000} 569 | m_ConstrainProportionsScale: 0 570 | m_Children: [] 571 | m_Father: {fileID: 0} 572 | m_RootOrder: 2 573 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 574 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene_Profiles.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a63cf253f8a07f4a96bfde854035ebf 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene_Profiles/Post Processing Volume Profile.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 8e6292b2c06870d4495f009f912b9600, type: 3} 13 | m_Name: Post Processing Volume Profile 14 | m_EditorClassIdentifier: 15 | settings: 16 | - {fileID: 4122257627788921909} 17 | - {fileID: 2394796538322480986} 18 | - {fileID: 7350201797495872020} 19 | --- !u!114 &2394796538322480986 20 | MonoBehaviour: 21 | m_ObjectHideFlags: 3 22 | m_CorrespondingSourceObject: {fileID: 0} 23 | m_PrefabInstance: {fileID: 0} 24 | m_PrefabAsset: {fileID: 0} 25 | m_GameObject: {fileID: 0} 26 | m_Enabled: 1 27 | m_EditorHideFlags: 0 28 | m_Script: {fileID: 11500000, guid: adb84e30e02715445aeb9959894e3b4d, type: 3} 29 | m_Name: ColorGrading 30 | m_EditorClassIdentifier: 31 | active: 1 32 | enabled: 33 | overrideState: 1 34 | value: 1 35 | gradingMode: 36 | overrideState: 0 37 | value: 1 38 | externalLut: 39 | overrideState: 0 40 | value: {fileID: 0} 41 | defaultState: 1 42 | tonemapper: 43 | overrideState: 0 44 | value: 2 45 | toneCurveToeStrength: 46 | overrideState: 0 47 | value: 0 48 | toneCurveToeLength: 49 | overrideState: 0 50 | value: 0.5 51 | toneCurveShoulderStrength: 52 | overrideState: 0 53 | value: 0 54 | toneCurveShoulderLength: 55 | overrideState: 0 56 | value: 0.5 57 | toneCurveShoulderAngle: 58 | overrideState: 0 59 | value: 0 60 | toneCurveGamma: 61 | overrideState: 0 62 | value: 1 63 | ldrLut: 64 | overrideState: 0 65 | value: {fileID: 0} 66 | defaultState: 4 67 | ldrLutContribution: 68 | overrideState: 0 69 | value: 1 70 | temperature: 71 | overrideState: 1 72 | value: 10 73 | tint: 74 | overrideState: 0 75 | value: 0 76 | colorFilter: 77 | overrideState: 0 78 | value: {r: 1, g: 1, b: 1, a: 1} 79 | hueShift: 80 | overrideState: 0 81 | value: 0 82 | saturation: 83 | overrideState: 0 84 | value: 0 85 | brightness: 86 | overrideState: 0 87 | value: 0 88 | postExposure: 89 | overrideState: 0 90 | value: 0.4 91 | contrast: 92 | overrideState: 0 93 | value: 0 94 | mixerRedOutRedIn: 95 | overrideState: 0 96 | value: 100 97 | mixerRedOutGreenIn: 98 | overrideState: 0 99 | value: 0 100 | mixerRedOutBlueIn: 101 | overrideState: 0 102 | value: 0 103 | mixerGreenOutRedIn: 104 | overrideState: 0 105 | value: 0 106 | mixerGreenOutGreenIn: 107 | overrideState: 0 108 | value: 100 109 | mixerGreenOutBlueIn: 110 | overrideState: 0 111 | value: 0 112 | mixerBlueOutRedIn: 113 | overrideState: 0 114 | value: 0 115 | mixerBlueOutGreenIn: 116 | overrideState: 0 117 | value: 0 118 | mixerBlueOutBlueIn: 119 | overrideState: 0 120 | value: 100 121 | lift: 122 | overrideState: 0 123 | value: {x: 1, y: 1, z: 1, w: 0} 124 | gamma: 125 | overrideState: 0 126 | value: {x: 1, y: 1, z: 1, w: 0} 127 | gain: 128 | overrideState: 0 129 | value: {x: 1, y: 1, z: 1, w: 0} 130 | masterCurve: 131 | overrideState: 0 132 | value: 133 | curve: 134 | serializedVersion: 2 135 | m_Curve: 136 | - serializedVersion: 3 137 | time: 0 138 | value: 0 139 | inSlope: 1 140 | outSlope: 1 141 | tangentMode: 0 142 | weightedMode: 0 143 | inWeight: 0 144 | outWeight: 0 145 | - serializedVersion: 3 146 | time: 1 147 | value: 1 148 | inSlope: 1 149 | outSlope: 1 150 | tangentMode: 0 151 | weightedMode: 0 152 | inWeight: 0 153 | outWeight: 0 154 | m_PreInfinity: 2 155 | m_PostInfinity: 2 156 | m_RotationOrder: 4 157 | m_Loop: 0 158 | m_ZeroValue: 0 159 | m_Range: 1 160 | cachedData: 161 | - 0 162 | - 0.0078125 163 | - 0.015625 164 | - 0.0234375 165 | - 0.03125 166 | - 0.0390625 167 | - 0.046875 168 | - 0.0546875 169 | - 0.0625 170 | - 0.0703125 171 | - 0.078125 172 | - 0.0859375 173 | - 0.09375 174 | - 0.1015625 175 | - 0.109375 176 | - 0.1171875 177 | - 0.125 178 | - 0.1328125 179 | - 0.140625 180 | - 0.1484375 181 | - 0.15625 182 | - 0.1640625 183 | - 0.171875 184 | - 0.1796875 185 | - 0.1875 186 | - 0.1953125 187 | - 0.203125 188 | - 0.2109375 189 | - 0.21875 190 | - 0.2265625 191 | - 0.234375 192 | - 0.2421875 193 | - 0.25 194 | - 0.2578125 195 | - 0.265625 196 | - 0.2734375 197 | - 0.28125 198 | - 0.2890625 199 | - 0.296875 200 | - 0.3046875 201 | - 0.3125 202 | - 0.3203125 203 | - 0.328125 204 | - 0.3359375 205 | - 0.34375 206 | - 0.3515625 207 | - 0.359375 208 | - 0.3671875 209 | - 0.375 210 | - 0.3828125 211 | - 0.390625 212 | - 0.3984375 213 | - 0.40625 214 | - 0.4140625 215 | - 0.421875 216 | - 0.4296875 217 | - 0.4375 218 | - 0.4453125 219 | - 0.453125 220 | - 0.4609375 221 | - 0.46875 222 | - 0.4765625 223 | - 0.484375 224 | - 0.4921875 225 | - 0.5 226 | - 0.5078125 227 | - 0.515625 228 | - 0.5234375 229 | - 0.53125 230 | - 0.5390625 231 | - 0.546875 232 | - 0.5546875 233 | - 0.5625 234 | - 0.5703125 235 | - 0.578125 236 | - 0.5859375 237 | - 0.59375 238 | - 0.6015625 239 | - 0.609375 240 | - 0.6171875 241 | - 0.625 242 | - 0.6328125 243 | - 0.640625 244 | - 0.6484375 245 | - 0.65625 246 | - 0.6640625 247 | - 0.671875 248 | - 0.6796875 249 | - 0.6875 250 | - 0.6953125 251 | - 0.703125 252 | - 0.7109375 253 | - 0.71875 254 | - 0.7265625 255 | - 0.734375 256 | - 0.7421875 257 | - 0.75 258 | - 0.7578125 259 | - 0.765625 260 | - 0.7734375 261 | - 0.78125 262 | - 0.7890625 263 | - 0.796875 264 | - 0.8046875 265 | - 0.8125 266 | - 0.8203125 267 | - 0.828125 268 | - 0.8359375 269 | - 0.84375 270 | - 0.8515625 271 | - 0.859375 272 | - 0.8671875 273 | - 0.875 274 | - 0.8828125 275 | - 0.890625 276 | - 0.8984375 277 | - 0.90625 278 | - 0.9140625 279 | - 0.921875 280 | - 0.9296875 281 | - 0.9375 282 | - 0.9453125 283 | - 0.953125 284 | - 0.9609375 285 | - 0.96875 286 | - 0.9765625 287 | - 0.984375 288 | - 0.9921875 289 | redCurve: 290 | overrideState: 0 291 | value: 292 | curve: 293 | serializedVersion: 2 294 | m_Curve: 295 | - serializedVersion: 3 296 | time: 0 297 | value: 0 298 | inSlope: 1 299 | outSlope: 1 300 | tangentMode: 0 301 | weightedMode: 0 302 | inWeight: 0 303 | outWeight: 0 304 | - serializedVersion: 3 305 | time: 1 306 | value: 1 307 | inSlope: 1 308 | outSlope: 1 309 | tangentMode: 0 310 | weightedMode: 0 311 | inWeight: 0 312 | outWeight: 0 313 | m_PreInfinity: 2 314 | m_PostInfinity: 2 315 | m_RotationOrder: 4 316 | m_Loop: 0 317 | m_ZeroValue: 0 318 | m_Range: 1 319 | cachedData: 320 | - 0 321 | - 0.0078125 322 | - 0.015625 323 | - 0.0234375 324 | - 0.03125 325 | - 0.0390625 326 | - 0.046875 327 | - 0.0546875 328 | - 0.0625 329 | - 0.0703125 330 | - 0.078125 331 | - 0.0859375 332 | - 0.09375 333 | - 0.1015625 334 | - 0.109375 335 | - 0.1171875 336 | - 0.125 337 | - 0.1328125 338 | - 0.140625 339 | - 0.1484375 340 | - 0.15625 341 | - 0.1640625 342 | - 0.171875 343 | - 0.1796875 344 | - 0.1875 345 | - 0.1953125 346 | - 0.203125 347 | - 0.2109375 348 | - 0.21875 349 | - 0.2265625 350 | - 0.234375 351 | - 0.2421875 352 | - 0.25 353 | - 0.2578125 354 | - 0.265625 355 | - 0.2734375 356 | - 0.28125 357 | - 0.2890625 358 | - 0.296875 359 | - 0.3046875 360 | - 0.3125 361 | - 0.3203125 362 | - 0.328125 363 | - 0.3359375 364 | - 0.34375 365 | - 0.3515625 366 | - 0.359375 367 | - 0.3671875 368 | - 0.375 369 | - 0.3828125 370 | - 0.390625 371 | - 0.3984375 372 | - 0.40625 373 | - 0.4140625 374 | - 0.421875 375 | - 0.4296875 376 | - 0.4375 377 | - 0.4453125 378 | - 0.453125 379 | - 0.4609375 380 | - 0.46875 381 | - 0.4765625 382 | - 0.484375 383 | - 0.4921875 384 | - 0.5 385 | - 0.5078125 386 | - 0.515625 387 | - 0.5234375 388 | - 0.53125 389 | - 0.5390625 390 | - 0.546875 391 | - 0.5546875 392 | - 0.5625 393 | - 0.5703125 394 | - 0.578125 395 | - 0.5859375 396 | - 0.59375 397 | - 0.6015625 398 | - 0.609375 399 | - 0.6171875 400 | - 0.625 401 | - 0.6328125 402 | - 0.640625 403 | - 0.6484375 404 | - 0.65625 405 | - 0.6640625 406 | - 0.671875 407 | - 0.6796875 408 | - 0.6875 409 | - 0.6953125 410 | - 0.703125 411 | - 0.7109375 412 | - 0.71875 413 | - 0.7265625 414 | - 0.734375 415 | - 0.7421875 416 | - 0.75 417 | - 0.7578125 418 | - 0.765625 419 | - 0.7734375 420 | - 0.78125 421 | - 0.7890625 422 | - 0.796875 423 | - 0.8046875 424 | - 0.8125 425 | - 0.8203125 426 | - 0.828125 427 | - 0.8359375 428 | - 0.84375 429 | - 0.8515625 430 | - 0.859375 431 | - 0.8671875 432 | - 0.875 433 | - 0.8828125 434 | - 0.890625 435 | - 0.8984375 436 | - 0.90625 437 | - 0.9140625 438 | - 0.921875 439 | - 0.9296875 440 | - 0.9375 441 | - 0.9453125 442 | - 0.953125 443 | - 0.9609375 444 | - 0.96875 445 | - 0.9765625 446 | - 0.984375 447 | - 0.9921875 448 | greenCurve: 449 | overrideState: 0 450 | value: 451 | curve: 452 | serializedVersion: 2 453 | m_Curve: 454 | - serializedVersion: 3 455 | time: 0 456 | value: 0 457 | inSlope: 1 458 | outSlope: 1 459 | tangentMode: 0 460 | weightedMode: 0 461 | inWeight: 0 462 | outWeight: 0 463 | - serializedVersion: 3 464 | time: 1 465 | value: 1 466 | inSlope: 1 467 | outSlope: 1 468 | tangentMode: 0 469 | weightedMode: 0 470 | inWeight: 0 471 | outWeight: 0 472 | m_PreInfinity: 2 473 | m_PostInfinity: 2 474 | m_RotationOrder: 4 475 | m_Loop: 0 476 | m_ZeroValue: 0 477 | m_Range: 1 478 | cachedData: 479 | - 0 480 | - 0.0078125 481 | - 0.015625 482 | - 0.0234375 483 | - 0.03125 484 | - 0.0390625 485 | - 0.046875 486 | - 0.0546875 487 | - 0.0625 488 | - 0.0703125 489 | - 0.078125 490 | - 0.0859375 491 | - 0.09375 492 | - 0.1015625 493 | - 0.109375 494 | - 0.1171875 495 | - 0.125 496 | - 0.1328125 497 | - 0.140625 498 | - 0.1484375 499 | - 0.15625 500 | - 0.1640625 501 | - 0.171875 502 | - 0.1796875 503 | - 0.1875 504 | - 0.1953125 505 | - 0.203125 506 | - 0.2109375 507 | - 0.21875 508 | - 0.2265625 509 | - 0.234375 510 | - 0.2421875 511 | - 0.25 512 | - 0.2578125 513 | - 0.265625 514 | - 0.2734375 515 | - 0.28125 516 | - 0.2890625 517 | - 0.296875 518 | - 0.3046875 519 | - 0.3125 520 | - 0.3203125 521 | - 0.328125 522 | - 0.3359375 523 | - 0.34375 524 | - 0.3515625 525 | - 0.359375 526 | - 0.3671875 527 | - 0.375 528 | - 0.3828125 529 | - 0.390625 530 | - 0.3984375 531 | - 0.40625 532 | - 0.4140625 533 | - 0.421875 534 | - 0.4296875 535 | - 0.4375 536 | - 0.4453125 537 | - 0.453125 538 | - 0.4609375 539 | - 0.46875 540 | - 0.4765625 541 | - 0.484375 542 | - 0.4921875 543 | - 0.5 544 | - 0.5078125 545 | - 0.515625 546 | - 0.5234375 547 | - 0.53125 548 | - 0.5390625 549 | - 0.546875 550 | - 0.5546875 551 | - 0.5625 552 | - 0.5703125 553 | - 0.578125 554 | - 0.5859375 555 | - 0.59375 556 | - 0.6015625 557 | - 0.609375 558 | - 0.6171875 559 | - 0.625 560 | - 0.6328125 561 | - 0.640625 562 | - 0.6484375 563 | - 0.65625 564 | - 0.6640625 565 | - 0.671875 566 | - 0.6796875 567 | - 0.6875 568 | - 0.6953125 569 | - 0.703125 570 | - 0.7109375 571 | - 0.71875 572 | - 0.7265625 573 | - 0.734375 574 | - 0.7421875 575 | - 0.75 576 | - 0.7578125 577 | - 0.765625 578 | - 0.7734375 579 | - 0.78125 580 | - 0.7890625 581 | - 0.796875 582 | - 0.8046875 583 | - 0.8125 584 | - 0.8203125 585 | - 0.828125 586 | - 0.8359375 587 | - 0.84375 588 | - 0.8515625 589 | - 0.859375 590 | - 0.8671875 591 | - 0.875 592 | - 0.8828125 593 | - 0.890625 594 | - 0.8984375 595 | - 0.90625 596 | - 0.9140625 597 | - 0.921875 598 | - 0.9296875 599 | - 0.9375 600 | - 0.9453125 601 | - 0.953125 602 | - 0.9609375 603 | - 0.96875 604 | - 0.9765625 605 | - 0.984375 606 | - 0.9921875 607 | blueCurve: 608 | overrideState: 0 609 | value: 610 | curve: 611 | serializedVersion: 2 612 | m_Curve: 613 | - serializedVersion: 3 614 | time: 0 615 | value: 0 616 | inSlope: 1 617 | outSlope: 1 618 | tangentMode: 0 619 | weightedMode: 0 620 | inWeight: 0 621 | outWeight: 0 622 | - serializedVersion: 3 623 | time: 1 624 | value: 1 625 | inSlope: 1 626 | outSlope: 1 627 | tangentMode: 0 628 | weightedMode: 0 629 | inWeight: 0 630 | outWeight: 0 631 | m_PreInfinity: 2 632 | m_PostInfinity: 2 633 | m_RotationOrder: 4 634 | m_Loop: 0 635 | m_ZeroValue: 0 636 | m_Range: 1 637 | cachedData: 638 | - 0 639 | - 0.0078125 640 | - 0.015625 641 | - 0.0234375 642 | - 0.03125 643 | - 0.0390625 644 | - 0.046875 645 | - 0.0546875 646 | - 0.0625 647 | - 0.0703125 648 | - 0.078125 649 | - 0.0859375 650 | - 0.09375 651 | - 0.1015625 652 | - 0.109375 653 | - 0.1171875 654 | - 0.125 655 | - 0.1328125 656 | - 0.140625 657 | - 0.1484375 658 | - 0.15625 659 | - 0.1640625 660 | - 0.171875 661 | - 0.1796875 662 | - 0.1875 663 | - 0.1953125 664 | - 0.203125 665 | - 0.2109375 666 | - 0.21875 667 | - 0.2265625 668 | - 0.234375 669 | - 0.2421875 670 | - 0.25 671 | - 0.2578125 672 | - 0.265625 673 | - 0.2734375 674 | - 0.28125 675 | - 0.2890625 676 | - 0.296875 677 | - 0.3046875 678 | - 0.3125 679 | - 0.3203125 680 | - 0.328125 681 | - 0.3359375 682 | - 0.34375 683 | - 0.3515625 684 | - 0.359375 685 | - 0.3671875 686 | - 0.375 687 | - 0.3828125 688 | - 0.390625 689 | - 0.3984375 690 | - 0.40625 691 | - 0.4140625 692 | - 0.421875 693 | - 0.4296875 694 | - 0.4375 695 | - 0.4453125 696 | - 0.453125 697 | - 0.4609375 698 | - 0.46875 699 | - 0.4765625 700 | - 0.484375 701 | - 0.4921875 702 | - 0.5 703 | - 0.5078125 704 | - 0.515625 705 | - 0.5234375 706 | - 0.53125 707 | - 0.5390625 708 | - 0.546875 709 | - 0.5546875 710 | - 0.5625 711 | - 0.5703125 712 | - 0.578125 713 | - 0.5859375 714 | - 0.59375 715 | - 0.6015625 716 | - 0.609375 717 | - 0.6171875 718 | - 0.625 719 | - 0.6328125 720 | - 0.640625 721 | - 0.6484375 722 | - 0.65625 723 | - 0.6640625 724 | - 0.671875 725 | - 0.6796875 726 | - 0.6875 727 | - 0.6953125 728 | - 0.703125 729 | - 0.7109375 730 | - 0.71875 731 | - 0.7265625 732 | - 0.734375 733 | - 0.7421875 734 | - 0.75 735 | - 0.7578125 736 | - 0.765625 737 | - 0.7734375 738 | - 0.78125 739 | - 0.7890625 740 | - 0.796875 741 | - 0.8046875 742 | - 0.8125 743 | - 0.8203125 744 | - 0.828125 745 | - 0.8359375 746 | - 0.84375 747 | - 0.8515625 748 | - 0.859375 749 | - 0.8671875 750 | - 0.875 751 | - 0.8828125 752 | - 0.890625 753 | - 0.8984375 754 | - 0.90625 755 | - 0.9140625 756 | - 0.921875 757 | - 0.9296875 758 | - 0.9375 759 | - 0.9453125 760 | - 0.953125 761 | - 0.9609375 762 | - 0.96875 763 | - 0.9765625 764 | - 0.984375 765 | - 0.9921875 766 | hueVsHueCurve: 767 | overrideState: 0 768 | value: 769 | curve: 770 | serializedVersion: 2 771 | m_Curve: [] 772 | m_PreInfinity: 2 773 | m_PostInfinity: 2 774 | m_RotationOrder: 4 775 | m_Loop: 1 776 | m_ZeroValue: 0.5 777 | m_Range: 1 778 | cachedData: 779 | - 0.5 780 | - 0.5 781 | - 0.5 782 | - 0.5 783 | - 0.5 784 | - 0.5 785 | - 0.5 786 | - 0.5 787 | - 0.5 788 | - 0.5 789 | - 0.5 790 | - 0.5 791 | - 0.5 792 | - 0.5 793 | - 0.5 794 | - 0.5 795 | - 0.5 796 | - 0.5 797 | - 0.5 798 | - 0.5 799 | - 0.5 800 | - 0.5 801 | - 0.5 802 | - 0.5 803 | - 0.5 804 | - 0.5 805 | - 0.5 806 | - 0.5 807 | - 0.5 808 | - 0.5 809 | - 0.5 810 | - 0.5 811 | - 0.5 812 | - 0.5 813 | - 0.5 814 | - 0.5 815 | - 0.5 816 | - 0.5 817 | - 0.5 818 | - 0.5 819 | - 0.5 820 | - 0.5 821 | - 0.5 822 | - 0.5 823 | - 0.5 824 | - 0.5 825 | - 0.5 826 | - 0.5 827 | - 0.5 828 | - 0.5 829 | - 0.5 830 | - 0.5 831 | - 0.5 832 | - 0.5 833 | - 0.5 834 | - 0.5 835 | - 0.5 836 | - 0.5 837 | - 0.5 838 | - 0.5 839 | - 0.5 840 | - 0.5 841 | - 0.5 842 | - 0.5 843 | - 0.5 844 | - 0.5 845 | - 0.5 846 | - 0.5 847 | - 0.5 848 | - 0.5 849 | - 0.5 850 | - 0.5 851 | - 0.5 852 | - 0.5 853 | - 0.5 854 | - 0.5 855 | - 0.5 856 | - 0.5 857 | - 0.5 858 | - 0.5 859 | - 0.5 860 | - 0.5 861 | - 0.5 862 | - 0.5 863 | - 0.5 864 | - 0.5 865 | - 0.5 866 | - 0.5 867 | - 0.5 868 | - 0.5 869 | - 0.5 870 | - 0.5 871 | - 0.5 872 | - 0.5 873 | - 0.5 874 | - 0.5 875 | - 0.5 876 | - 0.5 877 | - 0.5 878 | - 0.5 879 | - 0.5 880 | - 0.5 881 | - 0.5 882 | - 0.5 883 | - 0.5 884 | - 0.5 885 | - 0.5 886 | - 0.5 887 | - 0.5 888 | - 0.5 889 | - 0.5 890 | - 0.5 891 | - 0.5 892 | - 0.5 893 | - 0.5 894 | - 0.5 895 | - 0.5 896 | - 0.5 897 | - 0.5 898 | - 0.5 899 | - 0.5 900 | - 0.5 901 | - 0.5 902 | - 0.5 903 | - 0.5 904 | - 0.5 905 | - 0.5 906 | - 0.5 907 | hueVsSatCurve: 908 | overrideState: 0 909 | value: 910 | curve: 911 | serializedVersion: 2 912 | m_Curve: [] 913 | m_PreInfinity: 2 914 | m_PostInfinity: 2 915 | m_RotationOrder: 4 916 | m_Loop: 1 917 | m_ZeroValue: 0.5 918 | m_Range: 1 919 | cachedData: 920 | - 0.5 921 | - 0.5 922 | - 0.5 923 | - 0.5 924 | - 0.5 925 | - 0.5 926 | - 0.5 927 | - 0.5 928 | - 0.5 929 | - 0.5 930 | - 0.5 931 | - 0.5 932 | - 0.5 933 | - 0.5 934 | - 0.5 935 | - 0.5 936 | - 0.5 937 | - 0.5 938 | - 0.5 939 | - 0.5 940 | - 0.5 941 | - 0.5 942 | - 0.5 943 | - 0.5 944 | - 0.5 945 | - 0.5 946 | - 0.5 947 | - 0.5 948 | - 0.5 949 | - 0.5 950 | - 0.5 951 | - 0.5 952 | - 0.5 953 | - 0.5 954 | - 0.5 955 | - 0.5 956 | - 0.5 957 | - 0.5 958 | - 0.5 959 | - 0.5 960 | - 0.5 961 | - 0.5 962 | - 0.5 963 | - 0.5 964 | - 0.5 965 | - 0.5 966 | - 0.5 967 | - 0.5 968 | - 0.5 969 | - 0.5 970 | - 0.5 971 | - 0.5 972 | - 0.5 973 | - 0.5 974 | - 0.5 975 | - 0.5 976 | - 0.5 977 | - 0.5 978 | - 0.5 979 | - 0.5 980 | - 0.5 981 | - 0.5 982 | - 0.5 983 | - 0.5 984 | - 0.5 985 | - 0.5 986 | - 0.5 987 | - 0.5 988 | - 0.5 989 | - 0.5 990 | - 0.5 991 | - 0.5 992 | - 0.5 993 | - 0.5 994 | - 0.5 995 | - 0.5 996 | - 0.5 997 | - 0.5 998 | - 0.5 999 | - 0.5 1000 | - 0.5 1001 | - 0.5 1002 | - 0.5 1003 | - 0.5 1004 | - 0.5 1005 | - 0.5 1006 | - 0.5 1007 | - 0.5 1008 | - 0.5 1009 | - 0.5 1010 | - 0.5 1011 | - 0.5 1012 | - 0.5 1013 | - 0.5 1014 | - 0.5 1015 | - 0.5 1016 | - 0.5 1017 | - 0.5 1018 | - 0.5 1019 | - 0.5 1020 | - 0.5 1021 | - 0.5 1022 | - 0.5 1023 | - 0.5 1024 | - 0.5 1025 | - 0.5 1026 | - 0.5 1027 | - 0.5 1028 | - 0.5 1029 | - 0.5 1030 | - 0.5 1031 | - 0.5 1032 | - 0.5 1033 | - 0.5 1034 | - 0.5 1035 | - 0.5 1036 | - 0.5 1037 | - 0.5 1038 | - 0.5 1039 | - 0.5 1040 | - 0.5 1041 | - 0.5 1042 | - 0.5 1043 | - 0.5 1044 | - 0.5 1045 | - 0.5 1046 | - 0.5 1047 | - 0.5 1048 | satVsSatCurve: 1049 | overrideState: 0 1050 | value: 1051 | curve: 1052 | serializedVersion: 2 1053 | m_Curve: [] 1054 | m_PreInfinity: 2 1055 | m_PostInfinity: 2 1056 | m_RotationOrder: 4 1057 | m_Loop: 0 1058 | m_ZeroValue: 0.5 1059 | m_Range: 1 1060 | cachedData: 1061 | - 0.5 1062 | - 0.5 1063 | - 0.5 1064 | - 0.5 1065 | - 0.5 1066 | - 0.5 1067 | - 0.5 1068 | - 0.5 1069 | - 0.5 1070 | - 0.5 1071 | - 0.5 1072 | - 0.5 1073 | - 0.5 1074 | - 0.5 1075 | - 0.5 1076 | - 0.5 1077 | - 0.5 1078 | - 0.5 1079 | - 0.5 1080 | - 0.5 1081 | - 0.5 1082 | - 0.5 1083 | - 0.5 1084 | - 0.5 1085 | - 0.5 1086 | - 0.5 1087 | - 0.5 1088 | - 0.5 1089 | - 0.5 1090 | - 0.5 1091 | - 0.5 1092 | - 0.5 1093 | - 0.5 1094 | - 0.5 1095 | - 0.5 1096 | - 0.5 1097 | - 0.5 1098 | - 0.5 1099 | - 0.5 1100 | - 0.5 1101 | - 0.5 1102 | - 0.5 1103 | - 0.5 1104 | - 0.5 1105 | - 0.5 1106 | - 0.5 1107 | - 0.5 1108 | - 0.5 1109 | - 0.5 1110 | - 0.5 1111 | - 0.5 1112 | - 0.5 1113 | - 0.5 1114 | - 0.5 1115 | - 0.5 1116 | - 0.5 1117 | - 0.5 1118 | - 0.5 1119 | - 0.5 1120 | - 0.5 1121 | - 0.5 1122 | - 0.5 1123 | - 0.5 1124 | - 0.5 1125 | - 0.5 1126 | - 0.5 1127 | - 0.5 1128 | - 0.5 1129 | - 0.5 1130 | - 0.5 1131 | - 0.5 1132 | - 0.5 1133 | - 0.5 1134 | - 0.5 1135 | - 0.5 1136 | - 0.5 1137 | - 0.5 1138 | - 0.5 1139 | - 0.5 1140 | - 0.5 1141 | - 0.5 1142 | - 0.5 1143 | - 0.5 1144 | - 0.5 1145 | - 0.5 1146 | - 0.5 1147 | - 0.5 1148 | - 0.5 1149 | - 0.5 1150 | - 0.5 1151 | - 0.5 1152 | - 0.5 1153 | - 0.5 1154 | - 0.5 1155 | - 0.5 1156 | - 0.5 1157 | - 0.5 1158 | - 0.5 1159 | - 0.5 1160 | - 0.5 1161 | - 0.5 1162 | - 0.5 1163 | - 0.5 1164 | - 0.5 1165 | - 0.5 1166 | - 0.5 1167 | - 0.5 1168 | - 0.5 1169 | - 0.5 1170 | - 0.5 1171 | - 0.5 1172 | - 0.5 1173 | - 0.5 1174 | - 0.5 1175 | - 0.5 1176 | - 0.5 1177 | - 0.5 1178 | - 0.5 1179 | - 0.5 1180 | - 0.5 1181 | - 0.5 1182 | - 0.5 1183 | - 0.5 1184 | - 0.5 1185 | - 0.5 1186 | - 0.5 1187 | - 0.5 1188 | - 0.5 1189 | lumVsSatCurve: 1190 | overrideState: 0 1191 | value: 1192 | curve: 1193 | serializedVersion: 2 1194 | m_Curve: [] 1195 | m_PreInfinity: 2 1196 | m_PostInfinity: 2 1197 | m_RotationOrder: 4 1198 | m_Loop: 0 1199 | m_ZeroValue: 0.5 1200 | m_Range: 1 1201 | cachedData: 1202 | - 0.5 1203 | - 0.5 1204 | - 0.5 1205 | - 0.5 1206 | - 0.5 1207 | - 0.5 1208 | - 0.5 1209 | - 0.5 1210 | - 0.5 1211 | - 0.5 1212 | - 0.5 1213 | - 0.5 1214 | - 0.5 1215 | - 0.5 1216 | - 0.5 1217 | - 0.5 1218 | - 0.5 1219 | - 0.5 1220 | - 0.5 1221 | - 0.5 1222 | - 0.5 1223 | - 0.5 1224 | - 0.5 1225 | - 0.5 1226 | - 0.5 1227 | - 0.5 1228 | - 0.5 1229 | - 0.5 1230 | - 0.5 1231 | - 0.5 1232 | - 0.5 1233 | - 0.5 1234 | - 0.5 1235 | - 0.5 1236 | - 0.5 1237 | - 0.5 1238 | - 0.5 1239 | - 0.5 1240 | - 0.5 1241 | - 0.5 1242 | - 0.5 1243 | - 0.5 1244 | - 0.5 1245 | - 0.5 1246 | - 0.5 1247 | - 0.5 1248 | - 0.5 1249 | - 0.5 1250 | - 0.5 1251 | - 0.5 1252 | - 0.5 1253 | - 0.5 1254 | - 0.5 1255 | - 0.5 1256 | - 0.5 1257 | - 0.5 1258 | - 0.5 1259 | - 0.5 1260 | - 0.5 1261 | - 0.5 1262 | - 0.5 1263 | - 0.5 1264 | - 0.5 1265 | - 0.5 1266 | - 0.5 1267 | - 0.5 1268 | - 0.5 1269 | - 0.5 1270 | - 0.5 1271 | - 0.5 1272 | - 0.5 1273 | - 0.5 1274 | - 0.5 1275 | - 0.5 1276 | - 0.5 1277 | - 0.5 1278 | - 0.5 1279 | - 0.5 1280 | - 0.5 1281 | - 0.5 1282 | - 0.5 1283 | - 0.5 1284 | - 0.5 1285 | - 0.5 1286 | - 0.5 1287 | - 0.5 1288 | - 0.5 1289 | - 0.5 1290 | - 0.5 1291 | - 0.5 1292 | - 0.5 1293 | - 0.5 1294 | - 0.5 1295 | - 0.5 1296 | - 0.5 1297 | - 0.5 1298 | - 0.5 1299 | - 0.5 1300 | - 0.5 1301 | - 0.5 1302 | - 0.5 1303 | - 0.5 1304 | - 0.5 1305 | - 0.5 1306 | - 0.5 1307 | - 0.5 1308 | - 0.5 1309 | - 0.5 1310 | - 0.5 1311 | - 0.5 1312 | - 0.5 1313 | - 0.5 1314 | - 0.5 1315 | - 0.5 1316 | - 0.5 1317 | - 0.5 1318 | - 0.5 1319 | - 0.5 1320 | - 0.5 1321 | - 0.5 1322 | - 0.5 1323 | - 0.5 1324 | - 0.5 1325 | - 0.5 1326 | - 0.5 1327 | - 0.5 1328 | - 0.5 1329 | - 0.5 1330 | --- !u!114 &4122257627788921909 1331 | MonoBehaviour: 1332 | m_ObjectHideFlags: 3 1333 | m_CorrespondingSourceObject: {fileID: 0} 1334 | m_PrefabInstance: {fileID: 0} 1335 | m_PrefabAsset: {fileID: 0} 1336 | m_GameObject: {fileID: 0} 1337 | m_Enabled: 1 1338 | m_EditorHideFlags: 0 1339 | m_Script: {fileID: 11500000, guid: 40b924e2dad56384a8df2a1e111bb675, type: 3} 1340 | m_Name: Vignette 1341 | m_EditorClassIdentifier: 1342 | active: 1 1343 | enabled: 1344 | overrideState: 1 1345 | value: 1 1346 | mode: 1347 | overrideState: 0 1348 | value: 0 1349 | color: 1350 | overrideState: 0 1351 | value: {r: 0, g: 0, b: 0, a: 1} 1352 | center: 1353 | overrideState: 0 1354 | value: {x: 0.5, y: 0.5} 1355 | intensity: 1356 | overrideState: 1 1357 | value: 0.33 1358 | smoothness: 1359 | overrideState: 0 1360 | value: 0.2 1361 | roundness: 1362 | overrideState: 0 1363 | value: 1 1364 | rounded: 1365 | overrideState: 0 1366 | value: 0 1367 | mask: 1368 | overrideState: 0 1369 | value: {fileID: 0} 1370 | defaultState: 1 1371 | opacity: 1372 | overrideState: 0 1373 | value: 1 1374 | --- !u!114 &7350201797495872020 1375 | MonoBehaviour: 1376 | m_ObjectHideFlags: 3 1377 | m_CorrespondingSourceObject: {fileID: 0} 1378 | m_PrefabInstance: {fileID: 0} 1379 | m_PrefabAsset: {fileID: 0} 1380 | m_GameObject: {fileID: 0} 1381 | m_Enabled: 1 1382 | m_EditorHideFlags: 0 1383 | m_Script: {fileID: 11500000, guid: 48a79b01ea5641d4aa6daa2e23605641, type: 3} 1384 | m_Name: Bloom 1385 | m_EditorClassIdentifier: 1386 | active: 1 1387 | enabled: 1388 | overrideState: 1 1389 | value: 1 1390 | intensity: 1391 | overrideState: 1 1392 | value: 1 1393 | threshold: 1394 | overrideState: 0 1395 | value: 1 1396 | softKnee: 1397 | overrideState: 0 1398 | value: 0.5 1399 | clamp: 1400 | overrideState: 0 1401 | value: 65472 1402 | diffusion: 1403 | overrideState: 0 1404 | value: 7 1405 | anamorphicRatio: 1406 | overrideState: 0 1407 | value: 0 1408 | color: 1409 | overrideState: 0 1410 | value: {r: 1, g: 1, b: 1, a: 1} 1411 | fastMode: 1412 | overrideState: 0 1413 | value: 0 1414 | dirtTexture: 1415 | overrideState: 0 1416 | value: {fileID: 0} 1417 | defaultState: 1 1418 | dirtIntensity: 1419 | overrideState: 0 1420 | value: 0 1421 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene_Profiles/Post Processing Volume Profile.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c239025c31ca253429b68a3e0f2d9cd2 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ffc3f6c28f73e346870f5b95f5e8525 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/CameraController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class CameraController : MonoBehaviour 6 | { 7 | void Update() 8 | { 9 | Camera cam = Camera.main; 10 | 11 | float speed = 20; 12 | 13 | Vector3 moveDelta = cam.transform.forward * Input.GetAxis("Vertical") + cam.transform.right * Input.GetAxis("Horizontal"); 14 | 15 | cam.transform.position += moveDelta * speed * Time.deltaTime; 16 | 17 | if (Input.GetMouseButton(1)) { 18 | float sensitivity = 7; 19 | 20 | cam.transform.Rotate(new Vector3(-Input.GetAxis("Mouse Y"), 0, 0) * sensitivity, Space.Self); 21 | cam.transform.Rotate(new Vector3(0, Input.GetAxis("Mouse X"), 0) * sensitivity, Space.World); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Assets/Scripts/CameraController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52e35391032640b4ab70cd956b140d49 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/PrefixSum.cginc: -------------------------------------------------------------------------------- 1 | #if !defined(PREFIX_SUM_ARRAY_NAME) 2 | #error "Please define PREFIX_SUM_ARRAY_NAME as a proper array name." 3 | #endif 4 | 5 | // Original array needs to be calculated. 6 | // Make its length round to THREADS. 7 | RWStructuredBuffer PREFIX_SUM_ARRAY_NAME; 8 | 9 | // Temp array with the length of ceil(length(arr) / THREADS). 10 | RWStructuredBuffer groupArr; 11 | 12 | // Make it power of two. 13 | #define THREADS 1024 14 | 15 | // Double buffered 16 | groupshared uint tmp[THREADS*2]; 17 | 18 | // Calculate prefix sum for each groups. 19 | [numthreads(THREADS,1,1)] 20 | void PrefixSum1 (uint3 id : SV_DispatchThreadID) 21 | { 22 | uint length, stride; 23 | PREFIX_SUM_ARRAY_NAME.GetDimensions(length, stride); 24 | 25 | uint localIndex = id.x & (THREADS-1); 26 | if (id.x < length) { 27 | // Copy data to groupshared memory. 28 | tmp[localIndex] = PREFIX_SUM_ARRAY_NAME[id.x]; 29 | } 30 | 31 | GroupMemoryBarrierWithGroupSync(); 32 | 33 | uint bufferIndex = 0; 34 | for (uint i = 1; i < THREADS; i <<= 1) { 35 | if (id.x < length) { 36 | if (localIndex >= i) { 37 | tmp[localIndex + (bufferIndex^1) * THREADS] = tmp[(localIndex-i) + bufferIndex * THREADS] + tmp[localIndex + bufferIndex * THREADS]; 38 | } 39 | else { 40 | tmp[localIndex + (bufferIndex^1) * THREADS] = tmp[localIndex + bufferIndex * THREADS]; 41 | } 42 | } 43 | bufferIndex ^= 1; 44 | 45 | GroupMemoryBarrierWithGroupSync(); 46 | } 47 | 48 | // Write results. 49 | if (id.x < length) { 50 | PREFIX_SUM_ARRAY_NAME[id.x] = tmp[localIndex + bufferIndex * THREADS]; 51 | } 52 | } 53 | 54 | // Calculate prefix sum for sum of each groups. 55 | [numthreads(THREADS,1,1)] 56 | void PrefixSum2 (uint3 id : SV_DispatchThreadID) 57 | { 58 | uint length, stride; 59 | groupArr.GetDimensions(length, stride); 60 | 61 | uint localIndex = id.x & (THREADS-1); 62 | if (id.x < length) { 63 | // Copy data to groupshared memory. 64 | tmp[localIndex] = PREFIX_SUM_ARRAY_NAME[id.x * THREADS + (THREADS-1)]; 65 | } 66 | 67 | GroupMemoryBarrierWithGroupSync(); 68 | 69 | uint bufferIndex = 0; 70 | for (uint i = 1; i < THREADS; i <<= 1) { 71 | if (id.x < length) { 72 | if (localIndex >= i) { 73 | tmp[localIndex + (bufferIndex^1) * THREADS] = tmp[(localIndex-i) + bufferIndex * THREADS] + tmp[localIndex + bufferIndex * THREADS]; 74 | } 75 | else { 76 | tmp[localIndex + (bufferIndex^1) * THREADS] = tmp[localIndex + bufferIndex * THREADS]; 77 | } 78 | } 79 | bufferIndex ^= 1; 80 | 81 | GroupMemoryBarrierWithGroupSync(); 82 | } 83 | 84 | // Write results. 85 | if (id.x < length) { 86 | groupArr[id.x] = tmp[localIndex + bufferIndex * THREADS]; 87 | } 88 | } 89 | 90 | // Add offset to each groups and finalize the results. 91 | [numthreads(THREADS,1,1)] 92 | void PrefixSum3 (uint3 id : SV_DispatchThreadID) 93 | { 94 | uint length, stride; 95 | PREFIX_SUM_ARRAY_NAME.GetDimensions(length, stride); 96 | 97 | if (id.x < length) { 98 | if (id.x >= THREADS) { 99 | PREFIX_SUM_ARRAY_NAME[id.x] += groupArr[id.x / THREADS - 1]; 100 | } 101 | } 102 | } -------------------------------------------------------------------------------- /Assets/Scripts/PrefixSum.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a06d26166af8be488077315e1db4bb8 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scripts/PrefixSum.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel PrefixSum1 2 | #pragma kernel PrefixSum2 3 | #pragma kernel PrefixSum3 4 | 5 | #define PREFIX_SUM_ARRAY_NAME arr 6 | 7 | #include "PrefixSum.cginc" -------------------------------------------------------------------------------- /Assets/Scripts/PrefixSum.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39c7ace557333ee4ba60a6da15ada308 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | preprocessorOverride: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/PrefixSumTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class PrefixSumTest : MonoBehaviour 6 | { 7 | public ComputeShader computeShader; 8 | 9 | void Start() 10 | { 11 | // Prepare data. 12 | int[] arr = new int[1024*1024]; 13 | 14 | for (int i = 0; i < arr.Length; i++) { 15 | arr[i] = Random.Range(0, 1024); 16 | } 17 | 18 | ComputeBuffer buffer = new ComputeBuffer(arr.Length, 4); 19 | buffer.SetData(arr); 20 | 21 | ComputeBuffer groupBuffer = new ComputeBuffer(arr.Length / 1024, 4); 22 | groupBuffer.SetData(new int[arr.Length / 1024]); 23 | 24 | for (int i = 0; i < 3; i++) { 25 | computeShader.SetBuffer(i, "arr", buffer); 26 | computeShader.SetBuffer(i, "groupArr", groupBuffer); 27 | } 28 | 29 | int[] result = new int[arr.Length]; 30 | int[] gpuResult = new int[arr.Length]; 31 | 32 | double startTime; 33 | 34 | Debug.Log("Prefix sum benchmark:"); 35 | 36 | // CPU 37 | startTime = Time.realtimeSinceStartupAsDouble; 38 | 39 | result[0] = arr[0]; 40 | for (int i = 1; i < arr.Length; i++) { 41 | result[i] = arr[i] + result[i-1]; 42 | } 43 | 44 | Debug.Log("CPU: " + Mathf.RoundToInt((float)((Time.realtimeSinceStartupAsDouble - startTime) * 1000)) + "ms."); 45 | 46 | // GPU 47 | startTime = Time.realtimeSinceStartup; 48 | 49 | computeShader.Dispatch(0, 1024, 1, 1); 50 | computeShader.Dispatch(1, 1, 1, 1); 51 | computeShader.Dispatch(2, 1024, 1, 1); 52 | 53 | buffer.GetData(gpuResult); 54 | 55 | Debug.Log("GPU: " + Mathf.RoundToInt((float)((Time.realtimeSinceStartupAsDouble - startTime) * 1000)) + "ms."); 56 | 57 | // Compare results. 58 | bool pass = true; 59 | for (int i = 0; i < arr.Length; i++) { 60 | if (result[i] != gpuResult[i]) { 61 | pass = false; 62 | // Debug.Log($"Index {i} : {result[i]} != {gpuResult[i]}"); 63 | } 64 | } 65 | 66 | Debug.Log("Equal: " + pass); 67 | 68 | buffer.Dispose(); 69 | groupBuffer.Dispose(); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Assets/Scripts/PrefixSumTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25938156b07f26947aabd8faa6f958c7 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/Sim.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel MoveParticles 2 | #pragma kernel ResetCounter 3 | #pragma kernel InsertToBucket 4 | #pragma kernel DebugHash 5 | #pragma kernel PrefixSum1 6 | #pragma kernel PrefixSum2 7 | #pragma kernel PrefixSum3 8 | #pragma kernel Sort 9 | #pragma kernel CalcHashRange 10 | #pragma kernel CalcPressure 11 | #pragma kernel CalcForces 12 | #pragma kernel CalcPCA 13 | #pragma kernel Step 14 | 15 | #define PI 3.1415926535 16 | 17 | // 2 is the optimal value, according to my experiment. 18 | // If this value is too small, the number of particles per one grid cell increases. (Inefficient) 19 | // If this value is too large, the number of grid cells to check increases. (Overhead) 20 | // Also note that, unrolling all three loops make the performance worse! (Why?) 21 | #define GRIDS_PER_DIAMETER 2 22 | 23 | float3 gridScale; 24 | float3 gridOffset; 25 | uint numHash; // Should be power of two. 26 | 27 | struct Particle { 28 | float4 pos; // with density as w component. 29 | float4 vel; // with pressure as w component. 30 | }; 31 | 32 | RWStructuredBuffer hashes; 33 | RWStructuredBuffer localIndices; 34 | RWStructuredBuffer inverseIndices; 35 | 36 | uint numParticles; 37 | 38 | float radiusSqr; 39 | float radius; 40 | float gasConst; 41 | float restDensity; 42 | float mass; 43 | float viscosity; 44 | float gravity; 45 | float deltaTime; 46 | 47 | float4 planes[7]; 48 | 49 | float poly6Coeff; 50 | float spikyCoeff; 51 | float viscoCoeff; 52 | 53 | uint moveBeginIndex; 54 | uint moveSize; 55 | float3 movePos; 56 | float3 moveVel; 57 | 58 | RWStructuredBuffer particles; 59 | RWStructuredBuffer sorted; 60 | 61 | RWStructuredBuffer forces; 62 | 63 | RWStructuredBuffer mean; 64 | RWStructuredBuffer cov; 65 | RWStructuredBuffer principle; 66 | 67 | RWStructuredBuffer hashRange; 68 | 69 | #define PREFIX_SUM_ARRAY_NAME globalHashCounter 70 | 71 | #include "PrefixSum.cginc" 72 | 73 | RWStructuredBuffer hashDebug; 74 | RWStructuredBuffer hashValueDebug; 75 | 76 | uint3 murmur_32_scramble(uint3 k) { 77 | k *= 0xcc9e2d51; 78 | k = (k << 15) | (k >> 17); 79 | k *= 0x1b873593; 80 | return k; 81 | } 82 | 83 | uint calculateHash(int3 normed) { 84 | uint h = (normed.z & 255) | ((normed.y & 15) << 8) | ((normed.x & 255) << 12); 85 | 86 | // uint h = ((normed.z & 7) << 0) | ((normed.y & 7) << 3) | ((normed.x & 7) << 6); 87 | // normed >>= 3; 88 | // h |= ((normed.z & 15) << 9) | ((normed.y & 7) << 13) | ((normed.x & 15) << 16); 89 | 90 | // Murmur3 91 | // ~27 collision 92 | // uint h = 0; // seed 93 | 94 | // uint3 scrambled = murmur_32_scramble(normed); 95 | 96 | // h ^= scrambled.x; 97 | // h = (h << 13) | (h >> 19); 98 | // h = h * 5 + 0xe6546b64U; 99 | 100 | // h ^= scrambled.y; 101 | // h = (h << 13) | (h >> 19); 102 | // h = h * 5 + 0xe6546b64U; 103 | 104 | // h ^= scrambled.z; 105 | // h = (h << 13) | (h >> 19); 106 | // h = h * 5 + 0xe6546b64U; 107 | 108 | // h &= (numHash-1); 109 | 110 | // Simple xor 111 | // ~33 collision 112 | // uint h = 73856093 * normed.x ^ 19349663 * normed.y ^ 83492791 * normed.z; 113 | // h &= (numHash-1); 114 | 115 | // FNV-1a 116 | // ~27 collision 117 | // uint h = 0x811c9dc5U; 118 | 119 | // h = h ^ ((normed.x >> 0) & 255); 120 | // h = h * 0x01000193; 121 | // h = h ^ ((normed.x >> 8) & 255); 122 | // h = h * 0x01000193; 123 | // h = h ^ ((normed.x >> 16) & 255); 124 | // h = h * 0x01000193; 125 | // h = h ^ ((normed.x >> 24) & 255); 126 | // h = h * 0x01000193; 127 | 128 | // h = h ^ ((normed.y >> 0) & 255); 129 | // h = h * 0x01000193; 130 | // h = h ^ ((normed.y >> 8) & 255); 131 | // h = h * 0x01000193; 132 | // h = h ^ ((normed.y >> 16) & 255); 133 | // h = h * 0x01000193; 134 | // h = h ^ ((normed.y >> 24) & 255); 135 | // h = h * 0x01000193; 136 | 137 | // h = h ^ ((normed.z >> 0) & 255); 138 | // h = h * 0x01000193; 139 | // h = h ^ ((normed.z >> 8) & 255); 140 | // h = h * 0x01000193; 141 | // h = h ^ ((normed.z >> 16) & 255); 142 | // h = h * 0x01000193; 143 | // h = h ^ ((normed.z >> 24) & 255); 144 | // h = h * 0x01000193; 145 | 146 | // h = h & (numHash-1); 147 | return h; 148 | } 149 | 150 | float poly6(float d) { 151 | return poly6Coeff * pow(radiusSqr - d, 3); 152 | } 153 | 154 | float spiky(float l) { 155 | return spikyCoeff * pow(radius - l, 2); 156 | } 157 | 158 | float visco(float l) { 159 | return viscoCoeff * (radius - l); 160 | } 161 | 162 | float isotropic(float d) { 163 | return 1 - pow(d / radiusSqr, 3); 164 | } 165 | 166 | #define BEGIN_FOREACH_PARTICLES \ 167 | int3 base = floor(GRIDS_PER_DIAMETER/2.0 * (pi.pos.xyz / radius - 1)); \ 168 | for (uint3 dxyz = 0; dxyz.x < (GRIDS_PER_DIAMETER+1)*(GRIDS_PER_DIAMETER+1)*(GRIDS_PER_DIAMETER+1); dxyz += uint3(1, (GRIDS_PER_DIAMETER+1), (GRIDS_PER_DIAMETER+1)*(GRIDS_PER_DIAMETER+1))) { \ 169 | uint h = calculateHash(base + int3(dxyz / ((GRIDS_PER_DIAMETER+1)*(GRIDS_PER_DIAMETER+1)) % (GRIDS_PER_DIAMETER+1))); \ 170 | uint2 range = hashRange[h]; \ 171 | for (; range.x < range.y; range.x++) { \ 172 | Particle pj = sorted[range.x]; \ 173 | float3 diff = pi.pos.xyz - pj.pos.xyz; \ 174 | float d = dot(diff, diff); \ 175 | 176 | 177 | #define END_FOREACH_PARTICLES }} 178 | 179 | [numthreads(1024,1,1)] 180 | void MoveParticles (uint3 id : SV_DispatchThreadID) 181 | { 182 | uint totalParticlesToMove = moveSize * moveSize; 183 | 184 | const float moveAreaSize = 5.0; 185 | 186 | for (uint x = 0; x < moveSize; x++) { 187 | for (uint y = 0; y < moveSize; y++) { 188 | uint idx = (moveBeginIndex + x * moveSize + y) % numParticles; 189 | 190 | particles[idx].pos.xyz = movePos + float3(x, 0, y) / moveSize * moveAreaSize - float3(1, 0, 1) * moveAreaSize * 0.5; 191 | particles[idx].vel.xyz = moveVel; 192 | 193 | forces[idx] = 0; 194 | } 195 | } 196 | } 197 | 198 | [numthreads(1024,1,1)] 199 | void ResetCounter (uint3 id : SV_DispatchThreadID) 200 | { 201 | if (id.x < numHash) { 202 | globalHashCounter[id.x] = 0; 203 | } 204 | } 205 | 206 | [numthreads(1024,1,1)] 207 | void InsertToBucket (uint3 id : SV_DispatchThreadID) 208 | { 209 | if (id.x < numParticles) { 210 | int3 normed = floor(GRIDS_PER_DIAMETER/2.0 * (particles[id.x].pos.xyz / radius)); 211 | uint h = calculateHash(normed); 212 | hashes[id.x] = h; 213 | 214 | uint localIndex; 215 | InterlockedAdd(globalHashCounter[h], 1, localIndex); 216 | 217 | localIndices[id.x] = localIndex; 218 | } 219 | } 220 | 221 | [numthreads(1024,1,1)] 222 | void DebugHash (uint3 id : SV_DispatchThreadID) 223 | { 224 | if (id.x < numHash) { 225 | if (globalHashCounter[id.x] > 0) { 226 | InterlockedAdd(hashDebug[0], 1); 227 | InterlockedMax(hashDebug[1], globalHashCounter[id.x]); 228 | } 229 | } 230 | if (id.x < numParticles) { 231 | Particle pi = sorted[id.x]; 232 | 233 | uint totalAccessCount = 0; 234 | uint neighborCount = 0; 235 | 236 | BEGIN_FOREACH_PARTICLES 237 | totalAccessCount++; 238 | if (d < radiusSqr) neighborCount++; 239 | END_FOREACH_PARTICLES 240 | 241 | InterlockedAdd(hashDebug[2], totalAccessCount); 242 | InterlockedAdd(hashDebug[3], neighborCount); 243 | 244 | int3 normed = floor(GRIDS_PER_DIAMETER/2.0 * (particles[id.x].pos.xyz / radius)); 245 | hashValueDebug[id.x] = normed; 246 | } 247 | } 248 | 249 | [numthreads(1024,1,1)] 250 | void Sort (uint3 id : SV_DispatchThreadID) 251 | { 252 | if (id.x < numParticles) { 253 | uint sortedIndex = 0; 254 | uint h = hashes[id.x]; 255 | if (h > 0) { 256 | sortedIndex += globalHashCounter[h-1]; 257 | } 258 | sortedIndex += localIndices[id.x]; 259 | 260 | sorted[sortedIndex] = particles[id.x]; 261 | 262 | inverseIndices[sortedIndex] = id.x; 263 | } 264 | } 265 | 266 | [numthreads(1024,1,1)] 267 | void CalcHashRange (uint3 id : SV_DispatchThreadID) 268 | { 269 | if (id.x < numHash) { 270 | uint begin = id.x ? globalHashCounter[id.x-1] : 0; 271 | uint end = globalHashCounter[id.x]; 272 | hashRange[id.x] = uint2(begin, end); 273 | } 274 | } 275 | 276 | [numthreads(128,1,1)] 277 | void CalcPressure (uint3 id : SV_DispatchThreadID) 278 | { 279 | if (id.x < numParticles) { 280 | Particle pi = sorted[id.x]; 281 | 282 | // float density = mass * poly6(0); 283 | float density = 0; 284 | float4 m = 0; 285 | 286 | BEGIN_FOREACH_PARTICLES 287 | [branch] if (d < radiusSqr) { 288 | density += poly6(d); 289 | m += isotropic(d) * float4(pj.pos.xyz, 1); 290 | } 291 | END_FOREACH_PARTICLES 292 | 293 | density *= mass; 294 | 295 | m.xyz /= m.w; 296 | mean[id.x] = m; 297 | 298 | sorted[id.x].pos.w = density; 299 | // Clamp negative pressure. This happens when a particle has a few neighbors. 300 | sorted[id.x].vel.w = max(gasConst * (density - restDensity), 0); 301 | } 302 | } 303 | 304 | [numthreads(128,1,1)] 305 | void CalcForces (uint3 id : SV_DispatchThreadID) 306 | { 307 | if (id.x < numParticles) { 308 | Particle pi = sorted[id.x]; 309 | 310 | float3 force = 0; 311 | 312 | float4 m = mean[id.x]; 313 | float3 cov1 = 0, cov2 = 0; 314 | uint cnt = 0; 315 | 316 | BEGIN_FOREACH_PARTICLES 317 | [branch] if (d < radiusSqr) { 318 | float l = sqrt(d); 319 | 320 | if (d > 0) { 321 | // Pressure 322 | force += (pi.vel.w + pj.vel.w) / (2*pj.pos.w * l) * spiky(l) * diff; 323 | // Viscosity 324 | force += visco(l) / pj.pos.w * (pj.vel - pi.vel); 325 | } 326 | 327 | float w = isotropic(d); 328 | float3 centered = pj.pos.xyz - m.xyz; 329 | cov1 += w * centered * centered; 330 | cov2 += w * centered.xyz * centered.yzx; 331 | cnt++; 332 | } 333 | 334 | END_FOREACH_PARTICLES 335 | 336 | // Gravity 337 | force += gravity * float3(0,-1,0); 338 | 339 | force *= mass; 340 | 341 | forces[id.x].xyz = force; 342 | 343 | cov1 /= m.w; 344 | cov2 /= m.w; 345 | 346 | // Numerical stability. 347 | cov1 = max(cov1, 0.01); 348 | 349 | mean[id.x].w = cnt; 350 | cov[id.x*2+0] = cov1; 351 | cov[id.x*2+1] = cov2; 352 | } 353 | } 354 | 355 | [numthreads(1024,1,1)] 356 | void CalcPCA(uint3 id : SV_DispatchThreadID) 357 | { 358 | float4 m = mean[id.x]; 359 | float3 cov1 = cov[id.x*2+0]; 360 | float3 cov2 = cov[id.x*2+1]; 361 | float neighborCount = m.w; 362 | // @Todo: Not enough condition. 363 | // There are still matrices that determinant are almost-zero. 364 | if (neighborCount >= 6) { 365 | float p1 = dot(cov2, cov2); 366 | float q = dot(cov1, float3(1,1,1)) / 3; 367 | float p2 = dot(cov1 - q, cov1 - q) + 2*p1; 368 | float p = sqrt(p2 / 6); 369 | 370 | float3x3 A = { 371 | cov1.x, cov2.x, cov2.z, 372 | cov2.x, cov1.y, cov2.y, 373 | cov2.z, cov2.y, cov1.z 374 | }; 375 | float3x3 B = A; 376 | B._11_22_33 -= q; 377 | B /= p; 378 | float r = determinant(B) / 2; 379 | float phi = acos(clamp(r, -1, 1)) / 3; 380 | 381 | float3 eig; 382 | eig.x = q + 2*p*cos(phi); 383 | eig.z = q + 2*p*cos(phi + (2*PI/3)); 384 | eig.y = 3 * q - eig.x - eig.z; 385 | 386 | float3x3 A1 = A; 387 | A1._11_22_33 -= eig.x; 388 | 389 | float3x3 A2 = A; 390 | A2._11_22_33 -= eig.y; 391 | 392 | float3x3 A3 = A; 393 | A3._11_22_33 -= eig.z; 394 | 395 | // Normalize 396 | A /= eig.x; 397 | 398 | // principle[id.x*4+0] = A._11_12_13; 399 | // principle[id.x*4+1] = A._21_22_23; 400 | // principle[id.x*4+2] = A._31_32_33; 401 | principle[id.x*4+3] = m.xyz; 402 | 403 | float3 va = normalize(mul(A2, A3._11_21_31)); 404 | float3 vb = normalize(mul(A1, A3._11_21_31)); 405 | 406 | // @Todo: Check if it's zero. 407 | float3x3 M = float3x3( 408 | va, 409 | eig.y / eig.x * vb, 410 | eig.z / eig.x * cross(va, vb) 411 | ); 412 | // Transpose M 413 | principle[id.x*4+0] = M._11_21_31; 414 | principle[id.x*4+1] = M._12_22_32; 415 | principle[id.x*4+2] = M._13_23_33; 416 | } 417 | else { 418 | const float dropletScale = 0.33; 419 | principle[id.x*4+0] = float3(1,0,0)*dropletScale; 420 | principle[id.x*4+1] = float3(0,1,0)*dropletScale; 421 | principle[id.x*4+2] = float3(0,0,1)*dropletScale; 422 | principle[id.x*4+3] = m.xyz; 423 | } 424 | } 425 | 426 | void checkPlane(float4 plane, inout float3 pos, inout float3 vel) { 427 | const float eps = 0.001; 428 | const float damping = 0.5; 429 | 430 | 431 | float3 planePoint; 432 | if (plane.x != 0) planePoint = float3(-plane.w / plane.x, 0, 0); 433 | else if (plane.y != 0) planePoint = float3(0, -plane.w / plane.y, 0); 434 | else planePoint = float3(0, 0, -plane.w / plane.z); 435 | 436 | float3 planeNormal = plane.xyz; 437 | 438 | float3 pointToParticle = pos - planePoint; 439 | 440 | float d = dot(planeNormal, pointToParticle); 441 | 442 | if (d < 0) { 443 | pos -= (d - eps) * planeNormal; 444 | 445 | if (dot(vel, planeNormal) < 0) { 446 | vel -= dot(vel, planeNormal) * planeNormal; 447 | } 448 | } 449 | } 450 | 451 | [numthreads(1024,1,1)] 452 | void Step (uint3 id : SV_DispatchThreadID) 453 | { 454 | if (id.x < numParticles) { 455 | Particle pi = sorted[id.x]; 456 | 457 | float3 currAcc = forces[id.x].xyz / mass; 458 | 459 | [unroll] 460 | for (uint i = 0; i < 7; i++) { 461 | if (dot(planes[i], 1) != 0) checkPlane(planes[i], pi.pos.xyz, pi.vel.xyz); 462 | } 463 | 464 | pi.vel.xyz += currAcc * deltaTime; 465 | 466 | pi.pos.xyz += pi.vel.xyz * deltaTime; 467 | 468 | // particles[inverseIndices[id.x]] = pi; 469 | particles[id.x] = pi; 470 | } 471 | } -------------------------------------------------------------------------------- /Assets/Scripts/Sim.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f4000e3305ec3b14b8f7b31781bb32dd 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | preprocessorOverride: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Solver.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.Rendering; 5 | 6 | public class Solver : MonoBehaviour 7 | { 8 | const int numHashes = 1<<20; 9 | const int numThreads = 1<<10; // Compute shader dependent value. 10 | public int numParticles = 1024; 11 | public float initSize = 10; 12 | public float radius = 1; 13 | public float gasConstant = 2000; 14 | public float restDensity = 10; 15 | public float mass = 1; 16 | public float density = 1; 17 | public float viscosity = 0.01f; 18 | public float gravity = 9.8f; 19 | public float deltaTime = 0.001f; 20 | 21 | public Vector3 minBounds = new Vector3(-10, -10, -10); 22 | public Vector3 maxBounds = new Vector3(10, 10, 10); 23 | 24 | public ComputeShader solverShader; 25 | 26 | public Shader renderShader; 27 | public Material renderMat; 28 | 29 | public Mesh particleMesh; 30 | public float particleRenderSize = 0.5f; 31 | 32 | public Mesh sphereMesh; 33 | 34 | public Color primaryColor; 35 | public Color secondaryColor; 36 | 37 | private ComputeBuffer hashesBuffer; 38 | private ComputeBuffer globalHashCounterBuffer; 39 | private ComputeBuffer localIndicesBuffer; 40 | private ComputeBuffer inverseIndicesBuffer; 41 | private ComputeBuffer particlesBuffer; 42 | private ComputeBuffer sortedBuffer; 43 | private ComputeBuffer forcesBuffer; 44 | private ComputeBuffer groupArrBuffer; 45 | private ComputeBuffer hashDebugBuffer; 46 | private ComputeBuffer hashValueDebugBuffer; 47 | private ComputeBuffer meanBuffer; 48 | private ComputeBuffer covBuffer; 49 | private ComputeBuffer principleBuffer; 50 | private ComputeBuffer hashRangeBuffer; 51 | 52 | private ComputeBuffer quadInstancedArgsBuffer; 53 | private ComputeBuffer sphereInstancedArgsBuffer; 54 | 55 | private int solverFrame = 0; 56 | 57 | private int moveParticleBeginIndex = 0; 58 | public int moveParticles = 10; 59 | 60 | private double lastFrameTimestamp = 0; 61 | private double totalFrameTime = 0; 62 | 63 | // @Temp: Just for fun. 64 | private int boundsState = 0; 65 | private float waveTime = 0; 66 | private Vector4[] boxPlanes = new Vector4[7]; 67 | private Vector4[] wavePlanes = new Vector4[7]; 68 | private Vector4[] groundPlanes = new Vector4[7]; 69 | 70 | struct Particle { 71 | public Vector4 pos; // with pressure. 72 | public Vector4 vel; 73 | } 74 | 75 | private bool paused = false; 76 | private bool usePositionSmoothing = true; 77 | 78 | private CommandBuffer commandBuffer; 79 | private Mesh screenQuadMesh; 80 | 81 | Vector4 GetPlaneEq(Vector3 p, Vector3 n) { 82 | return new Vector4(n.x, n.y, n.z, -Vector3.Dot(p, n)); 83 | } 84 | 85 | void UpdateParams() { 86 | if (Input.GetKeyDown(KeyCode.X)) { 87 | boundsState++; 88 | } 89 | 90 | Vector4[] currPlanes; 91 | switch (boundsState) { 92 | case 0: currPlanes = boxPlanes; 93 | break; 94 | 95 | case 1: currPlanes = wavePlanes; 96 | break; 97 | 98 | default: currPlanes = groundPlanes; 99 | break; 100 | } 101 | 102 | if (currPlanes == wavePlanes) { 103 | waveTime += deltaTime; 104 | } 105 | 106 | boxPlanes[0] = GetPlaneEq(new Vector3(0, 0, 0), Vector3.up); 107 | boxPlanes[1] = GetPlaneEq(new Vector3(0, 100, 0), Vector3.down); 108 | boxPlanes[2] = GetPlaneEq(new Vector3(-50, 0, 0), Vector3.right); 109 | boxPlanes[3] = GetPlaneEq(new Vector3(50, 0, 0), Vector3.left); 110 | boxPlanes[4] = GetPlaneEq(new Vector3(0, 0, -50), Vector3.forward); 111 | boxPlanes[5] = GetPlaneEq(new Vector3(0, 0, 50), Vector3.back); 112 | 113 | wavePlanes[0] = GetPlaneEq(new Vector3(0, 0, 0), Vector3.up); 114 | wavePlanes[1] = GetPlaneEq(new Vector3(0, 100, 0), Vector3.down); 115 | wavePlanes[2] = GetPlaneEq(new Vector3(-50 + Mathf.Pow(Mathf.Sin(waveTime*0.2f),8) * 25f, 0, 0), Vector3.right); 116 | wavePlanes[3] = GetPlaneEq(new Vector3(50, 0, 0), Vector3.left); 117 | wavePlanes[4] = GetPlaneEq(new Vector3(0, 0, -50), Vector3.forward); 118 | wavePlanes[5] = GetPlaneEq(new Vector3(0, 0, 50), Vector3.back); 119 | 120 | groundPlanes[0] = GetPlaneEq(new Vector3(0, 0, 0), Vector3.up); 121 | groundPlanes[1] = GetPlaneEq(new Vector3(0, 100, 0), Vector3.down); 122 | 123 | solverShader.SetVectorArray("planes", currPlanes); 124 | } 125 | 126 | void Start() { 127 | Particle[] particles = new Particle[numParticles]; 128 | 129 | // Two dam break situation. 130 | Vector3 origin1 = new Vector3( 131 | Mathf.Lerp(minBounds.x, maxBounds.x, 0.25f), 132 | minBounds.y + initSize * 0.5f, 133 | Mathf.Lerp(minBounds.z, maxBounds.z, 0.25f) 134 | ); 135 | Vector3 origin2 = new Vector3( 136 | Mathf.Lerp(minBounds.x, maxBounds.x, 0.75f), 137 | minBounds.y + initSize * 0.5f, 138 | Mathf.Lerp(minBounds.z, maxBounds.z, 0.75f) 139 | ); 140 | 141 | for (int i = 0; i < numParticles; i++) { 142 | Vector3 pos = new Vector3( 143 | Random.Range(0f, 1f) * initSize - initSize * 0.5f, 144 | Random.Range(0f, 1f) * initSize - initSize * 0.5f, 145 | Random.Range(0f, 1f) * initSize - initSize * 0.5f 146 | ); 147 | 148 | pos += (i % 2 == 0) ? origin1 : origin2; 149 | 150 | particles[i].pos = pos; 151 | } 152 | 153 | solverShader.SetInt("numHash", numHashes); 154 | solverShader.SetInt("numParticles", numParticles); 155 | 156 | solverShader.SetFloat("radiusSqr", radius * radius); 157 | solverShader.SetFloat("radius", radius); 158 | solverShader.SetFloat("gasConst", gasConstant); 159 | solverShader.SetFloat("restDensity", restDensity); 160 | solverShader.SetFloat("mass", mass); 161 | solverShader.SetFloat("viscosity", viscosity); 162 | solverShader.SetFloat("gravity", gravity); 163 | solverShader.SetFloat("deltaTime", deltaTime); 164 | 165 | float poly6 = 315f / (64f * Mathf.PI * Mathf.Pow(radius, 9f)); 166 | float spiky = 45f / (Mathf.PI * Mathf.Pow(radius, 6f)); 167 | float visco = 45f / (Mathf.PI * Mathf.Pow(radius, 6f)); 168 | 169 | solverShader.SetFloat("poly6Coeff", poly6); 170 | solverShader.SetFloat("spikyCoeff", spiky); 171 | solverShader.SetFloat("viscoCoeff", visco * viscosity); 172 | 173 | UpdateParams(); 174 | 175 | hashesBuffer = new ComputeBuffer(numParticles, 4); 176 | 177 | globalHashCounterBuffer = new ComputeBuffer(numHashes, 4); 178 | 179 | localIndicesBuffer = new ComputeBuffer(numParticles, 4); 180 | 181 | inverseIndicesBuffer = new ComputeBuffer(numParticles, 4); 182 | 183 | particlesBuffer = new ComputeBuffer(numParticles, 4 * 8); 184 | particlesBuffer.SetData(particles); 185 | 186 | sortedBuffer = new ComputeBuffer(numParticles, 4 * 8); 187 | 188 | forcesBuffer = new ComputeBuffer(numParticles * 2, 4 * 4); 189 | 190 | int groupArrLen = Mathf.CeilToInt(numHashes / 1024f); 191 | groupArrBuffer = new ComputeBuffer(groupArrLen, 4); 192 | 193 | hashDebugBuffer = new ComputeBuffer(4, 4); 194 | hashValueDebugBuffer = new ComputeBuffer(numParticles, 4 * 3); 195 | 196 | meanBuffer = new ComputeBuffer(numParticles, 4 * 4); 197 | covBuffer = new ComputeBuffer(numParticles * 2, 4 * 3); 198 | principleBuffer = new ComputeBuffer(numParticles * 4, 4 * 3); 199 | hashRangeBuffer = new ComputeBuffer(numHashes, 4 * 2); 200 | 201 | for (int i = 0; i < 13; i++) { 202 | solverShader.SetBuffer(i, "hashes", hashesBuffer); 203 | solverShader.SetBuffer(i, "globalHashCounter", globalHashCounterBuffer); 204 | solverShader.SetBuffer(i, "localIndices", localIndicesBuffer); 205 | solverShader.SetBuffer(i, "inverseIndices", inverseIndicesBuffer); 206 | solverShader.SetBuffer(i, "particles", particlesBuffer); 207 | solverShader.SetBuffer(i, "sorted", sortedBuffer); 208 | solverShader.SetBuffer(i, "forces", forcesBuffer); 209 | solverShader.SetBuffer(i, "groupArr", groupArrBuffer); 210 | solverShader.SetBuffer(i, "hashDebug", hashDebugBuffer); 211 | solverShader.SetBuffer(i, "mean", meanBuffer); 212 | solverShader.SetBuffer(i, "cov", covBuffer); 213 | solverShader.SetBuffer(i, "principle", principleBuffer); 214 | solverShader.SetBuffer(i, "hashRange", hashRangeBuffer); 215 | solverShader.SetBuffer(i, "hashValueDebug", hashValueDebugBuffer); 216 | } 217 | 218 | renderMat.SetBuffer("particles", particlesBuffer); 219 | renderMat.SetBuffer("principle", principleBuffer); 220 | renderMat.SetFloat("radius", particleRenderSize * 0.5f); 221 | 222 | quadInstancedArgsBuffer = new ComputeBuffer(1, sizeof(uint) * 5, ComputeBufferType.IndirectArguments); 223 | 224 | uint[] args = new uint[5]; 225 | args[0] = particleMesh.GetIndexCount(0); 226 | args[1] = (uint) numParticles; 227 | args[2] = particleMesh.GetIndexStart(0); 228 | args[3] = particleMesh.GetBaseVertex(0); 229 | args[4] = 0; 230 | 231 | quadInstancedArgsBuffer.SetData(args); 232 | 233 | sphereInstancedArgsBuffer = new ComputeBuffer(1, sizeof(uint) * 5, ComputeBufferType.IndirectArguments); 234 | 235 | uint[] args2 = new uint[5]; 236 | args2[0] = sphereMesh.GetIndexCount(0); 237 | args2[1] = (uint) numParticles; 238 | args2[2] = sphereMesh.GetIndexStart(0); 239 | args2[3] = sphereMesh.GetBaseVertex(0); 240 | args2[4] = 0; 241 | 242 | sphereInstancedArgsBuffer.SetData(args2); 243 | 244 | screenQuadMesh = new Mesh(); 245 | screenQuadMesh.vertices = new Vector3[4] { 246 | new Vector3( 1.0f , 1.0f, 0.0f), 247 | new Vector3(-1.0f , 1.0f, 0.0f), 248 | new Vector3(-1.0f ,-1.0f, 0.0f), 249 | new Vector3( 1.0f ,-1.0f, 0.0f), 250 | }; 251 | screenQuadMesh.uv = new Vector2[4] { 252 | new Vector2(1, 0), 253 | new Vector2(0, 0), 254 | new Vector2(0, 1), 255 | new Vector2(1, 1) 256 | }; 257 | screenQuadMesh.triangles = new int[6] { 0, 1, 2, 2, 3, 0 }; 258 | 259 | commandBuffer = new CommandBuffer(); 260 | commandBuffer.name = "Fluid Render"; 261 | 262 | UpdateCommandBuffer(); 263 | Camera.main.AddCommandBuffer(CameraEvent.AfterForwardAlpha, commandBuffer); 264 | 265 | } 266 | 267 | void Update() { 268 | // Update solver. 269 | { 270 | UpdateParams(); 271 | 272 | if (Input.GetMouseButton(0)) { 273 | Ray mouseRay = Camera.main.ScreenPointToRay(Input.mousePosition); 274 | RaycastHit hit; 275 | if (Physics.Raycast(mouseRay, out hit)) { 276 | Vector3 pos = new Vector3( 277 | Mathf.Clamp(hit.point.x, minBounds.x, maxBounds.x), 278 | maxBounds.y - 1f, 279 | Mathf.Clamp(hit.point.z, minBounds.z, maxBounds.z) 280 | ); 281 | 282 | solverShader.SetInt("moveBeginIndex", moveParticleBeginIndex); 283 | solverShader.SetInt("moveSize", moveParticles); 284 | solverShader.SetVector("movePos", pos); 285 | solverShader.SetVector("moveVel", Vector3.down * 70); 286 | 287 | solverShader.Dispatch(solverShader.FindKernel("MoveParticles"), 1, 1, 1); 288 | 289 | moveParticleBeginIndex = (moveParticleBeginIndex + moveParticles * moveParticles) % numParticles; 290 | } 291 | } 292 | 293 | if (Input.GetKeyDown(KeyCode.Space)) { 294 | paused = !paused; 295 | } 296 | 297 | if (Input.GetKeyDown(KeyCode.Z)) { 298 | usePositionSmoothing = !usePositionSmoothing; 299 | Debug.Log("usePositionSmoothing: " + usePositionSmoothing); 300 | } 301 | 302 | renderMat.SetColor("primaryColor", primaryColor.linear); 303 | renderMat.SetColor("secondaryColor", secondaryColor.linear); 304 | renderMat.SetInt("usePositionSmoothing", usePositionSmoothing ? 1 : 0); 305 | 306 | double solverStart = Time.realtimeSinceStartupAsDouble; 307 | 308 | solverShader.Dispatch(solverShader.FindKernel("ResetCounter"), Mathf.CeilToInt((float)numHashes / numThreads), 1, 1); 309 | solverShader.Dispatch(solverShader.FindKernel("InsertToBucket"), Mathf.CeilToInt((float)numParticles / numThreads), 1, 1); 310 | 311 | // Debug 312 | if (Input.GetKeyDown(KeyCode.C)) { 313 | uint[] debugResult = new uint[4]; 314 | 315 | hashDebugBuffer.SetData(debugResult); 316 | 317 | solverShader.Dispatch(solverShader.FindKernel("DebugHash"), Mathf.CeilToInt((float)numHashes / numThreads), 1, 1); 318 | 319 | hashDebugBuffer.GetData(debugResult); 320 | 321 | uint usedHashBuckets = debugResult[0]; 322 | uint maxSameHash = debugResult[1]; 323 | 324 | Debug.Log($"Total buckets: {numHashes}, Used buckets: {usedHashBuckets}, Used rate: {(float)usedHashBuckets / numHashes * 100}%"); 325 | Debug.Log($"Avg hash collision: {(float)numParticles / usedHashBuckets}, Max hash collision: {maxSameHash}"); 326 | } 327 | 328 | solverShader.Dispatch(solverShader.FindKernel("PrefixSum1"), Mathf.CeilToInt((float)numHashes / numThreads), 1, 1); 329 | 330 | // @Important: Because of the way prefix sum algorithm implemented, 331 | // Currently maximum numHashes value is numThreads^2. 332 | Debug.Assert(numHashes <= numThreads*numThreads); 333 | solverShader.Dispatch(solverShader.FindKernel("PrefixSum2"), 1, 1, 1); 334 | 335 | solverShader.Dispatch(solverShader.FindKernel("PrefixSum3"), Mathf.CeilToInt((float)numHashes / numThreads), 1, 1); 336 | solverShader.Dispatch(solverShader.FindKernel("Sort"), Mathf.CeilToInt((float)numParticles / numThreads), 1, 1); 337 | solverShader.Dispatch(solverShader.FindKernel("CalcHashRange"), Mathf.CeilToInt((float)numHashes / numThreads), 1, 1); 338 | 339 | // Debug 340 | if (Input.GetKeyDown(KeyCode.C)) { 341 | uint[] debugResult = new uint[4]; 342 | 343 | int[] values = new int[numParticles * 3]; 344 | 345 | hashDebugBuffer.SetData(debugResult); 346 | 347 | solverShader.Dispatch(solverShader.FindKernel("DebugHash"), Mathf.CeilToInt((float)numHashes / numThreads), 1, 1); 348 | 349 | hashDebugBuffer.GetData(debugResult); 350 | 351 | uint totalAccessCount = debugResult[2]; 352 | uint totalNeighborCount = debugResult[3]; 353 | 354 | Debug.Log($"Total access: {totalAccessCount}, Avg access: {(float)totalAccessCount / numParticles}, Avg accept: {(float)totalNeighborCount / numParticles}"); 355 | Debug.Log($"Average accept rate: {(float)totalNeighborCount / totalAccessCount * 100}%"); 356 | 357 | hashValueDebugBuffer.GetData(values); 358 | 359 | HashSet set = new HashSet(); 360 | for (int i = 0; i < numParticles; i++) { 361 | Vector3Int vi = new Vector3Int(values[i*3+0], values[i*3+1], values[i*3+2]); 362 | set.Add(vi); 363 | } 364 | 365 | Debug.Log($"Total unique hash keys: {set.Count}, Ideal bucket load: {(float)set.Count / numHashes * 100}%"); 366 | } 367 | 368 | if (!paused) { 369 | for (int iter = 0; iter < 1; iter++) { 370 | solverShader.Dispatch(solverShader.FindKernel("CalcPressure"), Mathf.CeilToInt((float)numParticles / 128), 1, 1); 371 | solverShader.Dispatch(solverShader.FindKernel("CalcForces"), Mathf.CeilToInt((float)numParticles / 128), 1, 1); 372 | solverShader.Dispatch(solverShader.FindKernel("CalcPCA"), Mathf.CeilToInt((float)numParticles / numThreads), 1, 1); 373 | solverShader.Dispatch(solverShader.FindKernel("Step"), Mathf.CeilToInt((float)numParticles / numThreads), 1, 1); 374 | } 375 | 376 | solverFrame++; 377 | 378 | if (solverFrame > 1) { 379 | totalFrameTime += Time.realtimeSinceStartupAsDouble - lastFrameTimestamp; 380 | } 381 | 382 | if (solverFrame == 400 || solverFrame == 1200) { 383 | Debug.Log($"Avg frame time at #{solverFrame}: {totalFrameTime / (solverFrame-1) * 1000}ms."); 384 | } 385 | } 386 | 387 | lastFrameTimestamp = Time.realtimeSinceStartupAsDouble; 388 | } 389 | } 390 | 391 | void UpdateCommandBuffer() { 392 | commandBuffer.Clear(); 393 | 394 | int[] worldPosBufferIds = new int[] { 395 | Shader.PropertyToID("worldPosBuffer1"), 396 | Shader.PropertyToID("worldPosBuffer2") 397 | }; 398 | 399 | commandBuffer.GetTemporaryRT(worldPosBufferIds[0], Screen.width, Screen.height, 0, FilterMode.Point, RenderTextureFormat.ARGBFloat); 400 | commandBuffer.GetTemporaryRT(worldPosBufferIds[1], Screen.width, Screen.height, 0, FilterMode.Point, RenderTextureFormat.ARGBFloat); 401 | 402 | int depthId = Shader.PropertyToID("depthBuffer"); 403 | commandBuffer.GetTemporaryRT(depthId, Screen.width, Screen.height, 32, FilterMode.Point, RenderTextureFormat.Depth); 404 | 405 | commandBuffer.SetRenderTarget((RenderTargetIdentifier)worldPosBufferIds[0], (RenderTargetIdentifier)depthId); 406 | commandBuffer.ClearRenderTarget(true, true, Color.clear); 407 | 408 | commandBuffer.DrawMeshInstancedIndirect( 409 | sphereMesh, 410 | 0, // submeshIndex 411 | renderMat, 412 | 0, // shaderPass 413 | sphereInstancedArgsBuffer 414 | ); 415 | 416 | int depth2Id = Shader.PropertyToID("depth2Buffer"); 417 | commandBuffer.GetTemporaryRT(depth2Id, Screen.width, Screen.height, 32, FilterMode.Point, RenderTextureFormat.Depth); 418 | 419 | commandBuffer.SetRenderTarget((RenderTargetIdentifier)worldPosBufferIds[0], (RenderTargetIdentifier)depth2Id); 420 | commandBuffer.ClearRenderTarget(true, true, Color.clear); 421 | 422 | commandBuffer.SetGlobalTexture("depthBuffer", depthId); 423 | 424 | commandBuffer.DrawMesh( 425 | screenQuadMesh, 426 | Matrix4x4.identity, 427 | renderMat, 428 | 0, // submeshIndex 429 | 1 // shaderPass 430 | ); 431 | 432 | int normalBufferId = Shader.PropertyToID("normalBuffer"); 433 | commandBuffer.GetTemporaryRT(normalBufferId, Screen.width, Screen.height, 0, FilterMode.Point, RenderTextureFormat.ARGBHalf); 434 | 435 | int colorBufferId = Shader.PropertyToID("colorBuffer"); 436 | commandBuffer.GetTemporaryRT(colorBufferId, Screen.width, Screen.height, 0, FilterMode.Point, RenderTextureFormat.RGHalf); 437 | 438 | commandBuffer.SetRenderTarget(new RenderTargetIdentifier[] { normalBufferId, colorBufferId }, (RenderTargetIdentifier)depth2Id); 439 | commandBuffer.ClearRenderTarget(false, true, Color.clear); 440 | 441 | commandBuffer.SetGlobalTexture("worldPosBuffer", worldPosBufferIds[0]); 442 | 443 | commandBuffer.DrawMeshInstancedIndirect( 444 | particleMesh, 445 | 0, // submeshIndex 446 | renderMat, 447 | 2, // shaderPass 448 | quadInstancedArgsBuffer 449 | ); 450 | 451 | commandBuffer.SetGlobalTexture("normalBuffer", normalBufferId); 452 | commandBuffer.SetGlobalTexture("colorBuffer", colorBufferId); 453 | 454 | commandBuffer.SetRenderTarget(BuiltinRenderTextureType.CameraTarget); 455 | 456 | commandBuffer.DrawMesh( 457 | screenQuadMesh, 458 | Matrix4x4.identity, 459 | renderMat, 460 | 0, // submeshIndex 461 | 3 // shaderPass 462 | ); 463 | } 464 | 465 | void LateUpdate() { 466 | Matrix4x4 view = Camera.main.worldToCameraMatrix; 467 | 468 | Shader.SetGlobalMatrix("inverseV", view.inverse); 469 | Shader.SetGlobalMatrix("inverseP", Camera.main.projectionMatrix.inverse); 470 | } 471 | 472 | void OnDisable() { 473 | hashesBuffer.Dispose(); 474 | globalHashCounterBuffer.Dispose(); 475 | localIndicesBuffer.Dispose(); 476 | inverseIndicesBuffer.Dispose(); 477 | particlesBuffer.Dispose(); 478 | sortedBuffer.Dispose(); 479 | forcesBuffer.Dispose(); 480 | groupArrBuffer.Dispose(); 481 | hashDebugBuffer.Dispose(); 482 | meanBuffer.Dispose(); 483 | covBuffer.Dispose(); 484 | principleBuffer.Dispose(); 485 | hashRangeBuffer.Dispose(); 486 | 487 | quadInstancedArgsBuffer.Dispose(); 488 | } 489 | } 490 | -------------------------------------------------------------------------------- /Assets/Scripts/Solver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7632611a3bb3d1244804dcbf01056fb5 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/Spheres.shader: -------------------------------------------------------------------------------- 1 | Shader "Spheres" 2 | { 3 | Properties 4 | { 5 | _PrimaryColor ("Primary Color", Color) = (1,1,1,1) 6 | _SecondaryColor ("Secondary Color", Color) = (1,1,1,1) 7 | _FoamColor ("Foam Color", Color) = (1,1,1,1) 8 | [HDR] _SpecularColor ("Specular Color", Color) = (1,1,1,1) 9 | _PhongExponent ("Phong Exponent", Float) = 128 10 | _EnvMap ("Environment Map", Cube) = "white" {} 11 | } 12 | SubShader 13 | { 14 | Tags { "RenderType"="Opaque" } 15 | 16 | Pass 17 | { 18 | CGPROGRAM 19 | #pragma target 4.5 20 | #pragma vertex vert 21 | #pragma fragment frag 22 | 23 | #include "UnityCG.cginc" 24 | 25 | struct Particle { 26 | float4 pos; 27 | float4 vel; 28 | }; 29 | 30 | StructuredBuffer particles; 31 | 32 | float radius; 33 | 34 | StructuredBuffer principle; 35 | 36 | int usePositionSmoothing; 37 | 38 | struct appdata 39 | { 40 | float4 vertex : POSITION; 41 | }; 42 | 43 | struct v2f 44 | { 45 | float4 vertex : SV_POSITION; 46 | }; 47 | 48 | // https://www.iquilezles.org/www/articles/spherefunctions/spherefunctions.htm 49 | float sphIntersect( float3 ro, float3 rd, float4 sph ) 50 | { 51 | float3 oc = ro - sph.xyz; 52 | float b = dot( oc, rd ); 53 | float c = dot( oc, oc ) - sph.w*sph.w; 54 | float h = b*b - c; 55 | if( h<0.0 ) return -1.0; 56 | h = sqrt( h ); 57 | return -b - h; 58 | } 59 | 60 | float invlerp(float a, float b, float t) { 61 | return (t-a)/(b-a); 62 | } 63 | 64 | v2f vert (appdata v, uint id : SV_InstanceID) 65 | { 66 | float3 spherePos = usePositionSmoothing ? principle[id*4+3] : particles[id].pos.xyz; 67 | float3 localPos = v.vertex.xyz * (radius * 2 * 2); 68 | 69 | float3x3 ellip = float3x3(principle[id*4+0], principle[id*4+1], principle[id*4+2]); 70 | 71 | float3 worldPos = mul(ellip, localPos) + spherePos; 72 | 73 | v2f o; 74 | o.vertex = mul(UNITY_MATRIX_VP, float4(worldPos, 1)); 75 | return o; 76 | } 77 | 78 | fixed4 frag (v2f i) : SV_Target 79 | { 80 | return 0; 81 | } 82 | ENDCG 83 | } 84 | 85 | Pass 86 | { 87 | ZTest Always 88 | 89 | CGPROGRAM 90 | #pragma target 4.5 91 | #pragma vertex vert 92 | #pragma fragment frag 93 | 94 | #include "UnityCG.cginc" 95 | 96 | sampler2D depthBuffer; 97 | 98 | struct appdata 99 | { 100 | float4 vertex : POSITION; 101 | float2 uv : TEXCOORD0; 102 | }; 103 | 104 | struct v2f 105 | { 106 | float4 vertex : SV_POSITION; 107 | float2 uv : TEXCOORD0; 108 | }; 109 | 110 | float4x4 inverseV, inverseP; 111 | 112 | float radius; 113 | 114 | v2f vert(appdata v) 115 | { 116 | v2f o; 117 | o.vertex = v.vertex; 118 | o.vertex.z = 0.5; 119 | o.uv = v.uv; 120 | return o; 121 | } 122 | 123 | float4 frag(v2f i, out float depth : SV_Depth) : SV_Target 124 | { 125 | float d = tex2D(depthBuffer, i.uv); 126 | 127 | depth = d; 128 | 129 | // Calculate world-space position. 130 | float3 viewSpaceRayDir = normalize(mul(inverseP, float4(i.uv*2-1, 0, 1)).xyz); 131 | float viewSpaceDistance = LinearEyeDepth(d) / dot(viewSpaceRayDir, float3(0,0,-1)); 132 | // Slightly push forward to screen. 133 | // viewSpaceDistance -= radius * 1; 134 | // viewSpaceDistance -= 0.1; 135 | 136 | float3 viewSpacePos = viewSpaceRayDir * viewSpaceDistance; 137 | float3 worldSpacePos = mul(inverseV, float4(viewSpacePos, 1)).xyz; 138 | 139 | return float4(worldSpacePos, 0); 140 | } 141 | 142 | ENDCG 143 | } 144 | 145 | Pass 146 | { 147 | ZTest Less 148 | ZWrite Off 149 | Blend One One 150 | 151 | CGPROGRAM 152 | #pragma target 4.5 153 | #pragma vertex vert 154 | #pragma fragment frag 155 | 156 | #include "UnityCG.cginc" 157 | 158 | struct Particle { 159 | float4 pos; 160 | float4 vel; 161 | }; 162 | 163 | StructuredBuffer particles; 164 | 165 | float radius; 166 | 167 | StructuredBuffer principle; 168 | 169 | int usePositionSmoothing; 170 | 171 | sampler2D worldPosBuffer; 172 | 173 | struct appdata 174 | { 175 | float4 vertex : POSITION; 176 | }; 177 | 178 | struct v2f 179 | { 180 | float4 vertex : SV_POSITION; 181 | float4 rayDir : TEXCOORD0; 182 | float3 rayOrigin: TEXCOORD1; 183 | float4 spherePos : TEXCOORD2; 184 | float2 densitySpeed : TEXCOORD3; 185 | float3 m1 : TEXCOORD4; 186 | float3 m2 : TEXCOORD5; 187 | float3 m3 : TEXCOORD6; 188 | }; 189 | 190 | struct output2 191 | { 192 | float4 normal : SV_Target0; 193 | float2 densitySpeed : SV_Target1; 194 | }; 195 | 196 | // https://www.iquilezles.org/www/articles/spherefunctions/spherefunctions.htm 197 | float sphIntersect( float3 ro, float3 rd, float4 sph ) 198 | { 199 | float3 oc = ro - sph.xyz; 200 | float b = dot( oc, rd ); 201 | float c = dot( oc, oc ) - sph.w*sph.w; 202 | float h = b*b - c; 203 | if( h<0.0 ) return -1.0; 204 | h = sqrt( h ); 205 | return -b - h; 206 | } 207 | 208 | float invlerp(float a, float b, float t) { 209 | return (t-a)/(b-a); 210 | } 211 | 212 | float3x3 inverse(float3x3 m) { 213 | float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2]; 214 | float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2]; 215 | float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2]; 216 | 217 | float b01 = a22 * a11 - a12 * a21; 218 | float b11 = -a22 * a10 + a12 * a20; 219 | float b21 = a21 * a10 - a11 * a20; 220 | 221 | float det = a00 * b01 + a01 * b11 + a02 * b21; 222 | 223 | return float3x3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11), 224 | b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10), 225 | b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det; 226 | } 227 | 228 | v2f vert (appdata v, uint id : SV_InstanceID) 229 | { 230 | float3 spherePos = usePositionSmoothing ? principle[id*4+3] : particles[id].pos.xyz; 231 | float3 localPos = v.vertex.xyz * (radius * 2 * 4); 232 | 233 | float3x3 ellip = float3x3(principle[id*4+0], principle[id*4+1], principle[id*4+2]); 234 | 235 | float3 worldPos = mul(ellip, localPos) + spherePos; 236 | 237 | ellip = inverse(ellip); 238 | 239 | float3 objectSpaceCamera = _WorldSpaceCameraPos.xyz - spherePos; 240 | objectSpaceCamera = mul(ellip, objectSpaceCamera); 241 | 242 | float3 objectSpaceDir = normalize(worldPos - _WorldSpaceCameraPos.xyz); 243 | objectSpaceDir = mul(ellip, objectSpaceDir); 244 | objectSpaceDir = normalize(objectSpaceDir); 245 | 246 | v2f o; 247 | o.vertex = mul(UNITY_MATRIX_VP, float4(worldPos, 1)); 248 | 249 | // @Temp: Actually it's screen-space uv. 250 | o.rayDir = ComputeScreenPos(o.vertex); 251 | o.rayOrigin = objectSpaceCamera; 252 | o.spherePos = float4(spherePos, particles[id].pos.w); // Add density values. 253 | 254 | // @Hardcoded: Range 255 | o.densitySpeed = saturate(float2(invlerp(0, 1, o.spherePos.w), invlerp(10, 30, length(particles[id].vel.xyz)))); 256 | 257 | o.m1 = ellip._11_12_13; 258 | o.m2 = ellip._21_22_23; 259 | o.m3 = ellip._31_32_33; 260 | return o; 261 | } 262 | 263 | output2 frag (v2f i) : SV_Target 264 | { 265 | float3x3 mInv = float3x3(i.m1, i.m2, i.m3); 266 | 267 | float2 uv = i.rayDir.xy / i.rayDir.w; 268 | float3 worldPos = tex2D(worldPosBuffer, uv).xyz; 269 | float3 ellipPos = mul(mInv, worldPos - i.spherePos.xyz); 270 | 271 | float distSqr = dot(ellipPos, ellipPos); 272 | float radiusSqr = pow(radius*4, 2); 273 | if (distSqr >= radiusSqr) discard; 274 | 275 | mInv = mul(transpose(mInv), mInv); 276 | 277 | float weight = pow(1 - distSqr / radiusSqr, 3); 278 | 279 | float3 centered = worldPos - i.spherePos.xyz; 280 | float3 grad = mul(mInv, centered) + mul(centered, mInv); 281 | float3 normal = grad * weight; 282 | 283 | output2 o; 284 | o.normal = float4(normal, weight); 285 | o.densitySpeed = float2(i.densitySpeed) * weight; 286 | 287 | return o; 288 | } 289 | ENDCG 290 | } 291 | 292 | Pass 293 | { 294 | CGPROGRAM 295 | #pragma target 4.5 296 | #pragma vertex vert 297 | #pragma fragment frag 298 | 299 | #include "UnityCG.cginc" 300 | 301 | sampler2D depthBuffer; 302 | sampler2D worldPosBuffer; 303 | sampler2D normalBuffer; 304 | sampler2D colorBuffer; 305 | samplerCUBE _EnvMap; 306 | 307 | float4 _PrimaryColor, _SecondaryColor, _FoamColor; 308 | float4 _SpecularColor; 309 | float _PhongExponent; 310 | 311 | struct appdata 312 | { 313 | float4 vertex : POSITION; 314 | float2 uv : TEXCOORD0; 315 | }; 316 | 317 | struct v2f 318 | { 319 | float4 vertex : SV_POSITION; 320 | float2 uv : TEXCOORD0; 321 | }; 322 | 323 | v2f vert(appdata v) 324 | { 325 | v2f o; 326 | o.vertex = v.vertex; 327 | o.vertex.z = 0.5; 328 | o.uv = v.uv; 329 | return o; 330 | } 331 | 332 | float4 frag(v2f i, out float depth : SV_Depth) : SV_Target 333 | { 334 | float d = tex2D(depthBuffer, i.uv); 335 | float3 worldPos = tex2D(worldPosBuffer, i.uv).xyz; 336 | float4 normal = tex2D(normalBuffer, i.uv); 337 | float2 densitySpeed = tex2D(colorBuffer, i.uv); 338 | 339 | if (d == 0) discard; 340 | 341 | if (normal.w > 0) { 342 | normal.xyz = normalize(normal.xyz); 343 | densitySpeed /= normal.w; 344 | } 345 | 346 | depth = d; 347 | 348 | float3 diffuse = lerp(_PrimaryColor, _SecondaryColor, densitySpeed.x); 349 | diffuse = lerp(diffuse, _FoamColor, densitySpeed.y); 350 | 351 | float light = max(dot(normal, _WorldSpaceLightPos0.xyz), 0); 352 | light = lerp(0.1, 1, light); 353 | 354 | float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - worldPos); 355 | float3 lightDir = _WorldSpaceLightPos0.xyz; 356 | float3 mid = normalize(viewDir + lightDir); 357 | 358 | // Specular highlight 359 | diffuse += pow(max(dot(normal, mid), 0), _PhongExponent) * _SpecularColor; 360 | 361 | float4 reflectedColor = texCUBE(_EnvMap, reflect(-viewDir, normal)); 362 | 363 | // Schlick's approximation 364 | float iorAir = 1.0; 365 | float iorWater = 1.333; 366 | float r0 = pow((iorAir - iorWater) / (iorAir + iorWater), 2); 367 | float rTheta = r0 + (1 - r0) * pow(1 - max(dot(viewDir, normal), 0), 5); 368 | 369 | diffuse = lerp(diffuse, reflectedColor, rTheta); 370 | 371 | return float4(diffuse, 1); 372 | } 373 | 374 | ENDCG 375 | } 376 | } 377 | } 378 | -------------------------------------------------------------------------------- /Assets/Scripts/Spheres.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d422c3fc5e6461b4da80424ed4deb459 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e81e30f9f5027848a9734f09346c797 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Textures/shanghai_riverside_2k.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aren227/unity-fluid-simulation/f9202a97a754f46bcb854253a9f8f9e374ee5e5c/Assets/Textures/shanghai_riverside_2k.exr -------------------------------------------------------------------------------- /Assets/Textures/shanghai_riverside_2k.exr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 728dc8f45ec6bf240a3ff67e66721746 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: 2 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 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | - serializedVersion: 3 104 | buildTarget: WebGL 105 | maxTextureSize: 2048 106 | resizeAlgorithm: 0 107 | textureFormat: -1 108 | textureCompression: 1 109 | compressionQuality: 50 110 | crunchedCompression: 0 111 | allowsAlphaSplitting: 0 112 | overridden: 0 113 | androidETC2FallbackOverride: 0 114 | forceMaximumCompressionQuality_BC6H_BC7: 0 115 | spriteSheet: 116 | serializedVersion: 2 117 | sprites: [] 118 | outline: [] 119 | physicsShape: [] 120 | bones: [] 121 | spriteID: 122 | internalID: 0 123 | vertices: [] 124 | indices: 125 | edges: [] 126 | weights: [] 127 | secondaryTextures: [] 128 | nameFileIdTable: {} 129 | spritePackingTag: 130 | pSDRemoveMatte: 0 131 | pSDShowRemoveMatteOption: 0 132 | userData: 133 | assetBundleName: 134 | assetBundleVariant: 135 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.collab-proxy": "1.17.1", 4 | "com.unity.feature.development": "1.0.1", 5 | "com.unity.ide.rider": "3.0.15", 6 | "com.unity.ide.visualstudio": "2.0.16", 7 | "com.unity.ide.vscode": "1.2.5", 8 | "com.unity.postprocessing": "3.2.2", 9 | "com.unity.recorder": "3.0.3", 10 | "com.unity.test-framework": "1.1.31", 11 | "com.unity.textmeshpro": "3.0.6", 12 | "com.unity.timeline": "1.6.4", 13 | "com.unity.ugui": "1.0.0", 14 | "com.unity.visualscripting": "1.7.8", 15 | "com.unity.modules.ai": "1.0.0", 16 | "com.unity.modules.androidjni": "1.0.0", 17 | "com.unity.modules.animation": "1.0.0", 18 | "com.unity.modules.assetbundle": "1.0.0", 19 | "com.unity.modules.audio": "1.0.0", 20 | "com.unity.modules.cloth": "1.0.0", 21 | "com.unity.modules.director": "1.0.0", 22 | "com.unity.modules.imageconversion": "1.0.0", 23 | "com.unity.modules.imgui": "1.0.0", 24 | "com.unity.modules.jsonserialize": "1.0.0", 25 | "com.unity.modules.particlesystem": "1.0.0", 26 | "com.unity.modules.physics": "1.0.0", 27 | "com.unity.modules.physics2d": "1.0.0", 28 | "com.unity.modules.screencapture": "1.0.0", 29 | "com.unity.modules.terrain": "1.0.0", 30 | "com.unity.modules.terrainphysics": "1.0.0", 31 | "com.unity.modules.tilemap": "1.0.0", 32 | "com.unity.modules.ui": "1.0.0", 33 | "com.unity.modules.uielements": "1.0.0", 34 | "com.unity.modules.umbra": "1.0.0", 35 | "com.unity.modules.unityanalytics": "1.0.0", 36 | "com.unity.modules.unitywebrequest": "1.0.0", 37 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 38 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 39 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 40 | "com.unity.modules.unitywebrequestwww": "1.0.0", 41 | "com.unity.modules.vehicles": "1.0.0", 42 | "com.unity.modules.video": "1.0.0", 43 | "com.unity.modules.vr": "1.0.0", 44 | "com.unity.modules.wind": "1.0.0", 45 | "com.unity.modules.xr": "1.0.0" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.collab-proxy": { 4 | "version": "1.17.1", 5 | "depth": 0, 6 | "source": "registry", 7 | "dependencies": { 8 | "com.unity.services.core": "1.0.1" 9 | }, 10 | "url": "https://packages.unity.com" 11 | }, 12 | "com.unity.editorcoroutines": { 13 | "version": "1.0.0", 14 | "depth": 1, 15 | "source": "registry", 16 | "dependencies": {}, 17 | "url": "https://packages.unity.com" 18 | }, 19 | "com.unity.ext.nunit": { 20 | "version": "1.0.6", 21 | "depth": 1, 22 | "source": "registry", 23 | "dependencies": {}, 24 | "url": "https://packages.unity.com" 25 | }, 26 | "com.unity.feature.development": { 27 | "version": "1.0.1", 28 | "depth": 0, 29 | "source": "builtin", 30 | "dependencies": { 31 | "com.unity.ide.visualstudio": "2.0.16", 32 | "com.unity.ide.rider": "3.0.15", 33 | "com.unity.ide.vscode": "1.2.5", 34 | "com.unity.editorcoroutines": "1.0.0", 35 | "com.unity.performance.profile-analyzer": "1.1.1", 36 | "com.unity.test-framework": "1.1.31", 37 | "com.unity.testtools.codecoverage": "1.0.1" 38 | } 39 | }, 40 | "com.unity.ide.rider": { 41 | "version": "3.0.15", 42 | "depth": 0, 43 | "source": "registry", 44 | "dependencies": { 45 | "com.unity.ext.nunit": "1.0.6" 46 | }, 47 | "url": "https://packages.unity.com" 48 | }, 49 | "com.unity.ide.visualstudio": { 50 | "version": "2.0.16", 51 | "depth": 0, 52 | "source": "registry", 53 | "dependencies": { 54 | "com.unity.test-framework": "1.1.9" 55 | }, 56 | "url": "https://packages.unity.com" 57 | }, 58 | "com.unity.ide.vscode": { 59 | "version": "1.2.5", 60 | "depth": 0, 61 | "source": "registry", 62 | "dependencies": {}, 63 | "url": "https://packages.unity.com" 64 | }, 65 | "com.unity.nuget.newtonsoft-json": { 66 | "version": "3.0.2", 67 | "depth": 2, 68 | "source": "registry", 69 | "dependencies": {}, 70 | "url": "https://packages.unity.com" 71 | }, 72 | "com.unity.performance.profile-analyzer": { 73 | "version": "1.1.1", 74 | "depth": 1, 75 | "source": "registry", 76 | "dependencies": {}, 77 | "url": "https://packages.unity.com" 78 | }, 79 | "com.unity.postprocessing": { 80 | "version": "3.2.2", 81 | "depth": 0, 82 | "source": "registry", 83 | "dependencies": { 84 | "com.unity.modules.physics": "1.0.0" 85 | }, 86 | "url": "https://packages.unity.com" 87 | }, 88 | "com.unity.recorder": { 89 | "version": "3.0.3", 90 | "depth": 0, 91 | "source": "registry", 92 | "dependencies": { 93 | "com.unity.timeline": "1.0.0" 94 | }, 95 | "url": "https://packages.unity.com" 96 | }, 97 | "com.unity.services.core": { 98 | "version": "1.4.2", 99 | "depth": 1, 100 | "source": "registry", 101 | "dependencies": { 102 | "com.unity.modules.unitywebrequest": "1.0.0", 103 | "com.unity.nuget.newtonsoft-json": "3.0.2", 104 | "com.unity.modules.androidjni": "1.0.0" 105 | }, 106 | "url": "https://packages.unity.com" 107 | }, 108 | "com.unity.settings-manager": { 109 | "version": "1.0.3", 110 | "depth": 2, 111 | "source": "registry", 112 | "dependencies": {}, 113 | "url": "https://packages.unity.com" 114 | }, 115 | "com.unity.test-framework": { 116 | "version": "1.1.31", 117 | "depth": 0, 118 | "source": "registry", 119 | "dependencies": { 120 | "com.unity.ext.nunit": "1.0.6", 121 | "com.unity.modules.imgui": "1.0.0", 122 | "com.unity.modules.jsonserialize": "1.0.0" 123 | }, 124 | "url": "https://packages.unity.com" 125 | }, 126 | "com.unity.testtools.codecoverage": { 127 | "version": "1.0.1", 128 | "depth": 1, 129 | "source": "registry", 130 | "dependencies": { 131 | "com.unity.test-framework": "1.0.16", 132 | "com.unity.settings-manager": "1.0.1" 133 | }, 134 | "url": "https://packages.unity.com" 135 | }, 136 | "com.unity.textmeshpro": { 137 | "version": "3.0.6", 138 | "depth": 0, 139 | "source": "registry", 140 | "dependencies": { 141 | "com.unity.ugui": "1.0.0" 142 | }, 143 | "url": "https://packages.unity.com" 144 | }, 145 | "com.unity.timeline": { 146 | "version": "1.6.4", 147 | "depth": 0, 148 | "source": "registry", 149 | "dependencies": { 150 | "com.unity.modules.director": "1.0.0", 151 | "com.unity.modules.animation": "1.0.0", 152 | "com.unity.modules.audio": "1.0.0", 153 | "com.unity.modules.particlesystem": "1.0.0" 154 | }, 155 | "url": "https://packages.unity.com" 156 | }, 157 | "com.unity.ugui": { 158 | "version": "1.0.0", 159 | "depth": 0, 160 | "source": "builtin", 161 | "dependencies": { 162 | "com.unity.modules.ui": "1.0.0", 163 | "com.unity.modules.imgui": "1.0.0" 164 | } 165 | }, 166 | "com.unity.visualscripting": { 167 | "version": "1.7.8", 168 | "depth": 0, 169 | "source": "registry", 170 | "dependencies": { 171 | "com.unity.ugui": "1.0.0", 172 | "com.unity.modules.jsonserialize": "1.0.0" 173 | }, 174 | "url": "https://packages.unity.com" 175 | }, 176 | "com.unity.modules.ai": { 177 | "version": "1.0.0", 178 | "depth": 0, 179 | "source": "builtin", 180 | "dependencies": {} 181 | }, 182 | "com.unity.modules.androidjni": { 183 | "version": "1.0.0", 184 | "depth": 0, 185 | "source": "builtin", 186 | "dependencies": {} 187 | }, 188 | "com.unity.modules.animation": { 189 | "version": "1.0.0", 190 | "depth": 0, 191 | "source": "builtin", 192 | "dependencies": {} 193 | }, 194 | "com.unity.modules.assetbundle": { 195 | "version": "1.0.0", 196 | "depth": 0, 197 | "source": "builtin", 198 | "dependencies": {} 199 | }, 200 | "com.unity.modules.audio": { 201 | "version": "1.0.0", 202 | "depth": 0, 203 | "source": "builtin", 204 | "dependencies": {} 205 | }, 206 | "com.unity.modules.cloth": { 207 | "version": "1.0.0", 208 | "depth": 0, 209 | "source": "builtin", 210 | "dependencies": { 211 | "com.unity.modules.physics": "1.0.0" 212 | } 213 | }, 214 | "com.unity.modules.director": { 215 | "version": "1.0.0", 216 | "depth": 0, 217 | "source": "builtin", 218 | "dependencies": { 219 | "com.unity.modules.audio": "1.0.0", 220 | "com.unity.modules.animation": "1.0.0" 221 | } 222 | }, 223 | "com.unity.modules.imageconversion": { 224 | "version": "1.0.0", 225 | "depth": 0, 226 | "source": "builtin", 227 | "dependencies": {} 228 | }, 229 | "com.unity.modules.imgui": { 230 | "version": "1.0.0", 231 | "depth": 0, 232 | "source": "builtin", 233 | "dependencies": {} 234 | }, 235 | "com.unity.modules.jsonserialize": { 236 | "version": "1.0.0", 237 | "depth": 0, 238 | "source": "builtin", 239 | "dependencies": {} 240 | }, 241 | "com.unity.modules.particlesystem": { 242 | "version": "1.0.0", 243 | "depth": 0, 244 | "source": "builtin", 245 | "dependencies": {} 246 | }, 247 | "com.unity.modules.physics": { 248 | "version": "1.0.0", 249 | "depth": 0, 250 | "source": "builtin", 251 | "dependencies": {} 252 | }, 253 | "com.unity.modules.physics2d": { 254 | "version": "1.0.0", 255 | "depth": 0, 256 | "source": "builtin", 257 | "dependencies": {} 258 | }, 259 | "com.unity.modules.screencapture": { 260 | "version": "1.0.0", 261 | "depth": 0, 262 | "source": "builtin", 263 | "dependencies": { 264 | "com.unity.modules.imageconversion": "1.0.0" 265 | } 266 | }, 267 | "com.unity.modules.subsystems": { 268 | "version": "1.0.0", 269 | "depth": 1, 270 | "source": "builtin", 271 | "dependencies": { 272 | "com.unity.modules.jsonserialize": "1.0.0" 273 | } 274 | }, 275 | "com.unity.modules.terrain": { 276 | "version": "1.0.0", 277 | "depth": 0, 278 | "source": "builtin", 279 | "dependencies": {} 280 | }, 281 | "com.unity.modules.terrainphysics": { 282 | "version": "1.0.0", 283 | "depth": 0, 284 | "source": "builtin", 285 | "dependencies": { 286 | "com.unity.modules.physics": "1.0.0", 287 | "com.unity.modules.terrain": "1.0.0" 288 | } 289 | }, 290 | "com.unity.modules.tilemap": { 291 | "version": "1.0.0", 292 | "depth": 0, 293 | "source": "builtin", 294 | "dependencies": { 295 | "com.unity.modules.physics2d": "1.0.0" 296 | } 297 | }, 298 | "com.unity.modules.ui": { 299 | "version": "1.0.0", 300 | "depth": 0, 301 | "source": "builtin", 302 | "dependencies": {} 303 | }, 304 | "com.unity.modules.uielements": { 305 | "version": "1.0.0", 306 | "depth": 0, 307 | "source": "builtin", 308 | "dependencies": { 309 | "com.unity.modules.ui": "1.0.0", 310 | "com.unity.modules.imgui": "1.0.0", 311 | "com.unity.modules.jsonserialize": "1.0.0", 312 | "com.unity.modules.uielementsnative": "1.0.0" 313 | } 314 | }, 315 | "com.unity.modules.uielementsnative": { 316 | "version": "1.0.0", 317 | "depth": 1, 318 | "source": "builtin", 319 | "dependencies": { 320 | "com.unity.modules.ui": "1.0.0", 321 | "com.unity.modules.imgui": "1.0.0", 322 | "com.unity.modules.jsonserialize": "1.0.0" 323 | } 324 | }, 325 | "com.unity.modules.umbra": { 326 | "version": "1.0.0", 327 | "depth": 0, 328 | "source": "builtin", 329 | "dependencies": {} 330 | }, 331 | "com.unity.modules.unityanalytics": { 332 | "version": "1.0.0", 333 | "depth": 0, 334 | "source": "builtin", 335 | "dependencies": { 336 | "com.unity.modules.unitywebrequest": "1.0.0", 337 | "com.unity.modules.jsonserialize": "1.0.0" 338 | } 339 | }, 340 | "com.unity.modules.unitywebrequest": { 341 | "version": "1.0.0", 342 | "depth": 0, 343 | "source": "builtin", 344 | "dependencies": {} 345 | }, 346 | "com.unity.modules.unitywebrequestassetbundle": { 347 | "version": "1.0.0", 348 | "depth": 0, 349 | "source": "builtin", 350 | "dependencies": { 351 | "com.unity.modules.assetbundle": "1.0.0", 352 | "com.unity.modules.unitywebrequest": "1.0.0" 353 | } 354 | }, 355 | "com.unity.modules.unitywebrequestaudio": { 356 | "version": "1.0.0", 357 | "depth": 0, 358 | "source": "builtin", 359 | "dependencies": { 360 | "com.unity.modules.unitywebrequest": "1.0.0", 361 | "com.unity.modules.audio": "1.0.0" 362 | } 363 | }, 364 | "com.unity.modules.unitywebrequesttexture": { 365 | "version": "1.0.0", 366 | "depth": 0, 367 | "source": "builtin", 368 | "dependencies": { 369 | "com.unity.modules.unitywebrequest": "1.0.0", 370 | "com.unity.modules.imageconversion": "1.0.0" 371 | } 372 | }, 373 | "com.unity.modules.unitywebrequestwww": { 374 | "version": "1.0.0", 375 | "depth": 0, 376 | "source": "builtin", 377 | "dependencies": { 378 | "com.unity.modules.unitywebrequest": "1.0.0", 379 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 380 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 381 | "com.unity.modules.audio": "1.0.0", 382 | "com.unity.modules.assetbundle": "1.0.0", 383 | "com.unity.modules.imageconversion": "1.0.0" 384 | } 385 | }, 386 | "com.unity.modules.vehicles": { 387 | "version": "1.0.0", 388 | "depth": 0, 389 | "source": "builtin", 390 | "dependencies": { 391 | "com.unity.modules.physics": "1.0.0" 392 | } 393 | }, 394 | "com.unity.modules.video": { 395 | "version": "1.0.0", 396 | "depth": 0, 397 | "source": "builtin", 398 | "dependencies": { 399 | "com.unity.modules.audio": "1.0.0", 400 | "com.unity.modules.ui": "1.0.0", 401 | "com.unity.modules.unitywebrequest": "1.0.0" 402 | } 403 | }, 404 | "com.unity.modules.vr": { 405 | "version": "1.0.0", 406 | "depth": 0, 407 | "source": "builtin", 408 | "dependencies": { 409 | "com.unity.modules.jsonserialize": "1.0.0", 410 | "com.unity.modules.physics": "1.0.0", 411 | "com.unity.modules.xr": "1.0.0" 412 | } 413 | }, 414 | "com.unity.modules.wind": { 415 | "version": "1.0.0", 416 | "depth": 0, 417 | "source": "builtin", 418 | "dependencies": {} 419 | }, 420 | "com.unity.modules.xr": { 421 | "version": "1.0.0", 422 | "depth": 0, 423 | "source": "builtin", 424 | "dependencies": { 425 | "com.unity.modules.physics": "1.0.0", 426 | "com.unity.modules.jsonserialize": "1.0.0", 427 | "com.unity.modules.subsystems": "1.0.0" 428 | } 429 | } 430 | } 431 | } 432 | -------------------------------------------------------------------------------- /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 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /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_SerializationMode: 2 8 | m_LineEndingsForNewScripts: 0 9 | m_DefaultBehaviorMode: 0 10 | m_PrefabRegularEnvironment: {fileID: 0} 11 | m_PrefabUIEnvironment: {fileID: 0} 12 | m_SpritePackerMode: 0 13 | m_SpritePackerPaddingPower: 1 14 | m_Bc7TextureCompressor: 0 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_EnableTextureStreamingInEditMode: 1 22 | m_EnableTextureStreamingInPlayMode: 1 23 | m_AsyncShaderCompilation: 1 24 | m_CachingShaderPreprocessor: 1 25 | m_PrefabModeAllowAutoSave: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_GameObjectNamingDigits: 1 29 | m_GameObjectNamingScheme: 0 30 | m_AssetNamingUsesSpace: 1 31 | m_UseLegacyProbeSampleCount: 0 32 | m_SerializeInlineMappingsOnOneLine: 1 33 | m_DisableCookiesInLightmapper: 0 34 | m_AssetPipelineMode: 1 35 | m_RefreshImportMode: 0 36 | m_CacheServerMode: 0 37 | m_CacheServerEndpoint: 38 | m_CacheServerNamespacePrefix: default 39 | m_CacheServerEnableDownload: 1 40 | m_CacheServerEnableUpload: 1 41 | m_CacheServerEnableAuth: 0 42 | m_CacheServerEnableTls: 0 43 | m_CacheServerValidationMode: 2 44 | -------------------------------------------------------------------------------- /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: 9bd19c8db8a8a72419439a66cd83c04e 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: Fluid sim 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1920 46 | defaultScreenHeight: 1080 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 1 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: 1 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.Fluid-sim 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_BuildTargetVRSettings: 336 | - m_BuildTarget: Standalone 337 | m_Enabled: 0 338 | m_Devices: 339 | - Oculus 340 | - OpenVR 341 | openGLRequireES31: 0 342 | openGLRequireES31AEP: 0 343 | openGLRequireES32: 0 344 | m_TemplateCustomTags: {} 345 | mobileMTRendering: 346 | Android: 1 347 | iPhone: 1 348 | tvOS: 1 349 | m_BuildTargetGroupLightmapEncodingQuality: 350 | - m_BuildTarget: Android 351 | m_EncodingQuality: 1 352 | - m_BuildTarget: iPhone 353 | m_EncodingQuality: 1 354 | - m_BuildTarget: tvOS 355 | m_EncodingQuality: 1 356 | m_BuildTargetGroupLightmapSettings: [] 357 | m_BuildTargetNormalMapEncoding: 358 | - m_BuildTarget: Android 359 | m_Encoding: 1 360 | - m_BuildTarget: iPhone 361 | m_Encoding: 1 362 | - m_BuildTarget: tvOS 363 | m_Encoding: 1 364 | m_BuildTargetDefaultTextureCompressionFormat: 365 | - m_BuildTarget: Android 366 | m_Format: 3 367 | playModeTestRunnerEnabled: 0 368 | runPlayModeTestAsEditModeTest: 0 369 | actionOnDotNetUnhandledException: 1 370 | enableInternalProfiler: 0 371 | logObjCUncaughtExceptions: 1 372 | enableCrashReportAPI: 0 373 | cameraUsageDescription: 374 | locationUsageDescription: 375 | microphoneUsageDescription: 376 | bluetoothUsageDescription: 377 | switchNMETAOverride: 378 | switchNetLibKey: 379 | switchSocketMemoryPoolSize: 6144 380 | switchSocketAllocatorPoolSize: 128 381 | switchSocketConcurrencyLimit: 14 382 | switchScreenResolutionBehavior: 2 383 | switchUseCPUProfiler: 0 384 | switchUseGOLDLinker: 0 385 | switchLTOSetting: 0 386 | switchApplicationID: 0x01004b9000490000 387 | switchNSODependencies: 388 | switchTitleNames_0: 389 | switchTitleNames_1: 390 | switchTitleNames_2: 391 | switchTitleNames_3: 392 | switchTitleNames_4: 393 | switchTitleNames_5: 394 | switchTitleNames_6: 395 | switchTitleNames_7: 396 | switchTitleNames_8: 397 | switchTitleNames_9: 398 | switchTitleNames_10: 399 | switchTitleNames_11: 400 | switchTitleNames_12: 401 | switchTitleNames_13: 402 | switchTitleNames_14: 403 | switchTitleNames_15: 404 | switchPublisherNames_0: 405 | switchPublisherNames_1: 406 | switchPublisherNames_2: 407 | switchPublisherNames_3: 408 | switchPublisherNames_4: 409 | switchPublisherNames_5: 410 | switchPublisherNames_6: 411 | switchPublisherNames_7: 412 | switchPublisherNames_8: 413 | switchPublisherNames_9: 414 | switchPublisherNames_10: 415 | switchPublisherNames_11: 416 | switchPublisherNames_12: 417 | switchPublisherNames_13: 418 | switchPublisherNames_14: 419 | switchPublisherNames_15: 420 | switchIcons_0: {fileID: 0} 421 | switchIcons_1: {fileID: 0} 422 | switchIcons_2: {fileID: 0} 423 | switchIcons_3: {fileID: 0} 424 | switchIcons_4: {fileID: 0} 425 | switchIcons_5: {fileID: 0} 426 | switchIcons_6: {fileID: 0} 427 | switchIcons_7: {fileID: 0} 428 | switchIcons_8: {fileID: 0} 429 | switchIcons_9: {fileID: 0} 430 | switchIcons_10: {fileID: 0} 431 | switchIcons_11: {fileID: 0} 432 | switchIcons_12: {fileID: 0} 433 | switchIcons_13: {fileID: 0} 434 | switchIcons_14: {fileID: 0} 435 | switchIcons_15: {fileID: 0} 436 | switchSmallIcons_0: {fileID: 0} 437 | switchSmallIcons_1: {fileID: 0} 438 | switchSmallIcons_2: {fileID: 0} 439 | switchSmallIcons_3: {fileID: 0} 440 | switchSmallIcons_4: {fileID: 0} 441 | switchSmallIcons_5: {fileID: 0} 442 | switchSmallIcons_6: {fileID: 0} 443 | switchSmallIcons_7: {fileID: 0} 444 | switchSmallIcons_8: {fileID: 0} 445 | switchSmallIcons_9: {fileID: 0} 446 | switchSmallIcons_10: {fileID: 0} 447 | switchSmallIcons_11: {fileID: 0} 448 | switchSmallIcons_12: {fileID: 0} 449 | switchSmallIcons_13: {fileID: 0} 450 | switchSmallIcons_14: {fileID: 0} 451 | switchSmallIcons_15: {fileID: 0} 452 | switchManualHTML: 453 | switchAccessibleURLs: 454 | switchLegalInformation: 455 | switchMainThreadStackSize: 1048576 456 | switchPresenceGroupId: 457 | switchLogoHandling: 0 458 | switchReleaseVersion: 0 459 | switchDisplayVersion: 1.0.0 460 | switchStartupUserAccount: 0 461 | switchTouchScreenUsage: 0 462 | switchSupportedLanguagesMask: 0 463 | switchLogoType: 0 464 | switchApplicationErrorCodeCategory: 465 | switchUserAccountSaveDataSize: 0 466 | switchUserAccountSaveDataJournalSize: 0 467 | switchApplicationAttribute: 0 468 | switchCardSpecSize: -1 469 | switchCardSpecClock: -1 470 | switchRatingsMask: 0 471 | switchRatingsInt_0: 0 472 | switchRatingsInt_1: 0 473 | switchRatingsInt_2: 0 474 | switchRatingsInt_3: 0 475 | switchRatingsInt_4: 0 476 | switchRatingsInt_5: 0 477 | switchRatingsInt_6: 0 478 | switchRatingsInt_7: 0 479 | switchRatingsInt_8: 0 480 | switchRatingsInt_9: 0 481 | switchRatingsInt_10: 0 482 | switchRatingsInt_11: 0 483 | switchRatingsInt_12: 0 484 | switchLocalCommunicationIds_0: 485 | switchLocalCommunicationIds_1: 486 | switchLocalCommunicationIds_2: 487 | switchLocalCommunicationIds_3: 488 | switchLocalCommunicationIds_4: 489 | switchLocalCommunicationIds_5: 490 | switchLocalCommunicationIds_6: 491 | switchLocalCommunicationIds_7: 492 | switchParentalControl: 0 493 | switchAllowsScreenshot: 1 494 | switchAllowsVideoCapturing: 1 495 | switchAllowsRuntimeAddOnContentInstall: 0 496 | switchDataLossConfirmation: 0 497 | switchUserAccountLockEnabled: 0 498 | switchSystemResourceMemory: 16777216 499 | switchSupportedNpadStyles: 22 500 | switchNativeFsCacheSize: 32 501 | switchIsHoldTypeHorizontal: 0 502 | switchSupportedNpadCount: 8 503 | switchSocketConfigEnabled: 0 504 | switchTcpInitialSendBufferSize: 32 505 | switchTcpInitialReceiveBufferSize: 64 506 | switchTcpAutoSendBufferSizeMax: 256 507 | switchTcpAutoReceiveBufferSizeMax: 256 508 | switchUdpSendBufferSize: 9 509 | switchUdpReceiveBufferSize: 42 510 | switchSocketBufferEfficiency: 4 511 | switchSocketInitializeEnabled: 1 512 | switchNetworkInterfaceManagerInitializeEnabled: 1 513 | switchPlayerConnectionEnabled: 1 514 | switchUseNewStyleFilepaths: 0 515 | switchUseMicroSleepForYield: 1 516 | switchEnableRamDiskSupport: 0 517 | switchMicroSleepForYieldTime: 25 518 | switchRamDiskSpaceSize: 12 519 | ps4NPAgeRating: 12 520 | ps4NPTitleSecret: 521 | ps4NPTrophyPackPath: 522 | ps4ParentalLevel: 11 523 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 524 | ps4Category: 0 525 | ps4MasterVersion: 01.00 526 | ps4AppVersion: 01.00 527 | ps4AppType: 0 528 | ps4ParamSfxPath: 529 | ps4VideoOutPixelFormat: 0 530 | ps4VideoOutInitialWidth: 1920 531 | ps4VideoOutBaseModeInitialWidth: 1920 532 | ps4VideoOutReprojectionRate: 60 533 | ps4PronunciationXMLPath: 534 | ps4PronunciationSIGPath: 535 | ps4BackgroundImagePath: 536 | ps4StartupImagePath: 537 | ps4StartupImagesFolder: 538 | ps4IconImagesFolder: 539 | ps4SaveDataImagePath: 540 | ps4SdkOverride: 541 | ps4BGMPath: 542 | ps4ShareFilePath: 543 | ps4ShareOverlayImagePath: 544 | ps4PrivacyGuardImagePath: 545 | ps4ExtraSceSysFile: 546 | ps4NPtitleDatPath: 547 | ps4RemotePlayKeyAssignment: -1 548 | ps4RemotePlayKeyMappingDir: 549 | ps4PlayTogetherPlayerCount: 0 550 | ps4EnterButtonAssignment: 1 551 | ps4ApplicationParam1: 0 552 | ps4ApplicationParam2: 0 553 | ps4ApplicationParam3: 0 554 | ps4ApplicationParam4: 0 555 | ps4DownloadDataSize: 0 556 | ps4GarlicHeapSize: 2048 557 | ps4ProGarlicHeapSize: 2560 558 | playerPrefsMaxSize: 32768 559 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 560 | ps4pnSessions: 1 561 | ps4pnPresence: 1 562 | ps4pnFriends: 1 563 | ps4pnGameCustomData: 1 564 | playerPrefsSupport: 0 565 | enableApplicationExit: 0 566 | resetTempFolder: 1 567 | restrictedAudioUsageRights: 0 568 | ps4UseResolutionFallback: 0 569 | ps4ReprojectionSupport: 0 570 | ps4UseAudio3dBackend: 0 571 | ps4UseLowGarlicFragmentationMode: 1 572 | ps4SocialScreenEnabled: 0 573 | ps4ScriptOptimizationLevel: 0 574 | ps4Audio3dVirtualSpeakerCount: 14 575 | ps4attribCpuUsage: 0 576 | ps4PatchPkgPath: 577 | ps4PatchLatestPkgPath: 578 | ps4PatchChangeinfoPath: 579 | ps4PatchDayOne: 0 580 | ps4attribUserManagement: 0 581 | ps4attribMoveSupport: 0 582 | ps4attrib3DSupport: 0 583 | ps4attribShareSupport: 0 584 | ps4attribExclusiveVR: 0 585 | ps4disableAutoHideSplash: 0 586 | ps4videoRecordingFeaturesUsed: 0 587 | ps4contentSearchFeaturesUsed: 0 588 | ps4CompatibilityPS5: 0 589 | ps4AllowPS5Detection: 0 590 | ps4GPU800MHz: 1 591 | ps4attribEyeToEyeDistanceSettingVR: 0 592 | ps4IncludedModules: [] 593 | ps4attribVROutputEnabled: 0 594 | monoEnv: 595 | splashScreenBackgroundSourceLandscape: {fileID: 0} 596 | splashScreenBackgroundSourcePortrait: {fileID: 0} 597 | blurSplashScreenBackground: 1 598 | spritePackerPolicy: 599 | webGLMemorySize: 16 600 | webGLExceptionSupport: 1 601 | webGLNameFilesAsHashes: 0 602 | webGLDataCaching: 1 603 | webGLDebugSymbols: 0 604 | webGLEmscriptenArgs: 605 | webGLModulesDirectory: 606 | webGLTemplate: APPLICATION:Default 607 | webGLAnalyzeBuildSize: 0 608 | webGLUseEmbeddedResources: 0 609 | webGLCompressionFormat: 1 610 | webGLWasmArithmeticExceptions: 0 611 | webGLLinkerTarget: 1 612 | webGLThreadsSupport: 0 613 | webGLDecompressionFallback: 0 614 | scriptingDefineSymbols: 615 | Android: UNITY_POST_PROCESSING_STACK_V2 616 | CloudRendering: UNITY_POST_PROCESSING_STACK_V2 617 | EmbeddedLinux: UNITY_POST_PROCESSING_STACK_V2 618 | GameCoreXboxOne: UNITY_POST_PROCESSING_STACK_V2 619 | Lumin: UNITY_POST_PROCESSING_STACK_V2 620 | Nintendo Switch: UNITY_POST_PROCESSING_STACK_V2 621 | PS4: UNITY_POST_PROCESSING_STACK_V2 622 | PS5: UNITY_POST_PROCESSING_STACK_V2 623 | Stadia: UNITY_POST_PROCESSING_STACK_V2 624 | Standalone: UNITY_POST_PROCESSING_STACK_V2 625 | WebGL: UNITY_POST_PROCESSING_STACK_V2 626 | Windows Store Apps: UNITY_POST_PROCESSING_STACK_V2 627 | XboxOne: UNITY_POST_PROCESSING_STACK_V2 628 | tvOS: UNITY_POST_PROCESSING_STACK_V2 629 | additionalCompilerArguments: {} 630 | platformArchitecture: {} 631 | scriptingBackend: {} 632 | il2cppCompilerConfiguration: {} 633 | managedStrippingLevel: {} 634 | incrementalIl2cppBuild: {} 635 | suppressCommonWarnings: 1 636 | allowUnsafeCode: 0 637 | useDeterministicCompilation: 1 638 | enableRoslynAnalyzers: 1 639 | additionalIl2CppArgs: 640 | scriptingRuntimeVersion: 1 641 | gcIncremental: 1 642 | assemblyVersionValidation: 1 643 | gcWBarrierValidation: 0 644 | apiCompatibilityLevelPerPlatform: {} 645 | m_RenderingPath: 1 646 | m_MobileRenderingPath: 1 647 | metroPackageName: Template_3D 648 | metroPackageVersion: 649 | metroCertificatePath: 650 | metroCertificatePassword: 651 | metroCertificateSubject: 652 | metroCertificateIssuer: 653 | metroCertificateNotAfter: 0000000000000000 654 | metroApplicationDescription: Template_3D 655 | wsaImages: {} 656 | metroTileShortName: 657 | metroTileShowName: 0 658 | metroMediumTileShowName: 0 659 | metroLargeTileShowName: 0 660 | metroWideTileShowName: 0 661 | metroSupportStreamingInstall: 0 662 | metroLastRequiredScene: 0 663 | metroDefaultTileSize: 1 664 | metroTileForegroundText: 2 665 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 666 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 667 | metroSplashScreenUseBackgroundColor: 0 668 | platformCapabilities: {} 669 | metroTargetDeviceFamilies: {} 670 | metroFTAName: 671 | metroFTAFileTypes: [] 672 | metroProtocolName: 673 | vcxProjDefaultLanguage: 674 | XboxOneProductId: 675 | XboxOneUpdateKey: 676 | XboxOneSandboxId: 677 | XboxOneContentId: 678 | XboxOneTitleId: 679 | XboxOneSCId: 680 | XboxOneGameOsOverridePath: 681 | XboxOnePackagingOverridePath: 682 | XboxOneAppManifestOverridePath: 683 | XboxOneVersion: 1.0.0.0 684 | XboxOnePackageEncryption: 0 685 | XboxOnePackageUpdateGranularity: 2 686 | XboxOneDescription: 687 | XboxOneLanguage: 688 | - enus 689 | XboxOneCapability: [] 690 | XboxOneGameRating: {} 691 | XboxOneIsContentPackage: 0 692 | XboxOneEnhancedXboxCompatibilityMode: 0 693 | XboxOneEnableGPUVariability: 1 694 | XboxOneSockets: {} 695 | XboxOneSplashScreen: {fileID: 0} 696 | XboxOneAllowedProductIds: [] 697 | XboxOnePersistentLocalStorageSize: 0 698 | XboxOneXTitleMemory: 8 699 | XboxOneOverrideIdentityName: 700 | XboxOneOverrideIdentityPublisher: 701 | vrEditorSettings: {} 702 | cloudServicesEnabled: 703 | UNet: 1 704 | luminIcon: 705 | m_Name: 706 | m_ModelFolderPath: 707 | m_PortalFolderPath: 708 | luminCert: 709 | m_CertPath: 710 | m_SignPackage: 1 711 | luminIsChannelApp: 0 712 | luminVersion: 713 | m_VersionCode: 1 714 | m_VersionName: 715 | apiCompatibilityLevel: 6 716 | activeInputHandler: 0 717 | cloudProjectId: 718 | framebufferDepthMemorylessMode: 0 719 | qualitySettingsNames: [] 720 | projectName: 721 | organizationId: 722 | cloudEnabled: 0 723 | legacyClampBlendShapeWeights: 0 724 | playerDataPath: 725 | forceSRGBBlit: 1 726 | virtualTexturingSupportEnabled: 0 727 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2021.3.7f1 2 | m_EditorVersionWithRevision: 2021.3.7f1 (24e8595d6d43) 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 | blendWeights: 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 | excludedTargetPlatforms: [] 44 | - serializedVersion: 2 45 | name: Low 46 | pixelLightCount: 0 47 | shadows: 0 48 | shadowResolution: 0 49 | shadowProjection: 1 50 | shadowCascades: 1 51 | shadowDistance: 20 52 | shadowNearPlaneOffset: 3 53 | shadowCascade2Split: 0.33333334 54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 55 | shadowmaskMode: 0 56 | blendWeights: 2 57 | textureQuality: 0 58 | anisotropicTextures: 0 59 | antiAliasing: 0 60 | softParticles: 0 61 | softVegetation: 0 62 | realtimeReflectionProbes: 0 63 | billboardsFaceCameraPosition: 0 64 | vSyncCount: 0 65 | lodBias: 0.4 66 | maximumLODLevel: 0 67 | streamingMipmapsActive: 0 68 | streamingMipmapsAddAllCameras: 1 69 | streamingMipmapsMemoryBudget: 512 70 | streamingMipmapsRenderersPerFrame: 512 71 | streamingMipmapsMaxLevelReduction: 2 72 | streamingMipmapsMaxFileIORequests: 1024 73 | particleRaycastBudget: 16 74 | asyncUploadTimeSlice: 2 75 | asyncUploadBufferSize: 16 76 | asyncUploadPersistentBuffer: 1 77 | resolutionScalingFixedDPIFactor: 1 78 | excludedTargetPlatforms: [] 79 | - serializedVersion: 2 80 | name: Medium 81 | pixelLightCount: 1 82 | shadows: 1 83 | shadowResolution: 0 84 | shadowProjection: 1 85 | shadowCascades: 1 86 | shadowDistance: 20 87 | shadowNearPlaneOffset: 3 88 | shadowCascade2Split: 0.33333334 89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 90 | shadowmaskMode: 0 91 | blendWeights: 2 92 | textureQuality: 0 93 | anisotropicTextures: 1 94 | antiAliasing: 0 95 | softParticles: 0 96 | softVegetation: 0 97 | realtimeReflectionProbes: 0 98 | billboardsFaceCameraPosition: 0 99 | vSyncCount: 1 100 | lodBias: 0.7 101 | maximumLODLevel: 0 102 | streamingMipmapsActive: 0 103 | streamingMipmapsAddAllCameras: 1 104 | streamingMipmapsMemoryBudget: 512 105 | streamingMipmapsRenderersPerFrame: 512 106 | streamingMipmapsMaxLevelReduction: 2 107 | streamingMipmapsMaxFileIORequests: 1024 108 | particleRaycastBudget: 64 109 | asyncUploadTimeSlice: 2 110 | asyncUploadBufferSize: 16 111 | asyncUploadPersistentBuffer: 1 112 | resolutionScalingFixedDPIFactor: 1 113 | excludedTargetPlatforms: [] 114 | - serializedVersion: 2 115 | name: High 116 | pixelLightCount: 2 117 | shadows: 2 118 | shadowResolution: 1 119 | shadowProjection: 1 120 | shadowCascades: 2 121 | shadowDistance: 40 122 | shadowNearPlaneOffset: 3 123 | shadowCascade2Split: 0.33333334 124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 125 | shadowmaskMode: 1 126 | blendWeights: 2 127 | textureQuality: 0 128 | anisotropicTextures: 1 129 | antiAliasing: 0 130 | softParticles: 0 131 | softVegetation: 1 132 | realtimeReflectionProbes: 1 133 | billboardsFaceCameraPosition: 1 134 | vSyncCount: 1 135 | lodBias: 1 136 | maximumLODLevel: 0 137 | streamingMipmapsActive: 0 138 | streamingMipmapsAddAllCameras: 1 139 | streamingMipmapsMemoryBudget: 512 140 | streamingMipmapsRenderersPerFrame: 512 141 | streamingMipmapsMaxLevelReduction: 2 142 | streamingMipmapsMaxFileIORequests: 1024 143 | particleRaycastBudget: 256 144 | asyncUploadTimeSlice: 2 145 | asyncUploadBufferSize: 16 146 | asyncUploadPersistentBuffer: 1 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Very High 151 | pixelLightCount: 3 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 2 156 | shadowDistance: 70 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 1.5 171 | maximumLODLevel: 0 172 | streamingMipmapsActive: 0 173 | streamingMipmapsAddAllCameras: 1 174 | streamingMipmapsMemoryBudget: 512 175 | streamingMipmapsRenderersPerFrame: 512 176 | streamingMipmapsMaxLevelReduction: 2 177 | streamingMipmapsMaxFileIORequests: 1024 178 | particleRaycastBudget: 1024 179 | asyncUploadTimeSlice: 2 180 | asyncUploadBufferSize: 16 181 | asyncUploadPersistentBuffer: 1 182 | resolutionScalingFixedDPIFactor: 1 183 | excludedTargetPlatforms: [] 184 | - serializedVersion: 2 185 | name: Ultra 186 | pixelLightCount: 4 187 | shadows: 2 188 | shadowResolution: 2 189 | shadowProjection: 1 190 | shadowCascades: 4 191 | shadowDistance: 150 192 | shadowNearPlaneOffset: 3 193 | shadowCascade2Split: 0.33333334 194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 195 | shadowmaskMode: 1 196 | blendWeights: 4 197 | textureQuality: 0 198 | anisotropicTextures: 2 199 | antiAliasing: 2 200 | softParticles: 1 201 | softVegetation: 1 202 | realtimeReflectionProbes: 1 203 | billboardsFaceCameraPosition: 1 204 | vSyncCount: 1 205 | lodBias: 2 206 | maximumLODLevel: 0 207 | streamingMipmapsActive: 0 208 | streamingMipmapsAddAllCameras: 1 209 | streamingMipmapsMemoryBudget: 512 210 | streamingMipmapsRenderersPerFrame: 512 211 | streamingMipmapsMaxLevelReduction: 2 212 | streamingMipmapsMaxFileIORequests: 1024 213 | particleRaycastBudget: 4096 214 | asyncUploadTimeSlice: 2 215 | asyncUploadBufferSize: 16 216 | asyncUploadPersistentBuffer: 1 217 | resolutionScalingFixedDPIFactor: 1 218 | excludedTargetPlatforms: [] 219 | m_PerPlatformDefaultQuality: 220 | Android: 2 221 | Lumin: 5 222 | Nintendo 3DS: 5 223 | Nintendo Switch: 5 224 | PS4: 5 225 | PSP2: 2 226 | Stadia: 5 227 | Standalone: 5 228 | WebGL: 3 229 | Windows Store Apps: 5 230 | XboxOne: 5 231 | iPhone: 2 232 | tvOS: 2 233 | -------------------------------------------------------------------------------- /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 | - Post Processing Volume 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/aren227/unity-fluid-simulation/f9202a97a754f46bcb854253a9f8f9e374ee5e5c/ProjectSettings/boot.config -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # unity-fluid-simulation 2 | ![image_004_0485](https://user-images.githubusercontent.com/14082448/197345770-a1151a75-f811-428e-898b-a0d6d5938acb.png) 3 | Real-time fluid simulation in unity. 4 | 5 | ## Features 6 | - Based on Smoothed-particle hydrodynamics method. 7 | - Runs entirely on GPU. 8 | - Handles up to one million particles. 9 | - Uses counting sort to speed-up neighbor searching. 10 | - Implementing surface extraction techniques proposed by Yu and Turk. 11 | - Performs normal smoothing to make the surface more realistic while avoiding expensive isosurface extraction algorithms. 12 | - Basic water shading 13 | 14 | ## Demo Video 15 | https://youtu.be/s-cDYtNfsl4 16 | 17 | One million particles simulated in real-time. ~40 fps with GTX 1070 Ti. 18 | 19 | ## References 20 | - M. Müller, D. Charypar and M. Gross. Particlebased fluid simulation for interactive applications. 2003. 21 | - J. Yu and G. Turk. Reconstructing Surfaces of Particle-Based Fluids Using Anisotropic Kernels. 2010. 22 | - Rama C. Hoetzlein. Fast Fixed-Radius Nearest Neighbor Search on the GPU. 2014. 23 | --------------------------------------------------------------------------------