├── .gitignore ├── Assets ├── Compute Shaders.meta ├── Compute Shaders │ ├── ParallelReduce.compute │ ├── ParallelReduce.compute.meta │ ├── UpdateParticles.compute │ └── UpdateParticles.compute.meta ├── Scenes.meta ├── Scenes │ ├── SampleScene.unity │ └── SampleScene.unity.meta ├── Scripts.meta ├── Scripts │ ├── AffineTransformations.cs │ ├── AffineTransformations.cs.meta │ ├── AttractorPresets.cs │ ├── AttractorPresets.cs.meta │ ├── Capturer.cs │ ├── Capturer.cs.meta │ ├── ChaosGame.cs │ ├── ChaosGame.cs.meta │ ├── IteratedFunctionSystem.cs │ ├── IteratedFunctionSystem.cs.meta │ ├── ProceduralWizard.cs │ ├── ProceduralWizard.cs.meta │ ├── SetBlender.cs │ ├── SetBlender.cs.meta │ ├── SimpleCameraController.cs │ ├── SimpleCameraController.cs.meta │ ├── TransformSet.cs │ └── TransformSet.cs.meta ├── Shaders.meta └── Shaders │ ├── DebugParticle.shader │ ├── DebugParticle.shader.meta │ ├── InstancedParticle.shader │ ├── InstancedParticle.shader.meta │ ├── Particle.shader │ ├── Particle.shader.meta │ ├── Voxel.shader │ └── Voxel.shader.meta ├── Examples ├── f17.png └── flagship.png ├── 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 └── UserSettings ├── EditorUserSettings.asset ├── Layouts └── default-2021.dwlt └── Search.settings /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Ll]ogs/ 3 | /[Pp]ackages/ 4 | /[Tt]emp/ 5 | /[Oo]bj/ 6 | /[Bb]uild/ 7 | /[Bb]uilds/ 8 | /Assets/AssetStoreTools* 9 | /Assets/Ignored* 10 | /Assets/AllSkyFree* 11 | 12 | # Autogenerated VS/MD solution and project files 13 | ExportedObj/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.vscode 25 | 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | 30 | # Unity3D Generated File On Crash Reports 31 | sysinfo.txt 32 | 33 | # Builds 34 | *.apk 35 | *.unitypackage 36 | 37 | # ========================= 38 | # Operating System Files 39 | # ========================= 40 | 41 | # OSX 42 | # ========================= 43 | 44 | .DS_Store 45 | .AppleDouble 46 | .LSOverride 47 | 48 | # Thumbnails 49 | ._* 50 | 51 | # Files that might appear in the root of a volume 52 | .DocumentRevisions-V100 53 | .fseventsd 54 | .Spotlight-V100 55 | .TemporaryItems 56 | .Trashes 57 | .VolumeIcon.icns 58 | 59 | # Directories potentially created on remote AFP share 60 | .AppleDB 61 | .AppleDesktop 62 | Network Trash Folder 63 | Temporary Items 64 | .apdisk 65 | 66 | # Windows 67 | # ========================= 68 | 69 | # Windows image file caches 70 | Thumbs.db 71 | ehthumbs.db 72 | 73 | # Folder config file 74 | Desktop.ini 75 | 76 | # Recycle Bin used on file shares 77 | $RECYCLE.BIN/ 78 | 79 | # Windows Installer files 80 | *.cab 81 | *.msi 82 | *.msm 83 | *.msp 84 | 85 | # Windows shortcuts 86 | *.lnk 87 | 88 | Recordings 89 | Build.zip -------------------------------------------------------------------------------- /Assets/Compute Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 429d006b308449847ade946fde8b2c38 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Compute Shaders/ParallelReduce.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel SingleThreadedScan 2 | #pragma kernel GlobalReduce 3 | #pragma kernel FinalReduce 4 | #pragma kernel ReductionToTransformation 5 | 6 | #pragma kernel FirstLODIteration 7 | #pragma kernel LODIteration 8 | 9 | RWStructuredBuffer _OutputBuffer, _InputBuffer; 10 | uint _ReductionBufferSize; 11 | 12 | [numthreads(1, 1, 1)] 13 | void SingleThreadedScan(uint3 id : SV_DISPATCHTHREADID) { 14 | float3 minPos = 1000000000000000.0f; 15 | float3 maxPos = -1000000000000000.0f; 16 | 17 | for (uint i = 0; i < _ReductionBufferSize; ++i) { 18 | float3 v = _InputBuffer[i]; 19 | 20 | minPos = min(minPos, v); 21 | maxPos = max(maxPos, v); 22 | } 23 | 24 | if (id.x == 0) { 25 | _OutputBuffer[0] = minPos; 26 | _OutputBuffer[1] = maxPos; 27 | } 28 | } 29 | 30 | 31 | // Reduction kernels and optimization progression referenced from https://developer.download.nvidia.com/assets/cuda/files/reduction.pdf 32 | 33 | #pragma multi_compile_local _ INTERLEAVED_ADDRESSING_DIVERGENT INTERLEAVED_ADDRESSING_BANK_CONFLICT SEQUENTIAL_ADDRESSING UNROLL_LAST_WARP 34 | #pragma multi_compile_local _ DOUBLE_LOAD 35 | #pragma multi_compile_local _ MIN_REDUCTION MAX_REDUCTION ADD_REDUCTION 36 | 37 | #define REDUCTION_GROUP_SIZE 128 38 | 39 | 40 | groupshared float3 gs_Reduce[REDUCTION_GROUP_SIZE]; 41 | 42 | float3 ReductionOperator(float3 v1, float3 v2) { 43 | #ifdef MIN_REDUCTION 44 | return min(v1, v2); 45 | #endif 46 | #ifdef MAX_REDUCTION 47 | return max(v1, v2); 48 | #endif 49 | #ifdef ADD_REDUCTION 50 | return v1 + v2; 51 | #endif 52 | 53 | return 0; 54 | } 55 | 56 | void Load(uint groupThreadID, uint globalThreadID, uint groupID, uint reductionBufferSize) { 57 | #ifdef DOUBLE_LOAD // Reduction #4 -- Slide 18 58 | 59 | uint tid = groupThreadID; 60 | uint i = groupID * (reductionBufferSize * 2) + groupThreadID; 61 | 62 | gs_Reduce[tid] = ReductionOperator(_InputBuffer[i], _InputBuffer[i + reductionBufferSize]); 63 | 64 | #else 65 | 66 | gs_Reduce[groupThreadID] = _InputBuffer[globalThreadID]; 67 | 68 | #endif 69 | 70 | AllMemoryBarrierWithGroupSync(); 71 | 72 | } 73 | 74 | void Reduce(uint id, uint bufferSize) { 75 | #ifdef INTERLEAVED_ADDRESSING_DIVERGENT // Reduction #1 -- Slide 9 (PROBLEM: Divergent branch in loop) 76 | 77 | [loop] 78 | for (uint s = 1; s < bufferSize; s *= 2) { 79 | if (id % (2 * s) == 0) { 80 | float3 v = gs_Reduce[id]; 81 | gs_Reduce[id] = ReductionOperator(v, gs_Reduce[id + s]); 82 | } 83 | 84 | GroupMemoryBarrierWithGroupSync(); 85 | } 86 | 87 | #endif 88 | #ifdef INTERLEAVED_ADDRESSING_BANK_CONFLICT // Reduction #2 -- Slide 11 (PROBLEM: Different threads reference the same shared memory index) 89 | 90 | [loop] 91 | for (uint s = 1; s < bufferSize; s *= 2) { 92 | uint index = 2 * s * id; 93 | 94 | if (index < bufferSize) { 95 | float3 v = gs_Reduce[index]; 96 | gs_Reduce[index] = ReductionOperator(v, gs_Reduce[index + s]); 97 | } 98 | 99 | GroupMemoryBarrierWithGroupSync(); 100 | } 101 | 102 | #endif 103 | #ifdef SEQUENTIAL_ADDRESSING // Reduction #3 -- Slide 15 104 | 105 | [loop] 106 | for (uint s = bufferSize / 2; s > 0; s >>= 1) { // fyi s >>= 1 is equivalent to s /= 2 107 | if (id < s) { 108 | float3 v = gs_Reduce[id]; 109 | gs_Reduce[id] = ReductionOperator(v, gs_Reduce[id + s]); 110 | } 111 | GroupMemoryBarrierWithGroupSync(); 112 | } 113 | 114 | #endif 115 | #ifdef UNROLL_LAST_WARP // Reduction #5 -- Slide 22 116 | 117 | [unroll] 118 | for (uint s = bufferSize / 2; s > 0; s >>= 1) { // fyi s >>= 1 is equivalent to s /= 2 119 | if (id < s) { 120 | float3 v = gs_Reduce[id]; 121 | gs_Reduce[id] = ReductionOperator(v, gs_Reduce[id + s]); 122 | } 123 | GroupMemoryBarrierWithGroupSync(); 124 | } 125 | 126 | #endif 127 | } 128 | 129 | [numthreads(REDUCTION_GROUP_SIZE, 1, 1)] 130 | void GlobalReduce(uint3 id : SV_DISPATCHTHREADID, uint3 gtid : SV_GroupThreadID, uint3 gid : SV_GROUPID) { 131 | Load(gtid.x, id.x, gid.x, REDUCTION_GROUP_SIZE); 132 | 133 | Reduce(gtid.x, REDUCTION_GROUP_SIZE); 134 | 135 | if (gtid.x == 0) { 136 | _OutputBuffer[gid.x] = gs_Reduce[0]; 137 | } 138 | } 139 | 140 | [numthreads(REDUCTION_GROUP_SIZE, 1, 1)] 141 | void FinalReduce(uint3 id : SV_DISPATCHTHREADID, uint3 gtid : SV_GroupThreadID, uint3 gid : SV_GROUPID) { 142 | Load(id.x, id.x, gid.x, _ReductionBufferSize); 143 | 144 | Reduce(id.x, _ReductionBufferSize); 145 | 146 | if (id.x == 0) { 147 | #ifdef MIN_REDUCTION 148 | _OutputBuffer[0] = gs_Reduce[0]; 149 | #endif 150 | #ifdef MAX_REDUCTION 151 | _OutputBuffer[1] = gs_Reduce[0]; 152 | #endif 153 | #ifdef ADD_REDUCTION 154 | _OutputBuffer[2] = gs_Reduce[0]; 155 | #endif 156 | } 157 | } 158 | 159 | RWStructuredBuffer _FinalTransformBuffer; 160 | float _TargetBoundsSize, _ScalePadding, _ParticleCount; 161 | 162 | [numthreads(1, 1, 1)] 163 | void ReductionToTransformation(uint3 id : SV_DISPATCHTHREADID, uint3 gtid : SV_GroupThreadID, uint3 gid : SV_GROUPID) { 164 | float3 minPos = _InputBuffer[0]; 165 | float3 maxPos = _InputBuffer[1]; 166 | 167 | float3 midPos = _InputBuffer[2] / _ParticleCount; 168 | 169 | float x = abs(minPos.x - maxPos.x); 170 | float y = abs(minPos.y - maxPos.y); 171 | float z = abs(minPos.z - maxPos.z); 172 | 173 | float boundsExtent = max(distance(minPos, midPos), distance(maxPos, midPos)); 174 | // float boundsExtent = max(x, max(y, z)); 175 | 176 | float rescale = _TargetBoundsSize / boundsExtent; 177 | rescale *= _ScalePadding; 178 | 179 | midPos *= rescale; 180 | 181 | float4x4 finalTransform = { 182 | rescale, 0.0f, 0.0f, -midPos.x, 183 | 0.0f, rescale, 0.0f, -midPos.y, 184 | 0.0f, 0.0f, rescale, -midPos.z, 185 | 0.0f, 0.0f, 0.0f, 1.0f 186 | }; 187 | 188 | // float4x4 finalTransform = { 189 | // 1.0f, 0.0f, 0.0f, 0.0f, 190 | // 0.0f, 1.0f, 0.0f, 0.0f, 191 | // 0.0f, 0.0f, 1.0f, 0.0f, 192 | // 0.0f, 0.0f, 0.0f, 1.0f 193 | // }; 194 | 195 | _FinalTransformBuffer[0] = finalTransform; 196 | } 197 | 198 | StructuredBuffer _Transformations; 199 | int _TransformationCount; 200 | 201 | [numthreads(1, 1, 1)] 202 | void FirstLODIteration(uint3 id : SV_DISPATCHTHREADID) { 203 | for (int i = 0; i < _TransformationCount; ++i) { 204 | _OutputBuffer[id.x + i] = mul(_Transformations[i], float4(0, 0, 0, 1)).xyz; 205 | } 206 | } 207 | 208 | [numthreads(64, 1, 1)] 209 | void LODIteration(uint3 id : SV_DISPATCHTHREADID) { 210 | float3 seed = _InputBuffer[id.x]; 211 | 212 | int outputIndex = id.x * _TransformationCount; 213 | for (int i = 0; i < _TransformationCount; ++i) { 214 | _OutputBuffer[outputIndex + i] = mul(_Transformations[i], float4(seed, 1)).xyz; 215 | } 216 | } -------------------------------------------------------------------------------- /Assets/Compute Shaders/ParallelReduce.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3285589765ffd20489593752acd50a05 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | preprocessorOverride: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Compute Shaders/UpdateParticles.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel InitializeParticles 2 | #pragma kernel AffineTransformChaos 3 | #pragma kernel AffineTransformIterated 4 | #pragma kernel ClearVoxelBuffer 5 | #pragma kernel VoxelizePositions 6 | #pragma kernel ClearOcclusion 7 | #pragma kernel CalculateOcclusion 8 | 9 | #define SIZEOF_UINT 4 10 | #define SIZEOF_FLOAT3 12 11 | 12 | RWByteAddressBuffer _VertexBuffer, _IndexBuffer; 13 | 14 | void WriteVertex(uint offset, float3 v) { 15 | uint addr = offset * SIZEOF_FLOAT3; 16 | _VertexBuffer.Store3(addr, asuint(v)); 17 | } 18 | 19 | float3 ReadVertex(uint offset) { 20 | uint addr = offset * SIZEOF_FLOAT3; 21 | 22 | return asfloat(_VertexBuffer.Load3(addr)); 23 | } 24 | 25 | void WriteIndex(uint offset, uint i) { 26 | uint addr = offset * SIZEOF_UINT; 27 | _IndexBuffer.Store(addr, i); 28 | } 29 | 30 | StructuredBuffer _Transformations; 31 | 32 | uint _Seed, _TransformationCount, _DebugIndex, _CubeResolution; 33 | int _BatchIndex, _ParticleCount; 34 | float _CubeSize; 35 | 36 | float hash(uint n) { 37 | // integer hash copied from Hugo Elias 38 | n = (n << 13U) ^ n; 39 | n = n * (n * n * 15731U + 0x789221U) + 0x1376312589U; 40 | return float(n & uint(0x7fffffffU)) / float(0x7fffffff); 41 | } 42 | 43 | float3 otherTo3D(uint idx) { 44 | uint3 voxelRes = _CubeResolution; 45 | uint x = idx % (voxelRes.x); 46 | uint y = (idx / voxelRes.x) % voxelRes.y; 47 | uint z = idx / (voxelRes.x * voxelRes.y); 48 | 49 | return float3(x, y, z); 50 | } 51 | 52 | [numthreads(64,1,1)] 53 | void InitializeParticles(uint3 id : SV_DispatchThreadID) { 54 | float3 pos = otherTo3D(id.x) * _CubeSize; 55 | uint index = id.x; 56 | 57 | WriteVertex(id.x, pos); 58 | WriteIndex(id.x, index); 59 | } 60 | 61 | uint _GridSize, _GridBounds; 62 | 63 | StructuredBuffer _FinalTransformBuffer; 64 | 65 | [numthreads(64, 1, 1)] 66 | void AffineTransformChaos(uint3 id : SV_DispatchThreadID) { 67 | float3 currentPos = ReadVertex(id.x); 68 | 69 | uint seed = (_Seed + _BatchIndex * 100000) + id.x; 70 | 71 | float rand = hash(seed); 72 | uint index = floor(rand * (_TransformationCount)); 73 | 74 | float4x4 attractor = _Transformations[index]; 75 | 76 | float4 newPosition = float4(currentPos, 1.0f); 77 | 78 | newPosition = mul(attractor, newPosition); 79 | 80 | // if (dot(newPosition.xyz, newPosition.xyz) > 10000000) newPosition = 0; // If particle shot off to infinity for some stupid reason then reset it to the origin 81 | 82 | WriteVertex(id.x, newPosition.xyz); 83 | } 84 | 85 | uint _GenerationOffset, _GenerationLimit; 86 | 87 | [numthreads(128, 1, 1)] 88 | void AffineTransformIterated(uint3 id : SV_DispatchThreadID) { 89 | uint threadID = id.x + _GenerationOffset; 90 | 91 | if (threadID < _GenerationLimit) { // This ensures threads that exceed the bounds of the current memory block don't do work and overwrite data, which shows how this is kind of not a good method for compute lol 92 | float3 seedPos = ReadVertex(floor((threadID - 1) / _TransformationCount)); 93 | 94 | float4x4 attractor = _Transformations[threadID % _TransformationCount]; 95 | float4 newPosition = mul(attractor, float4(seedPos, 1.0f)); 96 | 97 | WriteVertex(threadID, newPosition.xyz); 98 | } 99 | } 100 | 101 | RWStructuredBuffer _VoxelGrid; 102 | uint _MemoryOffset; 103 | 104 | uint to1D(uint3 pos) { 105 | return pos.x + pos.y * _GridSize + pos.z * _GridSize * _GridSize; 106 | } 107 | 108 | uint3 to3D(uint idx) { 109 | uint3 voxelRes = _GridSize; 110 | uint x = idx % (voxelRes.x); 111 | uint y = (idx / voxelRes.x) % voxelRes.y; 112 | uint z = idx / (voxelRes.x * voxelRes.y); 113 | 114 | return uint3(x, y, z); 115 | } 116 | 117 | [numthreads(64, 1, 1)] 118 | void ClearVoxelBuffer(uint3 id : SV_DispatchThreadID) { 119 | _VoxelGrid[id.x + _MemoryOffset] = 0; 120 | } 121 | 122 | [numthreads(64, 1, 1)] 123 | void VoxelizePositions(uint3 id : SV_DispatchThreadID) { 124 | float3 pos = ReadVertex(id.x); 125 | 126 | float4x4 finalTransform = _FinalTransformBuffer[0]; 127 | 128 | float3 centralPos = mul(finalTransform, float4(pos, 1.0f)).xyz; 129 | centralPos += (_GridBounds / 2.0f); 130 | centralPos /= _GridBounds; 131 | centralPos *= _GridSize; 132 | 133 | _VoxelGrid[to1D(centralPos)] = 1; 134 | 135 | for (uint i = 0; i < _TransformationCount; ++i) { 136 | float3 nextPos = mul(finalTransform, mul(_Transformations[i], float4(pos, 1.0f))).xyz; 137 | 138 | nextPos += (_GridBounds / 2.0f); 139 | nextPos /= _GridBounds; 140 | nextPos *= _GridSize; 141 | 142 | _VoxelGrid[to1D(nextPos)] = 1; 143 | } 144 | } 145 | 146 | RWStructuredBuffer _OcclusionGrid; 147 | 148 | [numthreads(64, 1, 1)] 149 | void ClearOcclusion(uint3 id : SV_DispatchThreadID) { 150 | _OcclusionGrid[id.x + _MemoryOffset] = 0; 151 | } 152 | 153 | [numthreads(64, 1, 1)] 154 | void CalculateOcclusion(uint3 id : SV_DispatchThreadID) { 155 | 156 | int3 pos = to3D(id.x + _MemoryOffset); 157 | 158 | int neighborCount = 0; 159 | for (int x = -1; x <= 1; ++x) { 160 | for (int y = -1; y <= 1; ++y) { 161 | for (int z = -1; z <= 1; ++z) { 162 | if (x == 0 && y == 0 && z == 0) continue; 163 | uint addr = to1D(pos - int3(x, y, z)); 164 | neighborCount += _VoxelGrid[addr]; 165 | } 166 | } 167 | } 168 | 169 | float occlusion = neighborCount / 27.0f; 170 | 171 | // occlusion = 1; 172 | // if (neighborCount == 10) occlusion = 0.25f; 173 | 174 | _OcclusionGrid[id.x + _MemoryOffset] = (1 - occlusion); 175 | } -------------------------------------------------------------------------------- /Assets/Compute Shaders/UpdateParticles.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8faac77cdf44eae4caaf13a51b8e079e 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | preprocessorOverride: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ea315d0fd7389c41b19996891e99ae3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/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: 15302, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 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 &198840490 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: 198840501} 135 | - component: {fileID: 198840500} 136 | - component: {fileID: 198840499} 137 | - component: {fileID: 198840498} 138 | - component: {fileID: 198840497} 139 | - component: {fileID: 198840496} 140 | - component: {fileID: 198840492} 141 | - component: {fileID: 198840491} 142 | m_Layer: 0 143 | m_Name: Particles 144 | m_TagString: Untagged 145 | m_Icon: {fileID: 0} 146 | m_NavMeshLayer: 0 147 | m_StaticEditorFlags: 0 148 | m_IsActive: 1 149 | --- !u!114 &198840491 150 | MonoBehaviour: 151 | m_ObjectHideFlags: 0 152 | m_CorrespondingSourceObject: {fileID: 0} 153 | m_PrefabInstance: {fileID: 0} 154 | m_PrefabAsset: {fileID: 0} 155 | m_GameObject: {fileID: 198840490} 156 | m_Enabled: 0 157 | m_EditorHideFlags: 0 158 | m_Script: {fileID: 11500000, guid: e4d32cc418c7c2c47adcb5f016300918, type: 3} 159 | m_Name: 160 | m_EditorClassIdentifier: 161 | affineTransformations: {fileID: 198840496} 162 | instancedPointShader: {fileID: 4800000, guid: da60c5ceac9d93949914277c9acee32e, type: 3} 163 | particleUpdater: {fileID: 7200000, guid: 8faac77cdf44eae4caaf13a51b8e079e, type: 3} 164 | parallelReducer: {fileID: 7200000, guid: 3285589765ffd20489593752acd50a05, type: 3} 165 | particlesPerBatch: 1048576 166 | batchCount: 1 167 | updateInstanceCount: 0 168 | lowDetailGenerations: 8 169 | viewLowDetail: 0 170 | uncapped: 1 171 | pointCloudMeshes: [] 172 | predictOrigin: 0 173 | boundsCalculationMode: 0 174 | toggleDoubleLoad: 1 175 | scalePadding: 1 176 | voxelShader: {fileID: 4800000, guid: 0d552777edf877b469ce5b6e1ac22326, type: 3} 177 | voxelMesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 178 | voxelBounds: 3 179 | voxelSize: 0.02 180 | meshesToVoxelize: 1 181 | useLowDetailForVoxels: 0 182 | renderVoxels: 0 183 | dumpData: 0 184 | updateGizmoPoints: 0 185 | occlusionMultiplier: 1 186 | occlusionAttenuation: 1 187 | particleColor: {r: 0.8537736, g: 1, b: 0.8947165, a: 0} 188 | occlusionColor: {r: 0.103773594, g: 0.014195448, b: 0.014195448, a: 0} 189 | --- !u!114 &198840492 190 | MonoBehaviour: 191 | m_ObjectHideFlags: 0 192 | m_CorrespondingSourceObject: {fileID: 0} 193 | m_PrefabInstance: {fileID: 0} 194 | m_PrefabAsset: {fileID: 0} 195 | m_GameObject: {fileID: 198840490} 196 | m_Enabled: 1 197 | m_EditorHideFlags: 0 198 | m_Script: {fileID: 11500000, guid: 5298ec254435b3245bb3de1e5d24443e, type: 3} 199 | m_Name: 200 | m_EditorClassIdentifier: 201 | affineTransformations: {fileID: 198840496} 202 | instancedPointShader: {fileID: 4800000, guid: da60c5ceac9d93949914277c9acee32e, type: 3} 203 | particleUpdater: {fileID: 7200000, guid: 8faac77cdf44eae4caaf13a51b8e079e, type: 3} 204 | parallelReducer: {fileID: 7200000, guid: 3285589765ffd20489593752acd50a05, type: 3} 205 | particlesPerBatch: 1048576 206 | batchCount: 10 207 | updateInstanceCount: 0 208 | lowDetailGenerations: 13 209 | viewLowDetail: 0 210 | uncapped: 1 211 | pointCloudMeshes: 212 | - {fileID: 0} 213 | - {fileID: 0} 214 | - {fileID: 0} 215 | - {fileID: 0} 216 | - {fileID: 0} 217 | - {fileID: 0} 218 | - {fileID: 0} 219 | - {fileID: 0} 220 | predictOrigin: 0 221 | boundsCalculationMode: 4 222 | toggleDoubleLoad: 1 223 | scalePadding: 0.5 224 | voxelShader: {fileID: 4800000, guid: 0d552777edf877b469ce5b6e1ac22326, type: 3} 225 | voxelMesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 226 | voxelBounds: 3 227 | voxelSize: 0.01 228 | meshesToVoxelize: 11 229 | useLowDetailForVoxels: 0 230 | renderVoxels: 0 231 | dumpData: 0 232 | updateGizmoPoints: 1 233 | occlusionMultiplier: 1.66 234 | occlusionAttenuation: 1.42 235 | particleColor: {r: 0.764151, g: 0.5655022, b: 0.4793966, a: 0} 236 | occlusionColor: {r: 0, g: 0.08627451, b: 0.032354567, a: 0} 237 | iterationsPerFrame: 1 238 | --- !u!114 &198840496 239 | MonoBehaviour: 240 | m_ObjectHideFlags: 0 241 | m_CorrespondingSourceObject: {fileID: 0} 242 | m_PrefabInstance: {fileID: 0} 243 | m_PrefabAsset: {fileID: 0} 244 | m_GameObject: {fileID: 198840490} 245 | m_Enabled: 1 246 | m_EditorHideFlags: 0 247 | m_Script: {fileID: 11500000, guid: 0372fa0dde8ecdc46b6de8c47f330688, type: 3} 248 | m_Name: 249 | m_EditorClassIdentifier: 250 | setBlender: {fileID: 198840497} 251 | --- !u!114 &198840497 252 | MonoBehaviour: 253 | m_ObjectHideFlags: 0 254 | m_CorrespondingSourceObject: {fileID: 0} 255 | m_PrefabInstance: {fileID: 0} 256 | m_PrefabAsset: {fileID: 0} 257 | m_GameObject: {fileID: 198840490} 258 | m_Enabled: 1 259 | m_EditorHideFlags: 0 260 | m_Script: {fileID: 11500000, guid: 57bb4d0125e093e40bfdf8d42fac5934, type: 3} 261 | m_Name: 262 | m_EditorClassIdentifier: 263 | set1: {fileID: 198840499} 264 | set2: {fileID: 198840498} 265 | animationCurve: 266 | serializedVersion: 2 267 | m_Curve: 268 | - serializedVersion: 3 269 | time: 0 270 | value: 0 271 | inSlope: 0.58119947 272 | outSlope: 0.58119947 273 | tangentMode: 0 274 | weightedMode: 0 275 | inWeight: 0 276 | outWeight: 0.7863378 277 | - serializedVersion: 3 278 | time: 0.11869369 279 | value: 0.16560625 280 | inSlope: 1.8865476 281 | outSlope: 1.8865476 282 | tangentMode: 0 283 | weightedMode: 0 284 | inWeight: 0.37092978 285 | outWeight: 0.33333334 286 | - serializedVersion: 3 287 | time: 0.59942836 288 | value: 0.95321834 289 | inSlope: 0.736799 290 | outSlope: 0.736799 291 | tangentMode: 0 292 | weightedMode: 0 293 | inWeight: 0.33333334 294 | outWeight: 0.25611597 295 | - serializedVersion: 3 296 | time: 0.99731445 297 | value: 1.0000011 298 | inSlope: 0 299 | outSlope: 0 300 | tangentMode: 0 301 | weightedMode: 0 302 | inWeight: 0 303 | outWeight: 0 304 | m_PreInfinity: 2 305 | m_PostInfinity: 2 306 | m_RotationOrder: 4 307 | useAnimationCurve: 0 308 | t: 0 309 | animate: 0 310 | speed: 1.6 311 | frameRateIndependent: 1 312 | useRamp: 1 313 | rampSpeed: 1 314 | epsilon: 3 315 | finalTransform: 316 | scale: {x: 1, y: 1, z: 1} 317 | shearX: {x: 0, y: 0, z: 0} 318 | shearY: {x: 0, y: 0, z: 0} 319 | shearZ: {x: 0, y: 0, z: 0} 320 | rotate: {x: 0, y: 0, z: 0} 321 | translate: {x: 0, y: 0, z: 0} 322 | --- !u!114 &198840498 323 | MonoBehaviour: 324 | m_ObjectHideFlags: 0 325 | m_CorrespondingSourceObject: {fileID: 0} 326 | m_PrefabInstance: {fileID: 0} 327 | m_PrefabAsset: {fileID: 0} 328 | m_GameObject: {fileID: 198840490} 329 | m_Enabled: 1 330 | m_EditorHideFlags: 0 331 | m_Script: {fileID: 11500000, guid: d618dbd71e5db5841bb8c53a8307cfde, type: 3} 332 | m_Name: 333 | m_EditorClassIdentifier: 334 | affinePreset: 6 335 | randomInstructionCount: 3 336 | resetToPreset: 0 337 | transformSet: 338 | - scale: {x: 0.7114281, y: 0.42056277, z: 0.62311846} 339 | shearX: {x: 0, y: -0.036258817, z: -0.08147562} 340 | shearY: {x: 0.080069914, y: 0, z: 0.06951962} 341 | shearZ: {x: -0.14304738, y: -0.032437965, z: 0} 342 | rotate: {x: -19.95215, y: -23.07871, z: 3.3337631} 343 | translate: {x: -0.4327373, y: -0.43214884, z: 0.57842535} 344 | - scale: {x: 0.45320323, y: 0.47105843, z: 0.41583723} 345 | shearX: {x: 0, y: 0.09270305, z: 0.044526786} 346 | shearY: {x: -0.19250889, y: 0, z: -0.19290496} 347 | shearZ: {x: -0.18165894, y: 0.10299754, z: 0} 348 | rotate: {x: 2.5488434, y: -5.270279, z: 23.032948} 349 | translate: {x: -0.4056494, y: -0.5833988, z: -0.5100738} 350 | - scale: {x: 0.45320323, y: 0.47105843, z: 0.41583723} 351 | shearX: {x: 0, y: 0.09270305, z: 0.044526786} 352 | shearY: {x: -0.19250889, y: 0, z: -0.19290496} 353 | shearZ: {x: -0.18165894, y: 0.10299754, z: 0} 354 | rotate: {x: 2.5488434, y: -5.270279, z: 23.032948} 355 | translate: {x: -0.4056494, y: -0.5833988, z: -0.5100738} 356 | postTransform: 357 | scale: {x: 1, y: 1, z: 1} 358 | shearX: {x: 0, y: 0, z: 0} 359 | shearY: {x: 0, y: 0, z: 0} 360 | shearZ: {x: 0, y: 0, z: 0} 361 | rotate: {x: 0, y: 0, z: 0} 362 | translate: {x: 0, y: 0, z: 0} 363 | --- !u!114 &198840499 364 | MonoBehaviour: 365 | m_ObjectHideFlags: 0 366 | m_CorrespondingSourceObject: {fileID: 0} 367 | m_PrefabInstance: {fileID: 0} 368 | m_PrefabAsset: {fileID: 0} 369 | m_GameObject: {fileID: 198840490} 370 | m_Enabled: 1 371 | m_EditorHideFlags: 0 372 | m_Script: {fileID: 11500000, guid: d618dbd71e5db5841bb8c53a8307cfde, type: 3} 373 | m_Name: 374 | m_EditorClassIdentifier: 375 | affinePreset: 6 376 | randomInstructionCount: 3 377 | resetToPreset: 0 378 | transformSet: 379 | - scale: {x: 0.64567, y: 0.6520087, z: 0.4992622} 380 | shearX: {x: 0, y: -0.1381314, z: -0.083548084} 381 | shearY: {x: 0.012350723, y: 0, z: 0.19594698} 382 | shearZ: {x: -0.06954615, y: -0.18209101, z: 0} 383 | rotate: {x: -14.159281, y: 30.700146, z: -4.5448456} 384 | translate: {x: -0.483831, y: -0.5847448, z: 0.54048765} 385 | - scale: {x: 0.51383644, y: 0.47638172, z: 0.47241908} 386 | shearX: {x: 0, y: -0.117562726, z: -0.04556334} 387 | shearY: {x: -0.11148821, y: 0, z: -0.046085566} 388 | shearZ: {x: -0.06789043, y: 0.14539348, z: 0} 389 | rotate: {x: -13.756258, y: -10.734333, z: -26.906143} 390 | translate: {x: -0.46300432, y: -0.44532868, z: -0.5514636} 391 | - scale: {x: 0.51383644, y: 0.47638172, z: 0.47241908} 392 | shearX: {x: 0, y: -0.117562726, z: -0.04556334} 393 | shearY: {x: -0.11148821, y: 0, z: -0.046085566} 394 | shearZ: {x: -0.06789043, y: 0.14539348, z: 0} 395 | rotate: {x: -13.756258, y: -10.734333, z: -26.906143} 396 | translate: {x: -0.46300432, y: -0.44532868, z: -0.5514636} 397 | postTransform: 398 | scale: {x: 1, y: 1, z: 1} 399 | shearX: {x: 0, y: 0, z: 0} 400 | shearY: {x: 0, y: 0, z: 0} 401 | shearZ: {x: 0, y: 0, z: 0} 402 | rotate: {x: 0, y: 0, z: 0} 403 | translate: {x: 0, y: 0, z: 0} 404 | --- !u!114 &198840500 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: 198840490} 411 | m_Enabled: 1 412 | m_EditorHideFlags: 0 413 | m_Script: {fileID: 11500000, guid: 2e736e87fafb0554f9f37774f5cef63f, type: 3} 414 | m_Name: 415 | m_EditorClassIdentifier: 416 | scaleMin: {x: 0.85, y: 0.85, z: 0.85} 417 | scaleMax: {x: 0.75, y: 0.75, z: 0.75} 418 | shearXMin: {x: 0, y: -0.1, z: -0.1} 419 | shearXMax: {x: 0, y: 0.1, z: 0.1} 420 | shearYMin: {x: -0.1, y: 0, z: -0.1} 421 | shearYMax: {x: 0.1, y: 0, z: 0.1} 422 | shearZMin: {x: -0.1, y: -0.1, z: 0} 423 | shearZMax: {x: 0.1, y: 0.1, z: 0} 424 | rotateMin: {x: -40, y: -40, z: -40} 425 | rotateMax: {x: 40, y: 40, z: 40} 426 | translateMin: {x: 0, y: 0, z: 0} 427 | translateMax: {x: 1, y: 1, z: 1} 428 | translationTemplate: 6 429 | --- !u!4 &198840501 430 | Transform: 431 | m_ObjectHideFlags: 0 432 | m_CorrespondingSourceObject: {fileID: 0} 433 | m_PrefabInstance: {fileID: 0} 434 | m_PrefabAsset: {fileID: 0} 435 | m_GameObject: {fileID: 198840490} 436 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 437 | m_LocalPosition: {x: 0, y: 0, z: 0} 438 | m_LocalScale: {x: 1, y: 1, z: 1} 439 | m_ConstrainProportionsScale: 0 440 | m_Children: [] 441 | m_Father: {fileID: 0} 442 | m_RootOrder: 1 443 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 444 | --- !u!1 &993136275 445 | GameObject: 446 | m_ObjectHideFlags: 0 447 | m_CorrespondingSourceObject: {fileID: 0} 448 | m_PrefabInstance: {fileID: 0} 449 | m_PrefabAsset: {fileID: 0} 450 | serializedVersion: 6 451 | m_Component: 452 | - component: {fileID: 993136284} 453 | - component: {fileID: 993136283} 454 | - component: {fileID: 993136282} 455 | - component: {fileID: 993136281} 456 | - component: {fileID: 993136278} 457 | - component: {fileID: 993136279} 458 | - component: {fileID: 993136277} 459 | - component: {fileID: 993136280} 460 | - component: {fileID: 993136276} 461 | - component: {fileID: 993136285} 462 | m_Layer: 0 463 | m_Name: Main Camera 464 | m_TagString: MainCamera 465 | m_Icon: {fileID: 0} 466 | m_NavMeshLayer: 0 467 | m_StaticEditorFlags: 0 468 | m_IsActive: 1 469 | --- !u!114 &993136276 470 | MonoBehaviour: 471 | m_ObjectHideFlags: 0 472 | m_CorrespondingSourceObject: {fileID: 0} 473 | m_PrefabInstance: {fileID: 0} 474 | m_PrefabAsset: {fileID: 0} 475 | m_GameObject: {fileID: 993136275} 476 | m_Enabled: 0 477 | m_EditorHideFlags: 0 478 | m_Script: {fileID: 11500000, guid: 256e72d3c07a6464b992ad439abe3f27, type: 3} 479 | m_Name: 480 | m_EditorClassIdentifier: 481 | sharpnessShader: {fileID: 4800000, guid: c9b5b5b831c153248a3e17976a0bf081, type: 3} 482 | amount: 0.6 483 | --- !u!114 &993136277 484 | MonoBehaviour: 485 | m_ObjectHideFlags: 0 486 | m_CorrespondingSourceObject: {fileID: 0} 487 | m_PrefabInstance: {fileID: 0} 488 | m_PrefabAsset: {fileID: 0} 489 | m_GameObject: {fileID: 993136275} 490 | m_Enabled: 0 491 | m_EditorHideFlags: 0 492 | m_Script: {fileID: 11500000, guid: dc986178a0cde3e4d9e21344dcb976fa, type: 3} 493 | m_Name: 494 | m_EditorClassIdentifier: 495 | tonemapperShader: {fileID: 4800000, guid: dcedec6602611b642828769cde1e5dcd, type: 3} 496 | toneMapper: 11 497 | Ldmax: 8.95 498 | Cmax: 15.08 499 | p: 0 500 | hiVal: 0 501 | Cwhite: 0 502 | shoulderStrength: 0 503 | linearStrength: 0 504 | linearAngle: 0 505 | toeStrength: 0 506 | toeNumerator: 0 507 | toeDenominator: 0 508 | linearWhitePoint: 0 509 | maxBrightness: 0 510 | contrast: 0 511 | linearStart: 0 512 | linearLength: 0 513 | blackTightnessShape: 0 514 | blackTightnessOffset: 0 515 | --- !u!114 &993136278 516 | MonoBehaviour: 517 | m_ObjectHideFlags: 0 518 | m_CorrespondingSourceObject: {fileID: 0} 519 | m_PrefabInstance: {fileID: 0} 520 | m_PrefabAsset: {fileID: 0} 521 | m_GameObject: {fileID: 993136275} 522 | m_Enabled: 0 523 | m_EditorHideFlags: 0 524 | m_Script: {fileID: 11500000, guid: a0e75f8f02bdaff4992c9fce27df1a6a, type: 3} 525 | m_Name: 526 | m_EditorClassIdentifier: 527 | bloomShader: {fileID: 4800000, guid: 3079d390611f14b44a14e58aec998398, type: 3} 528 | threshold: 0.3 529 | softThreshold: 0.32 530 | downSamples: 2 531 | downSampleDelta: 1 532 | upSampleDelta: 0.01 533 | bloomIntensity: 0.4 534 | --- !u!114 &993136279 535 | MonoBehaviour: 536 | m_ObjectHideFlags: 0 537 | m_CorrespondingSourceObject: {fileID: 0} 538 | m_PrefabInstance: {fileID: 0} 539 | m_PrefabAsset: {fileID: 0} 540 | m_GameObject: {fileID: 993136275} 541 | m_Enabled: 0 542 | m_EditorHideFlags: 0 543 | m_Script: {fileID: 11500000, guid: 6dafb8952c4e68b4bbaee31eaaae06e6, type: 3} 544 | m_Name: 545 | m_EditorClassIdentifier: 546 | postProcessingShader: {fileID: 0} 547 | exposure: {x: 1, y: 1, z: 1} 548 | temperature: 0 549 | tint: 0 550 | contrast: {x: 1, y: 1, z: 1} 551 | linearMidPoint: {x: 0.5, y: 0.5, z: 0.5} 552 | brightness: {x: 0, y: 0, z: 0} 553 | colorFilter: {r: 1, g: 1, b: 1, a: 0} 554 | saturation: {x: 1, y: 1, z: 1} 555 | --- !u!114 &993136280 556 | MonoBehaviour: 557 | m_ObjectHideFlags: 0 558 | m_CorrespondingSourceObject: {fileID: 0} 559 | m_PrefabInstance: {fileID: 0} 560 | m_PrefabAsset: {fileID: 0} 561 | m_GameObject: {fileID: 993136275} 562 | m_Enabled: 0 563 | m_EditorHideFlags: 0 564 | m_Script: {fileID: 11500000, guid: 034c8a9eb38feb24d8c0a8de321b3cce, type: 3} 565 | m_Name: 566 | m_EditorClassIdentifier: 567 | kuwaharaShader: {fileID: 4800000, guid: 9ba660ee9846a0d4c9eb95334c3753da, type: 3} 568 | kernelSize: 4 569 | sharpness: 8.4 570 | hardness: 48 571 | alpha: 0.58 572 | zeroCrossing: 0.58 573 | useZeta: 0 574 | zeta: 1 575 | passes: 1 576 | --- !u!114 &993136281 577 | MonoBehaviour: 578 | m_ObjectHideFlags: 0 579 | m_CorrespondingSourceObject: {fileID: 0} 580 | m_PrefabInstance: {fileID: 0} 581 | m_PrefabAsset: {fileID: 0} 582 | m_GameObject: {fileID: 993136275} 583 | m_Enabled: 1 584 | m_EditorHideFlags: 0 585 | m_Script: {fileID: 11500000, guid: 6d0b3106eafd5884e8f796eb0a9428fa, type: 3} 586 | m_Name: 587 | m_EditorClassIdentifier: 588 | boost: 0.8999987 589 | positionLerpTime: 0.2 590 | mouseSensitivityCurve: 591 | serializedVersion: 2 592 | m_Curve: 593 | - serializedVersion: 3 594 | time: 0 595 | value: 0.5 596 | inSlope: 0 597 | outSlope: 5 598 | tangentMode: 0 599 | weightedMode: 0 600 | inWeight: 0 601 | outWeight: 0 602 | - serializedVersion: 3 603 | time: 1 604 | value: 2.5 605 | inSlope: 0 606 | outSlope: 0 607 | tangentMode: 0 608 | weightedMode: 0 609 | inWeight: 0 610 | outWeight: 0 611 | m_PreInfinity: 2 612 | m_PostInfinity: 2 613 | m_RotationOrder: 4 614 | rotationLerpTime: 0.01 615 | invertY: 0 616 | --- !u!81 &993136282 617 | AudioListener: 618 | m_ObjectHideFlags: 0 619 | m_CorrespondingSourceObject: {fileID: 0} 620 | m_PrefabInstance: {fileID: 0} 621 | m_PrefabAsset: {fileID: 0} 622 | m_GameObject: {fileID: 993136275} 623 | m_Enabled: 1 624 | --- !u!20 &993136283 625 | Camera: 626 | m_ObjectHideFlags: 0 627 | m_CorrespondingSourceObject: {fileID: 0} 628 | m_PrefabInstance: {fileID: 0} 629 | m_PrefabAsset: {fileID: 0} 630 | m_GameObject: {fileID: 993136275} 631 | m_Enabled: 1 632 | serializedVersion: 2 633 | m_ClearFlags: 2 634 | m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} 635 | m_projectionMatrixMode: 1 636 | m_GateFitMode: 2 637 | m_FOVAxisMode: 0 638 | m_SensorSize: {x: 36, y: 24} 639 | m_LensShift: {x: 0, y: 0} 640 | m_FocalLength: 50 641 | m_NormalizedViewPortRect: 642 | serializedVersion: 2 643 | x: 0 644 | y: 0 645 | width: 1 646 | height: 1 647 | near clip plane: 0.01 648 | far clip plane: 1000 649 | field of view: 60 650 | orthographic: 1 651 | orthographic size: 1.5 652 | m_Depth: -1 653 | m_CullingMask: 654 | serializedVersion: 2 655 | m_Bits: 4294967295 656 | m_RenderingPath: -1 657 | m_TargetTexture: {fileID: 0} 658 | m_TargetDisplay: 0 659 | m_TargetEye: 3 660 | m_HDR: 1 661 | m_AllowMSAA: 1 662 | m_AllowDynamicResolution: 0 663 | m_ForceIntoRT: 0 664 | m_OcclusionCulling: 1 665 | m_StereoConvergence: 10 666 | m_StereoSeparation: 0.022 667 | --- !u!4 &993136284 668 | Transform: 669 | m_ObjectHideFlags: 0 670 | m_CorrespondingSourceObject: {fileID: 0} 671 | m_PrefabInstance: {fileID: 0} 672 | m_PrefabAsset: {fileID: 0} 673 | m_GameObject: {fileID: 993136275} 674 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 675 | m_LocalPosition: {x: 0, y: 0, z: -3.211} 676 | m_LocalScale: {x: 1, y: 1, z: 1} 677 | m_ConstrainProportionsScale: 0 678 | m_Children: [] 679 | m_Father: {fileID: 0} 680 | m_RootOrder: 0 681 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 682 | --- !u!114 &993136285 683 | MonoBehaviour: 684 | m_ObjectHideFlags: 0 685 | m_CorrespondingSourceObject: {fileID: 0} 686 | m_PrefabInstance: {fileID: 0} 687 | m_PrefabAsset: {fileID: 0} 688 | m_GameObject: {fileID: 993136275} 689 | m_Enabled: 1 690 | m_EditorHideFlags: 0 691 | m_Script: {fileID: 11500000, guid: e6f9180686ee2c54db45bc033500cb29, type: 3} 692 | m_Name: 693 | m_EditorClassIdentifier: 694 | recording: 0 695 | resolution: {x: 1080, y: 1080} 696 | framesToCapture: 1 697 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d12478bf1f63e814bb92b4545faeee94 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/AffineTransformations.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | public class AffineTransformations : MonoBehaviour { 7 | 8 | public SetBlender setBlender; 9 | 10 | private List affineTransforms = new List(); 11 | 12 | private Matrix4x4 finalAffine = new Matrix4x4(); 13 | 14 | private ComputeBuffer attractorsBuffer; 15 | 16 | public int GetTransformCount() { 17 | return affineTransforms.Count; 18 | } 19 | 20 | public List GetAffineTransforms() { 21 | return affineTransforms; 22 | } 23 | 24 | public ComputeBuffer GetAffineBuffer() { 25 | return attractorsBuffer; 26 | } 27 | 28 | public Matrix4x4 GetFinalTransform() { 29 | return finalAffine; 30 | } 31 | 32 | Matrix4x4 Scale(Vector3 s) { 33 | Matrix4x4 scaleMatrix = Matrix4x4.identity; 34 | 35 | scaleMatrix.SetRow(0, new Vector4(s.x, 0, 0, 0)); 36 | scaleMatrix.SetRow(1, new Vector4(0, s.y, 0, 0)); 37 | scaleMatrix.SetRow(2, new Vector4(0, 0, s.z, 0)); 38 | 39 | return scaleMatrix; 40 | } 41 | 42 | Matrix4x4 ShearX(Vector3 s) { 43 | Matrix4x4 shearMatrix = Matrix4x4.identity; 44 | 45 | shearMatrix.SetRow(0, new Vector4(1, s.y, s.z, 0)); 46 | shearMatrix.SetRow(1, new Vector4(0, 1, 0, 0)); 47 | shearMatrix.SetRow(2, new Vector4(0, 0, 1, 0)); 48 | 49 | return shearMatrix; 50 | } 51 | 52 | Matrix4x4 ShearY(Vector3 s) { 53 | Matrix4x4 shearMatrix = Matrix4x4.identity; 54 | 55 | shearMatrix.SetRow(0, new Vector4(1, 0, 0, 0)); 56 | shearMatrix.SetRow(1, new Vector4(s.x, 1, s.z, 0)); 57 | shearMatrix.SetRow(2, new Vector4(0, 0, 1, 0)); 58 | 59 | return shearMatrix; 60 | } 61 | 62 | Matrix4x4 ShearZ(Vector3 s) { 63 | Matrix4x4 shearMatrix = Matrix4x4.identity; 64 | 65 | shearMatrix.SetRow(0, new Vector4(1, 0, 0, 0)); 66 | shearMatrix.SetRow(1, new Vector4(0, 1, 0, 0)); 67 | shearMatrix.SetRow(2, new Vector4(s.x, s.y, 1, 0)); 68 | 69 | return shearMatrix; 70 | } 71 | 72 | Matrix4x4 Translate(Vector3 t) { 73 | Matrix4x4 transformMatrix = Matrix4x4.identity; 74 | 75 | transformMatrix.SetRow(0, new Vector4(1, 0, 0, t.x)); 76 | transformMatrix.SetRow(1, new Vector4(0, 1, 0, t.y)); 77 | transformMatrix.SetRow(2, new Vector4(0, 0, 1, t.z)); 78 | 79 | return transformMatrix; 80 | } 81 | 82 | Matrix4x4 Rotation(Vector3 r) { 83 | float xRad = r.x * Mathf.Deg2Rad; 84 | float yRad = r.y * Mathf.Deg2Rad; 85 | float zRad = r.z * Mathf.Deg2Rad; 86 | 87 | Matrix4x4 rotateX = Matrix4x4.identity; 88 | 89 | rotateX.SetRow(0, new Vector4(1, 0, 0, 0)); 90 | rotateX.SetRow(1, new Vector4(0, Mathf.Cos(xRad), -Mathf.Sin(xRad), 0)); 91 | rotateX.SetRow(2, new Vector4(0, Mathf.Sin(xRad), Mathf.Cos(xRad), 0)); 92 | 93 | Matrix4x4 rotateY = Matrix4x4.identity; 94 | 95 | rotateY.SetRow(0, new Vector4(Mathf.Cos(yRad), 0, Mathf.Sin(yRad), 0)); 96 | rotateY.SetRow(1, new Vector4(0, 1, 0, 0)); 97 | rotateY.SetRow(2, new Vector4(-Mathf.Sin(yRad), 0, Mathf.Cos(yRad), 0)); 98 | 99 | Matrix4x4 rotateZ = Matrix4x4.identity; 100 | 101 | rotateZ.SetRow(0, new Vector4(Mathf.Cos(zRad), -Mathf.Sin(zRad), 0, 0)); 102 | rotateZ.SetRow(1, new Vector4(Mathf.Sin(zRad), Mathf.Cos(zRad), 0, 0)); 103 | rotateZ.SetRow(2, new Vector4(0, 0, 1, 0)); 104 | 105 | Matrix4x4 rotationMatrix = rotateY * rotateX * rotateZ; 106 | 107 | return rotationMatrix; 108 | } 109 | 110 | Matrix4x4 AffineFromInstructions(TransformSet.TransformInstructions instructions) { 111 | Matrix4x4 affine = Matrix4x4.identity; 112 | 113 | Matrix4x4 scale = Scale(instructions.scale); 114 | Matrix4x4 shearX = ShearX(instructions.shearX); 115 | Matrix4x4 shearY = ShearY(instructions.shearY); 116 | Matrix4x4 shearZ = ShearZ(instructions.shearZ); 117 | Matrix4x4 shear = shearZ * shearY * shearX; 118 | Matrix4x4 translate = Translate(instructions.translate); 119 | Matrix4x4 rotation = Rotation(instructions.rotate); 120 | 121 | affine = scale * rotation * shear * translate; 122 | 123 | return affine; 124 | } 125 | 126 | public Matrix4x4 InterpolateAffineTransform(int i1, int i2, float t) { 127 | Matrix4x4 interpolatedMatrix = Matrix4x4.identity; 128 | 129 | Matrix4x4 m1 = affineTransforms[i1]; 130 | Matrix4x4 m2 = affineTransforms[i2]; 131 | 132 | interpolatedMatrix.SetRow(0, Vector4.Lerp(m1.GetRow(0), m2. GetRow(0), t)); 133 | interpolatedMatrix.SetRow(1, Vector4.Lerp(m1.GetRow(1), m2. GetRow(1), t)); 134 | interpolatedMatrix.SetRow(2, Vector4.Lerp(m1.GetRow(2), m2. GetRow(2), t)); 135 | 136 | return interpolatedMatrix; 137 | } 138 | 139 | 140 | void PopulateAffineBuffer() { 141 | affineTransforms.Clear(); 142 | 143 | List instructionSet = setBlender.GetBlendedSet(); 144 | 145 | for (int i = 0; i < instructionSet.Count; ++i) { 146 | affineTransforms.Add(AffineFromInstructions(instructionSet[i])); 147 | } 148 | 149 | finalAffine = AffineFromInstructions(setBlender.GetFinalTransform()); 150 | 151 | attractorsBuffer.SetData(affineTransforms.ToArray()); 152 | } 153 | 154 | void OnEnable() { 155 | attractorsBuffer = new ComputeBuffer(32, System.Runtime.InteropServices.Marshal.SizeOf(typeof(Matrix4x4))); 156 | 157 | PopulateAffineBuffer(); 158 | } 159 | 160 | void Update() { 161 | PopulateAffineBuffer(); 162 | } 163 | 164 | void OnDisable() { 165 | attractorsBuffer.Release(); 166 | attractorsBuffer = null; 167 | } 168 | } 169 | -------------------------------------------------------------------------------- /Assets/Scripts/AffineTransformations.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0372fa0dde8ecdc46b6de8c47f330688 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/AttractorPresets.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Random = UnityEngine.Random; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | 7 | public partial class TransformSet : MonoBehaviour { 8 | public enum AffinePreset { 9 | SierpinskiTriangle2D, 10 | Vicsek2D, 11 | SierpinskiCarpet2D, 12 | SierpinskiTriangle3D, 13 | Vicsek3D, 14 | SierpinskiCarpet3D, 15 | Procedural 16 | } 17 | 18 | List SierpinskiTriangle2D() { 19 | List instructions = new List(); 20 | 21 | TransformInstructions t = new TransformInstructions(); 22 | 23 | Vector3[] translations = { 24 | new Vector3(-0.5f, -0.5f, 0.0f), 25 | new Vector3(0.0f, 0.36f, 0.0f), 26 | new Vector3(0.5f, -0.5f, 0.0f) 27 | }; 28 | 29 | t.scale = new Vector3(0.5f, 0.5f, 0.5f); 30 | 31 | for (int i = 0; i < translations.Length; ++i) { 32 | t.translate = translations[i]; 33 | instructions.Add(t); 34 | } 35 | 36 | return instructions; 37 | } 38 | 39 | List Vicsek2D() { 40 | List instructions = new List(); 41 | 42 | TransformInstructions t = new TransformInstructions(); 43 | 44 | Vector3[] translations = { 45 | new Vector3(-0.5f, -0.5f, 0.0f), 46 | new Vector3(-0.5f, 0.5f, 0.0f), 47 | new Vector3(0.5f, 0.5f, 0.0f), 48 | new Vector3(0.5f, -0.5f, 0.0f), 49 | new Vector3(0.0f, 0.0f, 0.0f) 50 | }; 51 | 52 | t.scale = new Vector3(0.33f, 0.33f, 0.33f); 53 | 54 | for (int i = 0; i < translations.Length; ++i) { 55 | t.translate = translations[i]; 56 | instructions.Add(t); 57 | } 58 | 59 | return instructions; 60 | } 61 | 62 | List SierpinskiCarpet2D() { 63 | List instructions = new List(); 64 | 65 | TransformInstructions t = new TransformInstructions(); 66 | 67 | Vector3[] translations = { 68 | new Vector3(-0.5f, -0.5f, 0.0f), 69 | new Vector3(-0.5f, 0.5f, 0.0f), 70 | new Vector3(0.5f, 0.5f, 0.0f), 71 | new Vector3(0.5f, -0.5f, 0.0f), 72 | new Vector3(-0.5f, 0.0f, 0.0f), 73 | new Vector3(0.5f, 0.0f, 0.0f), 74 | new Vector3(0.0f, 0.5f, 0.0f), 75 | new Vector3(0.0f, -0.5f, 0.0f) 76 | }; 77 | 78 | t.scale = new Vector3(0.33f, 0.33f, 0.33f); 79 | 80 | for (int i = 0; i < translations.Length; ++i) { 81 | t.translate = translations[i]; 82 | instructions.Add(t); 83 | } 84 | 85 | return instructions; 86 | } 87 | 88 | List SierpinskiTriangle3D() { 89 | List instructions = new List(); 90 | 91 | TransformInstructions t = new TransformInstructions(); 92 | 93 | Vector3[] translations = { 94 | new Vector3(-0.5f, -0.5f, 0.5f), 95 | new Vector3(-0.5f, -0.5f, -0.5f), 96 | new Vector3(0.5f, -0.5f, 0.5f), 97 | new Vector3(0.5f, -0.5f, -0.5f), 98 | new Vector3(0.0f, 0.36f, 0.0f), 99 | }; 100 | 101 | t.scale = new Vector3(0.5f, 0.5f, 0.5f); 102 | 103 | for (int i = 0; i < translations.Length; ++i) { 104 | t.translate = translations[i]; 105 | instructions.Add(t); 106 | } 107 | 108 | return instructions; 109 | } 110 | 111 | List Vicsek3D() { 112 | List instructions = new List(); 113 | 114 | TransformInstructions t = new TransformInstructions(); 115 | 116 | Vector3[] translations = { 117 | new Vector3(-0.5f, -0.5f, -0.5f), 118 | new Vector3(-0.5f, -0.5f, 0.5f), 119 | new Vector3(0.5f, -0.5f, -0.5f), 120 | new Vector3(0.5f, -0.5f, 0.5f), 121 | new Vector3(-0.5f, 0.5f, -0.5f), 122 | new Vector3(-0.5f, 0.5f, 0.5f), 123 | new Vector3(0.5f, 0.5f, -0.5f), 124 | new Vector3(0.5f, 0.5f, 0.5f), 125 | new Vector3(0.0f, 0.0f, 0.0f) 126 | }; 127 | 128 | t.scale = new Vector3(0.33f, 0.33f, 0.33f); 129 | 130 | for (int i = 0; i < translations.Length; ++i) { 131 | t.translate = translations[i]; 132 | instructions.Add(t); 133 | } 134 | 135 | return instructions; 136 | } 137 | 138 | List SierpinskiCarpet3D() { 139 | List instructions = new List(); 140 | 141 | TransformInstructions t = new TransformInstructions(); 142 | 143 | Vector3[] translations = { 144 | new Vector3(-0.5f, -0.5f, -0.5f), 145 | new Vector3(-0.5f, -0.5f, 0.5f), 146 | new Vector3(0.5f, -0.5f, -0.5f), 147 | new Vector3(0.5f, -0.5f, 0.5f), 148 | new Vector3(-0.5f, 0.5f, -0.5f), 149 | new Vector3(-0.5f, 0.5f, 0.5f), 150 | new Vector3(0.5f, 0.5f, -0.5f), 151 | new Vector3(0.5f, 0.5f, 0.5f), 152 | new Vector3(-0.5f, 0.5f, 0.0f), 153 | new Vector3(0.5f, 0.5f, 0.0f), 154 | new Vector3(-0.5f, -0.5f, 0.0f), 155 | new Vector3(0.5f, -0.5f, 0.0f), 156 | new Vector3(0.0f, 0.5f, -0.5f), 157 | new Vector3(0.0f, 0.5f, 0.5f), 158 | new Vector3(0.0f, -0.5f, -0.5f), 159 | new Vector3(0.0f, -0.5f, 0.5f), 160 | new Vector3(-0.5f, 0.0f, -0.5f), 161 | new Vector3(0.5f, 0.0f, 0.5f), 162 | new Vector3(0.5f, 0.0f, -0.5f), 163 | new Vector3(-0.5f, 0.0f, 0.5f) 164 | }; 165 | 166 | t.scale = new Vector3(0.33f, 0.33f, 0.33f); 167 | 168 | for (int i = 0; i < translations.Length; ++i) { 169 | t.translate = translations[i]; 170 | instructions.Add(t); 171 | } 172 | 173 | return instructions; 174 | } 175 | 176 | List ProceduralInstructions() { 177 | List instructions = new List(); 178 | 179 | for (int i = 0; i < this.randomInstructionCount; ++i) { 180 | TransformInstructions t = proceduralWizard.GenerateRandomInstructions(); 181 | 182 | instructions.Add(t); 183 | } 184 | 185 | return instructions; 186 | } 187 | } 188 | -------------------------------------------------------------------------------- /Assets/Scripts/AttractorPresets.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 51b90c79af4fb5441990f8667ce63fed 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/Capturer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class Capturer : MonoBehaviour { 6 | public bool recording = false; 7 | 8 | public Vector2Int resolution = new Vector2Int(0, 0); 9 | public int framesToCapture = 1; 10 | 11 | private Camera cam; 12 | private int frameCount = 0; 13 | 14 | private RenderTexture rt; 15 | private Texture2D screenshot; 16 | 17 | void OnEnable() { 18 | frameCount = 0; 19 | cam = GetComponent(); 20 | } 21 | 22 | void LateUpdate() { 23 | if (recording && frameCount < framesToCapture) { 24 | if (frameCount == 0) { 25 | rt = new RenderTexture(resolution.x, resolution.y, 0); 26 | screenshot = new Texture2D(resolution.x, resolution.y, TextureFormat.RGB24, false); 27 | } 28 | 29 | GetComponent().targetTexture = rt; 30 | GetComponent().Render(); 31 | 32 | RenderTexture.active = rt; 33 | screenshot.ReadPixels(new Rect(0, 0, resolution.x, resolution.y), 0, 0); 34 | 35 | GetComponent().targetTexture = null; 36 | RenderTexture.active = null; 37 | 38 | string filename = string.Format("{0}/../Recordings/{1:000000}.png", Application.dataPath, frameCount); 39 | System.IO.File.WriteAllBytes(filename, screenshot.EncodeToPNG()); 40 | 41 | 42 | ++frameCount; 43 | if (frameCount == framesToCapture) { 44 | recording = false; 45 | frameCount = 0; 46 | 47 | rt.Release(); 48 | Destroy(screenshot); 49 | rt = null; 50 | screenshot = null; 51 | } 52 | } 53 | } 54 | 55 | void OnDisable() { 56 | if (rt != null) { 57 | rt.Release(); 58 | rt = null; 59 | } 60 | 61 | if (screenshot != null) { 62 | Destroy(screenshot); 63 | screenshot = null; 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Assets/Scripts/Capturer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6f9180686ee2c54db45bc033500cb29 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/ChaosGame.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class ChaosGame : IteratedFunctionSystem { 6 | [Range(1, 10)] 7 | public int iterationsPerFrame = 1; 8 | 9 | public override void IterateSystem() { 10 | for (int iteration = 0; iteration < iterationsPerFrame; ++iteration) { 11 | for (int i = 0; i < (int)batchCount; ++i) { 12 | particleUpdater.SetInt("_TransformationCount", affineTransformations.GetTransformCount()); 13 | particleUpdater.SetInt("_ParticleCount", (int)particlesPerBatch); 14 | particleUpdater.SetInt("_Seed", Mathf.CeilToInt(Random.Range(1, 1000000))); 15 | particleUpdater.SetBuffer(1, "_VertexBuffer", pointCloudMeshes[i].GetVertexBuffer(0)); 16 | particleUpdater.SetBuffer(1, "_Transformations", affineTransformations.GetAffineBuffer()); 17 | particleUpdater.Dispatch(1, Mathf.CeilToInt(particlesPerBatch / threadsPerGroup), 1, 1); 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets/Scripts/ChaosGame.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5298ec254435b3245bb3de1e5d24443e 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/IteratedFunctionSystem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UnityEngine.Rendering; 6 | using Unity.Collections.LowLevel.Unsafe; 7 | 8 | public class IteratedFunctionSystem : MonoBehaviour { 9 | public AffineTransformations affineTransformations; 10 | 11 | public Shader instancedPointShader; 12 | 13 | public ComputeShader particleUpdater, parallelReducer; 14 | 15 | public uint particlesPerBatch = 200000; 16 | public uint batchCount = 1; 17 | public bool updateInstanceCount = true; 18 | 19 | public uint lowDetailGenerations = 8; 20 | private uint lowDetailParticleCount = 0; 21 | 22 | public bool viewLowDetail = false; 23 | 24 | public bool uncapped = false; 25 | 26 | public Mesh[] pointCloudMeshes; 27 | private Mesh lowDetailMesh; 28 | 29 | private Material instancedPointMaterial; 30 | 31 | private RenderParams instancedRenderParams; 32 | 33 | [NonSerialized] 34 | public int threadsPerGroup = 64; 35 | 36 | public bool predictOrigin = false; 37 | 38 | public enum BoundsCalculationMode { 39 | SingleThreadedScan = 0, 40 | DivergentBranching, 41 | BankConflict, 42 | SequentialAddressing, 43 | UnrollLastWarp 44 | }; public BoundsCalculationMode boundsCalculationMode; 45 | private BoundsCalculationMode cachedCalculationMode; 46 | 47 | public bool toggleDoubleLoad = true; 48 | 49 | [Range(0.0f, 5.0f)] 50 | public float scalePadding = 1.0f; 51 | 52 | GraphicsBuffer instancedCommandBuffer, lowDetailCommandBuffer; 53 | GraphicsBuffer.IndirectDrawIndexedArgs[] instancedCommandIndexedData; 54 | 55 | private ComputeBuffer[] lowDetailIterationBuffers; 56 | private ComputeBuffer reductionDataBuffer, finalTransformBuffer; 57 | private ComputeBuffer reductionBuffer; 58 | 59 | private ComputeShader minReducer, maxReducer, addReducer; 60 | 61 | private int reductionGroupSize = 128; 62 | 63 | private float newScale; 64 | private Vector3 newOrigin; 65 | 66 | private bool buffersInitialized = false; 67 | 68 | void InitializeRenderParams() { 69 | instancedRenderParams = new RenderParams(instancedPointMaterial); 70 | instancedRenderParams.worldBounds = new Bounds(Vector3.zero, 10000 * Vector3.one); 71 | instancedRenderParams.matProps = new MaterialPropertyBlock(); 72 | 73 | instancedCommandBuffer = new GraphicsBuffer(GraphicsBuffer.Target.IndirectArguments, 1, GraphicsBuffer.IndirectDrawIndexedArgs.size); 74 | instancedCommandIndexedData = new GraphicsBuffer.IndirectDrawIndexedArgs[1]; 75 | instancedCommandIndexedData[0].instanceCount = System.Convert.ToUInt32(affineTransformations.GetTransformCount()); 76 | instancedCommandIndexedData[0].indexCountPerInstance = particlesPerBatch; 77 | 78 | instancedCommandBuffer.SetData(instancedCommandIndexedData); 79 | 80 | lowDetailCommandBuffer = new GraphicsBuffer(GraphicsBuffer.Target.IndirectArguments, 1, GraphicsBuffer.IndirectDrawIndexedArgs.size); 81 | instancedCommandIndexedData[0].indexCountPerInstance = lowDetailParticleCount; 82 | 83 | lowDetailCommandBuffer.SetData(instancedCommandIndexedData); 84 | } 85 | 86 | void InitializeMeshes() { 87 | pointCloudMeshes = new Mesh[batchCount]; 88 | 89 | for (int i = 0; i < batchCount; ++i) { 90 | // Create point cloud mesh 91 | pointCloudMeshes[i] = new Mesh(); 92 | 93 | pointCloudMeshes[i].vertexBufferTarget |= GraphicsBuffer.Target.Raw; 94 | pointCloudMeshes[i].indexBufferTarget |= GraphicsBuffer.Target.Raw; 95 | 96 | var vp = new VertexAttributeDescriptor(UnityEngine.Rendering.VertexAttribute.Position, VertexAttributeFormat.Float32, 3); 97 | 98 | pointCloudMeshes[i].SetVertexBufferParams((int)particlesPerBatch, vp); 99 | pointCloudMeshes[i].SetIndexBufferParams((int)particlesPerBatch, IndexFormat.UInt32); 100 | 101 | pointCloudMeshes[i].SetSubMesh(0, new SubMeshDescriptor(0, (int)particlesPerBatch, MeshTopology.Points), MeshUpdateFlags.DontRecalculateBounds); 102 | 103 | // Initialize point cloud vertices 104 | int cubeRootParticleCount = Mathf.CeilToInt(Mathf.Pow(particlesPerBatch, 1.0f / 3.0f)); 105 | particleUpdater.SetInt("_CubeResolution", cubeRootParticleCount); 106 | particleUpdater.SetFloat("_CubeSize", 1.0f / cubeRootParticleCount); 107 | particleUpdater.SetInt("_ParticleCount", (int)particlesPerBatch); 108 | 109 | particleUpdater.SetBuffer(0, "_VertexBuffer", pointCloudMeshes[i].GetVertexBuffer(0)); 110 | particleUpdater.SetBuffer(0, "_IndexBuffer", pointCloudMeshes[i].GetIndexBuffer()); 111 | particleUpdater.Dispatch(0, Mathf.CeilToInt(particlesPerBatch / threadsPerGroup), 1, 1); 112 | } 113 | } 114 | 115 | public Shader voxelShader; 116 | public Mesh voxelMesh; 117 | GraphicsBuffer voxelGrid, occlusionGrid, commandBuffer; 118 | GraphicsBuffer.IndirectDrawIndexedArgs[] commandIndexedData; 119 | public int voxelBounds; 120 | public float voxelSize; 121 | 122 | [Range(1, 32)] 123 | public int meshesToVoxelize = 1; 124 | 125 | public bool useLowDetailForVoxels = false; 126 | 127 | public bool renderVoxels = false; 128 | private int voxelDimension, voxelCount; 129 | private Material voxelMaterial; 130 | private RenderParams renderParams; 131 | 132 | 133 | void InitializeVoxelGrid() { 134 | voxelMaterial = new Material(voxelShader); 135 | 136 | voxelDimension = Mathf.FloorToInt(voxelBounds / voxelSize); 137 | voxelCount = voxelDimension * voxelDimension * voxelDimension; 138 | 139 | Debug.Log("Grid Dimension: " + voxelDimension.ToString()); 140 | Debug.Log("Voxel Count: " + voxelCount.ToString()); 141 | 142 | voxelGrid = new GraphicsBuffer(GraphicsBuffer.Target.Structured, voxelCount, System.Runtime.InteropServices.Marshal.SizeOf(typeof(int))); 143 | occlusionGrid = new GraphicsBuffer(GraphicsBuffer.Target.Structured, voxelCount, System.Runtime.InteropServices.Marshal.SizeOf(typeof(float))); 144 | 145 | renderParams = new RenderParams(voxelMaterial); 146 | renderParams.worldBounds = new Bounds(Vector3.zero, 10000 * Vector3.one); 147 | renderParams.matProps = new MaterialPropertyBlock(); 148 | 149 | renderParams.matProps.SetBuffer("_VoxelGrid", voxelGrid); 150 | renderParams.matProps.SetBuffer("_OcclusionGrid", occlusionGrid); 151 | renderParams.matProps.SetFloat("_VoxelSize", voxelSize); 152 | renderParams.matProps.SetInt("_GridSize", voxelDimension); 153 | renderParams.matProps.SetInt("_GridBounds", voxelBounds); 154 | 155 | instancedRenderParams.matProps.SetBuffer("_OcclusionGrid", occlusionGrid); 156 | instancedRenderParams.matProps.SetInt("_GridSize", voxelDimension); 157 | instancedRenderParams.matProps.SetInt("_GridBounds", voxelBounds); 158 | 159 | commandBuffer = new GraphicsBuffer(GraphicsBuffer.Target.IndirectArguments, 1, GraphicsBuffer.IndirectDrawIndexedArgs.size); 160 | commandIndexedData = new GraphicsBuffer.IndirectDrawIndexedArgs[1]; 161 | commandIndexedData[0].instanceCount = System.Convert.ToUInt32(voxelCount); 162 | commandIndexedData[0].indexCountPerInstance = voxelMesh.GetIndexCount(0); 163 | 164 | commandBuffer.SetData(commandIndexedData); 165 | } 166 | 167 | void InitializePredictedTransform() { 168 | reductionDataBuffer = new ComputeBuffer(3, System.Runtime.InteropServices.Marshal.SizeOf(typeof(Vector3))); 169 | finalTransformBuffer = new ComputeBuffer(1, System.Runtime.InteropServices.Marshal.SizeOf(typeof(Matrix4x4))); 170 | 171 | lowDetailParticleCount = (uint)Mathf.CeilToInt(Mathf.Pow(affineTransformations.GetTransformCount(), lowDetailGenerations)); 172 | Debug.Log("Transform Count: " + affineTransformations.GetTransformCount().ToString()); 173 | Debug.Log("Particle Count: " + lowDetailParticleCount.ToString()); 174 | lowDetailIterationBuffers = new ComputeBuffer[lowDetailGenerations - 1]; 175 | 176 | for (int i = 0; i < lowDetailGenerations - 1; ++i) { 177 | int bufferSize = Mathf.CeilToInt(Mathf.Pow(affineTransformations.GetTransformCount(), i + 1)); 178 | 179 | Debug.Log("Buffer " + i.ToString() + ": " + bufferSize.ToString()); 180 | 181 | lowDetailIterationBuffers[i] = new ComputeBuffer(bufferSize, System.Runtime.InteropServices.Marshal.SizeOf(typeof(Vector3))); 182 | } 183 | 184 | Debug.Log("Low Detail Vertices: " + lowDetailParticleCount.ToString()); 185 | 186 | lowDetailMesh = new Mesh(); 187 | 188 | lowDetailMesh.vertexBufferTarget |= GraphicsBuffer.Target.Raw; 189 | lowDetailMesh.indexBufferTarget |= GraphicsBuffer.Target.Raw; 190 | 191 | var vp = new VertexAttributeDescriptor(UnityEngine.Rendering.VertexAttribute.Position, VertexAttributeFormat.Float32, 3); 192 | 193 | lowDetailMesh.SetVertexBufferParams((int)lowDetailParticleCount, vp); 194 | lowDetailMesh.SetIndexBufferParams((int)lowDetailParticleCount, IndexFormat.UInt32); 195 | 196 | lowDetailMesh.SetSubMesh(0, new SubMeshDescriptor(0, (int)lowDetailParticleCount, MeshTopology.Points), MeshUpdateFlags.DontRecalculateBounds); 197 | 198 | 199 | int totalReductionGroups = Mathf.CeilToInt(lowDetailParticleCount / 128); 200 | reductionBuffer = new ComputeBuffer(totalReductionGroups, System.Runtime.InteropServices.Marshal.SizeOf(typeof(Vector3))); 201 | 202 | minReducer = Instantiate(parallelReducer); 203 | minReducer.EnableKeyword("MIN_REDUCTION"); 204 | minReducer.DisableKeyword("MAX_REDUCTION"); 205 | minReducer.DisableKeyword("ADD_REDUCTION"); 206 | 207 | maxReducer = Instantiate(parallelReducer); 208 | maxReducer.EnableKeyword("MAX_REDUCTION"); 209 | maxReducer.DisableKeyword("MIN_REDUCTION"); 210 | maxReducer.DisableKeyword("ADD_REDUCTION"); 211 | 212 | addReducer = Instantiate(parallelReducer); 213 | addReducer.DisableKeyword("MAX_REDUCTION"); 214 | addReducer.DisableKeyword("MIN_REDUCTION"); 215 | addReducer.EnableKeyword("ADD_REDUCTION"); 216 | 217 | } 218 | 219 | void EnableReductionKeyword(ComputeShader reducer, BoundsCalculationMode boundsMode) { 220 | if (boundsMode == BoundsCalculationMode.DivergentBranching) 221 | reducer.EnableKeyword("INTERLEAVED_ADDRESSING_DIVERGENT"); 222 | if (boundsMode == BoundsCalculationMode.BankConflict) 223 | reducer.EnableKeyword("INTERLEAVED_ADDRESSING_BANK_CONFLICT"); 224 | if (boundsMode == BoundsCalculationMode.SequentialAddressing) 225 | reducer.EnableKeyword("SEQUENTIAL_ADDRESSING"); 226 | if (boundsMode == BoundsCalculationMode.UnrollLastWarp) 227 | reducer.EnableKeyword("UNROLL_LAST_WARP"); 228 | } 229 | 230 | void DisableReductionKeywords(ComputeShader reducer) { 231 | reducer.DisableKeyword("INTERLEAVED_ADDRESSING_DIVERGENT"); 232 | reducer.DisableKeyword("INTERLEAVED_ADDRESSING_BANK_CONFLICT"); 233 | reducer.DisableKeyword("SEQUENTIAL_ADDRESSING"); 234 | reducer.DisableKeyword("UNROLL_LAST_WARP"); 235 | } 236 | 237 | void UpdateReductionKeywords(ComputeShader reducer) { 238 | DisableReductionKeywords(reducer); 239 | EnableReductionKeyword(reducer, boundsCalculationMode); 240 | cachedCalculationMode = boundsCalculationMode; 241 | } 242 | 243 | void ToggleDoubleLoad() { 244 | if (toggleDoubleLoad) { 245 | if (minReducer.IsKeywordEnabled("DOUBLE_LOAD")) { 246 | minReducer.DisableKeyword("DOUBLE_LOAD"); 247 | maxReducer.DisableKeyword("DOUBLE_LOAD"); 248 | addReducer.DisableKeyword("DOUBLE_LOAD"); 249 | reductionGroupSize = 128; 250 | Debug.Log("Disabled double load"); 251 | } else { 252 | minReducer.EnableKeyword("DOUBLE_LOAD"); 253 | maxReducer.EnableKeyword("DOUBLE_LOAD"); 254 | addReducer.EnableKeyword("DOUBLE_LOAD"); 255 | reductionGroupSize = 256; 256 | Debug.Log("Enabled double load"); 257 | } 258 | toggleDoubleLoad = false; 259 | } 260 | } 261 | 262 | 263 | void OnEnable() { 264 | // Debug.Log(SystemInfo.graphicsDeviceName); 265 | 266 | buffersInitialized = false; 267 | 268 | Application.targetFrameRate = 120; 269 | 270 | UnsafeUtility.SetLeakDetectionMode(Unity.Collections.NativeLeakDetectionMode.Enabled); 271 | instancedPointMaterial = new Material(instancedPointShader); 272 | 273 | if (affineTransformations.GetTransformCount() != 0) { 274 | 275 | Debug.Log("Enabling"); 276 | InitializeMeshes(); 277 | InitializePredictedTransform(); 278 | InitializeRenderParams(); 279 | InitializeVoxelGrid(); 280 | 281 | cachedCalculationMode = boundsCalculationMode; 282 | UpdateReductionKeywords(minReducer); 283 | UpdateReductionKeywords(maxReducer); 284 | UpdateReductionKeywords(addReducer); 285 | ToggleDoubleLoad(); 286 | 287 | buffersInitialized = true; 288 | } 289 | } 290 | 291 | public virtual void IterateSystem() { 292 | // Reset System 293 | int cubeRootParticleCount = Mathf.CeilToInt(Mathf.Pow(particlesPerBatch, 1.0f / 3.0f)); 294 | particleUpdater.SetInt("_CubeResolution", cubeRootParticleCount); 295 | particleUpdater.SetFloat("_CubeSize", 0); 296 | 297 | particleUpdater.SetBuffer(0, "_VertexBuffer", pointCloudMeshes[0].GetVertexBuffer(0)); 298 | particleUpdater.SetBuffer(0, "_IndexBuffer", pointCloudMeshes[0].GetIndexBuffer()); 299 | particleUpdater.Dispatch(0, Mathf.CeilToInt(particlesPerBatch / threadsPerGroup), 1, 1); 300 | 301 | // Seed First Iteration 302 | int transformCount = affineTransformations.GetTransformCount(); 303 | 304 | particleUpdater.SetInt("_TransformationCount", transformCount); 305 | particleUpdater.SetInt("_GenerationOffset", 0); 306 | particleUpdater.SetInt("_GenerationLimit", transformCount); 307 | particleUpdater.SetBuffer(2, "_VertexBuffer", pointCloudMeshes[0].GetVertexBuffer(0)); 308 | particleUpdater.SetBuffer(2, "_Transformations", affineTransformations.GetAffineBuffer()); 309 | particleUpdater.Dispatch(2, Mathf.CeilToInt(particlesPerBatch / threadsPerGroup), 1, 1); 310 | 311 | int iteratedParticles = transformCount; 312 | int previousGenerationSize = transformCount; 313 | while (iteratedParticles < particlesPerBatch) { 314 | int generationSize = previousGenerationSize * transformCount; 315 | 316 | particleUpdater.SetInt("_GenerationOffset", iteratedParticles); 317 | particleUpdater.SetInt("_GenerationLimit", (int)Mathf.Clamp(iteratedParticles + generationSize, 0, particlesPerBatch)); 318 | 319 | particleUpdater.SetBuffer(2, "_VertexBuffer", pointCloudMeshes[0].GetVertexBuffer(0)); 320 | particleUpdater.SetBuffer(2, "_Transformations", affineTransformations.GetAffineBuffer()); 321 | 322 | 323 | particleUpdater.Dispatch(2, Mathf.CeilToInt(particlesPerBatch / threadsPerGroup), 1, 1); 324 | 325 | 326 | iteratedParticles += generationSize; 327 | previousGenerationSize = generationSize; 328 | } 329 | } 330 | 331 | Matrix4x4 GetFinalFinalTransform() { 332 | if (predictOrigin) { 333 | return Matrix4x4.Scale((Vector3.one * voxelBounds) / newScale) * Matrix4x4.Translate(-newOrigin); 334 | } 335 | 336 | return affineTransformations.GetFinalTransform(); 337 | } 338 | 339 | void Reduce(ComputeShader reducer) { 340 | int reductionGroupCount = Mathf.CeilToInt(lowDetailParticleCount / reductionGroupSize); 341 | 342 | // Initial Reduction (Mesh -> Reduction Buffer) 343 | reducer.SetBuffer(1, "_InputBuffer", lowDetailMesh.GetVertexBuffer(0)); 344 | reducer.SetBuffer(1, "_OutputBuffer", reductionBuffer); 345 | reducer.SetInt("_ReductionBufferSize", (int)lowDetailParticleCount); 346 | reducer.Dispatch(1, reductionGroupCount, 1, 1); 347 | 348 | // Cross-kernel Reduction (Reduction Buffer -> Reduction Buffer) 349 | while (reductionGroupCount > reductionGroupSize) { 350 | reductionGroupCount = Mathf.CeilToInt(reductionGroupCount / reductionGroupSize); 351 | 352 | // Global Min Reduce 353 | reducer.SetBuffer(1, "_InputBuffer", reductionBuffer); 354 | reducer.SetBuffer(1, "_OutputBuffer", reductionBuffer); 355 | reducer.SetInt("_ReductionBufferSize", reductionGroupCount); 356 | reducer.Dispatch(1, reductionGroupCount, 1, 1); 357 | } 358 | 359 | // Final Reduction (Reduction Buffer -> Bounding Box Buffer) 360 | reducer.SetInt("_ReductionBufferSize", Math.Min(128, reductionGroupCount)); 361 | reducer.SetBuffer(2, "_InputBuffer", reductionBuffer); 362 | reducer.SetBuffer(2, "_OutputBuffer", reductionDataBuffer); 363 | reducer.Dispatch(2, 1, 1, 1); 364 | } 365 | 366 | List gizmoPoints = new(); 367 | 368 | public bool dumpData = false; 369 | public bool updateGizmoPoints = false; 370 | void PredictFinalTransform() { 371 | // Seed First Iteration 372 | int transformCount = affineTransformations.GetTransformCount(); 373 | 374 | parallelReducer.SetInt("_TransformationCount", transformCount); 375 | parallelReducer.SetBuffer(4, "_OutputBuffer", lowDetailIterationBuffers[0]); 376 | parallelReducer.SetBuffer(4, "_Transformations", affineTransformations.GetAffineBuffer()); 377 | 378 | parallelReducer.Dispatch(4, 1, 1, 1); // Assumes transform count <64 379 | 380 | for (int i = 1; i < lowDetailGenerations - 1; ++i) { 381 | parallelReducer.SetBuffer(5, "_InputBuffer", lowDetailIterationBuffers[i - 1]); 382 | parallelReducer.SetBuffer(5, "_OutputBuffer", lowDetailIterationBuffers[i]); 383 | parallelReducer.SetBuffer(5, "_Transformations", affineTransformations.GetAffineBuffer()); 384 | 385 | int bufferSize = Mathf.CeilToInt(Mathf.Pow(affineTransformations.GetTransformCount(), i + 1)); 386 | parallelReducer.Dispatch(5, (int)Mathf.Max(1, Mathf.CeilToInt(bufferSize / threadsPerGroup)), 1, 1); 387 | 388 | } 389 | 390 | parallelReducer.SetBuffer(5, "_InputBuffer", lowDetailIterationBuffers[lowDetailGenerations - 2]); 391 | parallelReducer.SetBuffer(5, "_OutputBuffer", lowDetailMesh.GetVertexBuffer(0)); 392 | parallelReducer.SetBuffer(5, "_Transformations", affineTransformations.GetAffineBuffer()); 393 | 394 | parallelReducer.Dispatch(5, Mathf.CeilToInt(lowDetailParticleCount / threadsPerGroup) - 1, 1, 1); 395 | 396 | 397 | if (boundsCalculationMode == BoundsCalculationMode.SingleThreadedScan) { 398 | parallelReducer.SetBuffer(0, "_InputBuffer", lowDetailMesh.GetVertexBuffer(0)); 399 | parallelReducer.SetBuffer(0, "_OutputBuffer", reductionDataBuffer); 400 | parallelReducer.SetInt("_ReductionBufferSize", (int)lowDetailParticleCount); 401 | parallelReducer.Dispatch(0, 1, 1, 1); 402 | } else { 403 | Reduce(minReducer); 404 | Reduce(maxReducer); 405 | Reduce(addReducer); 406 | } 407 | 408 | parallelReducer.SetBuffer(3, "_InputBuffer", reductionDataBuffer); 409 | parallelReducer.SetBuffer(3, "_FinalTransformBuffer", finalTransformBuffer); 410 | parallelReducer.SetFloat("_TargetBoundsSize", voxelBounds); 411 | parallelReducer.SetFloat("_ScalePadding", scalePadding); 412 | parallelReducer.SetFloat("_ParticleCount", lowDetailParticleCount); 413 | parallelReducer.Dispatch(3, 1, 1, 1); 414 | 415 | if (updateGizmoPoints) { 416 | gizmoPoints.Clear(); 417 | Vector3[] predictedPoints = new Vector3[3]; 418 | 419 | reductionDataBuffer.GetData(predictedPoints); 420 | 421 | for (int i = 0; i < 3; ++i) { 422 | gizmoPoints.Add(new Vector3(predictedPoints[i].x, predictedPoints[i].y, predictedPoints[i].z)); 423 | } 424 | 425 | Vector3 p1 = gizmoPoints[0]; 426 | Vector3 p2 = gizmoPoints[1]; 427 | Vector3 p3 = gizmoPoints[2]; 428 | 429 | float x = Mathf.Abs(p1.x - p2.x); 430 | float y = Mathf.Abs(p1.y - p2.y); 431 | float z = Mathf.Abs(p1.z - p2.z); 432 | 433 | newOrigin = new Vector3(predictedPoints[2].x, predictedPoints[2].y, predictedPoints[2].z); 434 | newOrigin = Vector3.Lerp(p1, p2, 0.5f); 435 | newOrigin = p3 / lowDetailParticleCount; 436 | newScale = Mathf.Max(Vector3.Distance(p1, newOrigin), Vector3.Distance(p2, newOrigin)); 437 | // newScale = Vector3.Distance(p1, p2); 438 | newScale *= scalePadding; 439 | } 440 | 441 | if (dumpData) { 442 | Vector3[] predictedPoints = new Vector3[3]; 443 | 444 | reductionDataBuffer.GetData(predictedPoints); 445 | 446 | Vector3[] meshPoints = new Vector3[lowDetailParticleCount]; 447 | lowDetailMesh.GetVertexBuffer(0).GetData(meshPoints); 448 | 449 | Vector3 cpuMin = Vector3.one * 1000000000; 450 | Vector3 cpuMax = Vector3.one * -1000000000; 451 | Vector3 cpuAdd = Vector3.zero; 452 | 453 | for (int i = 0; i < meshPoints.Length; ++i) { 454 | cpuMin = Vector3.Min(cpuMin, meshPoints[i]); 455 | cpuMax = Vector3.Max(cpuMax, meshPoints[i]); 456 | cpuAdd += meshPoints[i]; 457 | } 458 | 459 | Debug.Log("Minimum Found By CPU: " + cpuMin.ToString()); 460 | Debug.Log("Maximum Found By CPU: " + cpuMax.ToString()); 461 | Debug.Log("Sum Found By CPU: " + cpuAdd.ToString()); 462 | 463 | Debug.Log("Minimum Found By GPU: " + predictedPoints[0].ToString()); 464 | Debug.Log("Maximum Found By GPU: " + predictedPoints[1].ToString()); 465 | Debug.Log("Sum Found By GPU: " + predictedPoints[2].ToString()); 466 | 467 | foreach (var localKeyword in minReducer.enabledKeywords) { 468 | Debug.Log("Local min shader keyword " + localKeyword.name + " is currently enabled"); 469 | } 470 | foreach (var localKeyword in maxReducer.enabledKeywords) { 471 | Debug.Log("Local max shader keyword " + localKeyword.name + " is currently enabled"); 472 | } 473 | foreach (var localKeyword in addReducer.enabledKeywords) { 474 | Debug.Log("Local add shader keyword " + localKeyword.name + " is currently enabled"); 475 | } 476 | 477 | dumpData = false; 478 | } 479 | } 480 | 481 | void Voxelize() { 482 | int maxGroups = 65535; 483 | int maxThreadsPerGroup = threadsPerGroup * 65535; 484 | int groupCount = Mathf.CeilToInt(voxelCount / threadsPerGroup); 485 | 486 | int clearedMemoryOffset = 0; 487 | int clearedGroupCount = groupCount; 488 | while (clearedMemoryOffset < voxelCount) { 489 | particleUpdater.SetInt("_MemoryOffset", clearedMemoryOffset); 490 | 491 | // Clear Voxel Grid 492 | particleUpdater.SetBuffer(3, "_VoxelGrid", voxelGrid); 493 | particleUpdater.Dispatch(3, Mathf.Min(clearedGroupCount, maxGroups), 1, 1); 494 | 495 | // Clear Occlusion 496 | particleUpdater.SetBuffer(5, "_OcclusionGrid", occlusionGrid); 497 | particleUpdater.Dispatch(5, Mathf.Min(clearedGroupCount, maxGroups), 1, 1); 498 | 499 | clearedGroupCount -= maxGroups; 500 | clearedMemoryOffset += maxThreadsPerGroup; 501 | } 502 | 503 | // Particles To Voxel (Brute Force) 504 | particleUpdater.SetInt("_GridSize", Mathf.FloorToInt(voxelBounds / voxelSize)); 505 | particleUpdater.SetInt("_GridBounds", voxelBounds); 506 | particleUpdater.SetBuffer(4, "_FinalTransformBuffer", finalTransformBuffer); 507 | particleUpdater.SetInt("_TransformationCount", affineTransformations.GetTransformCount()); 508 | 509 | if (useLowDetailForVoxels) { 510 | particleUpdater.SetBuffer(4, "_VertexBuffer", lowDetailMesh.GetVertexBuffer(0)); 511 | particleUpdater.SetBuffer(4, "_VoxelGrid", voxelGrid); 512 | particleUpdater.SetBuffer(4, "_Transformations", affineTransformations.GetAffineBuffer()); 513 | particleUpdater.Dispatch(4, Mathf.CeilToInt(lowDetailParticleCount / threadsPerGroup), 1, 1); 514 | } 515 | else { 516 | for (int i = 0; i < Mathf.Min(meshesToVoxelize, batchCount); ++i) { 517 | particleUpdater.SetBuffer(4, "_VertexBuffer", pointCloudMeshes[i].GetVertexBuffer(0)); 518 | particleUpdater.SetBuffer(4, "_VoxelGrid", voxelGrid); 519 | particleUpdater.SetBuffer(4, "_Transformations", affineTransformations.GetAffineBuffer()); 520 | particleUpdater.Dispatch(4, Mathf.CeilToInt(particlesPerBatch / threadsPerGroup), 1, 1); 521 | } 522 | } 523 | 524 | int occlusionMemoryOffset = 0; 525 | int occlusionGroupCount = groupCount; 526 | particleUpdater.SetBuffer(6, "_VoxelGrid", voxelGrid); 527 | particleUpdater.SetBuffer(6, "_OcclusionGrid", occlusionGrid); 528 | while (occlusionMemoryOffset < voxelCount) { 529 | particleUpdater.SetInt("_MemoryOffset", occlusionMemoryOffset); 530 | particleUpdater.Dispatch(6, Mathf.Min(occlusionGroupCount, maxGroups), 1, 1); 531 | 532 | occlusionGroupCount -= maxGroups; 533 | occlusionMemoryOffset += maxThreadsPerGroup; 534 | } 535 | } 536 | 537 | [Range(0.0f, 3.0f)] 538 | public float occlusionMultiplier = 1.0f; 539 | 540 | [Range(0.0f, 5.0f)] 541 | public float occlusionAttenuation = 1.0f; 542 | 543 | public Color particleColor, occlusionColor; 544 | 545 | void DrawParticles() { 546 | instancedRenderParams.matProps.SetFloat("_OcclusionMultiplier", occlusionMultiplier); 547 | instancedRenderParams.matProps.SetFloat("_OcclusionAttenuation", occlusionAttenuation); 548 | instancedRenderParams.matProps.SetVector("_ParticleColor", particleColor); 549 | instancedRenderParams.matProps.SetVector("_OcclusionColor", occlusionColor); 550 | instancedRenderParams.matProps.SetBuffer("_FinalTransformBuffer", finalTransformBuffer); 551 | instancedRenderParams.matProps.SetBuffer("_Transformations", affineTransformations.GetAffineBuffer()); 552 | 553 | if (viewLowDetail) { 554 | Graphics.RenderMeshIndirect(instancedRenderParams, lowDetailMesh, lowDetailCommandBuffer, 1); 555 | } else { 556 | for (int i = 0; i < batchCount; ++i) { 557 | Graphics.RenderMeshIndirect(instancedRenderParams, pointCloudMeshes[i], instancedCommandBuffer, 1); 558 | } 559 | } 560 | } 561 | 562 | void Update() { 563 | // Wait for affine transformations to create data buffers 564 | if (affineTransformations.GetTransformCount() == 0) return; 565 | 566 | if (!buffersInitialized) { 567 | InitializeMeshes(); 568 | InitializePredictedTransform(); 569 | InitializeRenderParams(); 570 | InitializeVoxelGrid(); 571 | 572 | cachedCalculationMode = boundsCalculationMode; 573 | UpdateReductionKeywords(minReducer); 574 | UpdateReductionKeywords(maxReducer); 575 | UpdateReductionKeywords(addReducer); 576 | ToggleDoubleLoad(); 577 | 578 | buffersInitialized = true; 579 | } 580 | 581 | // Some weird race condition makes it so that the correct transformation count doesn't make it here in time so it breaks the instancing 582 | // As a hack, the first 1 second of runtime will repeatedly set this value in order to ensure proper functionality. In the industry, we call this a "loading screen" 583 | if (updateInstanceCount) { 584 | instancedCommandIndexedData[0].instanceCount = System.Convert.ToUInt32(affineTransformations.GetTransformCount()); 585 | instancedCommandIndexedData[0].indexCountPerInstance = particlesPerBatch; 586 | 587 | instancedCommandBuffer.SetData(instancedCommandIndexedData); 588 | instancedCommandIndexedData[0].indexCountPerInstance = lowDetailParticleCount; 589 | 590 | lowDetailCommandBuffer.SetData(instancedCommandIndexedData); 591 | updateInstanceCount = false; 592 | 593 | Debug.Log("Particles in memory: " + (particlesPerBatch * batchCount).ToString()); 594 | Debug.Log("Particles drawn with instancing: " + (particlesPerBatch * batchCount * instancedCommandIndexedData[0].instanceCount).ToString()); 595 | } 596 | 597 | if (cachedCalculationMode != boundsCalculationMode) { 598 | UpdateReductionKeywords(minReducer); 599 | UpdateReductionKeywords(maxReducer); 600 | UpdateReductionKeywords(addReducer); 601 | } 602 | 603 | ToggleDoubleLoad(); 604 | 605 | // Enable/Disable system iteration 606 | if (Input.GetKeyDown("r")) uncapped = !uncapped; 607 | 608 | if (uncapped && affineTransformations.GetTransformCount() != 0) { 609 | PredictFinalTransform(); 610 | IterateSystem(); 611 | } 612 | 613 | Voxelize(); 614 | 615 | if (renderVoxels) { 616 | Graphics.RenderMeshIndirect(renderParams, voxelMesh, commandBuffer, 1); 617 | } else { 618 | DrawParticles(); 619 | } 620 | } 621 | 622 | void OnDisable() { 623 | for (int i = 0; i < batchCount; ++i) { 624 | pointCloudMeshes[i].GetVertexBuffer(0).Release(); 625 | pointCloudMeshes[i].GetIndexBuffer().Release(); 626 | 627 | UnityEngine.Object.Destroy(pointCloudMeshes[i]); 628 | } 629 | 630 | for (int i = 0; i < lowDetailIterationBuffers.Length; ++i) { 631 | lowDetailIterationBuffers[i].Release(); 632 | } 633 | 634 | lowDetailMesh.GetVertexBuffer(0).Release(); 635 | lowDetailMesh.GetIndexBuffer().Release(); 636 | UnityEngine.Object.Destroy(lowDetailMesh); 637 | 638 | reductionBuffer.Release(); 639 | pointCloudMeshes = null; 640 | commandBuffer.Release(); 641 | instancedCommandBuffer.Release(); 642 | lowDetailCommandBuffer.Release(); 643 | voxelGrid.Release(); 644 | occlusionGrid.Release(); 645 | reductionDataBuffer.Release(); 646 | finalTransformBuffer.Release(); 647 | } 648 | 649 | void OnDrawGizmos() { 650 | // Voxel bounds cube 651 | Gizmos.color = Color.red; 652 | Gizmos.DrawWireCube(Vector3.zero, Vector3.one * voxelBounds); 653 | 654 | if (updateGizmoPoints) { 655 | Gizmos.color = Color.yellow; 656 | for (int i = 0; i < gizmoPoints.Count; ++i) Gizmos.DrawSphere(gizmoPoints[i], 0.025f); 657 | 658 | if (gizmoPoints.Count > 0) { 659 | Gizmos.color = Color.green; 660 | Gizmos.DrawSphere(newOrigin, 0.025f); 661 | 662 | Gizmos.DrawWireCube(newOrigin, Vector3.one * newScale); 663 | } 664 | } 665 | } 666 | } 667 | -------------------------------------------------------------------------------- /Assets/Scripts/IteratedFunctionSystem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e4d32cc418c7c2c47adcb5f016300918 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/ProceduralWizard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Random = UnityEngine.Random; 3 | using TransformInstructions = TransformSet.TransformInstructions; 4 | using AffinePreset = TransformSet.AffinePreset; 5 | using System.Collections; 6 | using System.Collections.Generic; 7 | using UnityEngine; 8 | 9 | public class ProceduralWizard : MonoBehaviour { 10 | public Vector3 scaleMin; 11 | public Vector3 scaleMax; 12 | public Vector3 shearXMin; 13 | public Vector3 shearXMax; 14 | public Vector3 shearYMin; 15 | public Vector3 shearYMax; 16 | public Vector3 shearZMin; 17 | public Vector3 shearZMax; 18 | public Vector3 rotateMin; 19 | public Vector3 rotateMax; 20 | public Vector3 translateMin; 21 | public Vector3 translateMax; 22 | public AffinePreset translationTemplate; 23 | 24 | Vector3 GenerateRandomVector(Vector3 min, Vector3 max) { 25 | return new Vector3(Random.Range(min.x, max.x), Random.Range(min.y, max.y), Random.Range(min.z, max.z)); 26 | } 27 | 28 | public TransformInstructions GenerateRandomInstructions() { 29 | TransformInstructions t = new TransformInstructions(); 30 | 31 | t.scale = GenerateRandomVector(scaleMin, scaleMax); 32 | t.shearX = GenerateRandomVector(shearXMin, shearXMax); 33 | t.shearY = GenerateRandomVector(shearYMin, shearYMax); 34 | t.shearZ = GenerateRandomVector(shearZMin, shearZMax); 35 | t.rotate = GenerateRandomVector(rotateMin, rotateMax); 36 | t.translate = GenerateRandomVector(translateMin, translateMax); 37 | 38 | return t; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Assets/Scripts/ProceduralWizard.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2e736e87fafb0554f9f37774f5cef63f 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/SetBlender.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using TransformInstructions = TransformSet.TransformInstructions; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | public class SetBlender : MonoBehaviour { 7 | 8 | public TransformSet set1, set2; 9 | 10 | public AnimationCurve animationCurve; 11 | 12 | public bool useAnimationCurve = false; 13 | 14 | [Range(0.0f, 1.0f)] 15 | public float t = 0.0f; 16 | 17 | public bool animate = false; 18 | 19 | [Range(0.01f, 20.0f)] 20 | public float speed = 1.0f; 21 | public bool frameRateIndependent = true; 22 | 23 | public bool useRamp = false; 24 | 25 | [Range(0.01f, 20.0f)] 26 | public float rampSpeed = 1.0f; 27 | 28 | [Range(0.001f, 30.0f)] 29 | public float epsilon = 1.0f; 30 | 31 | public TransformInstructions finalTransform = new TransformInstructions(); 32 | 33 | private List blendedSet = new List(); 34 | 35 | private bool swap = false; 36 | 37 | public List GetBlendedSet() { 38 | return blendedSet; 39 | } 40 | 41 | public TransformInstructions GetFinalTransform() { 42 | return finalTransform; 43 | } 44 | 45 | TransformInstructions InterpolateInstructions(TransformInstructions t1, TransformInstructions t2, float t) { 46 | TransformInstructions interpolatedInstructions = new TransformInstructions(); 47 | 48 | interpolatedInstructions.scale = Vector3.LerpUnclamped(t1.scale, t2.scale, t); 49 | interpolatedInstructions.shearX = Vector3.LerpUnclamped(t1.shearX, t2.shearX, t); 50 | interpolatedInstructions.shearY = Vector3.LerpUnclamped(t1.shearY, t2.shearY, t); 51 | interpolatedInstructions.shearZ = Vector3.LerpUnclamped(t1.shearZ, t2.shearZ, t); 52 | interpolatedInstructions.translate = Vector3.LerpUnclamped(t1.translate, t2.translate, t); 53 | 54 | Quaternion r1 = Quaternion.Euler(t1.rotate); 55 | Quaternion r2 = Quaternion.Euler(t2.rotate); 56 | Quaternion r3 = Quaternion.SlerpUnclamped(r1, r2, t); 57 | 58 | interpolatedInstructions.rotate = r3.eulerAngles; 59 | 60 | return interpolatedInstructions; 61 | } 62 | 63 | 64 | private void BlendSets() { 65 | blendedSet.Clear(); 66 | 67 | // Copy instruction sets so the following modifications don't ruin the originals 68 | List instructionSet1 = new List(set1.transformSet); 69 | List instructionSet2 = new List(set2.transformSet); 70 | 71 | // Apply post transform to all instruction sets 72 | for (int i = 0; i < instructionSet1.Count; ++i) { 73 | instructionSet1[i] += set1.postTransform; 74 | } 75 | 76 | for (int i = 0; i < instructionSet2.Count; ++i) { 77 | instructionSet2[i] += set2.postTransform; 78 | } 79 | 80 | // In order to blend smaller instruction sets with larger instruction sets, append identity matrices to smaller set 81 | int sizeDifference = Mathf.Abs(instructionSet1.Count - instructionSet2.Count); 82 | if (instructionSet1.Count < instructionSet2.Count) { 83 | for (int i = 0; i < sizeDifference; ++i) { 84 | instructionSet1.Add(TransformSet.GetIdentity()); 85 | } 86 | } else if (instructionSet2.Count < instructionSet1.Count) { 87 | for (int i = 0; i < sizeDifference; ++i) { 88 | instructionSet2.Add(TransformSet.GetIdentity()); 89 | } 90 | } 91 | 92 | // Blend instruction sets and create list of affine transformations 93 | for (int i = 0; i < instructionSet1.Count; ++i) { 94 | float blendFactor = animationCurve.Evaluate(t); // TO DO: Easing Functions 95 | 96 | if (swap) 97 | blendedSet.Add(InterpolateInstructions(instructionSet2[i], instructionSet1[i], blendFactor)); 98 | else 99 | blendedSet.Add(InterpolateInstructions(instructionSet1[i], instructionSet2[i], blendFactor)); 100 | } 101 | } 102 | 103 | private List moveTowardSet = new List(); 104 | 105 | Vector3 ExpDecay(Vector3 a, Vector3 b, float decay) { 106 | return Vector3.LerpUnclamped(a, b, decay); 107 | } 108 | 109 | float ramp = 0; 110 | TransformInstructions MoveTowardInstructions(TransformInstructions t1, TransformInstructions t2, float decay) { 111 | TransformInstructions i = new TransformInstructions(); 112 | 113 | float decayDeltaTime = 0.0f; 114 | 115 | if (frameRateIndependent) decayDeltaTime = decay * Time.deltaTime; 116 | else decayDeltaTime = decay; 117 | 118 | if (useRamp) decayDeltaTime *= animationCurve.Evaluate(ramp); 119 | 120 | decayDeltaTime = Mathf.Min(decayDeltaTime, 1.0f); 121 | 122 | i.scale = ExpDecay(t1.scale, t2.scale, decayDeltaTime); 123 | i.shearX = ExpDecay(t1.shearX, t2.shearX, decayDeltaTime); 124 | i.shearY = ExpDecay(t1.shearY, t2.shearY, decayDeltaTime); 125 | i.shearZ = ExpDecay(t1.shearZ, t2.shearZ, decayDeltaTime); 126 | i.translate = ExpDecay(t1.translate, t2.translate, decayDeltaTime); 127 | 128 | Quaternion r1 = Quaternion.Euler(t1.rotate); 129 | Quaternion r2 = Quaternion.Euler(t2.rotate); 130 | Quaternion r3 = Quaternion.Slerp(r1, r2, Mathf.Min(decayDeltaTime, 1.0f)); 131 | 132 | i.rotate = r3.eulerAngles; 133 | 134 | return i; 135 | } 136 | 137 | private void MoveTowardSet() { 138 | blendedSet.Clear(); 139 | 140 | if (moveTowardSet.Count != set1.transformSet.Count) moveTowardSet = new List(set1.transformSet); 141 | 142 | for (int i = 0; i < moveTowardSet.Count; ++i) { 143 | moveTowardSet[i] = MoveTowardInstructions(moveTowardSet[i], set2.transformSet[i], speed); 144 | blendedSet.Add(moveTowardSet[i]); 145 | } 146 | } 147 | 148 | private void OnEnable() { 149 | t = 0; 150 | 151 | moveTowardSet = new List(set1.transformSet); 152 | 153 | if (useAnimationCurve) 154 | BlendSets(); 155 | else 156 | MoveTowardSet(); 157 | } 158 | 159 | private bool paused = false; 160 | private void Update() { 161 | 162 | if (Input.GetKeyDown("space")) animate = !animate; 163 | 164 | // Update ramp timer for lerp smoothing 165 | if (frameRateIndependent) { 166 | ramp += Time.deltaTime * rampSpeed; 167 | } else { 168 | ramp += rampSpeed; 169 | } 170 | 171 | // Automate T 172 | if (animate) { 173 | if (frameRateIndependent) { 174 | t += Time.deltaTime * speed; 175 | } else { 176 | t += speed; 177 | } 178 | 179 | if (useAnimationCurve) { 180 | t = Mathf.Clamp(t, 0.0f, 1.0f); 181 | if (t >= 1) { 182 | swap = !swap; 183 | t = 0; 184 | 185 | if (swap) set1.ApplyPreset(); 186 | else set2.ApplyPreset(); 187 | } 188 | } else { 189 | if (t >= epsilon) { 190 | t = 0; 191 | ramp = 0; 192 | set2.ApplyPreset(); 193 | } 194 | } 195 | } 196 | 197 | // Update output set 198 | if (useAnimationCurve) { 199 | BlendSets(); 200 | } else { 201 | if (Input.GetKeyDown("f")) { 202 | ramp = 0; 203 | set2.ApplyPreset(); 204 | } 205 | MoveTowardSet(); 206 | } 207 | } 208 | } 209 | -------------------------------------------------------------------------------- /Assets/Scripts/SetBlender.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 57bb4d0125e093e40bfdf8d42fac5934 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/SimpleCameraController.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityTemplateProjects 4 | { 5 | public class SimpleCameraController : MonoBehaviour 6 | { 7 | class CameraState 8 | { 9 | public float yaw; 10 | public float pitch; 11 | public float roll; 12 | public float x; 13 | public float y; 14 | public float z; 15 | 16 | public void SetFromTransform(Transform t) 17 | { 18 | pitch = t.eulerAngles.x; 19 | yaw = t.eulerAngles.y; 20 | roll = t.eulerAngles.z; 21 | x = t.position.x; 22 | y = t.position.y; 23 | z = t.position.z; 24 | } 25 | 26 | public void Translate(Vector3 translation) 27 | { 28 | Vector3 rotatedTranslation = Quaternion.Euler(pitch, yaw, roll) * translation; 29 | 30 | x += rotatedTranslation.x; 31 | y += rotatedTranslation.y; 32 | z += rotatedTranslation.z; 33 | } 34 | 35 | public void LerpTowards(CameraState target, float positionLerpPct, float rotationLerpPct) 36 | { 37 | yaw = Mathf.Lerp(yaw, target.yaw, rotationLerpPct); 38 | pitch = Mathf.Lerp(pitch, target.pitch, rotationLerpPct); 39 | roll = Mathf.Lerp(roll, target.roll, rotationLerpPct); 40 | 41 | x = Mathf.Lerp(x, target.x, positionLerpPct); 42 | y = Mathf.Lerp(y, target.y, positionLerpPct); 43 | z = Mathf.Lerp(z, target.z, positionLerpPct); 44 | } 45 | 46 | public void UpdateTransform(Transform t) 47 | { 48 | t.eulerAngles = new Vector3(pitch, yaw, roll); 49 | t.position = new Vector3(x, y, z); 50 | } 51 | } 52 | 53 | CameraState m_TargetCameraState = new CameraState(); 54 | CameraState m_InterpolatingCameraState = new CameraState(); 55 | 56 | [Header("Movement Settings")] 57 | [Tooltip("Exponential boost factor on translation, controllable by mouse wheel.")] 58 | public float boost = 3.5f; 59 | 60 | [Tooltip("Time it takes to interpolate camera position 99% of the way to the target."), Range(0.001f, 1f)] 61 | public float positionLerpTime = 0.2f; 62 | 63 | [Header("Rotation Settings")] 64 | [Tooltip("X = Change in mouse position.\nY = Multiplicative factor for camera rotation.")] 65 | public AnimationCurve mouseSensitivityCurve = new AnimationCurve(new Keyframe(0f, 0.5f, 0f, 5f), new Keyframe(1f, 2.5f, 0f, 0f)); 66 | 67 | [Tooltip("Time it takes to interpolate camera rotation 99% of the way to the target."), Range(0.001f, 1f)] 68 | public float rotationLerpTime = 0.01f; 69 | 70 | [Tooltip("Whether or not to invert our Y axis for mouse input to rotation.")] 71 | public bool invertY = false; 72 | 73 | void OnEnable() 74 | { 75 | m_TargetCameraState.SetFromTransform(transform); 76 | m_InterpolatingCameraState.SetFromTransform(transform); 77 | } 78 | 79 | Vector3 GetInputTranslationDirection() 80 | { 81 | Vector3 direction = new Vector3(); 82 | if (Input.GetKey(KeyCode.W)) 83 | { 84 | direction += Vector3.forward; 85 | } 86 | if (Input.GetKey(KeyCode.S)) 87 | { 88 | direction += Vector3.back; 89 | } 90 | if (Input.GetKey(KeyCode.A)) 91 | { 92 | direction += Vector3.left; 93 | } 94 | if (Input.GetKey(KeyCode.D)) 95 | { 96 | direction += Vector3.right; 97 | } 98 | if (Input.GetKey(KeyCode.Q)) 99 | { 100 | direction += Vector3.down; 101 | } 102 | if (Input.GetKey(KeyCode.E)) 103 | { 104 | direction += Vector3.up; 105 | } 106 | return direction; 107 | } 108 | 109 | void Update() 110 | { 111 | // Exit Sample 112 | if (Input.GetKey(KeyCode.Escape)) 113 | { 114 | Application.Quit(); 115 | #if UNITY_EDITOR 116 | UnityEditor.EditorApplication.isPlaying = false; 117 | #endif 118 | } 119 | 120 | // Hide and lock cursor when right mouse button pressed 121 | if (Input.GetMouseButtonDown(1)) 122 | { 123 | Cursor.lockState = CursorLockMode.Locked; 124 | } 125 | 126 | // Unlock and show cursor when right mouse button released 127 | if (Input.GetMouseButtonUp(1)) 128 | { 129 | Cursor.visible = true; 130 | Cursor.lockState = CursorLockMode.None; 131 | } 132 | 133 | // Rotation 134 | if (Input.GetMouseButton(1)) 135 | { 136 | var mouseMovement = new Vector2(Input.GetAxis("Mouse X"), Input.GetAxis("Mouse Y") * (invertY ? 1 : -1)); 137 | 138 | var mouseSensitivityFactor = mouseSensitivityCurve.Evaluate(mouseMovement.magnitude); 139 | 140 | m_TargetCameraState.yaw += mouseMovement.x * mouseSensitivityFactor; 141 | m_TargetCameraState.pitch += mouseMovement.y * mouseSensitivityFactor; 142 | } 143 | 144 | // Translation 145 | var translation = GetInputTranslationDirection() * Time.deltaTime; 146 | 147 | // Speed up movement when shift key held 148 | if (Input.GetKey(KeyCode.LeftShift)) 149 | { 150 | translation *= 10.0f; 151 | } 152 | 153 | // Modify movement by a boost factor (defined in Inspector and modified in play mode through the mouse scroll wheel) 154 | boost += Input.mouseScrollDelta.y * 0.2f; 155 | translation *= Mathf.Pow(2.0f, boost); 156 | 157 | m_TargetCameraState.Translate(translation); 158 | 159 | // Framerate-independent interpolation 160 | // Calculate the lerp amount, such that we get 99% of the way to our target in the specified time 161 | var positionLerpPct = 1f - Mathf.Exp((Mathf.Log(1f - 0.99f) / positionLerpTime) * Time.deltaTime); 162 | var rotationLerpPct = 1f - Mathf.Exp((Mathf.Log(1f - 0.99f) / rotationLerpTime) * Time.deltaTime); 163 | m_InterpolatingCameraState.LerpTowards(m_TargetCameraState, positionLerpPct, rotationLerpPct); 164 | 165 | m_InterpolatingCameraState.UpdateTransform(transform); 166 | } 167 | } 168 | 169 | } -------------------------------------------------------------------------------- /Assets/Scripts/SimpleCameraController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d0b3106eafd5884e8f796eb0a9428fa 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/TransformSet.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | public partial class TransformSet : MonoBehaviour { 7 | 8 | [Serializable] 9 | public struct TransformInstructions { 10 | public Vector3 scale; 11 | public Vector3 shearX; 12 | public Vector3 shearY; 13 | public Vector3 shearZ; 14 | public Vector3 rotate; 15 | public Vector3 translate; 16 | 17 | public TransformInstructions(Vector3 scale, Vector3 shearX, Vector3 shearY, Vector3 shearZ, Vector3 rotate, Vector3 translate) { 18 | this.scale = scale; 19 | this.shearX = shearX; 20 | this.shearY = shearY; 21 | this.shearZ = shearZ; 22 | this.rotate = rotate; 23 | this.translate = translate; 24 | } 25 | 26 | public static TransformInstructions operator +(TransformInstructions a, TransformInstructions b) { 27 | Quaternion q1 = Quaternion.Euler(a.rotate); 28 | Quaternion q2 = Quaternion.Euler(b.rotate); 29 | Quaternion q3 = q1 * q2; 30 | 31 | return new TransformInstructions(Vector3.Scale(a.scale, b.scale), a.shearX + b.shearX, a.shearY + b.shearY, a.shearZ + b.shearZ, q3.eulerAngles, a.translate + b.translate); 32 | } 33 | } 34 | 35 | public AffinePreset affinePreset; 36 | 37 | public int randomInstructionCount = 8; 38 | 39 | public bool resetToPreset = false; 40 | 41 | public List transformSet = new List(); 42 | 43 | public TransformInstructions postTransform = new TransformInstructions(); 44 | 45 | private ProceduralWizard proceduralWizard; 46 | 47 | public static TransformInstructions GetIdentity() { 48 | TransformInstructions identity = new TransformInstructions(); 49 | 50 | identity.scale = new Vector3(1, 1, 1); 51 | 52 | return identity; 53 | } 54 | 55 | List GetPreset(AffinePreset preset) { 56 | switch (preset) { 57 | case AffinePreset.SierpinskiTriangle2D: 58 | return SierpinskiTriangle2D(); 59 | case AffinePreset.Vicsek2D: 60 | return Vicsek2D(); 61 | case AffinePreset.SierpinskiCarpet2D: 62 | return SierpinskiCarpet2D(); 63 | case AffinePreset.SierpinskiTriangle3D: 64 | return SierpinskiTriangle3D(); 65 | case AffinePreset.Vicsek3D: 66 | return Vicsek3D(); 67 | case AffinePreset.SierpinskiCarpet3D: 68 | return SierpinskiCarpet3D(); 69 | case AffinePreset.Procedural: 70 | return ProceduralInstructions(); 71 | } 72 | 73 | return SierpinskiTriangle2D(); 74 | } 75 | 76 | public void ApplyPreset() { 77 | transformSet.Clear(); 78 | 79 | transformSet = GetPreset(affinePreset); 80 | 81 | // Apply Translation Template 82 | if (affinePreset == AffinePreset.Procedural && proceduralWizard.translationTemplate != AffinePreset.Procedural) { 83 | List templateSet = GetPreset(proceduralWizard.translationTemplate); 84 | 85 | for (int i = 0; i < transformSet.Count; ++i) { 86 | TransformInstructions t = transformSet[i]; 87 | 88 | t.translate += templateSet[i % templateSet.Count].translate; 89 | 90 | transformSet[i] = t; 91 | } 92 | } 93 | } 94 | 95 | void OnEnable() { 96 | proceduralWizard = GetComponent(); 97 | ApplyPreset(); 98 | } 99 | 100 | void Update() { 101 | if (resetToPreset) { 102 | ApplyPreset(); 103 | resetToPreset = false; 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /Assets/Scripts/TransformSet.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d618dbd71e5db5841bb8c53a8307cfde 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cfe83c31388d3f24f9b3a5c3ed367714 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Shaders/DebugParticle.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/DebugParticle" { 2 | 3 | SubShader { 4 | 5 | Pass { 6 | Tags { 7 | "RenderType" = "Opaque" 8 | "LightMode" = "ForwardBase" 9 | } 10 | 11 | CGPROGRAM 12 | 13 | #pragma vertex vp 14 | #pragma fragment fp 15 | 16 | #include "UnityCG.cginc" 17 | #define UNITY_INDIRECT_DRAW_ARGS IndirectDrawIndexedArgs 18 | #include "UnityIndirect.cginc" 19 | #include "UnityPBSLighting.cginc" 20 | #include "AutoLight.cginc" 21 | 22 | struct VertexData { 23 | float4 vertex : POSITION; 24 | float3 normal : NORMAL; 25 | }; 26 | 27 | struct v2f { 28 | float4 pos : SV_POSITION; 29 | float3 worldPos : TEXCOORD0; 30 | float3 normal : TEXCOORD1; 31 | }; 32 | 33 | StructuredBuffer _Origins, _Destinations; 34 | float _Interpolator; 35 | float3 _Translate; 36 | 37 | v2f vp(VertexData v, uint svInstanceID : SV_INSTANCEID) { 38 | InitIndirectDrawArgs(0); 39 | 40 | v2f i; 41 | 42 | uint instanceID = GetIndirectInstanceID(svInstanceID); 43 | 44 | float4 origin = _Origins[svInstanceID]; 45 | float4 destination = _Destinations[svInstanceID]; 46 | 47 | float4 pos = (v.vertex * rcp(8.0f) + float4(_Translate,0)) + float4(lerp(origin.xyz, destination.xyz, _Interpolator), 0); 48 | 49 | i.pos = UnityObjectToClipPos(pos); 50 | i.worldPos = mul(unity_ObjectToWorld, pos); 51 | i.normal = UnityObjectToWorldNormal(v.normal); 52 | 53 | return i; 54 | } 55 | 56 | float4 fp(v2f i) : SV_TARGET { 57 | float3 col = 1; 58 | 59 | col *= DotClamped(_WorldSpaceLightPos0.xyz, i.normal) + 0.1f; 60 | 61 | return float4(col, 1); 62 | } 63 | 64 | ENDCG 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /Assets/Shaders/DebugParticle.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36f77b0ca98dd5447a99bda7907756ee 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Shaders/InstancedParticle.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/InstancedParticle" { 2 | 3 | SubShader { 4 | 5 | Pass { 6 | ZWrite On 7 | 8 | Tags { 9 | "RenderType" = "Opaque" 10 | "LightMode" = "ForwardBase" 11 | } 12 | 13 | CGPROGRAM 14 | 15 | #pragma vertex vp 16 | #pragma fragment fp 17 | 18 | #include "UnityCG.cginc" 19 | #define UNITY_INDIRECT_DRAW_ARGS IndirectDrawIndexedArgs 20 | #include "UnityIndirect.cginc" 21 | #include "UnityPBSLighting.cginc" 22 | #include "AutoLight.cginc" 23 | 24 | struct VertexData { 25 | float4 vertex : POSITION; 26 | }; 27 | 28 | struct v2f { 29 | float4 pos : SV_POSITION; 30 | float occlusion : TEXCOORD0; 31 | float3 worldPos : TEXCOORD1; 32 | float outOfBounds : TEXCOORD2; 33 | }; 34 | 35 | 36 | StructuredBuffer _OcclusionGrid; 37 | int _GridSize, _GridBounds; 38 | 39 | uint to1D(uint3 pos) { 40 | return pos.x + pos.y * _GridSize + pos.z * _GridSize * _GridSize; 41 | } 42 | 43 | float getTrilinearVoxel(float3 pos) { 44 | float v = 0; 45 | 46 | float boundsExtent = _GridBounds; 47 | 48 | if (abs(dot(pos, float3(1, 0, 0))) <= boundsExtent && 49 | abs(dot(pos, float3(0, 1, 0))) <= boundsExtent && 50 | abs(dot(pos, float3(0, 0, 1))) <= boundsExtent) 51 | { 52 | float3 seedPos = pos; 53 | seedPos += (_GridBounds / 2.0f); 54 | seedPos /= _GridBounds; 55 | seedPos *= _GridSize; 56 | // seedPos -= 0.5f; 57 | 58 | uint3 vi = floor(seedPos); 59 | 60 | float weight1 = 0.0f; 61 | float weight2 = 0.0f; 62 | float weight3 = 0.0f; 63 | float value = 0.0f; 64 | 65 | for (int i = 0; i < 2; ++i) { 66 | weight1 = 1 - min(abs(seedPos.x - (vi.x + i)), _GridSize); 67 | for (int j = 0; j < 2; ++j) { 68 | weight2 = 1 - min(abs(seedPos.y - (vi.y + j)), _GridSize); 69 | for (int k = 0; k < 2; ++k) { 70 | weight3 = 1 - min(abs(seedPos.z - (vi.z + k)), _GridSize); 71 | value += weight1 * weight2 * weight3 * _OcclusionGrid[to1D(vi + uint3(i, j, k))]; 72 | } 73 | } 74 | } 75 | 76 | v = value; 77 | } 78 | 79 | return v; 80 | } 81 | 82 | StructuredBuffer _FinalTransformBuffer; 83 | float _OcclusionMultiplier, _OcclusionAttenuation; 84 | float3 _ParticleColor, _OcclusionColor; 85 | 86 | StructuredBuffer _Transformations; 87 | 88 | v2f vp(VertexData v, uint svInstanceID : SV_INSTANCEID) { 89 | InitIndirectDrawArgs(0); 90 | 91 | v2f i; 92 | 93 | uint instanceID = GetIndirectInstanceID(svInstanceID); 94 | 95 | // float3 pos = v.vertex.xyz; 96 | // pos += (_GridBounds / 2.0f); 97 | // pos /= _GridBounds; 98 | // pos *= _GridSize; 99 | 100 | // if (any(uint3(pos) > _GridSize) || any(pos < 0)) return; 101 | 102 | float4 pos = mul(_FinalTransformBuffer[0], mul(_Transformations[instanceID], v.vertex)); 103 | // float4 pos = mul(_FinalTransformBuffer[0], v.vertex); 104 | 105 | float gridBounds = _GridBounds * 0.5f; 106 | 107 | i.outOfBounds = 0.0f; 108 | if (any(pos > gridBounds) || any(pos < -gridBounds)) i.outOfBounds = 1.0f; 109 | 110 | i.pos = UnityObjectToClipPos(pos); 111 | // i.occlusion = _OcclusionGrid[to1D(pos)]; 112 | i.occlusion = 0; 113 | i.worldPos = pos; 114 | return i; 115 | } 116 | 117 | float hash(uint n) { 118 | // integer hash copied from Hugo Elias 119 | n = (n << 13U) ^ n; 120 | n = n * (n * n * 15731U + 0x789221U) + 0x1376312589U; 121 | return float(n & uint(0x7fffffffU)) / float(0x7fffffff); 122 | } 123 | 124 | float4 fp(v2f i) : SV_TARGET { 125 | float3 col = _ParticleColor; 126 | // return 1; 127 | clip(-i.outOfBounds); 128 | 129 | float occlusion = getTrilinearVoxel(i.worldPos); 130 | 131 | occlusion = pow(saturate(occlusion * _OcclusionMultiplier), _OcclusionAttenuation); 132 | // return 1; 133 | return float4(lerp(_OcclusionColor, col, occlusion), 1); 134 | } 135 | 136 | ENDCG 137 | } 138 | } 139 | } -------------------------------------------------------------------------------- /Assets/Shaders/InstancedParticle.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da60c5ceac9d93949914277c9acee32e 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Shaders/Particle.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/Particle" { 2 | 3 | SubShader { 4 | 5 | Pass { 6 | ZWrite On 7 | 8 | Tags { 9 | "RenderType" = "Opaque" 10 | "LightMode" = "ForwardBase" 11 | } 12 | 13 | CGPROGRAM 14 | 15 | #pragma vertex vp 16 | #pragma fragment fp 17 | 18 | #include "UnityCG.cginc" 19 | #include "UnityPBSLighting.cginc" 20 | #include "AutoLight.cginc" 21 | 22 | struct VertexData { 23 | float4 vertex : POSITION; 24 | }; 25 | 26 | struct v2f { 27 | float4 pos : SV_POSITION; 28 | float occlusion : TEXCOORD0; 29 | float3 worldPos : TEXCOORD1; 30 | float outOfBounds : TEXCOORD2; 31 | }; 32 | 33 | 34 | StructuredBuffer _OcclusionGrid; 35 | int _GridSize, _GridBounds; 36 | 37 | uint to1D(uint3 pos) { 38 | return pos.x + pos.y * _GridSize + pos.z * _GridSize * _GridSize; 39 | } 40 | 41 | float getTrilinearVoxel(float3 pos) { 42 | float v = 0; 43 | 44 | float boundsExtent = _GridBounds; 45 | 46 | if (abs(dot(pos, float3(1, 0, 0))) <= boundsExtent && 47 | abs(dot(pos, float3(0, 1, 0))) <= boundsExtent && 48 | abs(dot(pos, float3(0, 0, 1))) <= boundsExtent) 49 | { 50 | float3 seedPos = pos; 51 | seedPos += (_GridBounds / 2.0f); 52 | seedPos /= _GridBounds; 53 | seedPos *= _GridSize; 54 | // seedPos -= 0.5f; 55 | 56 | uint3 vi = floor(seedPos); 57 | 58 | float weight1 = 0.0f; 59 | float weight2 = 0.0f; 60 | float weight3 = 0.0f; 61 | float value = 0.0f; 62 | 63 | for (int i = 0; i < 2; ++i) { 64 | weight1 = 1 - min(abs(seedPos.x - (vi.x + i)), _GridSize); 65 | for (int j = 0; j < 2; ++j) { 66 | weight2 = 1 - min(abs(seedPos.y - (vi.y + j)), _GridSize); 67 | for (int k = 0; k < 2; ++k) { 68 | weight3 = 1 - min(abs(seedPos.z - (vi.z + k)), _GridSize); 69 | value += weight1 * weight2 * weight3 * _OcclusionGrid[to1D(vi + uint3(i, j, k))]; 70 | } 71 | } 72 | } 73 | 74 | v = value; 75 | } 76 | 77 | return v; 78 | } 79 | 80 | float4x4 _FinalTransform; 81 | float _OcclusionMultiplier, _OcclusionAttenuation; 82 | float3 _ParticleColor, _OcclusionColor; 83 | 84 | v2f vp(VertexData v) { 85 | v2f i; 86 | 87 | // float3 pos = v.vertex.xyz; 88 | // pos += (_GridBounds / 2.0f); 89 | // pos /= _GridBounds; 90 | // pos *= _GridSize; 91 | 92 | // if (any(uint3(pos) > _GridSize) || any(pos < 0)) return; 93 | 94 | float4 pos = mul(_FinalTransform, v.vertex); 95 | 96 | float gridBounds = _GridBounds * 0.5f; 97 | 98 | i.outOfBounds = 0.0f; 99 | if (any(pos > gridBounds) || any(pos < -gridBounds)) i.outOfBounds = 1.0f; 100 | 101 | i.pos = UnityObjectToClipPos(pos); 102 | // i.occlusion = _OcclusionGrid[to1D(pos)]; 103 | i.occlusion = 0; 104 | i.worldPos = pos; 105 | return i; 106 | } 107 | 108 | float hash(uint n) { 109 | // integer hash copied from Hugo Elias 110 | n = (n << 13U) ^ n; 111 | n = n * (n * n * 15731U + 0x789221U) + 0x1376312589U; 112 | return float(n & uint(0x7fffffffU)) / float(0x7fffffff); 113 | } 114 | 115 | float4 fp(v2f i) : SV_TARGET { 116 | float3 col = _ParticleColor; 117 | 118 | clip(-i.outOfBounds); 119 | 120 | float occlusion = getTrilinearVoxel(i.worldPos); 121 | 122 | occlusion = pow(saturate(occlusion * _OcclusionMultiplier), _OcclusionAttenuation); 123 | 124 | return float4(lerp(_OcclusionColor, col, occlusion), 1); 125 | } 126 | 127 | ENDCG 128 | } 129 | } 130 | } -------------------------------------------------------------------------------- /Assets/Shaders/Particle.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e92bc28b2a8522941af6fa66887119e9 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Shaders/Voxel.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/Voxel" { 2 | 3 | SubShader { 4 | 5 | Pass { 6 | ZWrite On 7 | 8 | Tags { 9 | "RenderType" = "Opaque" 10 | "LightMode" = "ForwardBase" 11 | } 12 | 13 | CGPROGRAM 14 | 15 | #pragma vertex vp 16 | #pragma fragment fp 17 | 18 | #include "UnityCG.cginc" 19 | #define UNITY_INDIRECT_DRAW_ARGS IndirectDrawIndexedArgs 20 | #include "UnityIndirect.cginc" 21 | #include "UnityPBSLighting.cginc" 22 | #include "AutoLight.cginc" 23 | 24 | struct VertexData { 25 | float4 vertex : POSITION; 26 | float3 normal : NORMAL; 27 | }; 28 | 29 | struct v2f { 30 | float4 pos : SV_POSITION; 31 | float3 normal : TEXCOORD0; 32 | int voxel : TEXCOORD1; 33 | float occlusion : TEXCOORD2; 34 | }; 35 | 36 | StructuredBuffer _VoxelGrid; 37 | StructuredBuffer _OcclusionGrid; 38 | int _GridSize, _GridBounds; 39 | float _VoxelSize; 40 | 41 | uint3 to3D(uint idx) { 42 | uint3 voxelRes = _GridSize; 43 | uint x = idx % (voxelRes.x); 44 | uint y = (idx / voxelRes.x) % voxelRes.y; 45 | uint z = idx / (voxelRes.x * voxelRes.y); 46 | 47 | return uint3(x, y, z); 48 | } 49 | 50 | v2f vp(VertexData v, uint svInstanceID : SV_INSTANCEID) { 51 | InitIndirectDrawArgs(0); 52 | 53 | v2f i; 54 | 55 | uint instanceID = GetIndirectInstanceID(svInstanceID); 56 | 57 | uint x = instanceID % _GridSize; 58 | uint y = (instanceID / _GridSize) % _GridSize; 59 | uint z = instanceID / (_GridSize * _GridSize); 60 | 61 | int voxel = _VoxelGrid[instanceID]; 62 | float3 voxelPos = float3(x, y, z); 63 | 64 | float4 pos = v.vertex; 65 | pos.xyz = (v.vertex.xyz + voxelPos) * _VoxelSize + (_VoxelSize * 0.5f) - _GridBounds * 0.5f; 66 | 67 | float occlusion = _OcclusionGrid[instanceID]; 68 | 69 | i.pos = UnityObjectToClipPos(pos) * voxel; 70 | i.normal = UnityObjectToWorldNormal(v.normal); 71 | i.voxel = voxel; 72 | i.occlusion = occlusion; 73 | 74 | return i; 75 | } 76 | 77 | float4 fp(v2f i) : SV_TARGET { 78 | float3 col = 1; 79 | 80 | 81 | // if (i.voxel == 0) col = float3(1, 0, 0); 82 | // if (i.voxel == 1) col = float3(0, 1, 0); 83 | 84 | col *= saturate(DotClamped(_WorldSpaceLightPos0.xyz, i.normal) + 0.15f); 85 | 86 | col *= i.occlusion; 87 | return float4(saturate(col), 1); 88 | } 89 | 90 | ENDCG 91 | } 92 | } 93 | } -------------------------------------------------------------------------------- /Assets/Shaders/Voxel.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d552777edf877b469ce5b6e1ac22326 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Examples/f17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GarrettGunnell/Iterated-Function-Systems/7d4c8e9774f1a3ce9e803e6e153518a9dcf94707/Examples/f17.png -------------------------------------------------------------------------------- /Examples/flagship.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GarrettGunnell/Iterated-Function-Systems/7d4c8e9774f1a3ce9e803e6e153518a9dcf94707/Examples/flagship.png -------------------------------------------------------------------------------- /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_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 31 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | m_LogWhenShaderIsCompiled: 0 63 | m_AllowEnlightenSupportForUpgradedProject: 0 64 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreReleasePackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | m_SeeAllPackageVersions: 0 20 | oneTimeWarningShown: 0 21 | m_Registries: 22 | - m_Id: main 23 | m_Name: 24 | m_Url: https://packages.unity.com 25 | m_Scopes: [] 26 | m_IsDefault: 1 27 | m_Capabilities: 7 28 | m_UserSelectedRegistryName: 29 | m_UserAddingNewScopedRegistry: 0 30 | m_RegistryInfoDraft: 31 | m_Modified: 0 32 | m_ErrorMessage: 33 | m_UserModificationsInstanceId: -830 34 | m_OriginalInstanceId: -832 35 | m_LoadAssets: 0 36 | -------------------------------------------------------------------------------- /ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "m_Name": "Settings", 3 | "m_Path": "ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json", 4 | "m_Dictionary": { 5 | "m_DictionaryValues": [] 6 | } 7 | } -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 23 7 | productGUID: 4119c89fc82bbb546b37b5e0f8033610 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: Iterated Function Systems 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.Iterated-Function-Systems 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.3 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_BuildTargetShaderSettings: [] 291 | m_BuildTargetGraphicsJobs: 292 | - m_BuildTarget: MacStandaloneSupport 293 | m_GraphicsJobs: 0 294 | - m_BuildTarget: Switch 295 | m_GraphicsJobs: 1 296 | - m_BuildTarget: MetroSupport 297 | m_GraphicsJobs: 1 298 | - m_BuildTarget: AppleTVSupport 299 | m_GraphicsJobs: 0 300 | - m_BuildTarget: BJMSupport 301 | m_GraphicsJobs: 1 302 | - m_BuildTarget: LinuxStandaloneSupport 303 | m_GraphicsJobs: 1 304 | - m_BuildTarget: PS4Player 305 | m_GraphicsJobs: 1 306 | - m_BuildTarget: iOSSupport 307 | m_GraphicsJobs: 0 308 | - m_BuildTarget: WindowsStandaloneSupport 309 | m_GraphicsJobs: 1 310 | - m_BuildTarget: XboxOnePlayer 311 | m_GraphicsJobs: 1 312 | - m_BuildTarget: LuminSupport 313 | m_GraphicsJobs: 0 314 | - m_BuildTarget: AndroidPlayer 315 | m_GraphicsJobs: 0 316 | - m_BuildTarget: WebGLSupport 317 | m_GraphicsJobs: 0 318 | m_BuildTargetGraphicsJobMode: 319 | - m_BuildTarget: PS4Player 320 | m_GraphicsJobMode: 0 321 | - m_BuildTarget: XboxOnePlayer 322 | m_GraphicsJobMode: 0 323 | m_BuildTargetGraphicsAPIs: 324 | - m_BuildTarget: AndroidPlayer 325 | m_APIs: 150000000b000000 326 | m_Automatic: 1 327 | - m_BuildTarget: iOSSupport 328 | m_APIs: 10000000 329 | m_Automatic: 1 330 | - m_BuildTarget: AppleTVSupport 331 | m_APIs: 10000000 332 | m_Automatic: 1 333 | - m_BuildTarget: WebGLSupport 334 | m_APIs: 0b000000 335 | m_Automatic: 1 336 | - m_BuildTarget: WindowsStandaloneSupport 337 | m_APIs: 150000000200000012000000 338 | m_Automatic: 0 339 | m_BuildTargetVRSettings: 340 | - m_BuildTarget: Standalone 341 | m_Enabled: 0 342 | m_Devices: 343 | - Oculus 344 | - OpenVR 345 | m_DefaultShaderChunkSizeInMB: 16 346 | m_DefaultShaderChunkCount: 0 347 | openGLRequireES31: 0 348 | openGLRequireES31AEP: 0 349 | openGLRequireES32: 0 350 | m_TemplateCustomTags: {} 351 | mobileMTRendering: 352 | Android: 1 353 | iPhone: 1 354 | tvOS: 1 355 | m_BuildTargetGroupLightmapEncodingQuality: 356 | - m_BuildTarget: Android 357 | m_EncodingQuality: 1 358 | - m_BuildTarget: iPhone 359 | m_EncodingQuality: 1 360 | - m_BuildTarget: tvOS 361 | m_EncodingQuality: 1 362 | m_BuildTargetGroupLightmapSettings: [] 363 | m_BuildTargetNormalMapEncoding: 364 | - m_BuildTarget: Android 365 | m_Encoding: 1 366 | - m_BuildTarget: iPhone 367 | m_Encoding: 1 368 | - m_BuildTarget: tvOS 369 | m_Encoding: 1 370 | m_BuildTargetDefaultTextureCompressionFormat: 371 | - m_BuildTarget: Android 372 | m_Format: 3 373 | playModeTestRunnerEnabled: 0 374 | runPlayModeTestAsEditModeTest: 0 375 | actionOnDotNetUnhandledException: 1 376 | enableInternalProfiler: 0 377 | logObjCUncaughtExceptions: 1 378 | enableCrashReportAPI: 0 379 | cameraUsageDescription: 380 | locationUsageDescription: 381 | microphoneUsageDescription: 382 | bluetoothUsageDescription: 383 | switchNMETAOverride: 384 | switchNetLibKey: 385 | switchSocketMemoryPoolSize: 6144 386 | switchSocketAllocatorPoolSize: 128 387 | switchSocketConcurrencyLimit: 14 388 | switchScreenResolutionBehavior: 2 389 | switchUseCPUProfiler: 0 390 | switchUseGOLDLinker: 0 391 | switchLTOSetting: 0 392 | switchApplicationID: 0x01004b9000490000 393 | switchNSODependencies: 394 | switchTitleNames_0: 395 | switchTitleNames_1: 396 | switchTitleNames_2: 397 | switchTitleNames_3: 398 | switchTitleNames_4: 399 | switchTitleNames_5: 400 | switchTitleNames_6: 401 | switchTitleNames_7: 402 | switchTitleNames_8: 403 | switchTitleNames_9: 404 | switchTitleNames_10: 405 | switchTitleNames_11: 406 | switchTitleNames_12: 407 | switchTitleNames_13: 408 | switchTitleNames_14: 409 | switchTitleNames_15: 410 | switchPublisherNames_0: 411 | switchPublisherNames_1: 412 | switchPublisherNames_2: 413 | switchPublisherNames_3: 414 | switchPublisherNames_4: 415 | switchPublisherNames_5: 416 | switchPublisherNames_6: 417 | switchPublisherNames_7: 418 | switchPublisherNames_8: 419 | switchPublisherNames_9: 420 | switchPublisherNames_10: 421 | switchPublisherNames_11: 422 | switchPublisherNames_12: 423 | switchPublisherNames_13: 424 | switchPublisherNames_14: 425 | switchPublisherNames_15: 426 | switchIcons_0: {fileID: 0} 427 | switchIcons_1: {fileID: 0} 428 | switchIcons_2: {fileID: 0} 429 | switchIcons_3: {fileID: 0} 430 | switchIcons_4: {fileID: 0} 431 | switchIcons_5: {fileID: 0} 432 | switchIcons_6: {fileID: 0} 433 | switchIcons_7: {fileID: 0} 434 | switchIcons_8: {fileID: 0} 435 | switchIcons_9: {fileID: 0} 436 | switchIcons_10: {fileID: 0} 437 | switchIcons_11: {fileID: 0} 438 | switchIcons_12: {fileID: 0} 439 | switchIcons_13: {fileID: 0} 440 | switchIcons_14: {fileID: 0} 441 | switchIcons_15: {fileID: 0} 442 | switchSmallIcons_0: {fileID: 0} 443 | switchSmallIcons_1: {fileID: 0} 444 | switchSmallIcons_2: {fileID: 0} 445 | switchSmallIcons_3: {fileID: 0} 446 | switchSmallIcons_4: {fileID: 0} 447 | switchSmallIcons_5: {fileID: 0} 448 | switchSmallIcons_6: {fileID: 0} 449 | switchSmallIcons_7: {fileID: 0} 450 | switchSmallIcons_8: {fileID: 0} 451 | switchSmallIcons_9: {fileID: 0} 452 | switchSmallIcons_10: {fileID: 0} 453 | switchSmallIcons_11: {fileID: 0} 454 | switchSmallIcons_12: {fileID: 0} 455 | switchSmallIcons_13: {fileID: 0} 456 | switchSmallIcons_14: {fileID: 0} 457 | switchSmallIcons_15: {fileID: 0} 458 | switchManualHTML: 459 | switchAccessibleURLs: 460 | switchLegalInformation: 461 | switchMainThreadStackSize: 1048576 462 | switchPresenceGroupId: 463 | switchLogoHandling: 0 464 | switchReleaseVersion: 0 465 | switchDisplayVersion: 1.0.0 466 | switchStartupUserAccount: 0 467 | switchTouchScreenUsage: 0 468 | switchSupportedLanguagesMask: 0 469 | switchLogoType: 0 470 | switchApplicationErrorCodeCategory: 471 | switchUserAccountSaveDataSize: 0 472 | switchUserAccountSaveDataJournalSize: 0 473 | switchApplicationAttribute: 0 474 | switchCardSpecSize: -1 475 | switchCardSpecClock: -1 476 | switchRatingsMask: 0 477 | switchRatingsInt_0: 0 478 | switchRatingsInt_1: 0 479 | switchRatingsInt_2: 0 480 | switchRatingsInt_3: 0 481 | switchRatingsInt_4: 0 482 | switchRatingsInt_5: 0 483 | switchRatingsInt_6: 0 484 | switchRatingsInt_7: 0 485 | switchRatingsInt_8: 0 486 | switchRatingsInt_9: 0 487 | switchRatingsInt_10: 0 488 | switchRatingsInt_11: 0 489 | switchRatingsInt_12: 0 490 | switchLocalCommunicationIds_0: 491 | switchLocalCommunicationIds_1: 492 | switchLocalCommunicationIds_2: 493 | switchLocalCommunicationIds_3: 494 | switchLocalCommunicationIds_4: 495 | switchLocalCommunicationIds_5: 496 | switchLocalCommunicationIds_6: 497 | switchLocalCommunicationIds_7: 498 | switchParentalControl: 0 499 | switchAllowsScreenshot: 1 500 | switchAllowsVideoCapturing: 1 501 | switchAllowsRuntimeAddOnContentInstall: 0 502 | switchDataLossConfirmation: 0 503 | switchUserAccountLockEnabled: 0 504 | switchSystemResourceMemory: 16777216 505 | switchSupportedNpadStyles: 22 506 | switchNativeFsCacheSize: 32 507 | switchIsHoldTypeHorizontal: 0 508 | switchSupportedNpadCount: 8 509 | switchSocketConfigEnabled: 0 510 | switchTcpInitialSendBufferSize: 32 511 | switchTcpInitialReceiveBufferSize: 64 512 | switchTcpAutoSendBufferSizeMax: 256 513 | switchTcpAutoReceiveBufferSizeMax: 256 514 | switchUdpSendBufferSize: 9 515 | switchUdpReceiveBufferSize: 42 516 | switchSocketBufferEfficiency: 4 517 | switchSocketInitializeEnabled: 1 518 | switchNetworkInterfaceManagerInitializeEnabled: 1 519 | switchPlayerConnectionEnabled: 1 520 | switchUseNewStyleFilepaths: 0 521 | switchUseLegacyFmodPriorities: 1 522 | switchUseMicroSleepForYield: 1 523 | switchEnableRamDiskSupport: 0 524 | switchMicroSleepForYieldTime: 25 525 | switchRamDiskSpaceSize: 12 526 | ps4NPAgeRating: 12 527 | ps4NPTitleSecret: 528 | ps4NPTrophyPackPath: 529 | ps4ParentalLevel: 11 530 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 531 | ps4Category: 0 532 | ps4MasterVersion: 01.00 533 | ps4AppVersion: 01.00 534 | ps4AppType: 0 535 | ps4ParamSfxPath: 536 | ps4VideoOutPixelFormat: 0 537 | ps4VideoOutInitialWidth: 1920 538 | ps4VideoOutBaseModeInitialWidth: 1920 539 | ps4VideoOutReprojectionRate: 60 540 | ps4PronunciationXMLPath: 541 | ps4PronunciationSIGPath: 542 | ps4BackgroundImagePath: 543 | ps4StartupImagePath: 544 | ps4StartupImagesFolder: 545 | ps4IconImagesFolder: 546 | ps4SaveDataImagePath: 547 | ps4SdkOverride: 548 | ps4BGMPath: 549 | ps4ShareFilePath: 550 | ps4ShareOverlayImagePath: 551 | ps4PrivacyGuardImagePath: 552 | ps4ExtraSceSysFile: 553 | ps4NPtitleDatPath: 554 | ps4RemotePlayKeyAssignment: -1 555 | ps4RemotePlayKeyMappingDir: 556 | ps4PlayTogetherPlayerCount: 0 557 | ps4EnterButtonAssignment: 1 558 | ps4ApplicationParam1: 0 559 | ps4ApplicationParam2: 0 560 | ps4ApplicationParam3: 0 561 | ps4ApplicationParam4: 0 562 | ps4DownloadDataSize: 0 563 | ps4GarlicHeapSize: 2048 564 | ps4ProGarlicHeapSize: 2560 565 | playerPrefsMaxSize: 32768 566 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 567 | ps4pnSessions: 1 568 | ps4pnPresence: 1 569 | ps4pnFriends: 1 570 | ps4pnGameCustomData: 1 571 | playerPrefsSupport: 0 572 | enableApplicationExit: 0 573 | resetTempFolder: 1 574 | restrictedAudioUsageRights: 0 575 | ps4UseResolutionFallback: 0 576 | ps4ReprojectionSupport: 0 577 | ps4UseAudio3dBackend: 0 578 | ps4UseLowGarlicFragmentationMode: 1 579 | ps4SocialScreenEnabled: 0 580 | ps4ScriptOptimizationLevel: 0 581 | ps4Audio3dVirtualSpeakerCount: 14 582 | ps4attribCpuUsage: 0 583 | ps4PatchPkgPath: 584 | ps4PatchLatestPkgPath: 585 | ps4PatchChangeinfoPath: 586 | ps4PatchDayOne: 0 587 | ps4attribUserManagement: 0 588 | ps4attribMoveSupport: 0 589 | ps4attrib3DSupport: 0 590 | ps4attribShareSupport: 0 591 | ps4attribExclusiveVR: 0 592 | ps4disableAutoHideSplash: 0 593 | ps4videoRecordingFeaturesUsed: 0 594 | ps4contentSearchFeaturesUsed: 0 595 | ps4CompatibilityPS5: 0 596 | ps4AllowPS5Detection: 0 597 | ps4GPU800MHz: 1 598 | ps4attribEyeToEyeDistanceSettingVR: 0 599 | ps4IncludedModules: [] 600 | ps4attribVROutputEnabled: 0 601 | monoEnv: 602 | splashScreenBackgroundSourceLandscape: {fileID: 0} 603 | splashScreenBackgroundSourcePortrait: {fileID: 0} 604 | blurSplashScreenBackground: 1 605 | spritePackerPolicy: 606 | webGLMemorySize: 16 607 | webGLExceptionSupport: 1 608 | webGLNameFilesAsHashes: 0 609 | webGLDataCaching: 1 610 | webGLDebugSymbols: 0 611 | webGLEmscriptenArgs: 612 | webGLModulesDirectory: 613 | webGLTemplate: APPLICATION:Default 614 | webGLAnalyzeBuildSize: 0 615 | webGLUseEmbeddedResources: 0 616 | webGLCompressionFormat: 1 617 | webGLWasmArithmeticExceptions: 0 618 | webGLLinkerTarget: 1 619 | webGLThreadsSupport: 0 620 | webGLDecompressionFallback: 0 621 | webGLPowerPreference: 2 622 | scriptingDefineSymbols: {} 623 | additionalCompilerArguments: {} 624 | platformArchitecture: {} 625 | scriptingBackend: {} 626 | il2cppCompilerConfiguration: {} 627 | managedStrippingLevel: {} 628 | incrementalIl2cppBuild: {} 629 | suppressCommonWarnings: 1 630 | allowUnsafeCode: 0 631 | useDeterministicCompilation: 1 632 | enableRoslynAnalyzers: 1 633 | selectedPlatform: 0 634 | additionalIl2CppArgs: 635 | scriptingRuntimeVersion: 1 636 | gcIncremental: 1 637 | assemblyVersionValidation: 1 638 | gcWBarrierValidation: 0 639 | apiCompatibilityLevelPerPlatform: {} 640 | m_RenderingPath: 1 641 | m_MobileRenderingPath: 1 642 | metroPackageName: Template_3D 643 | metroPackageVersion: 644 | metroCertificatePath: 645 | metroCertificatePassword: 646 | metroCertificateSubject: 647 | metroCertificateIssuer: 648 | metroCertificateNotAfter: 0000000000000000 649 | metroApplicationDescription: Template_3D 650 | wsaImages: {} 651 | metroTileShortName: 652 | metroTileShowName: 0 653 | metroMediumTileShowName: 0 654 | metroLargeTileShowName: 0 655 | metroWideTileShowName: 0 656 | metroSupportStreamingInstall: 0 657 | metroLastRequiredScene: 0 658 | metroDefaultTileSize: 1 659 | metroTileForegroundText: 2 660 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 661 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 662 | metroSplashScreenUseBackgroundColor: 0 663 | platformCapabilities: {} 664 | metroTargetDeviceFamilies: {} 665 | metroFTAName: 666 | metroFTAFileTypes: [] 667 | metroProtocolName: 668 | vcxProjDefaultLanguage: 669 | XboxOneProductId: 670 | XboxOneUpdateKey: 671 | XboxOneSandboxId: 672 | XboxOneContentId: 673 | XboxOneTitleId: 674 | XboxOneSCId: 675 | XboxOneGameOsOverridePath: 676 | XboxOnePackagingOverridePath: 677 | XboxOneAppManifestOverridePath: 678 | XboxOneVersion: 1.0.0.0 679 | XboxOnePackageEncryption: 0 680 | XboxOnePackageUpdateGranularity: 2 681 | XboxOneDescription: 682 | XboxOneLanguage: 683 | - enus 684 | XboxOneCapability: [] 685 | XboxOneGameRating: {} 686 | XboxOneIsContentPackage: 0 687 | XboxOneEnhancedXboxCompatibilityMode: 0 688 | XboxOneEnableGPUVariability: 1 689 | XboxOneSockets: {} 690 | XboxOneSplashScreen: {fileID: 0} 691 | XboxOneAllowedProductIds: [] 692 | XboxOnePersistentLocalStorageSize: 0 693 | XboxOneXTitleMemory: 8 694 | XboxOneOverrideIdentityName: 695 | XboxOneOverrideIdentityPublisher: 696 | vrEditorSettings: {} 697 | cloudServicesEnabled: 698 | UNet: 1 699 | luminIcon: 700 | m_Name: 701 | m_ModelFolderPath: 702 | m_PortalFolderPath: 703 | luminCert: 704 | m_CertPath: 705 | m_SignPackage: 1 706 | luminIsChannelApp: 0 707 | luminVersion: 708 | m_VersionCode: 1 709 | m_VersionName: 710 | apiCompatibilityLevel: 6 711 | activeInputHandler: 0 712 | windowsGamepadBackendHint: 0 713 | cloudProjectId: 714 | framebufferDepthMemorylessMode: 0 715 | qualitySettingsNames: [] 716 | projectName: 717 | organizationId: 718 | cloudEnabled: 0 719 | legacyClampBlendShapeWeights: 0 720 | playerDataPath: 721 | forceSRGBBlit: 1 722 | virtualTexturingSupportEnabled: 0 723 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2021.3.15f1 2 | m_EditorVersionWithRevision: 2021.3.15f1 (e8e88683f834) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | - serializedVersion: 2 46 | name: Low 47 | pixelLightCount: 0 48 | shadows: 0 49 | shadowResolution: 0 50 | shadowProjection: 1 51 | shadowCascades: 1 52 | shadowDistance: 20 53 | shadowNearPlaneOffset: 3 54 | shadowCascade2Split: 0.33333334 55 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 56 | shadowmaskMode: 0 57 | skinWeights: 2 58 | textureQuality: 0 59 | anisotropicTextures: 0 60 | antiAliasing: 0 61 | softParticles: 0 62 | softVegetation: 0 63 | realtimeReflectionProbes: 0 64 | billboardsFaceCameraPosition: 0 65 | vSyncCount: 0 66 | lodBias: 0.4 67 | maximumLODLevel: 0 68 | streamingMipmapsActive: 0 69 | streamingMipmapsAddAllCameras: 1 70 | streamingMipmapsMemoryBudget: 512 71 | streamingMipmapsRenderersPerFrame: 512 72 | streamingMipmapsMaxLevelReduction: 2 73 | streamingMipmapsMaxFileIORequests: 1024 74 | particleRaycastBudget: 16 75 | asyncUploadTimeSlice: 2 76 | asyncUploadBufferSize: 16 77 | asyncUploadPersistentBuffer: 1 78 | resolutionScalingFixedDPIFactor: 1 79 | customRenderPipeline: {fileID: 0} 80 | excludedTargetPlatforms: [] 81 | - serializedVersion: 2 82 | name: Medium 83 | pixelLightCount: 1 84 | shadows: 1 85 | shadowResolution: 0 86 | shadowProjection: 1 87 | shadowCascades: 1 88 | shadowDistance: 20 89 | shadowNearPlaneOffset: 3 90 | shadowCascade2Split: 0.33333334 91 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 92 | shadowmaskMode: 0 93 | skinWeights: 2 94 | textureQuality: 0 95 | anisotropicTextures: 1 96 | antiAliasing: 0 97 | softParticles: 0 98 | softVegetation: 0 99 | realtimeReflectionProbes: 0 100 | billboardsFaceCameraPosition: 0 101 | vSyncCount: 1 102 | lodBias: 0.7 103 | maximumLODLevel: 0 104 | streamingMipmapsActive: 0 105 | streamingMipmapsAddAllCameras: 1 106 | streamingMipmapsMemoryBudget: 512 107 | streamingMipmapsRenderersPerFrame: 512 108 | streamingMipmapsMaxLevelReduction: 2 109 | streamingMipmapsMaxFileIORequests: 1024 110 | particleRaycastBudget: 64 111 | asyncUploadTimeSlice: 2 112 | asyncUploadBufferSize: 16 113 | asyncUploadPersistentBuffer: 1 114 | resolutionScalingFixedDPIFactor: 1 115 | customRenderPipeline: {fileID: 0} 116 | excludedTargetPlatforms: [] 117 | - serializedVersion: 2 118 | name: High 119 | pixelLightCount: 2 120 | shadows: 2 121 | shadowResolution: 1 122 | shadowProjection: 1 123 | shadowCascades: 2 124 | shadowDistance: 40 125 | shadowNearPlaneOffset: 3 126 | shadowCascade2Split: 0.33333334 127 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 128 | shadowmaskMode: 1 129 | skinWeights: 2 130 | textureQuality: 0 131 | anisotropicTextures: 1 132 | antiAliasing: 0 133 | softParticles: 0 134 | softVegetation: 1 135 | realtimeReflectionProbes: 1 136 | billboardsFaceCameraPosition: 1 137 | vSyncCount: 1 138 | lodBias: 1 139 | maximumLODLevel: 0 140 | streamingMipmapsActive: 0 141 | streamingMipmapsAddAllCameras: 1 142 | streamingMipmapsMemoryBudget: 512 143 | streamingMipmapsRenderersPerFrame: 512 144 | streamingMipmapsMaxLevelReduction: 2 145 | streamingMipmapsMaxFileIORequests: 1024 146 | particleRaycastBudget: 256 147 | asyncUploadTimeSlice: 2 148 | asyncUploadBufferSize: 16 149 | asyncUploadPersistentBuffer: 1 150 | resolutionScalingFixedDPIFactor: 1 151 | customRenderPipeline: {fileID: 0} 152 | excludedTargetPlatforms: [] 153 | - serializedVersion: 2 154 | name: Very High 155 | pixelLightCount: 3 156 | shadows: 2 157 | shadowResolution: 2 158 | shadowProjection: 1 159 | shadowCascades: 2 160 | shadowDistance: 70 161 | shadowNearPlaneOffset: 3 162 | shadowCascade2Split: 0.33333334 163 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 164 | shadowmaskMode: 1 165 | skinWeights: 4 166 | textureQuality: 0 167 | anisotropicTextures: 2 168 | antiAliasing: 2 169 | softParticles: 1 170 | softVegetation: 1 171 | realtimeReflectionProbes: 1 172 | billboardsFaceCameraPosition: 1 173 | vSyncCount: 1 174 | lodBias: 1.5 175 | maximumLODLevel: 0 176 | streamingMipmapsActive: 0 177 | streamingMipmapsAddAllCameras: 1 178 | streamingMipmapsMemoryBudget: 512 179 | streamingMipmapsRenderersPerFrame: 512 180 | streamingMipmapsMaxLevelReduction: 2 181 | streamingMipmapsMaxFileIORequests: 1024 182 | particleRaycastBudget: 1024 183 | asyncUploadTimeSlice: 2 184 | asyncUploadBufferSize: 16 185 | asyncUploadPersistentBuffer: 1 186 | resolutionScalingFixedDPIFactor: 1 187 | customRenderPipeline: {fileID: 0} 188 | excludedTargetPlatforms: [] 189 | - serializedVersion: 2 190 | name: Ultra 191 | pixelLightCount: 4 192 | shadows: 2 193 | shadowResolution: 2 194 | shadowProjection: 1 195 | shadowCascades: 4 196 | shadowDistance: 150 197 | shadowNearPlaneOffset: 3 198 | shadowCascade2Split: 0.33333334 199 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 200 | shadowmaskMode: 1 201 | skinWeights: 4 202 | textureQuality: 0 203 | anisotropicTextures: 2 204 | antiAliasing: 2 205 | softParticles: 1 206 | softVegetation: 1 207 | realtimeReflectionProbes: 1 208 | billboardsFaceCameraPosition: 1 209 | vSyncCount: 1 210 | lodBias: 2 211 | maximumLODLevel: 0 212 | streamingMipmapsActive: 0 213 | streamingMipmapsAddAllCameras: 1 214 | streamingMipmapsMemoryBudget: 512 215 | streamingMipmapsRenderersPerFrame: 512 216 | streamingMipmapsMaxLevelReduction: 2 217 | streamingMipmapsMaxFileIORequests: 1024 218 | particleRaycastBudget: 4096 219 | asyncUploadTimeSlice: 2 220 | asyncUploadBufferSize: 16 221 | asyncUploadPersistentBuffer: 1 222 | resolutionScalingFixedDPIFactor: 1 223 | customRenderPipeline: {fileID: 0} 224 | excludedTargetPlatforms: [] 225 | m_PerPlatformDefaultQuality: 226 | Android: 2 227 | GameCoreScarlett: 5 228 | GameCoreXboxOne: 5 229 | Lumin: 5 230 | Nintendo 3DS: 5 231 | Nintendo Switch: 5 232 | PS4: 5 233 | PS5: 5 234 | Server: 0 235 | Stadia: 5 236 | Standalone: 5 237 | WebGL: 3 238 | Windows Store Apps: 5 239 | XboxOne: 5 240 | iPhone: 2 241 | tvOS: 2 242 | -------------------------------------------------------------------------------- /ProjectSettings/SceneTemplateSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "templatePinStates": [], 3 | "dependencyTypeInfos": [ 4 | { 5 | "userAdded": false, 6 | "type": "UnityEngine.AnimationClip", 7 | "ignore": false, 8 | "defaultInstantiationMode": 0, 9 | "supportsModification": true 10 | }, 11 | { 12 | "userAdded": false, 13 | "type": "UnityEditor.Animations.AnimatorController", 14 | "ignore": false, 15 | "defaultInstantiationMode": 0, 16 | "supportsModification": true 17 | }, 18 | { 19 | "userAdded": false, 20 | "type": "UnityEngine.AnimatorOverrideController", 21 | "ignore": false, 22 | "defaultInstantiationMode": 0, 23 | "supportsModification": true 24 | }, 25 | { 26 | "userAdded": false, 27 | "type": "UnityEditor.Audio.AudioMixerController", 28 | "ignore": false, 29 | "defaultInstantiationMode": 0, 30 | "supportsModification": true 31 | }, 32 | { 33 | "userAdded": false, 34 | "type": "UnityEngine.ComputeShader", 35 | "ignore": true, 36 | "defaultInstantiationMode": 1, 37 | "supportsModification": true 38 | }, 39 | { 40 | "userAdded": false, 41 | "type": "UnityEngine.Cubemap", 42 | "ignore": false, 43 | "defaultInstantiationMode": 0, 44 | "supportsModification": true 45 | }, 46 | { 47 | "userAdded": false, 48 | "type": "UnityEngine.GameObject", 49 | "ignore": false, 50 | "defaultInstantiationMode": 0, 51 | "supportsModification": true 52 | }, 53 | { 54 | "userAdded": false, 55 | "type": "UnityEditor.LightingDataAsset", 56 | "ignore": false, 57 | "defaultInstantiationMode": 0, 58 | "supportsModification": false 59 | }, 60 | { 61 | "userAdded": false, 62 | "type": "UnityEngine.LightingSettings", 63 | "ignore": false, 64 | "defaultInstantiationMode": 0, 65 | "supportsModification": true 66 | }, 67 | { 68 | "userAdded": false, 69 | "type": "UnityEngine.Material", 70 | "ignore": false, 71 | "defaultInstantiationMode": 0, 72 | "supportsModification": true 73 | }, 74 | { 75 | "userAdded": false, 76 | "type": "UnityEditor.MonoScript", 77 | "ignore": true, 78 | "defaultInstantiationMode": 1, 79 | "supportsModification": true 80 | }, 81 | { 82 | "userAdded": false, 83 | "type": "UnityEngine.PhysicMaterial", 84 | "ignore": false, 85 | "defaultInstantiationMode": 0, 86 | "supportsModification": true 87 | }, 88 | { 89 | "userAdded": false, 90 | "type": "UnityEngine.PhysicsMaterial2D", 91 | "ignore": false, 92 | "defaultInstantiationMode": 0, 93 | "supportsModification": true 94 | }, 95 | { 96 | "userAdded": false, 97 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", 98 | "ignore": false, 99 | "defaultInstantiationMode": 0, 100 | "supportsModification": true 101 | }, 102 | { 103 | "userAdded": false, 104 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", 105 | "ignore": false, 106 | "defaultInstantiationMode": 0, 107 | "supportsModification": true 108 | }, 109 | { 110 | "userAdded": false, 111 | "type": "UnityEngine.Rendering.VolumeProfile", 112 | "ignore": false, 113 | "defaultInstantiationMode": 0, 114 | "supportsModification": true 115 | }, 116 | { 117 | "userAdded": false, 118 | "type": "UnityEditor.SceneAsset", 119 | "ignore": false, 120 | "defaultInstantiationMode": 0, 121 | "supportsModification": false 122 | }, 123 | { 124 | "userAdded": false, 125 | "type": "UnityEngine.Shader", 126 | "ignore": true, 127 | "defaultInstantiationMode": 1, 128 | "supportsModification": true 129 | }, 130 | { 131 | "userAdded": false, 132 | "type": "UnityEngine.ShaderVariantCollection", 133 | "ignore": true, 134 | "defaultInstantiationMode": 1, 135 | "supportsModification": true 136 | }, 137 | { 138 | "userAdded": false, 139 | "type": "UnityEngine.Texture", 140 | "ignore": false, 141 | "defaultInstantiationMode": 0, 142 | "supportsModification": true 143 | }, 144 | { 145 | "userAdded": false, 146 | "type": "UnityEngine.Texture2D", 147 | "ignore": false, 148 | "defaultInstantiationMode": 0, 149 | "supportsModification": true 150 | }, 151 | { 152 | "userAdded": false, 153 | "type": "UnityEngine.Timeline.TimelineAsset", 154 | "ignore": false, 155 | "defaultInstantiationMode": 0, 156 | "supportsModification": true 157 | } 158 | ], 159 | "defaultDependencyTypeInfo": { 160 | "userAdded": false, 161 | "type": "", 162 | "ignore": false, 163 | "defaultInstantiationMode": 1, 164 | "supportsModification": true 165 | }, 166 | "newSceneOverride": 0 167 | } -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | m_PackageRequiringCoreStatsPresent: 0 27 | UnityAdsSettings: 28 | m_Enabled: 0 29 | m_InitializeOnStartup: 1 30 | m_TestMode: 0 31 | m_IosGameId: 32 | m_AndroidGameId: 33 | m_GameIds: {} 34 | m_GameId: 35 | PerformanceReportingSettings: 36 | m_Enabled: 0 37 | -------------------------------------------------------------------------------- /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/GarrettGunnell/Iterated-Function-Systems/7d4c8e9774f1a3ce9e803e6e153518a9dcf94707/ProjectSettings/boot.config -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Point Cloud Fractals 2 | 3 | by Acerola 4 | 5 | This repo features tech for drawing as many particles as possible to approximate the attractor of a given iterated function system. It is not an implementation of splatting, rather the tech is game dev friendly and uses the usual rendering pipeline. It also features a real time lighting solution for the 3D fractal by implementing a brute force ambient occlusion approximation. Although, now that I'm thinking about it, I probably could've just done ssao. 6 | 7 | This is not a production asset. Do not use it in your video games. It is a proof of concept and tech demo for how much higher end hardware can handle with even midwit implementations. Many improvements could be made. 8 | 9 | 10 | 11 | ![fractal](./Examples/flagship.png) 12 | ![fractal](./Examples/f17.png) 13 | 14 | References:
15 | https://paulbourke.net/fractals/ifs/
16 | https://en.wikipedia.org/wiki/Chaos_game
17 | https://www.youtube.com/@acegikmo - Lerp smoothing is broken
-------------------------------------------------------------------------------- /UserSettings/EditorUserSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!162 &1 4 | EditorUserSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ConfigSettings: 8 | RecentlyUsedSceneGuid-0: 9 | value: 5704015250515f585e595a7440700844474e197c292d7f69787f1f6be7b3656e 10 | flags: 0 11 | RecentlyUsedSceneGuid-1: 12 | value: 05500753000d0a580808597a457b59444f151e29757d73687b2c4e32e4b9633e 13 | flags: 0 14 | RecentlyUsedSceneGuid-2: 15 | value: 5b0657570453515f0f585974497006441315417f2e2e77627a2a4966bab3603a 16 | flags: 0 17 | RecentlyUsedSceneGuid-3: 18 | value: 5a5757560101590a5d0c0e24427b5d44434e4c7a7b7a23677f2b4565b7b5353a 19 | flags: 0 20 | vcSharedLogLevel: 21 | value: 0d5e400f0650 22 | flags: 0 23 | m_VCAutomaticAdd: 1 24 | m_VCDebugCom: 0 25 | m_VCDebugCmd: 0 26 | m_VCDebugOut: 0 27 | m_SemanticMergeMode: 2 28 | m_DesiredImportWorkerCount: 4 29 | m_StandbyImportWorkerCount: 2 30 | m_IdleImportWorkerShutdownDelay: 60000 31 | m_VCShowFailedCheckout: 1 32 | m_VCOverwriteFailedCheckoutAssets: 1 33 | m_VCProjectOverlayIcons: 1 34 | m_VCHierarchyOverlayIcons: 1 35 | m_VCOtherOverlayIcons: 1 36 | m_VCAllowAsyncUpdate: 1 37 | m_ArtifactGarbageCollection: 1 38 | -------------------------------------------------------------------------------- /UserSettings/Layouts/default-2021.dwlt: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 52 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: 1 12 | m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_PixelRect: 16 | serializedVersion: 2 17 | x: 0 18 | y: 43.2 19 | width: 3072 20 | height: 1644.8 21 | m_ShowMode: 4 22 | m_Title: Game 23 | m_RootView: {fileID: 4} 24 | m_MinSize: {x: 875, y: 300} 25 | m_MaxSize: {x: 10000, y: 10000} 26 | m_Maximized: 1 27 | --- !u!114 &2 28 | MonoBehaviour: 29 | m_ObjectHideFlags: 52 30 | m_CorrespondingSourceObject: {fileID: 0} 31 | m_PrefabInstance: {fileID: 0} 32 | m_PrefabAsset: {fileID: 0} 33 | m_GameObject: {fileID: 0} 34 | m_Enabled: 1 35 | m_EditorHideFlags: 1 36 | m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} 37 | m_Name: 38 | m_EditorClassIdentifier: 39 | m_Children: 40 | - {fileID: 7} 41 | - {fileID: 3} 42 | m_Position: 43 | serializedVersion: 2 44 | x: 0 45 | y: 30 46 | width: 3072 47 | height: 1594.8 48 | m_MinSize: {x: 200, y: 100} 49 | m_MaxSize: {x: 16192, y: 8096} 50 | vertical: 0 51 | controlID: 1539 52 | --- !u!114 &3 53 | MonoBehaviour: 54 | m_ObjectHideFlags: 52 55 | m_CorrespondingSourceObject: {fileID: 0} 56 | m_PrefabInstance: {fileID: 0} 57 | m_PrefabAsset: {fileID: 0} 58 | m_GameObject: {fileID: 0} 59 | m_Enabled: 1 60 | m_EditorHideFlags: 1 61 | m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} 62 | m_Name: InspectorWindow 63 | m_EditorClassIdentifier: 64 | m_Children: [] 65 | m_Position: 66 | serializedVersion: 2 67 | x: 2492.8 68 | y: 0 69 | width: 579.19995 70 | height: 1594.8 71 | m_MinSize: {x: 276, y: 71} 72 | m_MaxSize: {x: 4001, y: 4021} 73 | m_ActualView: {fileID: 9} 74 | m_Panes: 75 | - {fileID: 9} 76 | - {fileID: 10} 77 | m_Selected: 0 78 | m_LastSelected: 1 79 | --- !u!114 &4 80 | MonoBehaviour: 81 | m_ObjectHideFlags: 52 82 | m_CorrespondingSourceObject: {fileID: 0} 83 | m_PrefabInstance: {fileID: 0} 84 | m_PrefabAsset: {fileID: 0} 85 | m_GameObject: {fileID: 0} 86 | m_Enabled: 1 87 | m_EditorHideFlags: 1 88 | m_Script: {fileID: 12008, guid: 0000000000000000e000000000000000, type: 0} 89 | m_Name: 90 | m_EditorClassIdentifier: 91 | m_Children: 92 | - {fileID: 5} 93 | - {fileID: 2} 94 | - {fileID: 6} 95 | m_Position: 96 | serializedVersion: 2 97 | x: 0 98 | y: 0 99 | width: 3072 100 | height: 1644.8 101 | m_MinSize: {x: 875, y: 300} 102 | m_MaxSize: {x: 10000, y: 10000} 103 | m_UseTopView: 1 104 | m_TopViewHeight: 30 105 | m_UseBottomView: 1 106 | m_BottomViewHeight: 20 107 | --- !u!114 &5 108 | MonoBehaviour: 109 | m_ObjectHideFlags: 52 110 | m_CorrespondingSourceObject: {fileID: 0} 111 | m_PrefabInstance: {fileID: 0} 112 | m_PrefabAsset: {fileID: 0} 113 | m_GameObject: {fileID: 0} 114 | m_Enabled: 1 115 | m_EditorHideFlags: 1 116 | m_Script: {fileID: 12011, guid: 0000000000000000e000000000000000, type: 0} 117 | m_Name: 118 | m_EditorClassIdentifier: 119 | m_Children: [] 120 | m_Position: 121 | serializedVersion: 2 122 | x: 0 123 | y: 0 124 | width: 3072 125 | height: 30 126 | m_MinSize: {x: 0, y: 0} 127 | m_MaxSize: {x: 0, y: 0} 128 | m_LastLoadedLayoutName: Game w inspector 129 | --- !u!114 &6 130 | MonoBehaviour: 131 | m_ObjectHideFlags: 52 132 | m_CorrespondingSourceObject: {fileID: 0} 133 | m_PrefabInstance: {fileID: 0} 134 | m_PrefabAsset: {fileID: 0} 135 | m_GameObject: {fileID: 0} 136 | m_Enabled: 1 137 | m_EditorHideFlags: 1 138 | m_Script: {fileID: 12042, guid: 0000000000000000e000000000000000, type: 0} 139 | m_Name: 140 | m_EditorClassIdentifier: 141 | m_Children: [] 142 | m_Position: 143 | serializedVersion: 2 144 | x: 0 145 | y: 1624.8 146 | width: 3072 147 | height: 20 148 | m_MinSize: {x: 0, y: 0} 149 | m_MaxSize: {x: 0, y: 0} 150 | --- !u!114 &7 151 | MonoBehaviour: 152 | m_ObjectHideFlags: 52 153 | m_CorrespondingSourceObject: {fileID: 0} 154 | m_PrefabInstance: {fileID: 0} 155 | m_PrefabAsset: {fileID: 0} 156 | m_GameObject: {fileID: 0} 157 | m_Enabled: 1 158 | m_EditorHideFlags: 1 159 | m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} 160 | m_Name: GameView 161 | m_EditorClassIdentifier: 162 | m_Children: [] 163 | m_Position: 164 | serializedVersion: 2 165 | x: 0 166 | y: 0 167 | width: 2492.8 168 | height: 1594.8 169 | m_MinSize: {x: 201, y: 221} 170 | m_MaxSize: {x: 4001, y: 4021} 171 | m_ActualView: {fileID: 12} 172 | m_Panes: 173 | - {fileID: 11} 174 | - {fileID: 12} 175 | - {fileID: 8} 176 | m_Selected: 1 177 | m_LastSelected: 0 178 | --- !u!114 &8 179 | MonoBehaviour: 180 | m_ObjectHideFlags: 52 181 | m_CorrespondingSourceObject: {fileID: 0} 182 | m_PrefabInstance: {fileID: 0} 183 | m_PrefabAsset: {fileID: 0} 184 | m_GameObject: {fileID: 0} 185 | m_Enabled: 1 186 | m_EditorHideFlags: 1 187 | m_Script: {fileID: 12111, guid: 0000000000000000e000000000000000, type: 0} 188 | m_Name: 189 | m_EditorClassIdentifier: 190 | m_MinSize: {x: 400, y: 100} 191 | m_MaxSize: {x: 2048, y: 2048} 192 | m_TitleContent: 193 | m_Text: Asset Store 194 | m_Image: {fileID: -4391848389275900105, guid: 0000000000000000d000000000000000, type: 0} 195 | m_Tooltip: 196 | m_Pos: 197 | serializedVersion: 2 198 | x: 468 199 | y: 181 200 | width: 973 201 | height: 501 202 | m_ViewDataDictionary: {fileID: 0} 203 | m_OverlayCanvas: 204 | m_LastAppliedPresetName: Default 205 | m_SaveData: [] 206 | --- !u!114 &9 207 | MonoBehaviour: 208 | m_ObjectHideFlags: 52 209 | m_CorrespondingSourceObject: {fileID: 0} 210 | m_PrefabInstance: {fileID: 0} 211 | m_PrefabAsset: {fileID: 0} 212 | m_GameObject: {fileID: 0} 213 | m_Enabled: 1 214 | m_EditorHideFlags: 1 215 | m_Script: {fileID: 12019, guid: 0000000000000000e000000000000000, type: 0} 216 | m_Name: 217 | m_EditorClassIdentifier: 218 | m_MinSize: {x: 275, y: 50} 219 | m_MaxSize: {x: 4000, y: 4000} 220 | m_TitleContent: 221 | m_Text: Inspector 222 | m_Image: {fileID: 8356117983803934776, guid: 0000000000000000d000000000000000, type: 0} 223 | m_Tooltip: 224 | m_Pos: 225 | serializedVersion: 2 226 | x: 2492.8 227 | y: 73.6 228 | width: 578.19995 229 | height: 1573.8 230 | m_ViewDataDictionary: {fileID: 0} 231 | m_OverlayCanvas: 232 | m_LastAppliedPresetName: Default 233 | m_SaveData: [] 234 | m_ObjectsLockedBeforeSerialization: [] 235 | m_InstanceIDsLockedBeforeSerialization: 236 | m_PreviewResizer: 237 | m_CachedPref: 160 238 | m_ControlHash: -371814159 239 | m_PrefName: Preview_InspectorPreview 240 | m_LastInspectedObjectInstanceID: -1 241 | m_LastVerticalScrollValue: 1239.2 242 | m_GlobalObjectId: 243 | m_InspectorMode: 0 244 | m_LockTracker: 245 | m_IsLocked: 0 246 | m_PreviewWindow: {fileID: 0} 247 | --- !u!114 &10 248 | MonoBehaviour: 249 | m_ObjectHideFlags: 52 250 | m_CorrespondingSourceObject: {fileID: 0} 251 | m_PrefabInstance: {fileID: 0} 252 | m_PrefabAsset: {fileID: 0} 253 | m_GameObject: {fileID: 0} 254 | m_Enabled: 1 255 | m_EditorHideFlags: 1 256 | m_Script: {fileID: 12061, guid: 0000000000000000e000000000000000, type: 0} 257 | m_Name: 258 | m_EditorClassIdentifier: 259 | m_MinSize: {x: 200, y: 200} 260 | m_MaxSize: {x: 4000, y: 4000} 261 | m_TitleContent: 262 | m_Text: Hierarchy 263 | m_Image: {fileID: -9000905672528348964, guid: 0000000000000000d000000000000000, type: 0} 264 | m_Tooltip: 265 | m_Pos: 266 | serializedVersion: 2 267 | x: 2492.8 268 | y: 73.6 269 | width: 578.19995 270 | height: 1573.8 271 | m_ViewDataDictionary: {fileID: 0} 272 | m_OverlayCanvas: 273 | m_LastAppliedPresetName: Default 274 | m_SaveData: [] 275 | m_SceneHierarchy: 276 | m_TreeViewState: 277 | scrollPos: {x: 0, y: 0} 278 | m_SelectedIDs: 2c5a0000 279 | m_LastClickedID: 23084 280 | m_ExpandedIDs: 38fbffff 281 | m_RenameOverlay: 282 | m_UserAcceptedRename: 0 283 | m_Name: 284 | m_OriginalName: 285 | m_EditFieldRect: 286 | serializedVersion: 2 287 | x: 0 288 | y: 0 289 | width: 0 290 | height: 0 291 | m_UserData: 0 292 | m_IsWaitingForDelay: 0 293 | m_IsRenaming: 0 294 | m_OriginalEventType: 11 295 | m_IsRenamingFilename: 0 296 | m_ClientGUIView: {fileID: 0} 297 | m_SearchString: 298 | m_ExpandedScenes: [] 299 | m_CurrenRootInstanceID: 0 300 | m_LockTracker: 301 | m_IsLocked: 0 302 | m_CurrentSortingName: TransformSorting 303 | m_WindowGUID: 69c405c2be20f3e47a74ffee3dcc046e 304 | --- !u!114 &11 305 | MonoBehaviour: 306 | m_ObjectHideFlags: 52 307 | m_CorrespondingSourceObject: {fileID: 0} 308 | m_PrefabInstance: {fileID: 0} 309 | m_PrefabAsset: {fileID: 0} 310 | m_GameObject: {fileID: 0} 311 | m_Enabled: 1 312 | m_EditorHideFlags: 1 313 | m_Script: {fileID: 12013, guid: 0000000000000000e000000000000000, type: 0} 314 | m_Name: 315 | m_EditorClassIdentifier: 316 | m_MinSize: {x: 200, y: 200} 317 | m_MaxSize: {x: 4000, y: 4000} 318 | m_TitleContent: 319 | m_Text: Scene 320 | m_Image: {fileID: -131512000283675692, guid: 0000000000000000d000000000000000, type: 0} 321 | m_Tooltip: 322 | m_Pos: 323 | serializedVersion: 2 324 | x: 249 325 | y: 73 326 | width: 1280 327 | height: 655 328 | m_ViewDataDictionary: {fileID: 0} 329 | m_OverlayCanvas: 330 | m_LastAppliedPresetName: Default 331 | m_SaveData: 332 | - dockPosition: 0 333 | containerId: overlay-toolbar__top 334 | floating: 0 335 | collapsed: 0 336 | displayed: 1 337 | snapOffset: {x: 0, y: 0} 338 | snapOffsetDelta: {x: -101, y: -26} 339 | snapCorner: 3 340 | id: Tool Settings 341 | index: 0 342 | layout: 1 343 | - dockPosition: 0 344 | containerId: overlay-toolbar__top 345 | floating: 0 346 | collapsed: 0 347 | displayed: 1 348 | snapOffset: {x: -141, y: 149} 349 | snapOffsetDelta: {x: 0, y: 0} 350 | snapCorner: 1 351 | id: unity-grid-and-snap-toolbar 352 | index: 1 353 | layout: 1 354 | - dockPosition: 1 355 | containerId: overlay-toolbar__top 356 | floating: 0 357 | collapsed: 0 358 | displayed: 1 359 | snapOffset: {x: 0, y: 0} 360 | snapOffsetDelta: {x: 0, y: 0} 361 | snapCorner: 0 362 | id: unity-scene-view-toolbar 363 | index: 0 364 | layout: 1 365 | - dockPosition: 1 366 | containerId: overlay-toolbar__top 367 | floating: 0 368 | collapsed: 0 369 | displayed: 0 370 | snapOffset: {x: 0, y: 0} 371 | snapOffsetDelta: {x: 0, y: 0} 372 | snapCorner: 1 373 | id: unity-search-toolbar 374 | index: 1 375 | layout: 1 376 | - dockPosition: 0 377 | containerId: overlay-container--left 378 | floating: 0 379 | collapsed: 0 380 | displayed: 1 381 | snapOffset: {x: 0, y: 0} 382 | snapOffsetDelta: {x: 0, y: 0} 383 | snapCorner: 0 384 | id: unity-transform-toolbar 385 | index: 0 386 | layout: 2 387 | - dockPosition: 0 388 | containerId: overlay-container--left 389 | floating: 0 390 | collapsed: 0 391 | displayed: 1 392 | snapOffset: {x: 0, y: 197} 393 | snapOffsetDelta: {x: 0, y: 0} 394 | snapCorner: 0 395 | id: unity-component-tools 396 | index: 1 397 | layout: 2 398 | - dockPosition: 0 399 | containerId: overlay-container--right 400 | floating: 0 401 | collapsed: 0 402 | displayed: 1 403 | snapOffset: {x: 67.5, y: 86} 404 | snapOffsetDelta: {x: 0, y: 0} 405 | snapCorner: 0 406 | id: Orientation 407 | index: 0 408 | layout: 4 409 | - dockPosition: 1 410 | containerId: overlay-container--right 411 | floating: 0 412 | collapsed: 0 413 | displayed: 0 414 | snapOffset: {x: 0, y: 0} 415 | snapOffsetDelta: {x: 0, y: 0} 416 | snapCorner: 0 417 | id: Scene View/Light Settings 418 | index: 0 419 | layout: 4 420 | - dockPosition: 1 421 | containerId: overlay-container--right 422 | floating: 0 423 | collapsed: 0 424 | displayed: 1 425 | snapOffset: {x: 0, y: 0} 426 | snapOffsetDelta: {x: 0, y: 0} 427 | snapCorner: 0 428 | id: Scene View/Camera 429 | index: 1 430 | layout: 4 431 | - dockPosition: 1 432 | containerId: overlay-container--right 433 | floating: 0 434 | collapsed: 0 435 | displayed: 0 436 | snapOffset: {x: 0, y: 0} 437 | snapOffsetDelta: {x: 0, y: 0} 438 | snapCorner: 0 439 | id: Scene View/Cloth Constraints 440 | index: 2 441 | layout: 4 442 | - dockPosition: 1 443 | containerId: overlay-container--right 444 | floating: 0 445 | collapsed: 0 446 | displayed: 0 447 | snapOffset: {x: 0, y: 0} 448 | snapOffsetDelta: {x: 0, y: 0} 449 | snapCorner: 0 450 | id: Scene View/Cloth Collisions 451 | index: 3 452 | layout: 4 453 | - dockPosition: 1 454 | containerId: overlay-container--right 455 | floating: 0 456 | collapsed: 0 457 | displayed: 0 458 | snapOffset: {x: 0, y: 0} 459 | snapOffsetDelta: {x: 0, y: 0} 460 | snapCorner: 0 461 | id: Scene View/Navmesh Display 462 | index: 4 463 | layout: 4 464 | - dockPosition: 1 465 | containerId: overlay-container--right 466 | floating: 0 467 | collapsed: 0 468 | displayed: 0 469 | snapOffset: {x: 0, y: 0} 470 | snapOffsetDelta: {x: 0, y: 0} 471 | snapCorner: 0 472 | id: Scene View/Agent Display 473 | index: 5 474 | layout: 4 475 | - dockPosition: 1 476 | containerId: overlay-container--right 477 | floating: 0 478 | collapsed: 0 479 | displayed: 0 480 | snapOffset: {x: 0, y: 0} 481 | snapOffsetDelta: {x: 0, y: 0} 482 | snapCorner: 0 483 | id: Scene View/Obstacle Display 484 | index: 6 485 | layout: 4 486 | - dockPosition: 1 487 | containerId: overlay-container--right 488 | floating: 0 489 | collapsed: 0 490 | displayed: 0 491 | snapOffset: {x: 0, y: 0} 492 | snapOffsetDelta: {x: 0, y: 0} 493 | snapCorner: 0 494 | id: Scene View/Occlusion Culling 495 | index: 7 496 | layout: 4 497 | - dockPosition: 1 498 | containerId: overlay-container--right 499 | floating: 0 500 | collapsed: 0 501 | displayed: 0 502 | snapOffset: {x: 0, y: 0} 503 | snapOffsetDelta: {x: 0, y: 0} 504 | snapCorner: 0 505 | id: Scene View/Physics Debugger 506 | index: 8 507 | layout: 4 508 | - dockPosition: 1 509 | containerId: overlay-container--right 510 | floating: 0 511 | collapsed: 0 512 | displayed: 0 513 | snapOffset: {x: 0, y: 0} 514 | snapOffsetDelta: {x: 0, y: 0} 515 | snapCorner: 0 516 | id: Scene View/Scene Visibility 517 | index: 9 518 | layout: 4 519 | - dockPosition: 1 520 | containerId: overlay-container--right 521 | floating: 0 522 | collapsed: 0 523 | displayed: 0 524 | snapOffset: {x: 0, y: 0} 525 | snapOffsetDelta: {x: 0, y: 0} 526 | snapCorner: 0 527 | id: Scene View/Particles 528 | index: 10 529 | layout: 4 530 | - dockPosition: 1 531 | containerId: overlay-container--right 532 | floating: 0 533 | collapsed: 0 534 | displayed: 0 535 | snapOffset: {x: 0, y: 0} 536 | snapOffsetDelta: {x: 0, y: 0} 537 | snapCorner: 0 538 | id: Scene View/Tilemap 539 | index: 11 540 | layout: 4 541 | - dockPosition: 1 542 | containerId: overlay-container--right 543 | floating: 0 544 | collapsed: 0 545 | displayed: 0 546 | snapOffset: {x: 0, y: 0} 547 | snapOffsetDelta: {x: 0, y: 0} 548 | snapCorner: 0 549 | id: Scene View/Tilemap Palette Helper 550 | index: 12 551 | layout: 4 552 | m_WindowGUID: 61670ec65adcf7c46807b58bebd5ce4e 553 | m_Gizmos: 1 554 | m_OverrideSceneCullingMask: 6917529027641081856 555 | m_SceneIsLit: 1 556 | m_SceneLighting: 1 557 | m_2DMode: 0 558 | m_isRotationLocked: 0 559 | m_PlayAudio: 0 560 | m_AudioPlay: 0 561 | m_Position: 562 | m_Target: {x: 600.96484, y: -223.76228, z: -386.9804} 563 | speed: 2 564 | m_Value: {x: 600.96484, y: -223.76228, z: -386.9804} 565 | m_RenderMode: 0 566 | m_CameraMode: 567 | drawMode: 0 568 | name: Shaded 569 | section: Shading Mode 570 | m_ValidateTrueMetals: 0 571 | m_DoValidateTrueMetals: 0 572 | m_ExposureSliderValue: 0 573 | m_SceneViewState: 574 | m_AlwaysRefresh: 0 575 | showFog: 1 576 | showSkybox: 1 577 | showFlares: 1 578 | showImageEffects: 1 579 | showParticleSystems: 1 580 | showVisualEffectGraphs: 1 581 | m_FxEnabled: 1 582 | m_Grid: 583 | xGrid: 584 | m_Fade: 585 | m_Target: 0 586 | speed: 2 587 | m_Value: 0 588 | m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} 589 | m_Pivot: {x: 0, y: 0, z: 0} 590 | m_Size: {x: 0, y: 0} 591 | yGrid: 592 | m_Fade: 593 | m_Target: 1 594 | speed: 2 595 | m_Value: 1 596 | m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} 597 | m_Pivot: {x: 0, y: 0, z: 0} 598 | m_Size: {x: 1, y: 1} 599 | zGrid: 600 | m_Fade: 601 | m_Target: 0 602 | speed: 2 603 | m_Value: 0 604 | m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} 605 | m_Pivot: {x: 0, y: 0, z: 0} 606 | m_Size: {x: 0, y: 0} 607 | m_ShowGrid: 1 608 | m_GridAxis: 1 609 | m_gridOpacity: 0.5 610 | m_Rotation: 611 | m_Target: {x: -0.2148943, y: -0.38726807, z: 0.09356651, w: -0.89166844} 612 | speed: 2 613 | m_Value: {x: -0.21489607, y: -0.38727129, z: 0.09356728, w: -0.89167583} 614 | m_Size: 615 | m_Target: 0.5008606 616 | speed: 2 617 | m_Value: 0.5008606 618 | m_Ortho: 619 | m_Target: 0 620 | speed: 2 621 | m_Value: 0 622 | m_CameraSettings: 623 | m_Speed: 1 624 | m_SpeedNormalized: 0.5 625 | m_SpeedMin: 0.01 626 | m_SpeedMax: 2 627 | m_EasingEnabled: 1 628 | m_EasingDuration: 0.4 629 | m_AccelerationEnabled: 1 630 | m_FieldOfViewHorizontalOrVertical: 60 631 | m_NearClip: 0.03 632 | m_FarClip: 10000 633 | m_DynamicClip: 1 634 | m_OcclusionCulling: 0 635 | m_LastSceneViewRotation: {x: 0, y: 0, z: 0, w: 0} 636 | m_LastSceneViewOrtho: 0 637 | m_ReplacementShader: {fileID: 0} 638 | m_ReplacementString: 639 | m_SceneVisActive: 1 640 | m_LastLockedObject: {fileID: 0} 641 | m_ViewIsLockedToObject: 0 642 | --- !u!114 &12 643 | MonoBehaviour: 644 | m_ObjectHideFlags: 52 645 | m_CorrespondingSourceObject: {fileID: 0} 646 | m_PrefabInstance: {fileID: 0} 647 | m_PrefabAsset: {fileID: 0} 648 | m_GameObject: {fileID: 0} 649 | m_Enabled: 1 650 | m_EditorHideFlags: 1 651 | m_Script: {fileID: 12015, guid: 0000000000000000e000000000000000, type: 0} 652 | m_Name: 653 | m_EditorClassIdentifier: 654 | m_MinSize: {x: 200, y: 200} 655 | m_MaxSize: {x: 4000, y: 4000} 656 | m_TitleContent: 657 | m_Text: Game 658 | m_Image: {fileID: 257045534191678443, guid: 0000000000000000d000000000000000, type: 0} 659 | m_Tooltip: 660 | m_Pos: 661 | serializedVersion: 2 662 | x: 0 663 | y: 73.6 664 | width: 2491.8 665 | height: 1573.8 666 | m_ViewDataDictionary: {fileID: 0} 667 | m_OverlayCanvas: 668 | m_LastAppliedPresetName: Default 669 | m_SaveData: [] 670 | m_SerializedViewNames: [] 671 | m_SerializedViewValues: [] 672 | m_PlayModeViewName: GameView 673 | m_ShowGizmos: 0 674 | m_TargetDisplay: 0 675 | m_ClearColor: {r: 0, g: 0, b: 0, a: 0} 676 | m_TargetSize: {x: 2160, y: 2160} 677 | m_TextureFilterMode: 0 678 | m_TextureHideFlags: 61 679 | m_RenderIMGUI: 1 680 | m_EnterPlayModeBehavior: 0 681 | m_UseMipMap: 0 682 | m_VSyncEnabled: 0 683 | m_Gizmos: 0 684 | m_Stats: 0 685 | m_SelectedSizes: 0a000000000000000000000000000000000000000000000000000000000000000000000000000000 686 | m_ZoomArea: 687 | m_HRangeLocked: 0 688 | m_VRangeLocked: 0 689 | hZoomLockedByDefault: 0 690 | vZoomLockedByDefault: 0 691 | m_HBaseRangeMin: -864 692 | m_HBaseRangeMax: 864 693 | m_VBaseRangeMin: -864 694 | m_VBaseRangeMax: 864 695 | m_HAllowExceedBaseRangeMin: 1 696 | m_HAllowExceedBaseRangeMax: 1 697 | m_VAllowExceedBaseRangeMin: 1 698 | m_VAllowExceedBaseRangeMax: 1 699 | m_ScaleWithWindow: 0 700 | m_HSlider: 0 701 | m_VSlider: 0 702 | m_IgnoreScrollWheelUntilClicked: 0 703 | m_EnableMouseInput: 1 704 | m_EnableSliderZoomHorizontal: 0 705 | m_EnableSliderZoomVertical: 0 706 | m_UniformScale: 1 707 | m_UpDirection: 1 708 | m_DrawArea: 709 | serializedVersion: 2 710 | x: 0 711 | y: 21 712 | width: 2491.8 713 | height: 1552.8 714 | m_Scale: {x: 0.8986112, y: 0.8986111} 715 | m_Translation: {x: 1245.9, y: 776.4} 716 | m_MarginLeft: 0 717 | m_MarginRight: 0 718 | m_MarginTop: 0 719 | m_MarginBottom: 0 720 | m_LastShownAreaInsideMargins: 721 | serializedVersion: 2 722 | x: -1386.4729 723 | y: -864 724 | width: 2772.9458 725 | height: 1728 726 | m_MinimalGUI: 1 727 | m_defaultScale: 0.8986111 728 | m_LastWindowPixelSize: {x: 3114.75, y: 1967.25} 729 | m_ClearInEditMode: 1 730 | m_NoCameraWarning: 1 731 | m_LowResolutionForAspectRatios: 01000000000000000000 732 | m_XRRenderMode: 0 733 | m_RenderTexture: {fileID: 0} 734 | -------------------------------------------------------------------------------- /UserSettings/Search.settings: -------------------------------------------------------------------------------- 1 | {} --------------------------------------------------------------------------------