Skip to content

Commit

Permalink
Part 5, basic threading and compute shader meshing!
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelreyn committed Mar 29, 2022
1 parent e582deb commit 5f0fd9b
Show file tree
Hide file tree
Showing 36 changed files with 2,753 additions and 715 deletions.
22 changes: 7 additions & 15 deletions Assets/UnityDefaults/Settings/URP-Balanced-Renderer.asset
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
14 changes: 2 additions & 12 deletions Assets/UnityDefaults/Settings/URP-Balanced.asset
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 6 additions & 4 deletions Assets/UnityDefaults/Settings/URP-HighFidelity.asset
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Assets/VoxelProjectSeries.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

179 changes: 158 additions & 21 deletions Assets/VoxelProjectSeries/Scenes/World.unity
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
8 changes: 8 additions & 0 deletions Assets/VoxelProjectSeries/Scripts/Camera.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5f0fd9b

Please sign in to comment.