Skip to content

Commit

Permalink
Add terrain noise layers, global vars, begin terrain structures
Browse files Browse the repository at this point in the history
  • Loading branch information
jeickhoff committed Jul 19, 2023
1 parent f556ef8 commit a21adc5
Show file tree
Hide file tree
Showing 65 changed files with 2,050 additions and 429 deletions.
8 changes: 8 additions & 0 deletions Assets/Config/TerrainLayers.meta

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

24 changes: 24 additions & 0 deletions Assets/Config/TerrainLayers/AbsoluteDirtLayer.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 11500000, guid: c8dc7565f1544ab096b804d358a1a4e4, type: 3}
m_Name: AbsoluteDirtLayer
m_EditorClassIdentifier:
layerType: 0
layerName: Dirt base layer
index: 300
blockType: 2
frequency: 50
exponent: 1
minHeight: 20
maxHeight: 25
chance: 0
structureType: 0
8 changes: 8 additions & 0 deletions Assets/Config/TerrainLayers/AbsoluteDirtLayer.asset.meta

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

24 changes: 24 additions & 0 deletions Assets/Config/TerrainLayers/AbsoluteStoneLayer.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 11500000, guid: c8dc7565f1544ab096b804d358a1a4e4, type: 3}
m_Name: AbsoluteStoneLayer
m_EditorClassIdentifier:
layerType: 0
layerName: Stone base layer
index: 100
blockType: 1
frequency: 32
exponent: 1
minHeight: 10
maxHeight: 26
chance: 0
structureType: 0
8 changes: 8 additions & 0 deletions Assets/Config/TerrainLayers/AbsoluteStoneLayer.asset.meta

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

24 changes: 24 additions & 0 deletions Assets/Config/TerrainLayers/AbsoluteStoneMountainLayer.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 11500000, guid: c8dc7565f1544ab096b804d358a1a4e4, type: 3}
m_Name: AbsoluteStoneMountainLayer
m_EditorClassIdentifier:
layerType: 0
layerName: Stone mountains layer
index: 150
blockType: 1
frequency: 110
exponent: 1.1
minHeight: 0
maxHeight: 26
chance: 0
structureType: 0

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

24 changes: 24 additions & 0 deletions Assets/Config/TerrainLayers/AdditiveDirtLayer.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 11500000, guid: c8dc7565f1544ab096b804d358a1a4e4, type: 3}
m_Name: AdditiveDirtLayer
m_EditorClassIdentifier:
layerType: 4
layerName: Dirt noise layer
index: 400
blockType: 2
frequency: 20
exponent: 1
minHeight: 2
maxHeight: 5
chance: 0
structureType: 0
8 changes: 8 additions & 0 deletions Assets/Config/TerrainLayers/AdditiveDirtLayer.asset.meta

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

24 changes: 24 additions & 0 deletions Assets/Config/TerrainLayers/AdditiveStoneLayer.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 11500000, guid: c8dc7565f1544ab096b804d358a1a4e4, type: 3}
m_Name: AdditiveStoneLayer
m_EditorClassIdentifier:
layerType: 4
layerName: Stone noise layer
index: 200
blockType: 1
frequency: 7
exponent: 1
minHeight: 1
maxHeight: 4
chance: 0
structureType: 0
8 changes: 8 additions & 0 deletions Assets/Config/TerrainLayers/AdditiveStoneLayer.asset.meta

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

24 changes: 24 additions & 0 deletions Assets/Config/TerrainLayers/StructureTreeLayer.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 11500000, guid: c8dc7565f1544ab096b804d358a1a4e4, type: 3}
m_Name: StructureTreeLayer
m_EditorClassIdentifier:
layerType: 2
layerName: Structure tree layer
index: 1500
blockType: 0
frequency: 0
exponent: 0
minHeight: 0
maxHeight: 0
chance: 0.01
structureType: 1
8 changes: 8 additions & 0 deletions Assets/Config/TerrainLayers/StructureTreeLayer.asset.meta

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

24 changes: 24 additions & 0 deletions Assets/Config/TerrainLayers/SurfaceGrassLayer.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 11500000, guid: c8dc7565f1544ab096b804d358a1a4e4, type: 3}
m_Name: SurfaceGrassLayer
m_EditorClassIdentifier:
layerType: 3
layerName: Surface grass layer
index: 1000
blockType: 5
frequency: 0
exponent: 0
minHeight: 0
maxHeight: 0
chance: 0
structureType: 0
8 changes: 8 additions & 0 deletions Assets/Config/TerrainLayers/SurfaceGrassLayer.asset.meta

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

22 changes: 22 additions & 0 deletions Assets/Config/TerrainLayers/TerrainLayerCollection.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 11500000, guid: ac255652e50945d8a4e0ec00804a4230, type: 3}
m_Name: TerrainLayerCollection
m_EditorClassIdentifier:
layers:
- {fileID: 11400000, guid: b294ba7c0c4a08144916c18d0f467747, type: 2}
- {fileID: 11400000, guid: 0bc928c0fbae2694a9c4c010f4687eb4, type: 2}
- {fileID: 11400000, guid: a5626c3ee64bec348a6e50deb3b467d1, type: 2}
- {fileID: 11400000, guid: a7f2d008399aab1458b1b760cf85ff0a, type: 2}
- {fileID: 11400000, guid: 5a676bee5116cc047acabfa4f7d19241, type: 2}
- {fileID: 11400000, guid: 04e8d21d759b887479e8717cf913597d, type: 2}
- {fileID: 11400000, guid: 73e6007e32e2599449c029eab6a24533, type: 2}
8 changes: 8 additions & 0 deletions Assets/Config/TerrainLayers/TerrainLayerCollection.asset.meta

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

6 changes: 3 additions & 3 deletions Assets/Materials/Shaders/VoxelShader.shader
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Shader "Custom/VoxelShader"
#define BUMP_SCALE_NOT_SUPPORTED 1

UNITY_DECLARE_TEX2DARRAY(_ColourTextures);
uniform float _uvSizes[2 * 5]; // Needs to be set from C#
uniform float _uvSizes[2 * 6]; // Needs to be set from C#
#include "Assets/Materials/Shaders/VoxelShaderInput.hlsl"
#include "Assets/Materials/Shaders/VoxelForwardPass.hlsl"
ENDHLSL
Expand Down Expand Up @@ -130,7 +130,7 @@ Shader "Custom/VoxelShader"

#include <HLSLSupport.cginc>
UNITY_DECLARE_TEX2DARRAY(_ColourTextures);
uniform float _uvSizes[2 * 5]; // Needs to be set from C#
uniform float _uvSizes[2 * 6]; // Needs to be set from C#
#include "Assets/Materials/Shaders/VoxelShaderInput.hlsl"

// vertex shader inputs
Expand Down Expand Up @@ -200,7 +200,7 @@ Shader "Custom/VoxelShader"

#include <HLSLSupport.cginc>
UNITY_DECLARE_TEX2DARRAY(_ColourTextures);
uniform float _uvSizes[2 * 5]; // Needs to be set from C#
uniform float _uvSizes[2 * 6]; // Needs to be set from C#
#include "Assets/Materials/Shaders/VoxelShaderInput.hlsl"

// vertex shader inputs
Expand Down
2 changes: 1 addition & 1 deletion Assets/Materials/TerrainMaterial.mat
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ColourTextures:
m_Texture: {fileID: 18700000, guid: 137571eea8ad30344b78e5a940d7e002, type: 3}
m_Texture: {fileID: 18700000, guid: 58639cefbc9f1ba4ba221f75bd9a0573, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
Expand Down
Binary file removed Assets/Materials/Textures/BlockTextures.png
Binary file not shown.
Binary file added Assets/Materials/Textures/SpriteSheet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

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

2 changes: 1 addition & 1 deletion Assets/Prefabs/MultiplayPlayer.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
playerInput: {fileID: -3399718007712543476}
Username: 0
username: 0
inputMovement: {x: 0, y: 0}
inputLook: {x: 0, y: 0}
inputJump: 0
Expand Down
7 changes: 6 additions & 1 deletion Assets/Prefabs/TerrainArea.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: bfdaa6c06fe64fbda2b16e07a4ee0b25, type: 3}
m_Name:
m_EditorClassIdentifier:
ComponentOverrides: []
ComponentOverrides:
- FullTypeName: Unity.Transforms.LocalTransform
EntityIndex: 0
PrefabType: -1
SendTypeOptimization: -1
VariantHash: 18225908329647095764
Binary file not shown.
19 changes: 8 additions & 11 deletions Assets/Scenes/AuthoringScene/AuthoringScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -180,18 +180,15 @@ MonoBehaviour:
- 1
- 1
- 1
seed: 44
initialAreas:
x: 4
y: 2
z: 4
playerViewRange: 2
- 1
- 1
layerCollection: {fileID: 11400000, guid: bf78fd0d717835f4ebfb0ab97738fcc3, type: 2}
seed: 42
initialColumnsX: 2
initialColumnsZ: 2
playerViewRange: 0
terrainSpawnRange: 2
maxChunkSpawnsPerTick: 50
blocksPerAreaSide: 16
YBounds:
x: 0
y: 8
maxColumnSpawnsPerTick: 8
--- !u!114 &176225512
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scenes/MainScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8bf58c69bf424fe194d229f05ce07072, type: 3}
m_Name:
m_EditorClassIdentifier:
editorArgs: -streaming_type host -emulation disabled
editorArgs: -streaming_type host -emulation disabled -debug
--- !u!1 &2101193216
GameObject:
m_ObjectHideFlags: 0
Expand Down
Loading

0 comments on commit a21adc5

Please sign in to comment.