From 5f0fd9b31f507efcccde37adfdfa22de4c47bac9 Mon Sep 17 00:00:00 2001 From: Mark Corbelli Date: Mon, 28 Mar 2022 17:28:43 -0700 Subject: [PATCH] Part 5, basic threading and compute shader meshing! --- .../Settings/URP-Balanced-Renderer.asset | 22 +- .../UnityDefaults/Settings/URP-Balanced.asset | 14 +- .../Settings/URP-HighFidelity.asset | 10 +- Assets/VoxelProjectSeries.meta | 2 +- Assets/VoxelProjectSeries/Scenes/World.unity | 179 +++- Assets/VoxelProjectSeries/Scripts/Camera.meta | 8 + .../Scripts/Camera/FreeFlyCamera.cs | 125 +++ .../Scripts/Camera/FreeFlyCamera.cs.meta | 11 + .../ComputeShaders/HeightMapNoise.compute | 118 ++- .../ComputeShaders/VoxelCompute.compute | 117 +++ .../ComputeShaders/VoxelCompute.compute.meta | 8 + .../ComputeShaders/VoxelValues.compute | 50 + .../ComputeShaders/VoxelValues.compute.meta | 8 + .../Scripts/Data/Container.cs | 254 ++---- .../Scripts/Data/NoiseLayer.cs | 19 + .../Scripts/Data/NoiseLayer.cs.meta | 11 + .../Scripts/Data/VoxelColor.cs | 12 +- .../Scripts/Managers/ComputeManager.cs | 229 ++++- .../Scripts/Managers/WorldManager.cs | 210 ++++- .../Shaders/VoxelVertexColor.shadergraph | 635 ++++++++----- Assets/VoxelProjectSeries/WorldMaterial.mat | 15 +- Packages/manifest.json | 5 +- Packages/packages-lock.json | 66 +- .../BurstAotSettings_StandaloneWindows.json | 5 +- ProjectSettings/CommonBurstAotSettings.json | 2 +- ProjectSettings/EditorBuildSettings.asset | 4 +- ProjectSettings/EditorSettings.asset | 19 +- ProjectSettings/GraphicsSettings.asset | 2 +- ProjectSettings/ProjectSettings.asset | 23 +- ProjectSettings/ProjectVersion.txt | 4 +- ProjectSettings/QualitySettings.asset | 2 +- ProjectSettings/URPProjectSettings.asset | 2 +- UserSettings/EditorUserSettings.asset | 18 +- .../Layouts/CurrentMaximizeLayout.dwlt | 852 ++++++++++++++++++ UserSettings/Layouts/default-2021.dwlt | 406 +++++++-- UserSettings/Search.settings | 1 + 36 files changed, 2753 insertions(+), 715 deletions(-) create mode 100644 Assets/VoxelProjectSeries/Scripts/Camera.meta create mode 100644 Assets/VoxelProjectSeries/Scripts/Camera/FreeFlyCamera.cs create mode 100644 Assets/VoxelProjectSeries/Scripts/Camera/FreeFlyCamera.cs.meta create mode 100644 Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelCompute.compute create mode 100644 Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelCompute.compute.meta create mode 100644 Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelValues.compute create mode 100644 Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelValues.compute.meta create mode 100644 Assets/VoxelProjectSeries/Scripts/Data/NoiseLayer.cs create mode 100644 Assets/VoxelProjectSeries/Scripts/Data/NoiseLayer.cs.meta create mode 100644 UserSettings/Layouts/CurrentMaximizeLayout.dwlt create mode 100644 UserSettings/Search.settings diff --git a/Assets/UnityDefaults/Settings/URP-Balanced-Renderer.asset b/Assets/UnityDefaults/Settings/URP-Balanced-Renderer.asset index 20bd4d4..d1eb0d2 100644 --- a/Assets/UnityDefaults/Settings/URP-Balanced-Renderer.asset +++ b/Assets/UnityDefaults/Settings/URP-Balanced-Renderer.asset @@ -13,10 +13,9 @@ MonoBehaviour: m_Name: SSAO m_EditorClassIdentifier: m_Active: 1 - m_Shader: {fileID: 0} + m_Shader: {fileID: 4800000, guid: 0849e84e3d62649e8882e9d6f056a017, type: 3} m_Settings: Downsample: 1 - AfterOpaque: 0 Source: 0 NormalSamples: 0 Intensity: 0.5 @@ -35,26 +34,22 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} m_Name: URP-Balanced-Renderer m_EditorClassIdentifier: - debugShaders: - debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, - type: 3} m_RendererFeatures: - {fileID: -1878332245247344467} m_RendererFeatureMap: adc0de57c6d2eee5 - m_UseNativeRenderPass: 0 postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} + xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} shaders: blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} - screenSpaceShadowPS: {fileID: 0} + screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd, + type: 3} samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} + tileDepthInfoPS: {fileID: 0} + tileDeferredPS: {fileID: 0} stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} - coreBlitPS: {fileID: 0} - coreBlitColorAndDepthPS: {fileID: 0} - cameraMotionVector: {fileID: 0} - objectMotionVector: {fileID: 0} m_OpaqueLayerMask: serializedVersion: 2 m_Bits: 4294967295 @@ -68,9 +63,6 @@ MonoBehaviour: passOperation: 2 failOperation: 0 zFailOperation: 0 - m_ShadowTransparentReceive: 1 + m_ShadowTransparentReceive: 0 m_RenderingMode: 0 - m_DepthPrimingMode: 0 m_AccurateGbufferNormals: 0 - m_ClusteredRendering: 0 - m_TileSize: 32 diff --git a/Assets/UnityDefaults/Settings/URP-Balanced.asset b/Assets/UnityDefaults/Settings/URP-Balanced.asset index 83ee844..ccf0678 100644 --- a/Assets/UnityDefaults/Settings/URP-Balanced.asset +++ b/Assets/UnityDefaults/Settings/URP-Balanced.asset @@ -22,10 +22,10 @@ MonoBehaviour: m_RequireDepthTexture: 0 m_RequireOpaqueTexture: 0 m_OpaqueDownsampling: 1 - m_SupportsTerrainHoles: 1 + m_SupportsTerrainHoles: 0 m_StoreActionsOptimization: 0 m_SupportsHDR: 1 - m_MSAA: 1 + m_MSAA: 8 m_RenderScale: 1 m_MainLightRenderingMode: 1 m_MainLightShadowsSupported: 1 @@ -34,31 +34,21 @@ MonoBehaviour: m_AdditionalLightsPerObjectLimit: 2 m_AdditionalLightShadowsSupported: 0 m_AdditionalLightsShadowmapResolution: 512 - m_AdditionalLightsShadowResolutionTierLow: 128 - m_AdditionalLightsShadowResolutionTierMedium: 256 - m_AdditionalLightsShadowResolutionTierHigh: 512 - m_ReflectionProbeBlending: 0 - m_ReflectionProbeBoxProjection: 0 m_ShadowDistance: 50 m_ShadowCascadeCount: 1 m_Cascade2Split: 0.25 m_Cascade3Split: {x: 0.1, y: 0.3} m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} - m_CascadeBorder: 0.1 m_ShadowDepthBias: 1 m_ShadowNormalBias: 1 m_SoftShadowsSupported: 1 - m_AdditionalLightsCookieResolution: 512 - m_AdditionalLightsCookieFormat: 1 m_UseSRPBatcher: 1 m_SupportsDynamicBatching: 0 m_MixedLightingSupported: 1 - m_SupportsLightLayers: 0 m_DebugLevel: 0 m_UseAdaptivePerformance: 1 m_ColorGradingMode: 0 m_ColorGradingLutSize: 32 - m_UseFastSRGBLinearConversion: 0 m_ShadowType: 1 m_LocalShadowsSupported: 0 m_LocalShadowsAtlasResolution: 256 diff --git a/Assets/UnityDefaults/Settings/URP-HighFidelity.asset b/Assets/UnityDefaults/Settings/URP-HighFidelity.asset index 6248100..48f895b 100644 --- a/Assets/UnityDefaults/Settings/URP-HighFidelity.asset +++ b/Assets/UnityDefaults/Settings/URP-HighFidelity.asset @@ -17,15 +17,15 @@ MonoBehaviour: m_RendererType: 1 m_RendererData: {fileID: 0} m_RendererDataList: - - {fileID: 11400000, guid: c40be3174f62c4acf8c1216858c64956, type: 2} + - {fileID: 11400000, guid: e634585d5c4544dd297acaee93dc2beb, type: 2} m_DefaultRendererIndex: 0 m_RequireDepthTexture: 0 m_RequireOpaqueTexture: 0 m_OpaqueDownsampling: 1 - m_SupportsTerrainHoles: 1 + m_SupportsTerrainHoles: 0 m_StoreActionsOptimization: 0 - m_SupportsHDR: 1 - m_MSAA: 4 + m_SupportsHDR: 0 + m_MSAA: 1 m_RenderScale: 1 m_MainLightRenderingMode: 1 m_MainLightShadowsSupported: 1 @@ -48,6 +48,8 @@ MonoBehaviour: m_ShadowDepthBias: 1 m_ShadowNormalBias: 1 m_SoftShadowsSupported: 1 + m_ConservativeEnclosingSphere: 0 + m_NumIterationsEnclosingSphere: 64 m_AdditionalLightsCookieResolution: 4096 m_AdditionalLightsCookieFormat: 4 m_UseSRPBatcher: 1 diff --git a/Assets/VoxelProjectSeries.meta b/Assets/VoxelProjectSeries.meta index fd1f553..477a164 100644 --- a/Assets/VoxelProjectSeries.meta +++ b/Assets/VoxelProjectSeries.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 179ba3369a253ef49b6438d9c42f0c1d +guid: f397fc349fa0eb0498d5ce75bb82d17a folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/VoxelProjectSeries/Scenes/World.unity b/Assets/VoxelProjectSeries/Scenes/World.unity index eacaa39..12fb1ae 100644 --- a/Assets/VoxelProjectSeries/Scenes/World.unity +++ b/Assets/VoxelProjectSeries/Scenes/World.unity @@ -25,7 +25,7 @@ RenderSettings: m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SubtractiveShadowColor: {r: 1, g: 1, b: 1, a: 1} m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} m_HaloStrength: 0.5 m_FlareStrength: 1 @@ -134,6 +134,8 @@ GameObject: - component: {fileID: 414495109} - component: {fileID: 414495108} - component: {fileID: 414495107} + - component: {fileID: 414495110} + - component: {fileID: 414495111} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -159,7 +161,7 @@ Camera: m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 @@ -189,7 +191,7 @@ Camera: m_AllowMSAA: 1 m_AllowDynamicResolution: 0 m_ForceIntoRT: 0 - m_OcclusionCulling: 1 + m_OcclusionCulling: 0 m_StereoConvergence: 10 m_StereoSeparation: 0.022 --- !u!4 &414495109 @@ -200,13 +202,62 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 414495106} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalPosition: {x: 0, y: 34, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &414495110 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 414495106} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 2 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 1 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 +--- !u!114 &414495111 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 414495106} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1fe2824dfee9fe44f9c3ee7c1f9c73d9, type: 3} + m_Name: + m_EditorClassIdentifier: + movementSpeed: 10 + fastMovementSpeed: 50 + freeLookSensitivity: 3 + zoomSensitivity: 10 + fastZoomSensitivity: 50 --- !u!1 &1147823335 GameObject: m_ObjectHideFlags: 0 @@ -297,7 +348,6 @@ Transform: m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -314,14 +364,73 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 1 m_UsePipelineSettings: 1 - m_AdditionalLightsShadowResolutionTier: 2 - m_LightLayerMask: 1 - m_CustomShadowLayers: 0 - m_ShadowLayerMask: 1 - m_LightCookieSize: {x: 1, y: 1} - m_LightCookieOffset: {x: 0, y: 0} +--- !u!1 &1489221245 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1489221248} + - component: {fileID: 1489221247} + - component: {fileID: 1489221246} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1489221246 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1489221245} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &1489221247 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1489221245} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!4 &1489221248 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1489221245} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1755072223 GameObject: m_ObjectHideFlags: 0 @@ -350,7 +459,6 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 2 @@ -369,16 +477,32 @@ MonoBehaviour: m_EditorClassIdentifier: worldMaterial: {fileID: 2100000, guid: d41578d92bc26b04bb2355aed476d2cb, type: 2} WorldColors: - - color: {r: 0, g: 0.4716981, b: 0.016664108, a: 0} - metallic: 0.2 - smoothness: 0.8 - - color: {r: 0.5471698, g: 0.29994953, b: 0, a: 0} + - color: + serializedVersion: 2 + rgba: 4278227736 + metallic: 0.1 + smoothness: 0.5 + - color: + serializedVersion: 2 + rgba: 4278202742 + metallic: 0.7 + smoothness: 0.1 + - color: + serializedVersion: 2 + rgba: 4287634176 + metallic: 0.6 + smoothness: 0.2 + - color: + serializedVersion: 2 + rgba: 0 metallic: 0.6 smoothness: 0.2 worldSettings: - containerSize: 128 - maxHeight: 128 - container: {fileID: 0} + containerSize: 16 + maxHeight: 256 + renderDistance: 64 + mainCamera: {fileID: 414495109} + maxChunksToProcessPerFrame: 8 --- !u!114 &1755072227 MonoBehaviour: m_ObjectHideFlags: 0 @@ -392,3 +516,16 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: noiseShader: {fileID: 7200000, guid: 2f02a6167301c774d83b7600a477ddac, type: 3} + voxelShader: {fileID: 7200000, guid: 7bf19094b7eb41d438a42cab08366abc, type: 3} + numberMeshBuffers: 0 + seed: 0 + noiseLayers: + - gain: 0.7 + frequency: 700 + lacunarity: 3.3 + persistence: 0.27 + octaves: 5 + caveScale: 550 + caveThreshold: 0.75 + surfaceVoxelId: 1 + subSurfaceVoxelId: 2 diff --git a/Assets/VoxelProjectSeries/Scripts/Camera.meta b/Assets/VoxelProjectSeries/Scripts/Camera.meta new file mode 100644 index 0000000..deeb788 --- /dev/null +++ b/Assets/VoxelProjectSeries/Scripts/Camera.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5504307ba8c84924c9927d6ee3fe9cec +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/VoxelProjectSeries/Scripts/Camera/FreeFlyCamera.cs b/Assets/VoxelProjectSeries/Scripts/Camera/FreeFlyCamera.cs new file mode 100644 index 0000000..88932c4 --- /dev/null +++ b/Assets/VoxelProjectSeries/Scripts/Camera/FreeFlyCamera.cs @@ -0,0 +1,125 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class FreeFlyCamera : MonoBehaviour +{ + + /// + /// Normal speed of camera movement. + /// + public float movementSpeed = 10f; + + /// + /// Speed of camera movement when shift is held down, + /// + public float fastMovementSpeed = 100f; + + /// + /// Sensitivity for free look. + /// + public float freeLookSensitivity = 3f; + + /// + /// Amount to zoom the camera when using the mouse wheel. + /// + public float zoomSensitivity = 10f; + + /// + /// Amount to zoom the camera when using the mouse wheel (fast mode). + /// + public float fastZoomSensitivity = 50f; + + /// + /// Set to true when free looking (on right mouse button). + /// + private bool looking = false; + + void Update() + { + var fastMode = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift); + var movementSpeed = fastMode ? this.fastMovementSpeed : this.movementSpeed; + + if (Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.LeftArrow)) + { + transform.position = transform.position + (-transform.right * movementSpeed * Time.deltaTime); + } + + if (Input.GetKey(KeyCode.D) || Input.GetKey(KeyCode.RightArrow)) + { + transform.position = transform.position + (transform.right * movementSpeed * Time.deltaTime); + } + + if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.UpArrow)) + { + transform.position = transform.position + (transform.forward * movementSpeed * Time.deltaTime); + } + + if (Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.DownArrow)) + { + transform.position = transform.position + (-transform.forward * movementSpeed * Time.deltaTime); + } + + if (Input.GetKey(KeyCode.Q)) + { + transform.position = transform.position + (transform.up * movementSpeed * Time.deltaTime); + } + + if (Input.GetKey(KeyCode.E)) + { + transform.position = transform.position + (-transform.up * movementSpeed * Time.deltaTime); + } + + if (Input.GetKey(KeyCode.R) || Input.GetKey(KeyCode.PageUp)) + { + transform.position = transform.position + (Vector3.up * movementSpeed * Time.deltaTime); + } + + if (Input.GetKey(KeyCode.F) || Input.GetKey(KeyCode.PageDown)) + { + transform.position = transform.position + (-Vector3.up * movementSpeed * Time.deltaTime); + } + + if (looking) + { + float newRotationX = transform.localEulerAngles.y + Input.GetAxis("Mouse X") * freeLookSensitivity; + float newRotationY = transform.localEulerAngles.x - Input.GetAxis("Mouse Y") * freeLookSensitivity; + transform.localEulerAngles = new Vector3(newRotationY, newRotationX, 0f); + } + + + if (Input.GetMouseButtonDown(0)) + { + StartLooking(); + } + else if (Input.GetMouseButtonUp(0)) + { + StopLooking(); + } + } + + void OnDisable() + { + StopLooking(); + } + + /// + /// Enable free looking. + /// + public void StartLooking() + { + looking = true; + Cursor.visible = false; + Cursor.lockState = CursorLockMode.Locked; + } + + /// + /// Disable free looking. + /// + public void StopLooking() + { + looking = false; + Cursor.visible = true; + Cursor.lockState = CursorLockMode.None; + } +} \ No newline at end of file diff --git a/Assets/VoxelProjectSeries/Scripts/Camera/FreeFlyCamera.cs.meta b/Assets/VoxelProjectSeries/Scripts/Camera/FreeFlyCamera.cs.meta new file mode 100644 index 0000000..902f9e2 --- /dev/null +++ b/Assets/VoxelProjectSeries/Scripts/Camera/FreeFlyCamera.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1fe2824dfee9fe44f9c3ee7c1f9c73d9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/VoxelProjectSeries/Scripts/ComputeShaders/HeightMapNoise.compute b/Assets/VoxelProjectSeries/Scripts/ComputeShaders/HeightMapNoise.compute index e4edae2..371a921 100644 --- a/Assets/VoxelProjectSeries/Scripts/ComputeShaders/HeightMapNoise.compute +++ b/Assets/VoxelProjectSeries/Scripts/ComputeShaders/HeightMapNoise.compute @@ -8,65 +8,147 @@ struct Voxel { int ID; }; +struct NoiseLayer { + float gain; + float frequency; + float lacunarity; + float persistence; + int octaves; + + float caveScale; + float caveThreshold; + + int surfaceVoxelId; + int subSurfaceVoxelId; +}; + +struct HeightAndnoise { + uint height; + uint noiseIndex; +}; + +StructuredBuffer noiseArray; RWStructuredBuffer voxelArray; RWStructuredBuffer count; float3 chunkPosition; float3 seedOffset; -int containerSizeX; -int containerSizeY; +uint containerSizeX; +uint containerSizeY; bool generateCaves; bool forceFloor; uint maxHeight; uint oceanHeight; - -float noiseScale; -float caveScale; -float caveThreshold; - -int surfaceVoxelID; -int subSurfaceVoxelID; +int noiseCount; +int seed; int flattenCoord(uint3 idx) { return idx.x + (idx.y * (containerSizeX + 3)) + (idx.z * (containerSizeX + 3) * (containerSizeY + 1)); } +float evaluateNoise(float3 pos, float terrainHeight) +{ + float h = 1; + float G = exp2(-h); + float f = 1; + float a = 1; + float t = 0; + + for (int i = 0; i < 4; i++) + { + t += a * snoise(f * (pos / (noiseArray[0].caveScale / ((uint) terrainHeight > oceanHeight ? 1 : 6)))); + f *= 2.0; + a *= G; + } + return t; +} + +float fractalNoise(float2 pos, int noisePosition) +{ + float v = 0; + float amplitude = 1; + + NoiseLayer b = noiseArray[noisePosition]; + float3 p1 = float3(pos.xy, seed); + for (int i = 0; i < noiseArray[noisePosition].octaves; i++) + { + v += snoise(float3(p1.xy / b.frequency, seed)) * amplitude; + + p1.xy *= b.lacunarity; + + amplitude *= b.persistence; + } + v = v * v; + return clamp(v, 0, 1); +} + + + +HeightAndnoise + sampleHeightAtPoint( + float2 pos) { + float height = 0; + + float strongestWeight = 0; + + uint count = 0; + uint noiseIndex = 0; + float heightWeight; + int i = 0; + + float weightH = fractalNoise(pos, i); + + + height = clamp((weightH * 240), 0, 250); + + + + HeightAndnoise hb; + hb.height = round(height); + hb.noiseIndex = noiseIndex; + return hb; +} + + + [numthreads(8, 8, 8)] void FillArray(uint3 id : SV_DispatchThreadID) { if (any(id.xz > containerSizeX + 2)) return; - + float3 pos = id + chunkPosition + seedOffset; float2 posXZ = pos.xz; - float height = snoise(posXZ * noiseScale) * (maxHeight); - uint roundHeight = round(height); + HeightAndnoise hb = sampleHeightAtPoint(posXZ); + uint terrainHeight = hb.height; + NoiseLayer selectednoise = noiseArray[hb.noiseIndex]; Voxel vox; vox.ID = 0; - if (id.y > roundHeight) + if (id.y > terrainHeight) { vox.ID = 0; voxelArray[flattenCoord(id)] = vox; return; } - bool isSurfaceBlock = id.y >= roundHeight - 3; - - vox.ID = isSurfaceBlock ? surfaceVoxelID : subSurfaceVoxelID; + bool isSurfaceBlock = id.y >= terrainHeight - 3; - if (generateCaves && snoise(pos * caveScale) > caveThreshold) + vox.ID = isSurfaceBlock ? selectednoise.surfaceVoxelId : selectednoise.subSurfaceVoxelId; + + if (generateCaves && evaluateNoise(pos, terrainHeight) > selectednoise.caveThreshold) { vox.ID = 0; } if (id.y <= 1 && forceFloor) - vox.ID = subSurfaceVoxelID; + vox.ID = selectednoise.surfaceVoxelId; + if (vox.ID != 0) count.IncrementCounter(); diff --git a/Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelCompute.compute b/Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelCompute.compute new file mode 100644 index 0000000..6958892 --- /dev/null +++ b/Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelCompute.compute @@ -0,0 +1,117 @@ +// Each #kernel tells which function to compile; you can have many kernels +#pragma kernel CSMain +#include "VoxelValues.compute" + +struct VoxelColor32 +{ + float color; + float metallic; + float smoothness; +}; + +struct Voxel { + int ID; +}; + +StructuredBuffer voxelColors; +RWStructuredBuffer voxelArray; +RWStructuredBuffer vertexBuffer; +RWStructuredBuffer colorBuffer; +RWStructuredBuffer indexBuffer; +RWStructuredBuffer counter; + +float3 chunkPosition; + +uint containerSizeX; +uint containerSizeY; + + +float packFloats(float xF, float yF) +{ + float2 output = float2(xF, yF); + output.x = floor(output.x * (100 - 1)); + output.y = floor(output.y * (100 - 1)); + + return (output.x * 100) + output.y; +} + +float packFloats(float2 xy) +{ + float2 output = xy; + output.x = floor(output.x * (100 - 1)); + output.y = floor(output.y * (100 - 1)); + + return (output.x * 100) + output.y; +} + + +float2 unpackFloats(float f) +{ + int input = int(f); + + float x = input >> 8 & 0xff; + float y = input >> 0 & 0xff; + + return float2(x, y); +} + +uint flattenCoord(uint3 idx) +{ + return idx.x + (idx.y * (containerSizeX + 3)) + (idx.z * (containerSizeX + 3) * (containerSizeY + 1)); +} + +bool VoxelIsSolid(uint3 pos) +{ + return voxelArray[flattenCoord(pos)].ID != 0; +} + + +[numthreads(8,8,8)] +void CSMain(uint3 id : SV_DispatchThreadID) +{ + if (any(id.xz > containerSizeX) || any(id.xz < 1)) + return; + + Voxel block = voxelArray[flattenCoord(id)]; + + if (block.ID == 0) + return; + + float3 faceVertices[4]; + float2 faceUVs[4]; + float4 color = float4(voxelColors[block.ID - 1].color, packFloats(voxelColors[block.ID - 1].metallic, voxelColors[block.ID - 1].smoothness), 0, 0); + uint vertCount = 0; + uint triCount = 0; + for (int i = 0; i < 6; i++) + { + + //Check if there's a solid block against this face + if (VoxelIsSolid(id + voxelFaceChecks[i])) + continue; + + //Draw this face + counter.IncrementCounter(); + InterlockedAdd(counter[0], 6, vertCount); + InterlockedAdd(counter[1], 6, triCount); //not used here, but will be used in a shared vertex configuration + + + //Collect the appropriate vertices from the default vertices and add the block position + for (int j = 0; j < 4; j++) + { + faceVertices[j] = voxelVertices[voxelVertexIndex[i][j]] + id + chunkPosition; + faceUVs[j] = voxelUVs[j]; + } + + for (int k = 0; k < 6; k++) + { + vertexBuffer[vertCount + k] = faceVertices[voxelTris[i][k]]; + color.b = faceUVs[voxelTris[i][k]].x; + color.a = faceUVs[voxelTris[i][k]].y; + colorBuffer[vertCount + k] = color; + + indexBuffer[triCount + k] = vertCount + k; + } + + } +} + diff --git a/Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelCompute.compute.meta b/Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelCompute.compute.meta new file mode 100644 index 0000000..efae45e --- /dev/null +++ b/Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelCompute.compute.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7bf19094b7eb41d438a42cab08366abc +ComputeShaderImporter: + externalObjects: {} + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelValues.compute b/Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelValues.compute new file mode 100644 index 0000000..90ba153 --- /dev/null +++ b/Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelValues.compute @@ -0,0 +1,50 @@ +static const float3 voxelVertices[8] = +{ + float3(0, 0, 0), //0 + float3(1, 0, 0), //1 + float3(0, 1, 0), //2 + float3(1, 1, 0), //3 + + float3(0, 0, 1), //4 + float3(1, 0, 1), //5 + float3(0, 1, 1), //6 + float3(1, 1, 1), //7 +}; + +static const float3 voxelFaceChecks[6] = +{ + float3(0, 0, -1), //back + float3(0, 0, 1), //front + float3(-1, 0, 0), //left + float3(1, 0, 0), //right + float3(0, -1, 0), //bottom + float3(0, 1, 0) //top +}; + +static const int voxelVertexIndex[6][4] = +{ + { 0, 1, 2, 3 }, + { 4, 5, 6, 7 }, + { 4, 0, 6, 2 }, + { 5, 1, 7, 3 }, + { 0, 1, 4, 5 }, + { 2, 3, 6, 7 }, +}; + +static const float2 voxelUVs[4] = +{ + float2(0, 0), + float2(0, 1), + float2(1, 0), + float2(1, 1) +}; + +static const int voxelTris[6][6] = +{ + { 0, 2, 3, 0, 3, 1 }, + { 0, 1, 2, 1, 3, 2 }, + { 0, 2, 3, 0, 3, 1 }, + { 0, 1, 2, 1, 3, 2 }, + { 0, 1, 2, 1, 3, 2 }, + { 0, 2, 3, 0, 3, 1 }, +}; \ No newline at end of file diff --git a/Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelValues.compute.meta b/Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelValues.compute.meta new file mode 100644 index 0000000..afd5785 --- /dev/null +++ b/Assets/VoxelProjectSeries/Scripts/ComputeShaders/VoxelValues.compute.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e45b9c486bf35e545b925c2fa71b40cc +ComputeShaderImporter: + externalObjects: {} + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/VoxelProjectSeries/Scripts/Data/Container.cs b/Assets/VoxelProjectSeries/Scripts/Data/Container.cs index dcf9ceb..0d2bc02 100644 --- a/Assets/VoxelProjectSeries/Scripts/Data/Container.cs +++ b/Assets/VoxelProjectSeries/Scripts/Data/Container.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Unity.Mathematics; using UnityEngine; - +using UnityEngine.Rendering; [RequireComponent(typeof(MeshFilter))] [RequireComponent(typeof(MeshRenderer))] @@ -11,9 +11,7 @@ public class Container : MonoBehaviour { public Vector3 containerPosition; - public NoiseBuffer data; - private MeshData meshData = new MeshData(); - + public MeshData meshData; private MeshRenderer meshRenderer; private MeshFilter meshFilter; private MeshCollider meshCollider; @@ -21,94 +19,51 @@ public class Container : MonoBehaviour public void Initialize(Material mat, Vector3 position) { ConfigureComponents(); - data = ComputeManager.Instance.GetNoiseBuffer(); + meshData = new MeshData(); + meshData.Initialize(); meshRenderer.sharedMaterial = mat; containerPosition = position; } public void ClearData() { - ComputeManager.Instance.ClearAndRequeueBuffer(data); - } - - public void RenderMesh() - { + meshFilter.sharedMesh = null; + meshCollider.sharedMesh = null; meshData.ClearData(); - GenerateMesh(); - UploadMesh(); } - public void GenerateMesh() + public void UploadMesh(MeshBuffer meshBuffer) { - Vector3 blockPos; - Voxel block; - - int counter = 0; - Vector3[] faceVertices = new Vector3[4]; - Vector2[] faceUVs = new Vector2[4]; - VoxelColor voxelColor; - Color voxelColorAlpha; - Vector2 voxelSmoothness; + if (meshRenderer == null) + ConfigureComponents(); - for (int x = 1; x < WorldManager.WorldSettings.containerSize + 1; x++) - for (int y = 0; y < WorldManager.WorldSettings.maxHeight; y++) - for (int z = 1; z < WorldManager.WorldSettings.containerSize + 1; z++) - { + //Get the count of vertices/tris from the shader + int[] faceCount = new int[2] { 0, 0 }; + meshBuffer.countBuffer.GetData(faceCount); - blockPos = new Vector3(x, y, z); - block = this[blockPos]; - //Only check on solid blocks - if (!block.isSolid) - continue; - - voxelColor = WorldManager.Instance.WorldColors[block.ID - 1]; - voxelColorAlpha = voxelColor.color; - voxelColorAlpha.a = 1; - voxelSmoothness = new Vector2(voxelColor.metallic, voxelColor.smoothness); - //Iterate over each face direction - for (int i = 0; i < 6; i++) - { - //Check if there's a solid block against this face - if (checkVoxelIsSolid(blockPos + voxelFaceChecks[i])) - continue; - - //Draw this face - - //Collect the appropriate vertices from the default vertices and add the block position - for (int j = 0; j < 4; j++) - { - faceVertices[j] = voxelVertices[voxelVertexIndex[i, j]] + blockPos; - faceUVs[j] = voxelUVs[j]; - } - - for (int j = 0; j < 6; j++) - { - meshData.vertices.Add(faceVertices[voxelTris[i, j]]); - meshData.UVs.Add(faceUVs[voxelTris[i, j]]); - meshData.colors.Add(voxelColorAlpha); - meshData.UVs2.Add(voxelSmoothness); - - meshData.triangles.Add(counter++); - - } - } + //Get all of the meshData from the buffers to local arrays + meshBuffer.vertexBuffer.GetData(meshData.verts, 0, 0, faceCount[0]); + meshBuffer.indexBuffer.GetData(meshData.indices, 0, 0, faceCount[0]); + meshBuffer.colorBuffer.GetData(meshData.Color, 0, 0, faceCount[0]); - } - } + //Assign the mesh + meshData.mesh = new Mesh(); + meshData.mesh.SetVertices(meshData.verts, 0, faceCount[0]); + meshData.mesh.SetIndices(meshData.indices, 0, faceCount[0], MeshTopology.Triangles, 0); + meshData.mesh.SetColors(meshData.Color, 0, faceCount[0]); + meshData.mesh.RecalculateNormals(); + meshData.mesh.RecalculateBounds(); + meshData.mesh.Optimize(); + meshData.mesh.UploadMeshData(true); + meshFilter.sharedMesh = meshData.mesh; + meshCollider.sharedMesh = meshData.mesh; - public void UploadMesh() - { - meshData.UploadMesh(); - - if (meshRenderer == null) - ConfigureComponents(); - - meshFilter.mesh = meshData.mesh; - if (meshData.vertices.Count > 3) - meshCollider.sharedMesh = meshData.mesh; + if (!gameObject.activeInHierarchy) + gameObject.SetActive(true); + } private void ConfigureComponents() @@ -117,136 +72,71 @@ private void ConfigureComponents() meshRenderer = GetComponent(); meshCollider = GetComponent(); } - public bool checkVoxelIsSolid(Vector3 point) + + public void Dispose() { - if (point.y < 0 || (point.x > WorldManager.WorldSettings.containerSize + 2) || (point.z > WorldManager.WorldSettings.containerSize + 2)) - return true; - else - return this[point].isSolid; + meshData.ClearData(); + meshData.indices = null; + meshData.verts = null; + meshData.Color = null; } public Voxel this[Vector3 index] { get { - return data[index]; + if (WorldManager.Instance.modifiedVoxels.ContainsKey(containerPosition)) + { + if (WorldManager.Instance.modifiedVoxels[containerPosition].ContainsKey(index)) + { + return WorldManager.Instance.modifiedVoxels[containerPosition][index]; + } + else return new Voxel() { ID = 0 }; + } + else return new Voxel() { ID = 0 }; } set { - data[index] = value; + if (!WorldManager.Instance.modifiedVoxels.ContainsKey(containerPosition)) + WorldManager.Instance.modifiedVoxels.TryAdd(containerPosition, new Dictionary()); + if (!WorldManager.Instance.modifiedVoxels[containerPosition].ContainsKey(index)) + WorldManager.Instance.modifiedVoxels[containerPosition].Add(index, value); + else + WorldManager.Instance.modifiedVoxels[containerPosition][index] = value; } } - #region Mesh Data - - public struct MeshData + [System.Serializable] + public class MeshData { + public int[] indices; + public Vector3[] verts; + public Color[] Color; public Mesh mesh; - public List vertices; - public List triangles; - public List UVs; - public List UVs2; - public List colors; - public bool Initialized; - public void ClearData() - { - if (!Initialized) - { - vertices = new List(); - triangles = new List(); - UVs = new List(); - UVs2 = new List(); - colors = new List(); - - Initialized = true; - mesh = new Mesh(); - } - else - { - vertices.Clear(); - triangles.Clear(); - UVs.Clear(); - UVs2.Clear(); - colors.Clear(); + public int arraySize; - mesh.Clear(); - } - } - public void UploadMesh(bool sharedVertices = false) + public void Initialize() { - mesh.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32; - - mesh.SetVertices(vertices); - mesh.SetTriangles(triangles, 0, false); - mesh.SetColors(colors); - - mesh.SetUVs(0, UVs); - mesh.SetUVs(2, UVs2); - - mesh.Optimize(); + int maxTris = WorldManager.WorldSettings.containerSize * WorldManager.WorldSettings.maxHeight * WorldManager.WorldSettings.containerSize / 4; + arraySize = maxTris * 3; + mesh = new Mesh(); - mesh.RecalculateNormals(); - - mesh.RecalculateBounds(); + indices = new int[arraySize]; + verts = new Vector3[arraySize]; + Color = new Color[arraySize]; + } - mesh.UploadMeshData(false); + public void ClearData() + { + //Completely clear the mesh reference to help prevent memory problems + mesh.Clear(); + Destroy(mesh); + mesh = null; } - } - #endregion - #region Static Variables - static readonly Vector3[] voxelVertices = new Vector3[8] - { - new Vector3(0,0,0),//0 - new Vector3(1,0,0),//1 - new Vector3(0,1,0),//2 - new Vector3(1,1,0),//3 - - new Vector3(0,0,1),//4 - new Vector3(1,0,1),//5 - new Vector3(0,1,1),//6 - new Vector3(1,1,1),//7 - }; - - static readonly Vector3[] voxelFaceChecks = new Vector3[6] - { - new Vector3(0,0,-1),//back - new Vector3(0,0,1),//front - new Vector3(-1,0,0),//left - new Vector3(1,0,0),//right - new Vector3(0,-1,0),//bottom - new Vector3(0,1,0)//top - }; - - static readonly int[,] voxelVertexIndex = new int[6, 4] - { - {0,1,2,3}, - {4,5,6,7}, - {4,0,6,2}, - {5,1,7,3}, - {0,1,4,5}, - {2,3,6,7}, - }; - - static readonly Vector2[] voxelUVs = new Vector2[4] - { - new Vector2(0,0), - new Vector2(0,1), - new Vector2(1,0), - new Vector2(1,1) - }; - static readonly int[,] voxelTris = new int[6, 6] - { - {0,2,3,0,3,1}, - {0,1,2,1,3,2}, - {0,2,3,0,3,1}, - {0,1,2,1,3,2}, - {0,1,2,1,3,2}, - {0,2,3,0,3,1}, - }; - #endregion + } } diff --git a/Assets/VoxelProjectSeries/Scripts/Data/NoiseLayer.cs b/Assets/VoxelProjectSeries/Scripts/Data/NoiseLayer.cs new file mode 100644 index 0000000..3f84115 --- /dev/null +++ b/Assets/VoxelProjectSeries/Scripts/Data/NoiseLayer.cs @@ -0,0 +1,19 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +[System.Serializable] +public struct NoiseLayers +{ + public float gain; + public float frequency; + public float lacunarity; + public float persistence; + public int octaves; + + public float caveScale; + public float caveThreshold; + + public int surfaceVoxelId; + public int subSurfaceVoxelId; +} diff --git a/Assets/VoxelProjectSeries/Scripts/Data/NoiseLayer.cs.meta b/Assets/VoxelProjectSeries/Scripts/Data/NoiseLayer.cs.meta new file mode 100644 index 0000000..5320152 --- /dev/null +++ b/Assets/VoxelProjectSeries/Scripts/Data/NoiseLayer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 997ef81e509322442b81d297189c952c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/VoxelProjectSeries/Scripts/Data/VoxelColor.cs b/Assets/VoxelProjectSeries/Scripts/Data/VoxelColor.cs index d83b585..7c1be9d 100644 --- a/Assets/VoxelProjectSeries/Scripts/Data/VoxelColor.cs +++ b/Assets/VoxelProjectSeries/Scripts/Data/VoxelColor.cs @@ -3,9 +3,17 @@ using UnityEngine; [System.Serializable] -public class VoxelColor +public struct VoxelColor { - public Color color; + public Color32 color; + public float metallic; + public float smoothness; +} + +[System.Serializable] +public struct VoxelColor32 +{ + public float color; public float metallic; public float smoothness; } \ No newline at end of file diff --git a/Assets/VoxelProjectSeries/Scripts/Managers/ComputeManager.cs b/Assets/VoxelProjectSeries/Scripts/Managers/ComputeManager.cs index 3ae63c6..9e0d0e6 100644 --- a/Assets/VoxelProjectSeries/Scripts/Managers/ComputeManager.cs +++ b/Assets/VoxelProjectSeries/Scripts/Managers/ComputeManager.cs @@ -7,17 +7,46 @@ public class ComputeManager : MonoBehaviour { public ComputeShader noiseShader; + public ComputeShader voxelShader; + + private List allMeshComputeBuffers = new List(); + private Queue availableMeshComputeBuffers = new Queue(); private List allNoiseComputeBuffers = new List(); private Queue availableNoiseComputeBuffers = new Queue(); + ComputeBuffer noiseLayersArray; + ComputeBuffer voxelColorsArray; + private int xThreads; private int yThreads; + public int numberMeshBuffers = 0; + + [Header("Noise Settings")] + public int seed; + public NoiseLayers[] noiseLayers; + + + static float ColorfTo32(Color32 c) + { + if (c.r == 0) + c.r = 1; + if (c.g == 0) + c.g = 1; + if (c.b == 0) + c.b = 1; + if (c.a == 0) + c.a = 1; + return (c.r << 24) | (c.g << 16) | (c.b << 8) | (c.a); + } - public void Initialize(int count = 256) + public void Initialize(int count = 18) { xThreads = WorldManager.WorldSettings.containerSize / 8 + 1; yThreads = WorldManager.WorldSettings.maxHeight / 8; + + noiseLayersArray = new ComputeBuffer(noiseLayers.Length, 36); + noiseLayersArray.SetData(noiseLayers); noiseShader.SetInt("containerSizeX", WorldManager.WorldSettings.containerSize); noiseShader.SetInt("containerSizeY", WorldManager.WorldSettings.maxHeight); @@ -27,27 +56,124 @@ public void Initialize(int count = 256) noiseShader.SetInt("maxHeight", WorldManager.WorldSettings.maxHeight); noiseShader.SetInt("oceanHeight", 42); + noiseShader.SetInt("seed", seed); - noiseShader.SetFloat("noiseScale", 0.004f); - noiseShader.SetFloat("caveScale", 0.01f); - noiseShader.SetFloat("caveThreshold", 0.8f); + noiseShader.SetBuffer(0, "noiseArray", noiseLayersArray); + noiseShader.SetInt("noiseCount", noiseLayers.Length); - noiseShader.SetInt("surfaceVoxelID", 1); - noiseShader.SetInt("subSurfaceVoxelID", 2); + VoxelColor32[] converted = new VoxelColor32[WorldManager.Instance.WorldColors.Length]; + int cCount = 0; + + foreach(VoxelColor c in WorldManager.Instance.WorldColors) + { + VoxelColor32 b = new VoxelColor32(); + b.color = ColorfTo32(c.color); + b.smoothness = c.smoothness; + b.metallic = c.metallic; + converted[cCount++] = b; + } + + voxelColorsArray = new ComputeBuffer(converted.Length, 12); + voxelColorsArray.SetData(converted); + + voxelShader.SetBuffer(0, "voxelColors", voxelColorsArray); + voxelShader.SetInt("containerSizeX", WorldManager.WorldSettings.containerSize); + voxelShader.SetInt("containerSizeY", WorldManager.WorldSettings.maxHeight); for (int i = 0; i < count; i++) { CreateNewNoiseBuffer(); + CreateNewMeshBuffer(); } } - #region Noise Buffers + public void GenerateVoxelData(Container cont, Vector3 pos) + { + + NoiseBuffer noiseBuffer = GetNoiseBuffer(); + noiseBuffer.countBuffer.SetCounterValue(0); + noiseBuffer.countBuffer.SetData(new uint[] { 0 }); + noiseShader.SetBuffer(0, "voxelArray", noiseBuffer.noiseBuffer); + noiseShader.SetBuffer(0, "count", noiseBuffer.countBuffer); - #region Pooling + noiseShader.SetVector("chunkPosition", cont.containerPosition); + noiseShader.SetVector("seedOffset", Vector3.zero); + + noiseShader.Dispatch(0, xThreads, yThreads, xThreads); + + MeshBuffer meshBuffer = GetMeshBuffer(); + meshBuffer.countBuffer.SetCounterValue(0); + meshBuffer.countBuffer.SetData(new uint[] { 0, 0 }); + voxelShader.SetVector("chunkPosition", cont.containerPosition); + + voxelShader.SetBuffer(0, "voxelArray", noiseBuffer.noiseBuffer); + voxelShader.SetBuffer(0, "counter", meshBuffer.countBuffer); + voxelShader.SetBuffer(0, "vertexBuffer", meshBuffer.vertexBuffer); + voxelShader.SetBuffer(0, "colorBuffer", meshBuffer.colorBuffer); + voxelShader.SetBuffer(0, "indexBuffer", meshBuffer.indexBuffer); + voxelShader.Dispatch(0, xThreads, yThreads, xThreads); + + AsyncGPUReadback.Request(meshBuffer.countBuffer, (callback) => + { + if (WorldManager.Instance.activeContainers.ContainsKey(pos)) + { + WorldManager.Instance.activeContainers[pos].UploadMesh(meshBuffer); + } + ClearAndRequeueBuffer(noiseBuffer); + ClearAndRequeueBuffer(meshBuffer); + + }); + } + + private void ClearVoxelData(NoiseBuffer buffer) + { + buffer.countBuffer.SetData(new int[] { 0 }); + noiseShader.SetBuffer(1, "voxelArray", buffer.noiseBuffer); + noiseShader.Dispatch(1, xThreads, yThreads, xThreads); + } + + #region MeshBuffer Pooling + public MeshBuffer GetMeshBuffer() + { + if (availableMeshComputeBuffers.Count > 0) + { + return availableMeshComputeBuffers.Dequeue(); + } + else + { + Debug.Log("Generate container"); + return CreateNewMeshBuffer(false); + } + } + + public MeshBuffer CreateNewMeshBuffer(bool enqueue = true) + { + MeshBuffer buffer = new MeshBuffer(); + buffer.InitializeBuffer(); + + allMeshComputeBuffers.Add(buffer); + + if (enqueue) + availableMeshComputeBuffers.Enqueue(buffer); + + numberMeshBuffers++; + + return buffer; + } + + public void ClearAndRequeueBuffer(MeshBuffer buffer) + { + availableMeshComputeBuffers.Enqueue(buffer); + } + #endregion + + #region NoiseBuffer Pooling public NoiseBuffer GetNoiseBuffer() { if (availableNoiseComputeBuffers.Count > 0) + { return availableNoiseComputeBuffers.Dequeue(); + } else { return CreateNewNoiseBuffer(false); @@ -73,35 +199,6 @@ public void ClearAndRequeueBuffer(NoiseBuffer buffer) } #endregion - #region Compute Helpers - - public void GenerateVoxelData(ref Container cont) - { - noiseShader.SetBuffer(0, "voxelArray", cont.data.noiseBuffer); - noiseShader.SetBuffer(0, "count", cont.data.countBuffer); - - noiseShader.SetVector("chunkPosition", cont.containerPosition); - noiseShader.SetVector("seedOffset", Vector3.zero); - - noiseShader.Dispatch(0, xThreads, yThreads, xThreads); - - AsyncGPUReadback.Request(cont.data.noiseBuffer, (callback) => - { - callback.GetData(0).CopyTo(WorldManager.Instance.container.data.voxelArray.array); - WorldManager.Instance.container.RenderMesh(); - - }); - } - - private void ClearVoxelData(NoiseBuffer buffer) - { - buffer.countBuffer.SetData(new int[] { 0 }); - noiseShader.SetBuffer(1, "voxelArray", buffer.noiseBuffer); - noiseShader.Dispatch(1, xThreads, yThreads, xThreads); - } - #endregion - #endregion - private void OnApplicationQuit() { DisposeAllBuffers(); @@ -109,8 +206,12 @@ private void OnApplicationQuit() public void DisposeAllBuffers() { + noiseLayersArray?.Dispose(); + voxelColorsArray?.Dispose(); foreach (NoiseBuffer buffer in allNoiseComputeBuffers) buffer.Dispose(); + foreach (MeshBuffer buffer in allMeshComputeBuffers) + buffer.Dispose(); } @@ -133,7 +234,6 @@ public struct NoiseBuffer public ComputeBuffer countBuffer; public bool Initialized; public bool Cleared; - public IndexedArray voxelArray; public void InitializeBuffer() { @@ -141,9 +241,8 @@ public void InitializeBuffer() countBuffer.SetCounterValue(0); countBuffer.SetData(new uint[] { 0 }); - voxelArray = new IndexedArray(); - noiseBuffer = new ComputeBuffer(voxelArray.Count, 4); - noiseBuffer.SetData(voxelArray.GetData); + //voxelArray = new IndexedArray(); + noiseBuffer = new ComputeBuffer(WorldManager.WorldSettings.ChunkCount, 4); Initialized = true; } @@ -154,16 +253,46 @@ public void Dispose() Initialized = false; } - public Voxel this[Vector3 index] + +} + +public struct MeshBuffer +{ + public ComputeBuffer vertexBuffer; + public ComputeBuffer colorBuffer; + public ComputeBuffer indexBuffer; + public ComputeBuffer countBuffer; + + public bool Initialized; + public bool Cleared; + + public void InitializeBuffer() + { + if (Initialized) + return; + + countBuffer = new ComputeBuffer(2, 4, ComputeBufferType.Counter); + countBuffer.SetCounterValue(0); + countBuffer.SetData(new uint[] { 0, 0 }); + + int maxTris = WorldManager.WorldSettings.containerSize * WorldManager.WorldSettings.maxHeight * WorldManager.WorldSettings.containerSize / 4; + //width*height*width*faces*tris + + vertexBuffer ??= new ComputeBuffer(maxTris*3, 12); + colorBuffer ??= new ComputeBuffer(maxTris*3, 16);; + indexBuffer ??= new ComputeBuffer(maxTris*3, 12); + + Initialized = true; + } + + public void Dispose() { - get - { - return voxelArray[index]; - } + vertexBuffer?.Dispose(); + colorBuffer?.Dispose(); + indexBuffer?.Dispose(); + countBuffer?.Dispose(); + + Initialized = false; - set - { - voxelArray[index] = value; - } } } \ No newline at end of file diff --git a/Assets/VoxelProjectSeries/Scripts/Managers/WorldManager.cs b/Assets/VoxelProjectSeries/Scripts/Managers/WorldManager.cs index 3a379fc..5b4e806 100644 --- a/Assets/VoxelProjectSeries/Scripts/Managers/WorldManager.cs +++ b/Assets/VoxelProjectSeries/Scripts/Managers/WorldManager.cs @@ -1,6 +1,12 @@ +using System; using System.Collections; +using System.Collections.Concurrent; using System.Collections.Generic; +using System.Threading; +using Unity.Mathematics; +using UnityEditor; using UnityEngine; +using UnityEngine.Profiling; public class WorldManager : MonoBehaviour { @@ -8,9 +14,22 @@ public class WorldManager : MonoBehaviour public VoxelColor[] WorldColors; public WorldSettings worldSettings; + public Transform mainCamera; + private Vector3 lastUpdatedPosition; + private Vector3 previouslyCheckedPosition; - public Container container; + //This will contain all modified voxels, structures, whatnot for all chunks, and will effectively be our saving mechanism + public ConcurrentDictionary> modifiedVoxels = new ConcurrentDictionary>(); + public ConcurrentDictionary activeContainers; + public Queue containerPool; + ConcurrentQueue containersNeedCreation = new ConcurrentQueue(); + ConcurrentQueue deactiveContainers = new ConcurrentQueue(); + public int maxChunksToProcessPerFrame = 6; + int mainThreadID; + Thread checkActiveChunks; + bool killThreads = false; + bool performedFirstPass = false; void Start() { if (_instance != null) @@ -23,14 +42,185 @@ void Start() _instance = this; } + InitializeWorld(); + } + + private void InitializeWorld() + { WorldSettings = worldSettings; - ComputeManager.Instance.Initialize(1); - GameObject cont = new GameObject("Container"); - cont.transform.parent = transform; - container = cont.AddComponent(); - container.Initialize(worldMaterial, Vector3.zero); - ComputeManager.Instance.GenerateVoxelData(ref container); + int renderSizePlusExcess = WorldSettings.renderDistance + 3; + int totalContainers = renderSizePlusExcess * renderSizePlusExcess; + + ComputeManager.Instance.Initialize(6 * 3); + + activeContainers = new ConcurrentDictionary(); + containerPool = new Queue(); + + mainThreadID = Thread.CurrentThread.ManagedThreadId; + + for (int i = 0; i < totalContainers; i++) + { + GenerateContainer(Vector3.zero, true); + } + checkActiveChunks = new Thread(CheckActiveChunksLoop); + checkActiveChunks.Priority = System.Threading.ThreadPriority.BelowNormal; + checkActiveChunks.Start(); + + } + + private void Update() + { + if (mainCamera?.transform.position != lastUpdatedPosition) + { + //Update position so our CheckActiveChunksLoop thread has it + lastUpdatedPosition = positionToChunkCoord(mainCamera.transform.position); + } + + Vector3 contToMake; + + while (deactiveContainers.Count > 0 && deactiveContainers.TryDequeue(out contToMake)) + { + deactiveContainer(contToMake); + } + for (int x = 0; x < maxChunksToProcessPerFrame; x++) + { + if (x < maxChunksToProcessPerFrame&& containersNeedCreation.Count > 0 && containersNeedCreation.TryDequeue(out contToMake)) + { + Container container = GetContainer(contToMake); + container.containerPosition = contToMake; + activeContainers.TryAdd(contToMake, container); + ComputeManager.Instance.GenerateVoxelData(container, contToMake); + x++; + } + + } + } + + void CheckActiveChunksLoop() + { + Profiler.BeginThreadProfiling("Chunks", "ChunkChecker"); + int halfRenderSize = WorldSettings.renderDistance / 2; + int renderDistPlus1 = WorldSettings.renderDistance + 1; + Vector3 pos = Vector3.zero; + + Bounds chunkBounds = new Bounds(); + chunkBounds.size = new Vector3(renderDistPlus1 * WorldSettings.containerSize, 1, renderDistPlus1 * WorldSettings.containerSize); + while (true && !killThreads) + { + if (previouslyCheckedPosition != lastUpdatedPosition || !performedFirstPass) + { + previouslyCheckedPosition = lastUpdatedPosition; + + for (int x = -halfRenderSize; x < halfRenderSize; x++) + for (int z = -halfRenderSize; z < halfRenderSize; z++) + { + pos.x = x * WorldSettings.containerSize + previouslyCheckedPosition.x; + pos.z = z * WorldSettings.containerSize + previouslyCheckedPosition.z; + + if (!activeContainers.ContainsKey(pos)) + { + containersNeedCreation.Enqueue(pos); + } + } + + chunkBounds.center = previouslyCheckedPosition; + + foreach (var kvp in activeContainers) + { + if (!chunkBounds.Contains(kvp.Key)) + deactiveContainers.Enqueue(kvp.Key); + } + } + + if (!performedFirstPass) + performedFirstPass = true; + + Thread.Sleep(300); + } + Profiler.EndThreadProfiling(); + } + + #region Container Pooling + public Container GetContainer(Vector3 pos) + { + if(containerPool.Count > 0) + { + return containerPool.Dequeue(); + } + else + { + return GenerateContainer(pos, false); + } + } + + Container GenerateContainer(Vector3 position, bool enqueue = true) + { + if(Thread.CurrentThread.ManagedThreadId != mainThreadID) + { + containersNeedCreation.Enqueue(position); + return null; + } + Container container = new GameObject().AddComponent(); + container.transform.parent = transform; + container.containerPosition = position; + container.Initialize(worldMaterial, position); + + if (enqueue) + { + container.gameObject.SetActive(false); + containerPool.Enqueue(container); + } + + return container; + } + + public bool deactiveContainer(Vector3 position) + { + if (activeContainers.ContainsKey(position)) + { + if (activeContainers.TryRemove(position, out Container c)) + { + c.ClearData(); + containerPool.Enqueue(c); + c.gameObject.SetActive(false); + return true; + } + else + return false; + + } + + return false; + } + #endregion + + public static Vector3 positionToChunkCoord(Vector3 pos) + { + pos /= WorldSettings.containerSize; + pos = math.floor(pos) * WorldSettings.containerSize; + pos.y = 0; + return pos; + } + + private void OnApplicationQuit() + { + killThreads = true; + checkActiveChunks?.Abort(); + + foreach(var c in activeContainers.Keys) + { + if(activeContainers.TryRemove(c, out var cont)) + { + cont.Dispose(); + } + } + + //Try to force cleanup of editor memory + #if UNITY_EDITOR + EditorUtility.UnloadUnusedAssetsImmediate(); + GC.Collect(); + #endif } public static WorldSettings WorldSettings; @@ -52,4 +242,10 @@ public class WorldSettings { public int containerSize = 16; public int maxHeight = 128; + public int renderDistance = 32; + + public int ChunkCount + { + get { return (containerSize + 3) *( maxHeight+ 1) * (containerSize+ 3); } + } } \ No newline at end of file diff --git a/Assets/VoxelProjectSeries/Shaders/VoxelVertexColor.shadergraph b/Assets/VoxelProjectSeries/Shaders/VoxelVertexColor.shadergraph index 823b321..3bf7886 100644 --- a/Assets/VoxelProjectSeries/Shaders/VoxelVertexColor.shadergraph +++ b/Assets/VoxelProjectSeries/Shaders/VoxelVertexColor.shadergraph @@ -1,15 +1,13 @@ { - "m_SGVersion": 3, + "m_SGVersion": 2, "m_Type": "UnityEditor.ShaderGraph.GraphData", "m_ObjectId": "1b0a381bf4fa4081a20a7ed1f9d1ca72", - "m_Properties": [], - "m_Keywords": [], - "m_Dropdowns": [], - "m_CategoryData": [ + "m_Properties": [ { - "m_Id": "8b38983899c44dbd89c0fe57eb158af3" + "m_Id": "9904d7a4f0324524b7ecb392af2d3b9f" } ], + "m_Keywords": [], "m_Nodes": [ { "m_Id": "810a7815a872476882906d948c2e0606" @@ -23,9 +21,6 @@ { "m_Id": "cc77c592a30f45d3a4bb1240d8a9fc3c" }, - { - "m_Id": "cf5c4cf290274cada9ec45e23090c4e5" - }, { "m_Id": "c77967e96bf041ffbcf5427d794bf709" }, @@ -39,13 +34,19 @@ "m_Id": "2b96952f83264bb09bf44262260a635f" }, { - "m_Id": "4d6b732b2bc04aaaa42a8e4268741624" + "m_Id": "8d49ed4be09d461cb3edcfc29ee7b929" + }, + { + "m_Id": "7e4bc00ffd934b7baccc38dfcaf2bf2c" + }, + { + "m_Id": "e7f06b8a956f47a98bc811ee0b852427" }, { - "m_Id": "c82f0b5effc542b297ab67f2cd8de7dc" + "m_Id": "9c4993905bd4497c8a6a9bc31f16dcbf" }, { - "m_Id": "b84a7d4a2af64ef291c95a588b74578b" + "m_Id": "7bbf2c817acd4ad98c6cb9805ef2c335" } ], "m_GroupDatas": [], @@ -54,13 +55,27 @@ { "m_OutputSlot": { "m_Node": { - "m_Id": "4d6b732b2bc04aaaa42a8e4268741624" + "m_Id": "7e4bc00ffd934b7baccc38dfcaf2bf2c" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "e7f06b8a956f47a98bc811ee0b852427" }, "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "7e4bc00ffd934b7baccc38dfcaf2bf2c" + }, + "m_SlotId": 2 }, "m_InputSlot": { "m_Node": { - "m_Id": "cc77c592a30f45d3a4bb1240d8a9fc3c" + "m_Id": "9c4993905bd4497c8a6a9bc31f16dcbf" }, "m_SlotId": 0 } @@ -68,13 +83,13 @@ { "m_OutputSlot": { "m_Node": { - "m_Id": "b84a7d4a2af64ef291c95a588b74578b" + "m_Id": "8d49ed4be09d461cb3edcfc29ee7b929" }, - "m_SlotId": 1 + "m_SlotId": 0 }, "m_InputSlot": { "m_Node": { - "m_Id": "c77967e96bf041ffbcf5427d794bf709" + "m_Id": "7e4bc00ffd934b7baccc38dfcaf2bf2c" }, "m_SlotId": 0 } @@ -82,13 +97,13 @@ { "m_OutputSlot": { "m_Node": { - "m_Id": "b84a7d4a2af64ef291c95a588b74578b" + "m_Id": "9c4993905bd4497c8a6a9bc31f16dcbf" }, "m_SlotId": 2 }, "m_InputSlot": { "m_Node": { - "m_Id": "3ec34c42fef047d4b986adc312717dd4" + "m_Id": "c77967e96bf041ffbcf5427d794bf709" }, "m_SlotId": 0 } @@ -96,13 +111,27 @@ { "m_OutputSlot": { "m_Node": { - "m_Id": "c82f0b5effc542b297ab67f2cd8de7dc" + "m_Id": "9c4993905bd4497c8a6a9bc31f16dcbf" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "3ec34c42fef047d4b986adc312717dd4" }, "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e7f06b8a956f47a98bc811ee0b852427" + }, + "m_SlotId": 1 }, "m_InputSlot": { "m_Node": { - "m_Id": "b84a7d4a2af64ef291c95a588b74578b" + "m_Id": "cc77c592a30f45d3a4bb1240d8a9fc3c" }, "m_SlotId": 0 } @@ -134,9 +163,6 @@ { "m_Id": "cc77c592a30f45d3a4bb1240d8a9fc3c" }, - { - "m_Id": "cf5c4cf290274cada9ec45e23090c4e5" - }, { "m_Id": "c77967e96bf041ffbcf5427d794bf709" }, @@ -148,6 +174,9 @@ }, { "m_Id": "2b96952f83264bb09bf44262260a635f" + }, + { + "m_Id": "7bbf2c817acd4ad98c6cb9805ef2c335" } ] }, @@ -155,11 +184,10 @@ "serializedMesh": { "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", "m_Guid": "" - }, - "preventRotation": false + } }, "m_Path": "Shader Graphs", - "m_GraphPrecision": 1, + "m_ConcretePrecision": 0, "m_PreviewMode": 2, "m_OutputNode": { "m_Id": "" @@ -204,6 +232,21 @@ "m_SerializedDescriptor": "VertexDescription.Tangent" } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "097d98d361d943ec9871a3a2b7b20cf2", + "m_Id": 1, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", @@ -231,12 +274,12 @@ { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "28bd759b914843ce9e62cb7ff6114ba6", - "m_Id": 4, - "m_DisplayName": "A", + "m_ObjectId": "23c66364b08d4bef82c09f52f9619aac", + "m_Id": 2, + "m_DisplayName": "x", "m_SlotType": 1, "m_Hidden": false, - "m_ShaderOutputName": "A", + "m_ShaderOutputName": "x", "m_StageCapability": 3, "m_Value": 0.0, "m_DefaultValue": 0.0, @@ -276,6 +319,21 @@ "m_SerializedDescriptor": "SurfaceDescription.Occlusion" } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "2fc8ea6bb9a84b0f953c2d1690a98f64", + "m_Id": 3, + "m_DisplayName": "y", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "y", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.BlockNode", @@ -316,56 +374,11 @@ "m_ActiveSubTarget": { "m_Id": "d8ca8037d99d467d96e37fe41dc5b0db" }, - "m_AllowMaterialOverride": false, "m_SurfaceType": 0, - "m_ZTestMode": 4, - "m_ZWriteControl": 0, "m_AlphaMode": 0, - "m_RenderFace": 2, + "m_TwoSided": false, "m_AlphaClip": false, - "m_CastShadows": true, - "m_ReceiveShadows": true, - "m_CustomEditorGUI": "", - "m_SupportVFX": false -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "33812e4c68ed44b1b08882d80329f0a5", - "m_Id": 2, - "m_DisplayName": "G", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "G", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", - "m_ObjectId": "371ad3bd40ee43908680f316a487adef", - "m_Id": 0, - "m_DisplayName": "Normal (Tangent Space)", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "NormalTS", - "m_StageCapability": 2, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [], - "m_Space": 3 + "m_CustomEditorGUI": "" } { @@ -425,10 +438,25 @@ "m_Space": 0 } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "4de7c2b11515477e886a991102b225f2", + "m_Id": 3, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "43b5f2d482254001b0b200f13625cdb9", + "m_ObjectId": "6a8eb7e53a794249a8e5b2d6664663ce", "m_Id": 0, "m_DisplayName": "In", "m_SlotType": 0, @@ -451,66 +479,96 @@ { "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.VertexColorNode", - "m_ObjectId": "4d6b732b2bc04aaaa42a8e4268741624", + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "7bbf2c817acd4ad98c6cb9805ef2c335", "m_Group": { "m_Id": "" }, - "m_Name": "Vertex Color", + "m_Name": "SurfaceDescription.NormalTS", "m_DrawState": { "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -815.9999389648438, - "y": 53.99998474121094, - "width": 118.0, - "height": 94.0 + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 } }, "m_Slots": [ { - "m_Id": "584328dfc58944a4934df64d3dce4155" + "m_Id": "b7cb11dbfe434cb79649ef0bc2654e82" } ], "synonyms": [], "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 2, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] - } + }, + "m_SerializedDescriptor": "SurfaceDescription.NormalTS" } { "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "5275bb4d0a8a4ef5884bab77a61e8f2d", - "m_Id": 1, - "m_DisplayName": "R", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "R", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] + "m_Type": "UnityEditor.ShaderGraph.SplitNode", + "m_ObjectId": "7e4bc00ffd934b7baccc38dfcaf2bf2c", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Split", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -690.0, + "y": 51.99998474121094, + "width": 119.99999237060547, + "height": 149.0 + } + }, + "m_Slots": [ + { + "m_Id": "6a8eb7e53a794249a8e5b2d6664663ce" + }, + { + "m_Id": "097d98d361d943ec9871a3a2b7b20cf2" + }, + { + "m_Id": "98d094a120fe4a0ca1f54a59cbbb2526" + }, + { + "m_Id": "4de7c2b11515477e886a991102b225f2" + }, + { + "m_Id": "c7586efadb7e4848bf076ab658f248c6" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } } { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "584328dfc58944a4934df64d3dce4155", - "m_Id": 0, - "m_DisplayName": "Out", + "m_ObjectId": "7ea00439c624427c9fc38899da9a0f9b", + "m_Id": 1, + "m_DisplayName": "c", "m_SlotType": 1, "m_Hidden": false, - "m_ShaderOutputName": "Out", + "m_ShaderOutputName": "c", "m_StageCapability": 3, "m_Value": { - "x": 1.0, - "y": 1.0, - "z": 1.0, - "w": 1.0 + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 }, "m_DefaultValue": { "x": 0.0, @@ -586,6 +644,118 @@ "m_Space": 0 } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.VertexColorNode", + "m_ObjectId": "8d49ed4be09d461cb3edcfc29ee7b929", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Vertex Color", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -965.0, + "y": 52.000003814697269, + "width": 208.0, + "height": 278.0 + } + }, + "m_Slots": [ + { + "m_Id": "db13cbf297704a76a8581420a68f6bc7" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 1, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "98d094a120fe4a0ca1f54a59cbbb2526", + "m_Id": 2, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "9904d7a4f0324524b7ecb392af2d3b9f", + "m_Guid": { + "m_GuidSerialized": "e0d2d16d-2879-4cae-b9b8-18a84129a6b7" + }, + "m_Name": "Texture2D", + "m_DefaultReferenceName": "Texture2D_9904d7a4f0324524b7ecb392af2d3b9f", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", + "m_ObjectId": "9c4993905bd4497c8a6a9bc31f16dcbf", + "m_Group": { + "m_Id": "" + }, + "m_Name": "UnpackFloats (Custom Function)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -401.9999694824219, + "y": 237.99998474121095, + "width": 231.00001525878907, + "height": 302.0 + } + }, + "m_Slots": [ + { + "m_Id": "d76c5955cc1a49ad852595b379275cda" + }, + { + "m_Id": "23c66364b08d4bef82c09f52f9619aac" + }, + { + "m_Id": "2fc8ea6bb9a84b0f953c2d1690a98f64" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SourceType": 1, + "m_FunctionName": "UnpackFloats", + "m_FunctionSource": "", + "m_FunctionBody": "float2 output;\noutput.y = inputs % 100;\noutput.x = floor(inputs / 100);\noutput /= (100 - 1);\nx = output.x;\ny = output.y;" +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -651,48 +821,26 @@ { "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.SplitNode", - "m_ObjectId": "b84a7d4a2af64ef291c95a588b74578b", - "m_Group": { - "m_Id": "" + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "b7cb11dbfe434cb79649ef0bc2654e82", + "m_Id": 0, + "m_DisplayName": "Normal (Tangent Space)", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "NormalTS", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 }, - "m_Name": "Split", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -627.54345703125, - "y": 293.65814208984377, - "width": 0.0, - "height": 0.0 - } + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 }, - "m_Slots": [ - { - "m_Id": "43b5f2d482254001b0b200f13625cdb9" - }, - { - "m_Id": "5275bb4d0a8a4ef5884bab77a61e8f2d" - }, - { - "m_Id": "33812e4c68ed44b1b08882d80329f0a5" - }, - { - "m_Id": "f09f26e0c21c442d9d6da5302058e5bf" - }, - { - "m_Id": "28bd759b914843ce9e62cb7ff6114ba6" - } - ], - "synonyms": [ - "separate" - ], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } + "m_Labels": [], + "m_Space": 3 } { @@ -740,6 +888,21 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c7586efadb7e4848bf076ab658f248c6", + "m_Id": 4, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.BlockNode", @@ -773,43 +936,6 @@ "m_SerializedDescriptor": "SurfaceDescription.Metallic" } -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.UVNode", - "m_ObjectId": "c82f0b5effc542b297ab67f2cd8de7dc", - "m_Group": { - "m_Id": "" - }, - "m_Name": "UV", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -815.9999389648438, - "y": 293.9999694824219, - "width": 145.0, - "height": 129.00006103515626 - } - }, - "m_Slots": [ - { - "m_Id": "f6c982f7118344688ee5e76c743e657b" - } - ], - "synonyms": [ - "texcoords", - "coords", - "coordinates" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_OutputChannel": 2 -} - { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.BlockNode", @@ -845,35 +971,17 @@ { "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "cf5c4cf290274cada9ec45e23090c4e5", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.NormalTS", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "371ad3bd40ee43908680f316a487adef" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.NormalTS" + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d76c5955cc1a49ad852595b379275cda", + "m_Id": 0, + "m_DisplayName": "inputs", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "inputs", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] } { @@ -885,6 +993,31 @@ "m_ClearCoat": false } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "db13cbf297704a76a8581420a68f6bc7", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", @@ -916,42 +1049,56 @@ } { - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "f09f26e0c21c442d9d6da5302058e5bf", - "m_Id": 3, - "m_DisplayName": "B", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "B", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", + "m_ObjectId": "e7f06b8a956f47a98bc811ee0b852427", + "m_Group": { + "m_Id": "" + }, + "m_Name": "floatToColor (Custom Function)", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": -394.0, + "y": -60.000003814697269, + "width": 223.00001525878907, + "height": 278.0 + } + }, + "m_Slots": [ + { + "m_Id": "f7499679ad434e25a9f3cef50ab57fd0" + }, + { + "m_Id": "7ea00439c624427c9fc38899da9a0f9b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SourceType": 1, + "m_FunctionName": "floatToColor", + "m_FunctionSource": "", + "m_FunctionBody": "uint i = input;\nc.a = float((i & 0xff))/255;\r\nc.b = float((i & 0xff00) >> 8)/255;\nc.g = float((i & 0xff0000) >> 16)/255;\nc.r = float((i & (0xff << 24)) >> 24)/255;\n" } { "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "f6c982f7118344688ee5e76c743e657b", + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "f7499679ad434e25a9f3cef50ab57fd0", "m_Id": 0, - "m_DisplayName": "Out", - "m_SlotType": 1, + "m_DisplayName": "input", + "m_SlotType": 0, "m_Hidden": false, - "m_ShaderOutputName": "Out", + "m_ShaderOutputName": "input", "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, + "m_Value": 0.0, + "m_DefaultValue": 0.0, "m_Labels": [] } diff --git a/Assets/VoxelProjectSeries/WorldMaterial.mat b/Assets/VoxelProjectSeries/WorldMaterial.mat index 1c0b58f..5831598 100644 --- a/Assets/VoxelProjectSeries/WorldMaterial.mat +++ b/Assets/VoxelProjectSeries/WorldMaterial.mat @@ -20,6 +20,10 @@ Material: m_SavedProperties: serializedVersion: 3 m_TexEnvs: + - Texture2D_9904d7a4f0324524b7ecb392af2d3b9f: + m_Texture: {fileID: 10309, guid: 0000000000000000f000000000000000, type: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _BaseMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -64,6 +68,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _TextureSample0: + m_Texture: {fileID: 2800000, guid: 750b1bd7ba8bd28489650de6d0a95cc5, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - unity_Lightmaps: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -76,9 +84,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: + - Vector1_A1ED6E53: 0.17 + - Vector1_B0D81385: 0.05 - _AlphaClip: 0 + - _AlphaCutoff: 0.5 - _Blend: 0 - _BumpScale: 1 - _ClearCoatMask: 0 @@ -105,7 +115,10 @@ Material: - _Surface: 0 - _WorkflowMode: 1 - _ZWrite: 1 + - __dirty: 1 m_Colors: + - Color_1221528D: {r: 0, g: 0, b: 0, a: 1} + - Color_6F4043B5: {r: 1, g: 1, b: 1, a: 0} - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Packages/manifest.json b/Packages/manifest.json index 2fd87bf..62f024d 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,10 +1,13 @@ { "dependencies": { + "com.oddworm.heapexplorer": "https://github.com/pschraut/UnityHeapExplorer.git#4.0.0", "com.unity.collab-proxy": "1.15.12", "com.unity.ide.rider": "3.0.12", "com.unity.ide.visualstudio": "2.0.14", "com.unity.ide.vscode": "1.2.5", - "com.unity.render-pipelines.universal": "12.1.5", + "com.unity.mathematics": "1.2.5", + "com.unity.memoryprofiler": "0.6.0-preview.1", + "com.unity.render-pipelines.universal": "10.8.1", "com.unity.test-framework": "1.1.29", "com.unity.textmeshpro": "3.0.6", "com.unity.timeline": "1.6.4", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 4b89e32..a0fdd79 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -1,13 +1,11 @@ { "dependencies": { - "com.unity.burst": { - "version": "1.6.4", - "depth": 1, - "source": "registry", - "dependencies": { - "com.unity.mathematics": "1.2.1" - }, - "url": "https://packages.unity.com" + "com.oddworm.heapexplorer": { + "version": "https://github.com/pschraut/UnityHeapExplorer.git#4.0.0", + "depth": 0, + "source": "git", + "dependencies": {}, + "hash": "b00fee6b4415cb66cfe1664c47e8aa683b834565" }, "com.unity.collab-proxy": { "version": "1.15.12", @@ -18,6 +16,13 @@ }, "url": "https://packages.unity.com" }, + "com.unity.editorcoroutines": { + "version": "1.0.0", + "depth": 1, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, "com.unity.ext.nunit": { "version": "1.0.6", "depth": 1, @@ -52,34 +57,44 @@ }, "com.unity.mathematics": { "version": "1.2.5", - "depth": 1, + "depth": 0, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, + "com.unity.memoryprofiler": { + "version": "0.6.0-preview.1", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.editorcoroutines": "1.0.0" + }, + "url": "https://packages.unity.com" + }, "com.unity.render-pipelines.core": { - "version": "12.1.5", + "version": "10.8.1", "depth": 1, - "source": "builtin", + "source": "registry", "dependencies": { "com.unity.ugui": "1.0.0", "com.unity.modules.physics": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0" - } + }, + "url": "https://packages.unity.com" }, "com.unity.render-pipelines.universal": { - "version": "12.1.5", + "version": "10.8.1", "depth": 0, - "source": "builtin", + "source": "registry", "dependencies": { - "com.unity.mathematics": "1.2.1", - "com.unity.burst": "1.5.0", - "com.unity.render-pipelines.core": "12.1.5", - "com.unity.shadergraph": "12.1.5" - } + "com.unity.mathematics": "1.1.0", + "com.unity.render-pipelines.core": "10.8.1", + "com.unity.shadergraph": "10.8.1" + }, + "url": "https://packages.unity.com" }, "com.unity.searcher": { - "version": "4.9.1", + "version": "4.3.2", "depth": 2, "source": "registry", "dependencies": {}, @@ -95,13 +110,14 @@ "url": "https://packages.unity.com" }, "com.unity.shadergraph": { - "version": "12.1.5", + "version": "10.8.1", "depth": 1, - "source": "builtin", + "source": "registry", "dependencies": { - "com.unity.render-pipelines.core": "12.1.5", - "com.unity.searcher": "4.9.1" - } + "com.unity.render-pipelines.core": "10.8.1", + "com.unity.searcher": "4.3.2" + }, + "url": "https://packages.unity.com" }, "com.unity.test-framework": { "version": "1.1.29", diff --git a/ProjectSettings/BurstAotSettings_StandaloneWindows.json b/ProjectSettings/BurstAotSettings_StandaloneWindows.json index 2144f6d..e02ae33 100644 --- a/ProjectSettings/BurstAotSettings_StandaloneWindows.json +++ b/ProjectSettings/BurstAotSettings_StandaloneWindows.json @@ -1,6 +1,6 @@ { "MonoBehaviour": { - "Version": 3, + "Version": 4, "EnableBurstCompilation": true, "EnableOptimisations": true, "EnableSafetyChecks": false, @@ -11,6 +11,7 @@ "CpuMinTargetX64": 0, "CpuMaxTargetX64": 0, "CpuTargetsX32": 6, - "CpuTargetsX64": 72 + "CpuTargetsX64": 72, + "OptimizeFor": 0 } } diff --git a/ProjectSettings/CommonBurstAotSettings.json b/ProjectSettings/CommonBurstAotSettings.json index 3dffdba..0293daf 100644 --- a/ProjectSettings/CommonBurstAotSettings.json +++ b/ProjectSettings/CommonBurstAotSettings.json @@ -1,6 +1,6 @@ { "MonoBehaviour": { - "Version": 3, + "Version": 4, "DisabledWarnings": "" } } diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index ea88784..6064ee0 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -6,6 +6,6 @@ EditorBuildSettings: serializedVersion: 2 m_Scenes: - enabled: 1 - path: Assets/Scenes/SampleScene.unity - guid: 99c9720ab356a0642a771bea13969a05 + path: Assets/VoxelProjectSeries/Scenes/World.unity + guid: 585e920a0ed93f64e8b93df655b05926 m_configObjects: {} diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset index c8da44e..1efe28b 100644 --- a/ProjectSettings/EditorSettings.asset +++ b/ProjectSettings/EditorSettings.asset @@ -3,8 +3,7 @@ --- !u!159 &1 EditorSettings: m_ObjectHideFlags: 0 - serializedVersion: 9 - m_ExternalVersionControlSupport: Visible Meta Files + serializedVersion: 11 m_SerializationMode: 2 m_LineEndingsForNewScripts: 2 m_DefaultBehaviorMode: 0 @@ -18,18 +17,24 @@ EditorSettings: m_EtcTextureBestCompressor: 4 m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp m_ProjectGenerationRootNamespace: - m_CollabEditorSettings: - inProgressEnabled: 1 m_EnableTextureStreamingInEditMode: 1 m_EnableTextureStreamingInPlayMode: 1 m_AsyncShaderCompilation: 1 - m_EnterPlayModeOptionsEnabled: 0 - m_EnterPlayModeOptions: 3 - m_ShowLightmapResolutionOverlay: 1 + m_CachingShaderPreprocessor: 1 + m_PrefabModeAllowAutoSave: 1 + m_EnterPlayModeOptionsEnabled: 1 + m_EnterPlayModeOptions: 0 + m_GameObjectNamingDigits: 1 + m_GameObjectNamingScheme: 0 + m_AssetNamingUsesSpace: 1 m_UseLegacyProbeSampleCount: 0 + m_SerializeInlineMappingsOnOneLine: 0 + m_DisableCookiesInLightmapper: 1 m_AssetPipelineMode: 1 m_CacheServerMode: 0 m_CacheServerEndpoint: m_CacheServerNamespacePrefix: default m_CacheServerEnableDownload: 1 m_CacheServerEnableUpload: 1 + m_CacheServerEnableAuth: 0 + m_CacheServerEnableTls: 0 diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index 56859a2..96ba1c9 100644 --- a/ProjectSettings/GraphicsSettings.asset +++ b/ProjectSettings/GraphicsSettings.asset @@ -41,7 +41,7 @@ GraphicsSettings: m_PreloadShadersBatchTimeLimit: -1 m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_CustomRenderPipeline: {fileID: 11400000, guid: 7b7fd9122c28c4d15b667c7040e3b3fd, + m_CustomRenderPipeline: {fileID: 11400000, guid: e1260c1148f6143b28bae5ace5e9c5d1, type: 2} m_TransparencySortMode: 0 m_TransparencySortAxis: {x: 0, y: 0, z: 1} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 03fe663..d6f401d 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -3,7 +3,7 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 23 + serializedVersion: 22 productGUID: 16d8f6f59ed05e94593bd1cbbd2374d1 AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 @@ -173,7 +173,7 @@ PlayerSettings: APKExpansionFiles: 0 keepLoadedShadersAlive: 0 StripUnusedMeshComponents: 0 - VertexChannelCompressionMask: 4054 + VertexChannelCompressionMask: 214 iPhoneSdkVersion: 988 iOSTargetOSVersionString: 11.0 tvOSSdkVersion: 0 @@ -216,7 +216,6 @@ PlayerSettings: iOSLaunchScreeniPadCustomStoryboardPath: iOSDeviceRequirements: [] iOSURLSchemes: [] - macOSURLSchemes: [] iOSBackgroundModes: 0 iOSMetalForceHardShadows: 0 metalEditorSupport: 1 @@ -517,7 +516,6 @@ PlayerSettings: m_BuildTargetGroupLightmapEncodingQuality: [] m_BuildTargetGroupLightmapSettings: [] m_BuildTargetNormalMapEncoding: [] - m_BuildTargetDefaultTextureCompressionFormat: [] playModeTestRunnerEnabled: 0 runPlayModeTestAsEditModeTest: 0 actionOnDotNetUnhandledException: 1 @@ -536,7 +534,6 @@ PlayerSettings: switchScreenResolutionBehavior: 2 switchUseCPUProfiler: 0 switchUseGOLDLinker: 0 - switchLTOSetting: 0 switchApplicationID: 0x01004b9000490000 switchNSODependencies: switchTitleNames_0: @@ -740,6 +737,7 @@ PlayerSettings: ps4videoRecordingFeaturesUsed: 0 ps4contentSearchFeaturesUsed: 0 ps4CompatibilityPS5: 0 + ps4AllowPS5Detection: 0 ps4GPU800MHz: 1 ps4attribEyeToEyeDistanceSettingVR: 0 ps4IncludedModules: [] @@ -764,23 +762,27 @@ PlayerSettings: webGLLinkerTarget: 1 webGLThreadsSupport: 0 webGLDecompressionFallback: 0 - scriptingDefineSymbols: {} + scriptingDefineSymbols: + 1: AMPLIFY_SHADER_EDITOR additionalCompilerArguments: {} platformArchitecture: {} - scriptingBackend: {} + scriptingBackend: + Standalone: 0 il2cppCompilerConfiguration: {} managedStrippingLevel: {} incrementalIl2cppBuild: {} suppressCommonWarnings: 1 allowUnsafeCode: 0 useDeterministicCompilation: 1 + useReferenceAssemblies: 1 enableRoslynAnalyzers: 1 additionalIl2CppArgs: scriptingRuntimeVersion: 1 - gcIncremental: 0 + gcIncremental: 1 assemblyVersionValidation: 1 gcWBarrierValidation: 0 - apiCompatibilityLevelPerPlatform: {} + apiCompatibilityLevelPerPlatform: + Standalone: 6 m_RenderingPath: 1 m_MobileRenderingPath: 1 metroPackageName: com.unity.template-starter-kit @@ -810,6 +812,7 @@ PlayerSettings: metroFTAName: metroFTAFileTypes: [] metroProtocolName: + vcxProjDefaultLanguage: XboxOneProductId: XboxOneUpdateKey: XboxOneSandboxId: @@ -859,6 +862,4 @@ PlayerSettings: organizationId: cloudEnabled: 0 legacyClampBlendShapeWeights: 0 - playerDataPath: - forceSRGBBlit: 1 virtualTexturingSupportEnabled: 0 diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 457cd7d..f6808b3 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2021.2.14f1 -m_EditorVersionWithRevision: 2021.2.14f1 (bcb93e5482d2) +m_EditorVersion: 2020.3.31f1 +m_EditorVersionWithRevision: 2020.3.31f1 (6b54b7616050) diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index 58ae55d..489a08f 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -95,7 +95,7 @@ QualitySettings: skinWeights: 255 textureQuality: 0 anisotropicTextures: 2 - antiAliasing: 4 + antiAliasing: 0 softParticles: 0 softVegetation: 1 realtimeReflectionProbes: 1 diff --git a/ProjectSettings/URPProjectSettings.asset b/ProjectSettings/URPProjectSettings.asset index c1f118a..3077404 100644 --- a/ProjectSettings/URPProjectSettings.asset +++ b/ProjectSettings/URPProjectSettings.asset @@ -12,4 +12,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3} m_Name: m_EditorClassIdentifier: - m_LastMaterialVersion: 5 + m_LastMaterialVersion: 4 diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index 7d1d4b4..5d5b814 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -9,7 +9,19 @@ EditorUserSettings: value: 5a08575f5207595a0f5d59741173094444164f7d7d2a23317c7a4465bbe1646d flags: 0 RecentlyUsedSceneGuid-1: - value: 5b5205075250080a0b0f5c7313730d441416417a782d756579704a60b4b33669 + value: 560901035c07595a5d0b087b43250944134f1a737f2c2066787c1f63b7b9666e + flags: 0 + RecentlyUsedScenePath-0: + value: 224247031146466d0216092e2031501a13140c19293a2f353e662e30e7ee312badd039fbeb3e7129370bfb25 + flags: 0 + UnityEditor.ShaderGraph.Blackboard: + value: 18135939215a0a5004000b0e15254b524c030a3f2964643d120d1230e9e93a3fd6e826abbd2e2d293c4ead313b08042de6030a0afa240c0d020be94c4ba75e435d8715fa32c70d15d11612dacc11fee5d3c5d1fe9ab1bf968e93e2ffcbc3e7e2f0b3ffe0e8b0be9af8ffaeffff8e85dd8390e3949c8899daa7 + flags: 0 + UnityEditor.ShaderGraph.FloatingWindowsLayout2: + value: 181344140043005e1a220d3b1f364b524c0c5a27130c293326201334cee5322ca0bd30e8eb293a707b0fd0180b3d0a36fc0d3d04e649500d1002ee0b5dbd1d2c27c00ad113cb1e10e41f1addc80993b98d9884a69ae6d8f0d1cda9e8fbfefaf9f9dea3fdb9ade882f0f7b0e1e380cafbf2c3adc18e9cd285a2908b82ec869c8395949c9483d68a8e97ddbd90bf + flags: 0 + UnityEditor.ShaderGraph.InspectorWindow: + value: 18135939215a0a5004000b0e15254b524c1119263f2d6a722016393ce1eb3d36e5d339f9a560393d3511ea7046333e09f7181d02f50a06241708ee0b05bd4a465f95548717f73713d91006c1c309d0effad0d2f9ddffa5828d86eea2b8b2e3c7c6f8bffee8f2e782b2eda4e2fc9b89948d88ae8696909997f482ccce flags: 0 vcSharedLogLevel: value: 0d5e400f0650 @@ -19,13 +31,9 @@ EditorUserSettings: m_VCDebugCmd: 0 m_VCDebugOut: 0 m_SemanticMergeMode: 2 - m_DesiredImportWorkerCount: 5 - m_StandbyImportWorkerCount: 2 - m_IdleImportWorkerShutdownDelay: 60000 m_VCShowFailedCheckout: 1 m_VCOverwriteFailedCheckoutAssets: 1 m_VCProjectOverlayIcons: 1 m_VCHierarchyOverlayIcons: 1 m_VCOtherOverlayIcons: 1 m_VCAllowAsyncUpdate: 1 - m_ArtifactGarbageCollection: 1 diff --git a/UserSettings/Layouts/CurrentMaximizeLayout.dwlt b/UserSettings/Layouts/CurrentMaximizeLayout.dwlt new file mode 100644 index 0000000..3d931d2 --- /dev/null +++ b/UserSettings/Layouts/CurrentMaximizeLayout.dwlt @@ -0,0 +1,852 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 3} + - {fileID: 12} + m_Position: + serializedVersion: 2 + x: 0 + y: 30 + width: 1920 + height: 939 + m_MinSize: {x: 300, y: 200} + m_MaxSize: {x: 24288, y: 16192} + vertical: 0 + controlID: 20 +--- !u!114 &2 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12003, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 100, y: 100} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Console + m_Image: {fileID: -4327648978806127646, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 0 + y: 762 + width: 780 + height: 229 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] +--- !u!114 &3 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 4} + - {fileID: 7} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 1478 + height: 939 + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 16192, y: 16192} + vertical: 1 + controlID: 21 +--- !u!114 &4 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: GameView + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 1478 + height: 689 + m_MinSize: {x: 201, y: 221} + m_MaxSize: {x: 4001, y: 4021} + m_ActualView: {fileID: 5} + m_Panes: + - {fileID: 5} + - {fileID: 6} + m_Selected: 0 + m_LastSelected: 1 +--- !u!114 &5 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12015, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Game + m_Image: {fileID: -6423792434712278376, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 0 + y: 73 + width: 1477 + height: 668 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_SerializedViewNames: [] + m_SerializedViewValues: [] + m_PlayModeViewName: GameView + m_ShowGizmos: 0 + m_TargetDisplay: 0 + m_ClearColor: {r: 0, g: 0, b: 0, a: 0} + m_TargetSize: {x: 1477, y: 647} + m_TextureFilterMode: 0 + m_TextureHideFlags: 61 + m_RenderIMGUI: 1 + m_EnterPlayModeBehavior: 0 + m_UseMipMap: 0 + m_VSyncEnabled: 0 + m_Gizmos: 0 + m_Stats: 0 + m_SelectedSizes: 00000000000000000000000000000000000000000000000000000000000000000000000000000000 + m_ZoomArea: + m_HRangeLocked: 0 + m_VRangeLocked: 0 + hZoomLockedByDefault: 0 + vZoomLockedByDefault: 0 + m_HBaseRangeMin: -738.5 + m_HBaseRangeMax: 738.5 + m_VBaseRangeMin: -323.5 + m_VBaseRangeMax: 323.5 + m_HAllowExceedBaseRangeMin: 1 + m_HAllowExceedBaseRangeMax: 1 + m_VAllowExceedBaseRangeMin: 1 + m_VAllowExceedBaseRangeMax: 1 + m_ScaleWithWindow: 0 + m_HSlider: 0 + m_VSlider: 0 + m_IgnoreScrollWheelUntilClicked: 0 + m_EnableMouseInput: 1 + m_EnableSliderZoomHorizontal: 0 + m_EnableSliderZoomVertical: 0 + m_UniformScale: 1 + m_UpDirection: 1 + m_DrawArea: + serializedVersion: 2 + x: 0 + y: 21 + width: 1477 + height: 647 + m_Scale: {x: 1, y: 1} + m_Translation: {x: 738.5, y: 323.5} + m_MarginLeft: 0 + m_MarginRight: 0 + m_MarginTop: 0 + m_MarginBottom: 0 + m_LastShownAreaInsideMargins: + serializedVersion: 2 + x: -738.5 + y: -323.5 + width: 1477 + height: 647 + m_MinimalGUI: 1 + m_defaultScale: 1 + m_LastWindowPixelSize: {x: 1477, y: 668} + m_ClearInEditMode: 1 + m_NoCameraWarning: 1 + m_LowResolutionForAspectRatios: 01000000000000000000 + m_XRRenderMode: 0 + m_RenderTexture: {fileID: 0} +--- !u!114 &6 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12013, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Scene + m_Image: {fileID: 2593428753322112591, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 0 + y: 73 + width: 1477 + height: 668 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: + - dockPosition: 0 + containerId: overlay-toolbar__top + floating: 0 + collapsed: 0 + displayed: 1 + snapOffset: {x: -98, y: -26} + snapOffsetDelta: {x: -3, y: 0} + snapCorner: 3 + id: Tool Settings + index: 0 + layout: 1 + - dockPosition: 0 + containerId: overlay-toolbar__top + floating: 0 + collapsed: 0 + displayed: 1 + snapOffset: {x: -141, y: 149} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 1 + id: unity-grid-and-snap-toolbar + index: 1 + layout: 1 + - dockPosition: 1 + containerId: overlay-toolbar__top + floating: 0 + collapsed: 0 + displayed: 1 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: unity-scene-view-toolbar + index: 0 + layout: 1 + - dockPosition: 1 + containerId: overlay-toolbar__top + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 1 + id: unity-search-toolbar + index: 1 + layout: 1 + - dockPosition: 0 + containerId: overlay-container--left + floating: 0 + collapsed: 0 + displayed: 1 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: unity-transform-toolbar + index: 0 + layout: 2 + - dockPosition: 0 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 1 + snapOffset: {x: 67.5, y: 86} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Orientation + index: 0 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Light Settings + index: 0 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Camera + index: 1 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Cloth Constraints + index: 2 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Cloth Collisions + index: 3 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Navmesh Display + index: 4 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Agent Display + index: 5 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Obstacle Display + index: 6 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Occlusion Culling + index: 7 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Physics Debugger + index: 8 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Scene Visibility + index: 9 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Particles + index: 10 + layout: 4 + m_WindowGUID: 1d763bbd077c76247bbb81c703bd3acf + m_Gizmos: 1 + m_OverrideSceneCullingMask: 6917529027641081856 + m_SceneIsLit: 1 + m_SceneLighting: 1 + m_2DMode: 0 + m_isRotationLocked: 0 + m_PlayAudio: 0 + m_AudioPlay: 0 + m_Position: + m_Target: {x: -66.813286, y: -49.925797, z: 222.98918} + speed: 2 + m_Value: {x: -66.813286, y: -49.925797, z: 222.98918} + m_RenderMode: 0 + m_CameraMode: + drawMode: 2 + name: Shaded Wireframe + section: Shading Mode + m_ValidateTrueMetals: 0 + m_DoValidateTrueMetals: 0 + m_ExposureSliderValue: 0 + m_SceneViewState: + m_AlwaysRefresh: 0 + showFog: 1 + showSkybox: 1 + showFlares: 1 + showImageEffects: 1 + showParticleSystems: 1 + showVisualEffectGraphs: 1 + m_FxEnabled: 1 + m_Grid: + xGrid: + m_Fade: + m_Target: 0 + speed: 2 + m_Value: 0 + m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} + m_Pivot: {x: 0, y: 0, z: 0} + m_Size: {x: 0, y: 0} + yGrid: + m_Fade: + m_Target: 1 + speed: 2 + m_Value: 1 + m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} + m_Pivot: {x: 0, y: 0, z: 0} + m_Size: {x: 1, y: 1} + zGrid: + m_Fade: + m_Target: 0 + speed: 2 + m_Value: 0 + m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} + m_Pivot: {x: 0, y: 0, z: 0} + m_Size: {x: 0, y: 0} + m_ShowGrid: 1 + m_GridAxis: 1 + m_gridOpacity: 0.5 + m_Rotation: + m_Target: {x: 0.38687453, y: -0.20436603, z: 0.089119665, w: 0.89462763} + speed: 2 + m_Value: {x: 0.38692516, y: -0.20439278, z: 0.08913133, w: 0.89474475} + m_Size: + m_Target: 115.118416 + speed: 2 + m_Value: 115.118416 + m_Ortho: + m_Target: 0 + speed: 2 + m_Value: 0 + m_CameraSettings: + m_Speed: 1 + m_SpeedNormalized: 0.5 + m_SpeedMin: 0.01 + m_SpeedMax: 2 + m_EasingEnabled: 1 + m_EasingDuration: 0.4 + m_AccelerationEnabled: 1 + m_FieldOfViewHorizontalOrVertical: 60 + m_NearClip: 0.03 + m_FarClip: 10000 + m_DynamicClip: 1 + m_OcclusionCulling: 0 + m_LastSceneViewRotation: {x: 0, y: 0, z: 0, w: 0} + m_LastSceneViewOrtho: 0 + m_ReplacementShader: {fileID: 0} + m_ReplacementString: + m_SceneVisActive: 1 + m_LastLockedObject: {fileID: 0} + m_ViewIsLockedToObject: 0 +--- !u!114 &7 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 8} + - {fileID: 10} + m_Position: + serializedVersion: 2 + x: 0 + y: 689 + width: 1478 + height: 250 + m_MinSize: {x: 200, y: 100} + m_MaxSize: {x: 16192, y: 8096} + vertical: 0 + controlID: 22 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: ConsoleWindow + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 781 + height: 250 + m_MinSize: {x: 100, y: 100} + m_MaxSize: {x: 4000, y: 4000} + m_ActualView: {fileID: 2} + m_Panes: + - {fileID: 9} + - {fileID: 2} + m_Selected: 1 + m_LastSelected: 0 +--- !u!114 &9 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12061, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Hierarchy + m_Image: {fileID: 7966133145522015247, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 0 + y: 762 + width: 780 + height: 229 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_SceneHierarchy: + m_TreeViewState: + scrollPos: {x: 0, y: 0} + m_SelectedIDs: + m_LastClickedID: 0 + m_ExpandedIDs: 38fbffff + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 0 + m_ClientGUIView: {fileID: 8} + m_SearchString: + m_ExpandedScenes: [] + m_CurrenRootInstanceID: 0 + m_LockTracker: + m_IsLocked: 0 + m_CurrentSortingName: TransformSorting + m_WindowGUID: 3d13d3320587b744a920d6b037ba3d47 +--- !u!114 &10 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 781 + y: 0 + width: 697 + height: 250 + m_MinSize: {x: 232, y: 271} + m_MaxSize: {x: 10002, y: 10021} + m_ActualView: {fileID: 11} + m_Panes: + - {fileID: 11} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &11 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12014, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 230, y: 250} + m_MaxSize: {x: 10000, y: 10000} + m_TitleContent: + m_Text: Project + m_Image: {fileID: -5467254957812901981, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 781 + y: 762 + width: 695 + height: 229 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_SearchFilter: + m_NameFilter: + m_ClassNames: [] + m_AssetLabels: [] + m_AssetBundleNames: [] + m_VersionControlStates: [] + m_SoftLockControlStates: [] + m_ReferencingInstanceIDs: + m_SceneHandles: + m_ShowAllHits: 0 + m_SkipHidden: 0 + m_SearchArea: 1 + m_Folders: + - Assets/VoxelProjectSeries/Scripts/ComputeShaders/Noise + m_Globs: [] + m_OriginalText: + m_ViewMode: 0 + m_StartGridSize: 64 + m_LastFolders: [] + m_LastFoldersGridSize: -1 + m_LastProjectPath: D:\GameDevelopment\PixelReyn\VideoSeries\VoxelProjectSeriesParts\Part7 + - GPU meshing working + m_LockTracker: + m_IsLocked: 0 + m_FolderTreeState: + scrollPos: {x: 0, y: 0} + m_SelectedIDs: 50ab0000 + m_LastClickedID: 43856 + m_ExpandedIDs: 00000000206c0000226c0000246c0000266c0000286c00002a6c00002c6c00002e6c0000306c0000326c0000 + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 1 + m_ClientGUIView: {fileID: 0} + m_SearchString: + m_CreateAssetUtility: + m_EndAction: {fileID: 0} + m_InstanceID: 0 + m_Path: + m_Icon: {fileID: 0} + m_ResourceFile: + m_AssetTreeState: + scrollPos: {x: 0, y: 169} + m_SelectedIDs: + m_LastClickedID: 0 + m_ExpandedIDs: ffffffff00000000206c0000226c0000246c0000266c0000286c00002a6c00002c6c00002e6c0000306c0000326c0000 + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 1 + m_ClientGUIView: {fileID: 10} + m_SearchString: + m_CreateAssetUtility: + m_EndAction: {fileID: 0} + m_InstanceID: 0 + m_Path: + m_Icon: {fileID: 0} + m_ResourceFile: + m_ListAreaState: + m_SelectedInstanceIDs: + m_LastClickedInstanceID: 0 + m_HadKeyboardFocusLastEvent: 0 + m_ExpandedInstanceIDs: c6230000 + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 1 + m_ClientGUIView: {fileID: 0} + m_CreateAssetUtility: + m_EndAction: {fileID: 0} + m_InstanceID: 0 + m_Path: + m_Icon: {fileID: 0} + m_ResourceFile: + m_NewAssetIndexInList: -1 + m_ScrollPosition: {x: 0, y: 29} + m_GridSize: 64 + m_SkipHiddenPackages: 0 + m_DirectoriesAreaWidth: 115 +--- !u!114 &12 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 1478 + y: 0 + width: 442 + height: 939 + m_MinSize: {x: 276, y: 71} + m_MaxSize: {x: 4001, y: 4021} + m_ActualView: {fileID: 13} + m_Panes: + - {fileID: 13} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &13 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12019, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 275, y: 50} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Inspector + m_Image: {fileID: -2667387946076563598, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 1478 + y: 73 + width: 441 + height: 918 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_ObjectsLockedBeforeSerialization: [] + m_InstanceIDsLockedBeforeSerialization: + m_PreviewResizer: + m_CachedPref: 380 + m_ControlHash: -371814159 + m_PrefName: Preview_InspectorPreview + m_LastInspectedObjectInstanceID: -1 + m_LastVerticalScrollValue: 0 + m_GlobalObjectId: + m_InspectorMode: 0 + m_LockTracker: + m_IsLocked: 0 + m_PreviewWindow: {fileID: 0} diff --git a/UserSettings/Layouts/default-2021.dwlt b/UserSettings/Layouts/default-2021.dwlt index 956b058..5192d0d 100644 --- a/UserSettings/Layouts/default-2021.dwlt +++ b/UserSettings/Layouts/default-2021.dwlt @@ -1,6 +1,54 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_PixelRect: + serializedVersion: 2 + x: 165 + y: 274 + width: 641 + height: 603 + m_ShowMode: 0 + m_Title: Build Settings + m_RootView: {fileID: 5} + m_MinSize: {x: 640, y: 601} + m_MaxSize: {x: 4000, y: 4021} + m_Maximized: 0 +--- !u!114 &2 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_PixelRect: + serializedVersion: 2 + x: 2030 + y: 290 + width: 390 + height: 567 + m_ShowMode: 0 + m_Title: Lighting + m_RootView: {fileID: 7} + m_MinSize: {x: 390, y: 411} + m_MaxSize: {x: 4000, y: 4021} + m_Maximized: 0 +--- !u!114 &3 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -20,11 +68,11 @@ MonoBehaviour: height: 989 m_ShowMode: 4 m_Title: Game - m_RootView: {fileID: 4} + m_RootView: {fileID: 8} m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} m_Maximized: 1 ---- !u!114 &2 +--- !u!114 &4 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -34,23 +82,23 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: SceneView + m_Name: BuildPlayerWindow m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 - x: 717 + x: 0 y: 0 - width: 761 - height: 689 - m_MinSize: {x: 202, y: 221} - m_MaxSize: {x: 4002, y: 4021} - m_ActualView: {fileID: 17} + width: 641 + height: 603 + m_MinSize: {x: 640, y: 601} + m_MaxSize: {x: 4000, y: 4021} + m_ActualView: {fileID: 18} m_Panes: - - {fileID: 17} + - {fileID: 18} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &3 +--- !u!114 &5 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -63,19 +111,68 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 10} - - {fileID: 2} + - {fileID: 4} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 1478 - height: 689 - m_MinSize: {x: 200, y: 100} - m_MaxSize: {x: 16192, y: 8096} + width: 641 + height: 603 + m_MinSize: {x: 640, y: 601} + m_MaxSize: {x: 4000, y: 4021} vertical: 0 - controlID: 103 ---- !u!114 &4 + controlID: 1911 +--- !u!114 &6 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: LightingWindow + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 390 + height: 567 + m_MinSize: {x: 390, y: 390} + m_MaxSize: {x: 4000, y: 4000} + m_ActualView: {fileID: 19} + m_Panes: + - {fileID: 19} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &7 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 6} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 390 + height: 567 + m_MinSize: {x: 390, y: 411} + m_MaxSize: {x: 4000, y: 4021} + vertical: 0 + controlID: 75 +--- !u!114 &8 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -88,9 +185,9 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 5} - - {fileID: 6} - - {fileID: 7} + - {fileID: 9} + - {fileID: 10} + - {fileID: 11} m_Position: serializedVersion: 2 x: 0 @@ -103,7 +200,7 @@ MonoBehaviour: m_TopViewHeight: 30 m_UseBottomView: 1 m_BottomViewHeight: 20 ---- !u!114 &5 +--- !u!114 &9 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -125,7 +222,7 @@ MonoBehaviour: m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} m_LastLoadedLayoutName: ---- !u!114 &6 +--- !u!114 &10 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -138,8 +235,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 8} - - {fileID: 9} + - {fileID: 12} + - {fileID: 13} m_Position: serializedVersion: 2 x: 0 @@ -149,8 +246,8 @@ MonoBehaviour: m_MinSize: {x: 300, y: 200} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 101 ---- !u!114 &7 + controlID: 17 +--- !u!114 &11 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -171,7 +268,7 @@ MonoBehaviour: height: 20 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} ---- !u!114 &8 +--- !u!114 &12 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -184,19 +281,19 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 3} - - {fileID: 11} + - {fileID: 14} + - {fileID: 15} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 1478 + width: 1503 height: 939 m_MinSize: {x: 200, y: 200} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 102 ---- !u!114 &9 + controlID: 53 +--- !u!114 &13 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -211,18 +308,18 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 1478 + x: 1503 y: 0 - width: 442 + width: 417 height: 939 m_MinSize: {x: 275, y: 50} m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 14} + m_ActualView: {fileID: 21} m_Panes: - - {fileID: 14} + - {fileID: 21} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &10 +--- !u!114 &14 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -239,16 +336,17 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 717 + width: 1503 height: 689 m_MinSize: {x: 200, y: 200} m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 16} + m_ActualView: {fileID: 23} m_Panes: - - {fileID: 16} + - {fileID: 23} + - {fileID: 24} m_Selected: 0 - m_LastSelected: 0 ---- !u!114 &11 + m_LastSelected: 1 +--- !u!114 &15 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -261,19 +359,19 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 12} - - {fileID: 13} + - {fileID: 16} + - {fileID: 17} m_Position: serializedVersion: 2 x: 0 y: 689 - width: 1478 + width: 1503 height: 250 m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 82 ---- !u!114 &12 + controlID: 24 +--- !u!114 &16 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -283,23 +381,24 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 1 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: + m_Name: ConsoleWindow m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 x: 0 y: 0 - width: 739 + width: 820 height: 250 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 18} + m_MinSize: {x: 101, y: 121} + m_MaxSize: {x: 4001, y: 4021} + m_ActualView: {fileID: 20} m_Panes: - - {fileID: 18} - m_Selected: 0 + - {fileID: 25} + - {fileID: 20} + m_Selected: 1 m_LastSelected: 0 ---- !u!114 &13 +--- !u!114 &17 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -314,18 +413,126 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 739 + x: 820 y: 0 - width: 739 + width: 683 height: 250 m_MinSize: {x: 232, y: 271} m_MaxSize: {x: 10002, y: 10021} - m_ActualView: {fileID: 15} + m_ActualView: {fileID: 22} m_Panes: - - {fileID: 15} + - {fileID: 22} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &14 +--- !u!114 &18 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12043, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 640, y: 580} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Build Settings + m_Image: {fileID: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 165 + y: 274 + width: 641 + height: 582 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_TreeViewState: + scrollPos: {x: 0, y: 0} + m_SelectedIDs: + m_LastClickedID: 0 + m_ExpandedIDs: + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 0 + m_ClientGUIView: {fileID: 0} + m_SearchString: +--- !u!114 &19 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12079, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 390, y: 390} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Lighting + m_Image: {fileID: -1347227620855488341, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 2030 + y: 290 + width: 390 + height: 546 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] +--- !u!114 &20 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12003, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 100, y: 100} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Console + m_Image: {fileID: -4327648978806127646, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 0 + y: 762 + width: 819 + height: 229 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] +--- !u!114 &21 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -346,9 +553,9 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1478 + x: 1503 y: 73 - width: 441 + width: 416 height: 918 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: @@ -357,7 +564,7 @@ MonoBehaviour: m_ObjectsLockedBeforeSerialization: [] m_InstanceIDsLockedBeforeSerialization: m_PreviewResizer: - m_CachedPref: -160 + m_CachedPref: 380 m_ControlHash: -371814159 m_PrefName: Preview_InspectorPreview m_LastInspectedObjectInstanceID: -1 @@ -367,7 +574,7 @@ MonoBehaviour: m_LockTracker: m_IsLocked: 0 m_PreviewWindow: {fileID: 0} ---- !u!114 &15 +--- !u!114 &22 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -388,9 +595,9 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 739 + x: 820 y: 762 - width: 737 + width: 681 height: 229 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: @@ -409,21 +616,22 @@ MonoBehaviour: m_SkipHidden: 0 m_SearchArea: 1 m_Folders: - - Assets/VoxelProjectSeries/Part1/Scenes + - Assets/UnityDefaults/Settings m_Globs: [] m_OriginalText: m_ViewMode: 0 m_StartGridSize: 64 m_LastFolders: [] m_LastFoldersGridSize: -1 - m_LastProjectPath: D:\GameDevelopment\PixelReyn\VideoSeries\VoxelProjectSeriesParts\Part1\Part1 + m_LastProjectPath: D:\GameDevelopment\PixelReyn\VideoSeries\VoxelProjectSeriesParts\Part7 + - GPU meshing working m_LockTracker: m_IsLocked: 0 m_FolderTreeState: scrollPos: {x: 0, y: 0} m_SelectedIDs: 50ab0000 m_LastClickedID: 43856 - m_ExpandedIDs: + m_ExpandedIDs: 00000000686800006a6800006c6800006e68000070680000726800007468000076680000786800007a6800007c6800007e680000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -448,10 +656,10 @@ MonoBehaviour: m_Icon: {fileID: 0} m_ResourceFile: m_AssetTreeState: - scrollPos: {x: 0, y: 0} + scrollPos: {x: 0, y: 329} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: ffffffff1ab400003eb4000040b40000bcb40000 + m_ExpandedIDs: ffffffff00000000142e0000686800006a6800006c6800006e68000070680000726800007468000076680000786800007a6800007c6800007e680000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -467,7 +675,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 13} + m_ClientGUIView: {fileID: 17} m_SearchString: m_CreateAssetUtility: m_EndAction: {fileID: 0} @@ -507,7 +715,7 @@ MonoBehaviour: m_GridSize: 64 m_SkipHiddenPackages: 0 m_DirectoriesAreaWidth: 115 ---- !u!114 &16 +--- !u!114 &23 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -530,7 +738,7 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 73 - width: 716 + width: 1502 height: 668 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: @@ -542,7 +750,7 @@ MonoBehaviour: m_ShowGizmos: 0 m_TargetDisplay: 0 m_ClearColor: {r: 0, g: 0, b: 0, a: 0} - m_TargetSize: {x: 716, y: 647} + m_TargetSize: {x: 1502, y: 647} m_TextureFilterMode: 0 m_TextureHideFlags: 61 m_RenderIMGUI: 1 @@ -557,8 +765,8 @@ MonoBehaviour: m_VRangeLocked: 0 hZoomLockedByDefault: 0 vZoomLockedByDefault: 0 - m_HBaseRangeMin: -358 - m_HBaseRangeMax: 358 + m_HBaseRangeMin: -751 + m_HBaseRangeMax: 751 m_VBaseRangeMin: -323.5 m_VBaseRangeMax: 323.5 m_HAllowExceedBaseRangeMin: 1 @@ -569,7 +777,7 @@ MonoBehaviour: m_HSlider: 0 m_VSlider: 0 m_IgnoreScrollWheelUntilClicked: 0 - m_EnableMouseInput: 0 + m_EnableMouseInput: 1 m_EnableSliderZoomHorizontal: 0 m_EnableSliderZoomVertical: 0 m_UniformScale: 1 @@ -578,29 +786,29 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 21 - width: 716 + width: 1502 height: 647 m_Scale: {x: 1, y: 1} - m_Translation: {x: 358, y: 323.5} + m_Translation: {x: 751, y: 323.5} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 m_MarginBottom: 0 m_LastShownAreaInsideMargins: serializedVersion: 2 - x: -358 + x: -751 y: -323.5 - width: 716 + width: 1502 height: 647 m_MinimalGUI: 1 m_defaultScale: 1 - m_LastWindowPixelSize: {x: 716, y: 668} + m_LastWindowPixelSize: {x: 1502, y: 668} m_ClearInEditMode: 1 m_NoCameraWarning: 1 m_LowResolutionForAspectRatios: 01000000000000000000 m_XRRenderMode: 0 m_RenderTexture: {fileID: 0} ---- !u!114 &17 +--- !u!114 &24 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -621,9 +829,9 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 717 + x: 0 y: 73 - width: 759 + width: 1502 height: 668 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: @@ -826,9 +1034,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: -3.3352413, y: 3.525569, z: 1.9458218} + m_Target: {x: 7.194289, y: 44.447132, z: 1.9421194} speed: 2 - m_Value: {x: -3.3352413, y: 3.525569, z: 1.9458218} + m_Value: {x: 7.194289, y: 44.447132, z: 1.9421194} m_RenderMode: 0 m_CameraMode: drawMode: 2 @@ -875,13 +1083,13 @@ MonoBehaviour: m_GridAxis: 1 m_gridOpacity: 0.5 m_Rotation: - m_Target: {x: -0.06350985, y: 0.87417567, z: -0.11901155, w: -0.46649846} + m_Target: {x: -0.29961172, y: -0.6053479, z: 0.2625641, w: -0.68889594} speed: 2 - m_Value: {x: -0.063509814, y: 0.87417513, z: -0.11901148, w: -0.4664982} + m_Value: {x: -0.29965207, y: -0.6054294, z: 0.26259944, w: -0.6889887} m_Size: - m_Target: 10 + m_Target: 11.489125 speed: 2 - m_Value: 10 + m_Value: 11.489125 m_Ortho: m_Target: 0 speed: 2 @@ -906,7 +1114,7 @@ MonoBehaviour: m_SceneVisActive: 1 m_LastLockedObject: {fileID: 0} m_ViewIsLockedToObject: 0 ---- !u!114 &18 +--- !u!114 &25 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -929,7 +1137,7 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 762 - width: 738 + width: 819 height: 229 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: @@ -938,9 +1146,9 @@ MonoBehaviour: m_SceneHierarchy: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: 42b40000 + m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 9abaffff04beffff + m_ExpandedIDs: e8abffff80acffff9aacffffa6afffff3eb0ffff0eb2ffff38fbffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -956,7 +1164,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} + m_ClientGUIView: {fileID: 16} m_SearchString: m_ExpandedScenes: [] m_CurrenRootInstanceID: 0 diff --git a/UserSettings/Search.settings b/UserSettings/Search.settings new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/UserSettings/Search.settings @@ -0,0 +1 @@ +{} \ No newline at end of file