Performance Optimization

Improved volumetric flow performance by orders of magnitude
Cleaned up old raymarching support code
Moved asteroid height calculation to vertex shader
Manual culling for asteroid field render update
This commit is contained in:
Reinier Vens 2022-07-19 18:55:17 +01:00
commit be5e7618d6
52 changed files with 1150 additions and 967 deletions

View file

@ -2,14 +2,20 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Car Paint White Small
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _MAINTEX _METALLICGLOSSMAP _NORMALMAP _OCCLUSIONMAP _PARALLAXMAP
m_ValidKeywords: []
m_InvalidKeywords:
- _MAINTEX
- _METALLICGLOSSMAP
- _NORMALMAP
- _OCCLUSIONMAP
- _PARALLAXMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
@ -64,6 +70,7 @@ Material:
type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,15 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Station Lights
m_Shader: {fileID: 4800000, guid: fe8c4273cecc4ade93ae54e087dff063, type: 3}
m_ShaderKeywords:
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
@ -62,6 +63,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpPower: 2
- _BumpScale: 1

View file

@ -2,14 +2,20 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Steel parkerized
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _MAINTEX _METALLICGLOSSMAP _NORMALMAP _OCCLUSIONMAP _PARALLAXMAP
m_ValidKeywords: []
m_InvalidKeywords:
- _MAINTEX
- _METALLICGLOSSMAP
- _NORMALMAP
- _OCCLUSIONMAP
- _PARALLAXMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
@ -64,6 +70,7 @@ Material:
type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -89,7 +89,7 @@ Material:
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _Scale: 1.6860973
- _Scale: 1.7853246
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Medium_v01
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Medium_v02
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Medium_v03
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Medium_v04
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Medium_v05
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Medium_v06
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Medium_v07
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Medium_v08
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Medium_v09
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Medium_v10
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Medium_v11
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Medium_v12
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Medium_v13
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Medium_v14
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Medium_v15
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Small_v01
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Small_v02
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Small_v03
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Small_v04
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Small_v05
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Small_v06
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Small_v07
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Small_v08
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Small_v09
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Small_v10
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Small_v11
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Small_v12
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Small_v13
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Small_v14
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

View file

@ -2,14 +2,16 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Small_v15
m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3}
m_ShaderKeywords: _NORMALMAP
m_Shader: {fileID: 4800000, guid: 7cbba296f87f57940a560e1645b402f2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
@ -59,6 +61,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5

BIN
Assets/Resources/Settings.asset (Stored with Git LFS)

Binary file not shown.

View file

@ -16239,6 +16239,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: bed3b49fe74863340b2a75f3d0517e86, type: 3}
m_Name:
m_EditorClassIdentifier:
MainCamera: {fileID: 2115559089}
WormholePrefab: {fileID: 463084220523011477, guid: 4a77c480b4bb2a148954bd57dfe91d0b,
type: 3}
EntityFadeTime: 3
@ -16370,8 +16371,8 @@ MonoBehaviour:
MaximumSize: 0.75
Spacing: 6
Ceiling: -250
Floor: -20
HeightExponent: 2
Floor: -10
HeightExponent: 3
NebulaSurfaceHeight: {fileID: 8400000, guid: 2fc21a9d3e9647948b56e384cd9378b3, type: 2}
NebulaPatchHeight: {fileID: 8400000, guid: c618a6b20b3c7394590c59a9fa467e86, type: 2}
NebulaPatch: {fileID: 8400000, guid: 06ec5ef8a5830fc44b1ac1a6e123add5, type: 2}

View file

@ -58,7 +58,7 @@ public class MiningTool : Behavior
var belt = Entity.Zone.AsteroidBelts[AsteroidBelt];
if (AsteroidBelt != Guid.Empty &&
Entity.Zone.AsteroidExists(AsteroidBelt, Asteroid) &&
length(Entity.Position.xz - belt.Positions[Asteroid].xz) - belt.Scales[Asteroid] < Range)
length(Entity.Position.xz - belt.Transforms[Asteroid].xy) - belt.Transforms[Asteroid].w < Range)
{
Entity.Zone.MineAsteroid(
Entity,

View file

@ -76,7 +76,7 @@ public class ResourceScanner : Behavior, IAlwaysUpdatedBehavior
{
if(Asteroid > -1 &&
Asteroid < beltData.Asteroids.Length &&
length(Entity.Position.xz - Entity.Zone.AsteroidBelts[ScanTarget].Positions[Asteroid].xz) < Range)
length(Entity.Position.xz - Entity.Zone.AsteroidBelts[ScanTarget].Transforms[Asteroid].xy) < Range)
{
_scanTime += dt;
if (_scanTime > ScanDuration)

View file

@ -138,11 +138,9 @@ public class Zone
foreach (var belt in AsteroidBelts)
{
Array.Copy(belt.Value.NewPositions, belt.Value.Positions, belt.Value.Positions.Length);
Array.Copy(belt.Value.NewVelocities, belt.Value.Velocities, belt.Value.Velocities.Length);
Array.Copy(belt.Value.NewScales, belt.Value.Scales, belt.Value.Scales.Length);
Array.Copy(belt.Value.NewRotations, belt.Value.Rotations, belt.Value.Rotations.Length);
BeltUpdates.Add(Task.Run(() => UpdateAsteroidTransformsAsync(belt.Key)));
Array.Copy(belt.Value.NewTransforms, belt.Value.Transforms, belt.Value.Transforms.Length);
belt.Value.OrbitPosition = belt.Value.NewOrbitPosition;
BeltUpdates.Add(Task.Run(() => UpdateAsteroidTransforms(belt.Key)));
}
foreach(var agent in Agents)
@ -200,7 +198,7 @@ public class Zone
{
var beltData = Planets[planetDataID] as AsteroidBeltData;
var asteroidPositions = AsteroidBelts[planetDataID].Positions;
var asteroidPositions = AsteroidBelts[planetDataID].Transforms;
int nearest = 0;
float nearestDistance = Single.MaxValue;
@ -219,14 +217,14 @@ public class Zone
public bool AsteroidExists(Guid planetDataID, int asteroid) => ((AsteroidBeltData) Planets[planetDataID]).Asteroids.Length > asteroid && asteroid >= 0;
private void UpdateAsteroidTransformsAsync(Guid planetDataID)
private void UpdateAsteroidTransforms(Guid planetDataID)
{
var beltData = Planets[planetDataID] as AsteroidBeltData;
var belt = AsteroidBelts[planetDataID];
var orbitData = Orbits[beltData.Orbit].Data;
var orbitPosition = GetOrbitPosition(orbitData.Parent);
belt.NewOrbitPosition = GetOrbitPosition(orbitData.Parent);
for (var i = 0; i < beltData.Asteroids.Length; i++)
{
float size;
@ -239,12 +237,11 @@ public class Zone
}
else size = Settings.AsteroidSize.Evaluate(beltData.Asteroids[i].Size);
belt.NewRotations[i] = (float) (_time * beltData.Asteroids[i].RotationSpeed % (PI * 2));
belt.NewScales[i] = size;
var rot = (float) (_time * beltData.Asteroids[i].RotationSpeed % (PI * 2));
var pos = OrbitData.Evaluate((float) frac(_time / Settings.OrbitPeriod.Evaluate(beltData.Asteroids[i].Distance) +
beltData.Asteroids[i].Phase)) * beltData.Asteroids[i].Distance + orbitPosition;
belt.NewVelocities[i] = pos - belt.Positions[i].xz;
belt.NewPositions[i] = float3(pos.x, GetHeight(pos) + Settings.AsteroidVerticalOffset, pos.y);
beltData.Asteroids[i].Phase)) * beltData.Asteroids[i].Distance + belt.NewOrbitPosition;
//belt.NewPositions[i] = float3(pos.x, GetHeight(pos) + Settings.AsteroidVerticalOffset, pos.y);
belt.NewTransforms[i] = float4(pos.x, pos.y, rot, size);
}
}
@ -470,14 +467,11 @@ public class Sun : GasGiant
public class AsteroidBelt
{
public AsteroidBeltData Data;
public float3[] Positions; // x, y, rotation, scale
public float3[] NewPositions; // x, y, rotation, scale
public float2[] Velocities;
public float2[] NewVelocities;
public float[] Rotations;
public float[] NewRotations;
public float[] Scales;
public float[] NewScales;
public float4[] Transforms; // x, y, rotation, scale
public float4[] NewTransforms; // x, y, rotation, scale
public float Radius { get; }
public float2 OrbitPosition;
public float2 NewOrbitPosition;
public Dictionary<int, float> RespawnTimers = new Dictionary<int, float>();
public Dictionary<int, float> Damage = new Dictionary<int, float>();
public Dictionary<(Entity, int), float> MiningAccumulator = new Dictionary<(Entity, int), float>();
@ -485,14 +479,9 @@ public class AsteroidBelt
public AsteroidBelt(AsteroidBeltData data)
{
Data = data;
Positions = new float3[data.Asteroids.Length];
NewPositions = new float3[data.Asteroids.Length];
Velocities = new float2[data.Asteroids.Length];
NewVelocities = new float2[data.Asteroids.Length];
Rotations = new float[data.Asteroids.Length];
NewRotations = new float[data.Asteroids.Length];
Scales = new float[data.Asteroids.Length];
NewScales = new float[data.Asteroids.Length];
Transforms = new float4[data.Asteroids.Length];
NewTransforms = new float4[data.Asteroids.Length];
Radius = data.Asteroids.Max(a => a.Distance);
}
}

View file

@ -18,6 +18,7 @@ using float2 = Unity.Mathematics.float2;
public class ZoneRenderer : MonoBehaviour
{
public Camera MainCamera;
public Transform WormholePrefab;
public float EntityFadeTime;
public Transform FogCameraParent;
@ -169,6 +170,8 @@ public class ZoneRenderer : MonoBehaviour
void Start()
{
var bigBounds = new Bounds(Vector3.zero, Vector3.one * 1024);
foreach (var mesh in AsteroidMeshes) mesh.Mesh.bounds = bigBounds;
ViewDistance = Settings.DefaultViewDistance;
MinimapDistance = Settings.MinimapZoomLevels[Settings.DefaultMinimapZoom];
@ -462,29 +465,42 @@ public class ZoneRenderer : MonoBehaviour
// {
// SlimeRenderer.SpawnPositions[i] = _suns[i].Body.transform.position.Flatland();
// }
Shader.SetGlobalFloat("_AsteroidVerticalOffset", ActionGameManager.Instance.Settings.PlanetSettings.AsteroidVerticalOffset);
foreach (var belt in Zone.AsteroidBelts)
Plane[] planes = GeometryUtility.CalculateFrustumPlanes(MainCamera);
bool isVisible(Bounds bounds) => GeometryUtility.TestPlanesAABB(planes, bounds);
foreach (var (key, belt) in Zone.AsteroidBelts)
{
var meshes = _beltMeshes[belt.Key];
var count = belt.Value.Positions.Length / meshes.Length;
for (int i = 0; i < meshes.Length; i++)
var height = Zone.GetHeight(belt.OrbitPosition);
if(isVisible(new Bounds(
new Vector3(belt.OrbitPosition.x,height,belt.OrbitPosition.y),
new Vector3(belt.Radius * 2,100,belt.Radius * 2))))
{
for (int t = 0; t < _beltMatrices[belt.Key][i].Length; t++)
var meshes = _beltMeshes[key];
var matrices = _beltMatrices[key];
var count = belt.Transforms.Length / meshes.Length;
for (int i = 0; i < meshes.Length; i++)
{
var tx = t + i * count;
_beltMatrices[belt.Key][i][t] = Matrix4x4.TRS(belt.Value.Positions[tx],
Quaternion.Euler(
cos(belt.Value.Rotations[tx] + (float) i / meshes.Length) * 100,
sin(belt.Value.Rotations[tx] + (float) i / meshes.Length) * 100,
(float) tx / belt.Value.Positions.Length * 360),
Vector3.one * belt.Value.Scales[tx]);
}
for (int t = 0; t < matrices[i].Length; t++)
{
var tx = t + i * count;
var transform = belt.Transforms[tx];
matrices[i][t] = Matrix4x4.TRS(new Vector3(transform.x,0,transform.y),
Quaternion.Euler(
cos(transform.z + (float)i / meshes.Length) * 100,
sin(transform.z + (float)i / meshes.Length) * 100,
(float)tx / belt.Transforms.Length * 360),
Vector3.one * transform.w);
}
Graphics.DrawMeshInstanced(meshes[i].Mesh, 0, meshes[i].Material, _beltMatrices[belt.Key][i]);
Graphics.DrawMeshInstanced(meshes[i].Mesh, 0, meshes[i].Material, matrices[i]);
}
}
if(_showAsteroidUI)
_beltObjects[belt.Key].Update(belt.Value.Positions);
_beltObjects[key].Update(belt.Transforms, height);
}
foreach (var planet in Planets)
@ -661,17 +677,18 @@ public class AsteroidBeltUI
//_collider.sharedMesh = _mesh;
}
public void Update(float3[] positions)
public void Update(float4[] transforms, float height)
{
var parentPosition = _zone.GetOrbitPosition(_orbitParent);
for (var i = 0; i < _belt.Data.Asteroids.Length; i++)
var parentPosition = _belt.OrbitPosition;
for (var i = 0; i < transforms.Length; i++)
{
var rotation = Quaternion.Euler(90, _belt.Rotations[i], 0);
//var position = new Vector3(_belt.Transforms[i].x, _zone.GetHeight(parentPosition), _belt.Transforms[i].y);
_vertices[i * 4] = rotation * new Vector3(-_belt.Scales[i] * _scale, -_belt.Scales[i] * _scale, 0) + (Vector3) positions[i];
_vertices[i * 4 + 1] = rotation * new Vector3(-_belt.Scales[i] * _scale, _belt.Scales[i] * _scale, 0) + (Vector3) positions[i];
_vertices[i * 4 + 2] = rotation * new Vector3(_belt.Scales[i] * _scale, _belt.Scales[i] * _scale, 0) + (Vector3) positions[i];
_vertices[i * 4 + 3] = rotation * new Vector3(_belt.Scales[i] * _scale, -_belt.Scales[i] * _scale, 0) + (Vector3) positions[i];
var transform = transforms[i];
var rotation = Quaternion.Euler(90, transform.z, 0);
var position = new Vector3(transform.x, height, transform.y);
_vertices[i * 4] = rotation * new Vector3(-transform.w * _scale, -transform.w * _scale, 0) + position;
_vertices[i * 4 + 1] = rotation * new Vector3(-transform.w * _scale, transform.w * _scale, 0) + position;
_vertices[i * 4 + 2] = rotation * new Vector3(transform.w * _scale, transform.w * _scale, 0) + position;
_vertices[i * 4 + 3] = rotation * new Vector3(transform.w * _scale, -transform.w * _scale, 0) + position;
}
_mesh.bounds = new Bounds(new Vector3(parentPosition.x, 0, parentPosition.y), Vector3.one * (_size * 2));

View file

@ -0,0 +1,80 @@
Shader "Aetheria/Asteroid"
{
Properties
{
[NoScaleOffset] _MainTex ("Texture", 2D) = "white" {}
}
CGINCLUDE
#pragma multi_compile_instancing
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc" // for UnityObjectToWorldNormal
#include "Assets/Shaders/Volumetric.cginc"
uniform float _AsteroidVerticalOffset;
struct v2f
{
float2 uv : TEXCOORD0;
half3 ambient : COLOR0;
float4 vertex : SV_POSITION;
};
v2f vert (appdata_base v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
float3 worldOrigin = mul(unity_ObjectToWorld, float4(0, 0, 0, 1.0)).xyz;
float3 worldPos = mul(unity_ObjectToWorld, float4(v.vertex.xyz, 1.0)).xyz;
const float2 uv = getUV(worldOrigin.xz);
const float surfaceDisp = tex2Dlod(_NebulaSurfaceHeight, half4(uv, 0, 0)).r;
worldPos.y += _AsteroidVerticalOffset - surfaceDisp;
o.vertex = mul(UNITY_MATRIX_VP, float4(worldPos, 1.0));
o.uv = v.texcoord;
// get vertex normal in world space
half3 worldNormal = UnityObjectToWorldNormal(v.normal);
o.ambient = VolumeSampleColorSimple(worldPos, worldNormal).rgb * 10;
return o;
}
sampler2D _MainTex;
fixed4 frag (v2f i) : SV_Target
{
// sample texture
fixed4 col = tex2D(_MainTex, i.uv);
// multiply by lighting
col.rgb *= i.ambient;
return col;
}
float4 frag_shadow(v2f i) : COLOR
{
SHADOW_CASTER_FRAGMENT(i)
}
ENDCG
SubShader
{
Pass
{
Tags {"LightMode"="ForwardBase"}
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
ENDCG
}
Pass
{
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
CGPROGRAM
#pragma vertex vert
#pragma fragment frag_shadow
ENDCG
}
}
}

View file

@ -1,10 +1,10 @@
fileFormatVersion: 2
guid: c7e80b274d611c144b9c2cebb238550b
timeCreated: 1521965851
licenseType: Free
guid: 7cbba296f87f57940a560e1645b402f2
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,5 +1,41 @@
#pragma once
#include "./CloudShaderHelper.cginc"
#include "Assets/Shaders/Volumetric.cginc"
float _ExtinctionCoefficient;
struct RaymarchStatus {
float3 intensity;
float depth;
float depthweightsum;
float intTransmittance;
};
void InitRaymarchStatus(inout RaymarchStatus result){
result.intTransmittance = 1.0f;
result.intensity = 0.0f;
result.depthweightsum = 0.00001f;
result.depth = 0.0f;
}
void IntegrateRaymarch(float3 startPos, float3 rayPos, float fade, float stepsize, inout RaymarchStatus result){
float4 c = VolumeSampleColor(rayPos);
float density = c.a;
if (density <= 0.0f)
return;
float extinction = _ExtinctionCoefficient * density / (1-fade);
float clampedExtinction = max(extinction, 1e-7);
float transmittance = exp(-extinction * stepsize);
float3 luminance = c.rgb;
float3 integScatt = (luminance - luminance * transmittance) / clampedExtinction;
float depthWeight = result.intTransmittance * (1-transmittance); //Is it a better idead to use (1-transmittance) * intTransmittance as depth weight?
result.intensity += result.intTransmittance * integScatt;
result.depth += depthWeight * length(rayPos - startPos);
result.depthweightsum += depthWeight;
result.intTransmittance *= transmittance;
}
float GetDensity(float3 startPos, float3 dir, float maxSampleDistance, float raymarchOffset, out float3 intensity,out float depth) {
float raymarchDistance = 0;
@ -14,7 +50,7 @@ float GetDensity(float3 startPos, float3 dir, float maxSampleDistance, float ray
if(raymarchDistance > maxSampleDistance) break;
float step = raymarchDistance - prevRayDist;
float3 rayPos = startPos + dir * raymarchDistance;
float fade = smoothstep(_ProjectionParams.z*.95,_ProjectionParams.z, raymarchDistance);
float fade = smoothstep(_ProjectionParams.z*.9,_ProjectionParams.z, raymarchDistance);
IntegrateRaymarch(startPos, rayPos, fade, step, result);
if (result.intTransmittance < 0.01f) {
result.intTransmittance = 0;

View file

@ -123,7 +123,6 @@ Shader "Aetheria/CloudShader"
#pragma fragment frag
#pragma multi_compile LOW_QUALITY MEDIUM_QUALITY HIGH_QUALITY
#include "./CloudShaderHelper.cginc"
#include "UnityCG.cginc"
#include "Assets/Shaders/PackFloat.cginc"

View file

@ -1,257 +0,0 @@
#include "UnityCG.cginc"
#define EARTH_RADIUS 6371000.0
#define EARTH_CENTER float3(0, -EARTH_RADIUS, 0)
#ifndef SAMPLE_COUNT
#define SAMPLE_COUNT 64
#endif
#define TRANSMITTANCE_SAMPLE_STEP 512.0f
static const float bayerOffsets[3][3] = {
{0, 7, 3},
{6, 5, 2},
{4, 1, 8}
};
//Base shape
float _CloudStartHeight;
float _CloudEndHeight;
sampler3D _BaseTex;
float _BaseTile;
sampler2D _HeightDensity;
//Detal shape
sampler3D _DetailTex;
float _DetailTile;
float _DetailStrength;
//Curl distortion
sampler2D _CurlNoise;
float _CurlTile;
float _CurlStrength;
//Top offset
float _CloudTopOffset;
//Overall cloud size.
float _CloudSize;
//Overall Density
float _CloudOverallDensity;
float _CloudCoverageModifier;
float _CloudTypeModifier;
half4 _WindDirection;
sampler2D _WeatherTex;
float _WeatherTexSize;
//Lighting
float _ScatteringCoefficient;
float _ExtinctionCoefficient;
float _SilverIntensity;
float _SilverSpread;
float SampleDensity(float3 worldPos, int lod, bool cheap, out float wetness);
float Remap(float original_value, float original_min, float original_max, float new_min, float new_max)
{
return new_min + (((original_value - original_min) / (original_max - original_min)) * (new_max - new_min));
}
float RemapClamped(float original_value, float original_min, float original_max, float new_min, float new_max)
{
return new_min + (saturate((original_value - original_min) / (original_max - original_min)) * (new_max - new_min));
}
float HeightPercent(float3 worldPos) {
float sqrMag = worldPos.x * worldPos.x + worldPos.z * worldPos.z;
float heightOffset = EARTH_RADIUS - sqrt(max(0.0, EARTH_RADIUS * EARTH_RADIUS - sqrMag));
return saturate((worldPos.y + heightOffset - _CloudStartHeight) / (_CloudEndHeight-_CloudStartHeight));
}
static float4 cloudGradients[3] = {
float4(0, 0.07, 0.08, 0.15),
float4(0, 0.2, 0.42, 0.6),
float4(0, 0.08, 0.75, 1)
};
float SampleHeight(float heightPercent,float cloudType) {
float4 gradient;
float cloudTypeVal;
if (cloudType < 0.5) {
gradient = lerp(cloudGradients[0], cloudGradients[1], cloudType*2.0);
}
else {
gradient = lerp(cloudGradients[1], cloudGradients[2], (cloudType - 0.5)*2.0);
}
return RemapClamped(heightPercent, gradient.x, gradient.y, 0.0, 1.0)
* RemapClamped(heightPercent, gradient.z, gradient.w, 1.0, 0.0);
}
float3 ApplyWind(float3 worldPos) {
float heightPercent = HeightPercent(worldPos);
// skew in wind direction
worldPos.xz -= (heightPercent) * _WindDirection.xy * _CloudTopOffset;
//animate clouds in wind direction and add a small upward bias to the wind direction
worldPos.xz -= (_WindDirection.xy + float3(0.0, 0.1, 0.0)) * _Time.y * _WindDirection.z;
worldPos.y -= _WindDirection.z * 0.4 * _Time.y;
return worldPos;
}
float HenryGreenstein(float g, float cosTheta) {
float k = 3.0 / (8.0 * 3.1415926f) * (1.0 - g * g) / (2.0 + g * g);
return k * (1.0 + cosTheta * cosTheta) / pow(abs(1.0 + g * g - 2.0 * g * cosTheta), 1.5);
}
float ApplyCoverageToDensity(float sampleResult, float coverage){
sampleResult = RemapClamped(sampleResult, 1.0 - coverage, 1.0, 0.0, 1.0);
sampleResult *= coverage;
return sampleResult;
}
#include "Assets/Shaders/Volumetric.cginc"
float _MultiScatteringA;
float _MultiScatteringB;
float _MultiScatteringC;
//We raymarch to sun using length of pattern 1,2,4,8, corresponding to step value.
//First sample(length 1) should sample at length 0.5, meaning an average inside length 1.
//Second sample should sample at 1.5, meaning an average inside [1, 2],
//Third should sample at 3.0, which is [2, 4]
//Forth at 6.0, meaning [4, 8]
static const float shadowSampleDistance[5] = {
0.5, 1.5, 3.0, 6.0, 12.0
};
static const float shadowSampleContribution[5] = {
1.0f, 1.0f, 2.0f, 4.0f, 8.0f
};
float SampleOpticsDistanceToSun(float3 worldPos) {
int mipmapOffset = 0.5;
float opticsDistance = 0.0f;
[unroll]
for (int i = 0; i < 5; i++) {
half3 direction = _WorldSpaceLightPos0;
float3 samplePoint = worldPos + direction * shadowSampleDistance[i] * TRANSMITTANCE_SAMPLE_STEP;
float wetness;
float sampleResult = SampleDensity(samplePoint, mipmapOffset, true, wetness);
opticsDistance += shadowSampleContribution[i] * TRANSMITTANCE_SAMPLE_STEP * sampleResult;
mipmapOffset += 0.5;
}
return opticsDistance;
}
float SampleEnergy(float3 worldPos, float3 viewDir) {
float opticsDistance = SampleOpticsDistanceToSun(worldPos);
float result = 0.0f;
float cosTheta = dot(viewDir, _WorldSpaceLightPos0);
[unroll]
for (int octaveIndex = 0; octaveIndex < 2; octaveIndex++) { //Multi scattering approximation from Frostbite.
float transmittance = exp(-_ExtinctionCoefficient * pow(_MultiScatteringB, octaveIndex) * opticsDistance);
float ecMult = pow(_MultiScatteringC, octaveIndex);
float phase = lerp(HenryGreenstein(.1f * ecMult, cosTheta), HenryGreenstein((0.99 - _SilverSpread) * ecMult, cosTheta), 0.5f);
result += phase * transmittance * _ScatteringCoefficient * pow(_MultiScatteringA, octaveIndex);
}
return result;
}
//Code from https://area.autodesk.com/blogs/game-dev-blog/volumetric-clouds/.
bool ray_trace_sphere(float3 center, float3 rd, float3 offset, float radius, out float t1, out float t2) {
float3 p = center - offset;
float b = dot(p, rd);
float c = dot(p, p) - (radius * radius);
float f = b * b - c;
if (f >= 0.0) {
float dem = sqrt(f);
t1 = -b - dem;
t2 = -b + dem;
return true;
}
return false;
}
bool resolve_ray_start_end(float3 ws_origin, float3 ws_ray, out float start, out float end) {
//case includes on ground, inside atm, above atm.
float ot1, ot2, it1, it2;
bool outIntersected = ray_trace_sphere(ws_origin, ws_ray, EARTH_CENTER, EARTH_RADIUS + _CloudEndHeight, ot1, ot2);
if (!outIntersected || ot2 < 0.0f)
return false; //you see nothing.
bool inIntersected = ray_trace_sphere(ws_origin, ws_ray, EARTH_CENTER, EARTH_RADIUS + _CloudStartHeight, it1, it2);
if (inIntersected) {
if (it1 * it2 < 0) {
//we're on ground.
start = max(it2, 0);
end = ot2;
}
else {
//we're inside atm, or above atm.
if (ot1 * ot2 < 0) { //Inside atm.
if (it1 > 0.0) {
//Look down.
end = it1;
}
else {
//Look up.
end = ot2;
}
start = 0.0f;
} else { //Outside atm
if (ot1 < 0.0) {
return false;
}
else {
start = ot1;
end = it1;
}
}
}
}
else {
end = ot2;
start = max(ot1, 0);
}
return true;
}
struct RaymarchStatus {
float3 intensity;
float depth;
float depthweightsum;
float intTransmittance;
};
void InitRaymarchStatus(inout RaymarchStatus result){
result.intTransmittance = 1.0f;
result.intensity = 0.0f;
result.depthweightsum = 0.00001f;
result.depth = 0.0f;
}
void IntegrateRaymarch(float3 startPos, float3 rayPos, float fade, float stepsize, inout RaymarchStatus result){
float4 c = VolumeSampleColor(rayPos);
float density = c.a;
if (density <= 0.0f)
return;
float extinction = _ExtinctionCoefficient * density;
float clampedExtinction = max(extinction, 1e-7);
float transmittance = exp(-extinction * stepsize);
float3 luminance = c.rgb * (1-fade);
float3 integScatt = (luminance - luminance * transmittance) / clampedExtinction;
float depthWeight = result.intTransmittance * (1-transmittance); //Is it a better idead to use (1-transmittance) * intTransmittance as depth weight?
result.intensity += result.intTransmittance * integScatt;
result.depth += depthWeight * length(rayPos - startPos);
result.depthweightsum += depthWeight;
result.intTransmittance *= transmittance;
}

View file

@ -142,14 +142,9 @@ void Adjust(uint2 tid : SV_DispatchThreadID)
W_out.GetDimensions(dim.x, dim.y);
float2 uv = (tid + float2(.5,.5)) / dim;
float2 globalPosXZ = (uv - .5) * _FluidTransform.z + _FluidTransform.xy;
float2 gravUV = getUV(globalPosXZ);
float3 globalPos = float3(globalPosXZ.x, -tex2Dlod(_NebulaSurfaceHeight, float4(gravUV, 0, 0)).x, globalPosXZ.y);
float2 f = flow(globalPos).xz * (_FluidTransform.z / dim.x);
float2 prevUV = uv - Delta;
//if(any(prevUV<0)||any(prevUV>1))
W_out[tid] = f;
//else W_out[tid] = lerp(U_in.SampleLevel(samplerU_in, prevUV, 0), f, Damping);
if(any(prevUV<0)||any(prevUV>1))
W_out[tid] = 0;
else W_out[tid] = U_in.SampleLevel(samplerU_in, prevUV, 0);
}

View file

@ -1,41 +1,5 @@
#include "UnityCG.cginc"
//
// Value Noise 3D Deriv
// Return value range of 0.0->1.0, with format float4( value, xderiv, yderiv, zderiv )
//
float4 Value3D_Deriv( float3 P )
{
// https://github.com/BrianSharpe/Wombat/blob/master/Value3D_Deriv.glsl
// establish our grid cell and unit position
float3 Pi = floor(P);
float3 Pf = P - Pi;
float3 Pf_min1 = Pf - 1.0;
// clamp the domain
Pi.xyz = Pi.xyz - floor(Pi.xyz * ( 1.0 / 69.0 )) * 69.0;
float3 Pi_inc1 = step( Pi, float3( (69.0 - 1.5).xxx ) ) * ( Pi + 1.0 );
// calculate the hash
float4 Pt = float4( Pi.xy, Pi_inc1.xy ) + float2( 50.0, 161.0 ).xyxy;
Pt *= Pt;
Pt = Pt.xzxz * Pt.yyww;
float2 hash_mod = float2( 1.0 / ( 635.298681 + float2( Pi.z, Pi_inc1.z ) * 48.500388 ) );
float4 hash_lowz = frac( Pt * hash_mod.xxxx );
float4 hash_highz = frac( Pt * hash_mod.yyyy );
// blend the results and return
float3 blend = Pf * Pf * Pf * (Pf * (Pf * 6.0 - 15.0) + 10.0);
float3 blendDeriv = Pf * Pf * (Pf * (Pf * 30.0 - 60.0) + 30.0);
float4 res0 = lerp( hash_lowz, hash_highz, blend.z );
float4 res1 = lerp( res0.xyxz, res0.zwyw, blend.yyxx );
float4 res3 = lerp( float4( hash_lowz.xy, hash_highz.xy ), float4( hash_lowz.zw, hash_highz.zw ), blend.y );
float2 res4 = lerp( res3.xz, res3.yw, blend.x );
return float4( res1.x, 0.0, 0.0, 0.0 ) + ( float4( res1.yyw, res4.y ) - float4( res1.xxz, res4.x ) ) * float4( blend.x, blendDeriv );
return float4(1,1,1,1);
}
uniform sampler2D _NebulaSurfaceHeight;
float4 _NebulaSurfaceHeight_TexelSize;
uniform sampler2D _NebulaPatch;
@ -73,8 +37,8 @@ uniform half _NebulaFillDensity,
_DynamicIntensity,
_DynamicSkyBoost;
float tri(in float x){return abs(frac(x)-.5);}
float3 tri3(in float3 p){return float3( tri(p.z+tri(p.y*1.)), tri(p.z+tri(p.x*1.)), tri(p.y+tri(p.x*1.)));}
inline float tri(in float x){return abs(frac(x)-.5);}
inline float3 tri3(in float3 p){return float3( tri(p.z+tri(p.y*1.)), tri(p.z+tri(p.x*1.)), tri(p.y+tri(p.x*1.)));}
float triNoise3d(in float3 p)
{
@ -90,12 +54,19 @@ float triNoise3d(in float3 p)
z *= 1.5;
p *= 1.2;
rz+= (tri(p.z+tri(p.x+tri(p.y))))/z;
rz+= tri(p.z+tri(p.x+tri(p.y)))/z;
bp += 0.14;
}
return rz;
}
float3 Tri3D( float3 P )
{
float3 t1 = normalize(tri3(P));
float3 t2 = normalize(tri3(P * 1.61803398875));
return cross(t1,t2);
}
float parabola( float x, float k )
{
return pow( 4.0*x*(1.0-x), k );
@ -120,7 +91,7 @@ float cloudDensity(float3 pos, float surfaceDisp)
const float patchDensity = saturate((-abs(pos.y+patchDisp - _NebulaFloorOffset)+patch)/_NebulaPatchBlend)*_NebulaPatchDensity;
const float floorDist = -dist;
const float floorDensity = floorDist/_NebulaFloorBlend*_NebulaFloorDensity;
const float floorDensity = floorDist/_NebulaFloorBlend;
return patchDensity + max(0,floorDensity);
}
@ -134,18 +105,31 @@ float2 flowTex(float3 pos)
return float3(fluidSample.x,0,fluidSample.y) * (512 / _FluidTransform.z);
}
float2 gravGradient (float2 uv)
{
return float2(
tex2Dlod(_NebulaSurfaceHeight, float4(uv.x + _NebulaSurfaceHeight_TexelSize.x, uv.y, 0, 0)).r - tex2Dlod(_NebulaSurfaceHeight, float4(uv.x - _NebulaSurfaceHeight_TexelSize.x, uv.y, 0, 0)).r,
tex2Dlod(_NebulaSurfaceHeight, float4(uv.x, uv.y + _NebulaSurfaceHeight_TexelSize.y, 0, 0)).r - tex2Dlod(_NebulaSurfaceHeight, float4(uv.x, uv.y - _NebulaSurfaceHeight_TexelSize.y, 0, 0)).r
);
}
float3 flow(float3 pos)
{
const float4 noiseSample1 = Value3D_Deriv( pos / _FlowScale - float3(0,_FlowScroll,0) );
const float4 noiseSample2 = Value3D_Deriv( pos / (_FlowScale * 1.61803398875) - float3(0,_FlowScroll,0) ); // make it golden
return cross(normalize(noiseSample2.yzw), normalize(noiseSample1.yzw)) * _FlowAmplitude;
float3 flowSample = Tri3D( pos / _FlowScale - float3(0,_FlowScroll,0) );
//float2 grad = normalize(gravGradient(getUV(pos.xz)));
flowSample.xyz *= .5;
flowSample.y *= .5;
// flowSample.x += grad.y;
// flowSample.z += -grad.x;
flowSample.xyz *= _FlowAmplitude;
return flowSample;
}
float tri2(in float x){return 1-2*abs(frac(x)-.5);}
float density(float3 pos)
{
float2 uv = getUV(pos.xz);
const float2 uv = getUV(pos.xz);
const float surfaceDisp = tex2Dlod(_NebulaSurfaceHeight, half4(uv, 0, 0)).r;
const float dist = pos.y + surfaceDisp;
float d = pow(abs(dist+_NebulaFillOffset)/_NebulaFillDistance,-_NebulaFillExponent) * _NebulaFillDensity;
@ -156,13 +140,13 @@ float density(float3 pos)
const float3 fl = flow(pos);
const float lerp1 = frac(_Time.y / _FlowPeriod);
const float lerp2 = frac(_Time.y / _FlowPeriod + .5);
const float noise1 = pow(triNoise3d((pos+fl * (lerp1 - .5) * _FlowPeriod) / _NebulaNoiseScale),_NebulaNoiseExponent) * _NebulaNoiseAmplitude * tri2(lerp1);
const float noise2 = pow(triNoise3d((pos+fl * (lerp2 - .5) * _FlowPeriod) / _NebulaNoiseScale),_NebulaNoiseExponent) * _NebulaNoiseAmplitude * tri2(lerp2);
const float noise1 = pow(triNoise3d((pos+fl.xyz * (lerp1 - .5) * _FlowPeriod) / _NebulaNoiseScale),_NebulaNoiseExponent) * _NebulaNoiseAmplitude * tri2(lerp1);
const float noise2 = pow(triNoise3d((pos+fl.xyz * (lerp2 - .5) * _FlowPeriod) / _NebulaNoiseScale),_NebulaNoiseExponent) * _NebulaNoiseAmplitude * tri2(lerp2);
pos.y += (noise1 + noise2) * heightFade;
const float lerp3 = frac(_Time.y / _FlowPeriod * 2 + .25);
const float lerp4 = frac(_Time.y / _FlowPeriod * 2 + .75);
const float noise3 = pow(triNoise3d((pos+fl * (lerp3 - .5) * _FlowPeriod / 2) / _NebulaNoiseScale * 8), _NebulaNoiseExponent) * _NebulaNoiseAmplitude * tri2(lerp3) / 2;
const float noise4 = pow(triNoise3d((pos+fl * (lerp4 - .5) * _FlowPeriod / 2) / _NebulaNoiseScale * 8), _NebulaNoiseExponent) * _NebulaNoiseAmplitude * tri2(lerp4) / 2;
const float noise3 = pow(triNoise3d((pos+fl.xyz * (lerp3 - .5) * _FlowPeriod / 2) / _NebulaNoiseScale * 8), _NebulaNoiseExponent) * _NebulaNoiseAmplitude * tri2(lerp3) / 2;
const float noise4 = pow(triNoise3d((pos+fl.xyz * (lerp4 - .5) * _FlowPeriod / 2) / _NebulaNoiseScale * 8), _NebulaNoiseExponent) * _NebulaNoiseAmplitude * tri2(lerp4) / 2;
pos.y -= (noise3 + noise4) * heightFade;
d += cloudDensity(pos, surfaceDisp);
}

View file

@ -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
}
}

View file

@ -0,0 +1,6 @@
{
"MonoBehaviour": {
"Version": 4,
"DisabledWarnings": ""
}
}

BIN
ProjectSettings/EditorSettings.asset (Stored with Git LFS)

Binary file not shown.

View file

@ -24,7 +24,7 @@ MonoBehaviour:
m_MinSize: {x: 400, y: 200}
m_MaxSize: {x: 32384, y: 16192}
vertical: 0
controlID: -1
controlID: 91929
--- !u!114 &2
MonoBehaviour:
m_ObjectHideFlags: 52
@ -47,9 +47,9 @@ MonoBehaviour:
m_Pos:
serializedVersion: 2
x: 71
y: 394
y: 401
width: 1109
height: 645
height: 638
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@ -64,11 +64,11 @@ MonoBehaviour:
m_TextureFilterMode: 0
m_TextureHideFlags: 61
m_RenderIMGUI: 1
m_EnterPlayModeBehavior: 0
m_EnterPlayModeBehavior: 1
m_UseMipMap: 0
m_VSyncEnabled: 0
m_Gizmos: 0
m_Stats: 0
m_Stats: 1
m_SelectedSizes: 0a000000000000000000000000000000000000000000000000000000000000000000000000000000
m_ZoomArea:
m_HRangeLocked: 0
@ -97,22 +97,22 @@ MonoBehaviour:
x: 0
y: 21
width: 1109
height: 624
m_Scale: {x: 0.5776042, y: 0.5776042}
m_Translation: {x: 554.5, y: 312}
height: 617
m_Scale: {x: 0.5712963, y: 0.5712963}
m_Translation: {x: 554.5, y: 308.5}
m_MarginLeft: 0
m_MarginRight: 0
m_MarginTop: 0
m_MarginBottom: 0
m_LastShownAreaInsideMargins:
serializedVersion: 2
x: -960
y: -540.1623
width: 1920
height: 1080.3246
x: -970.59973
y: -540
width: 1941.1995
height: 1080
m_MinimalGUI: 1
m_defaultScale: 0.5776042
m_LastWindowPixelSize: {x: 1109, y: 645}
m_defaultScale: 0.5712963
m_LastWindowPixelSize: {x: 1109, y: 638}
m_ClearInEditMode: 1
m_NoCameraWarning: 1
m_LowResolutionForAspectRatios: 01000000000000000000
@ -142,7 +142,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192}
vertical: 0
controlID: -1
controlID: 91930
--- !u!114 &4
MonoBehaviour:
m_ObjectHideFlags: 52
@ -167,7 +167,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 16192, y: 16192}
vertical: 1
controlID: -1
controlID: 91931
--- !u!114 &5
MonoBehaviour:
m_ObjectHideFlags: 52
@ -188,11 +188,11 @@ MonoBehaviour:
x: 0
y: 0
width: 1110
height: 321
height: 328
m_MinSize: {x: 200, y: 100}
m_MaxSize: {x: 16192, y: 8096}
vertical: 0
controlID: 15553
controlID: 91932
--- !u!114 &6
MonoBehaviour:
m_ObjectHideFlags: 52
@ -211,7 +211,7 @@ MonoBehaviour:
x: 0
y: 0
width: 708
height: 321
height: 328
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 7}
@ -243,7 +243,7 @@ MonoBehaviour:
x: 71
y: 73
width: 707
height: 300
height: 307
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@ -467,9 +467,9 @@ MonoBehaviour:
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: 40.814148, y: -860.6872, z: -1186.4028}
m_Target: {x: -5936.0327, y: -395.84363, z: 5086.9893}
speed: 2
m_Value: {x: 40.814148, y: -860.6872, z: -1186.4028}
m_Value: {x: -5936.0327, y: -395.84363, z: 5086.9893}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
@ -516,13 +516,13 @@ MonoBehaviour:
m_GridAxis: 1
m_gridOpacity: 0.5
m_Rotation:
m_Target: {x: -0.15218943, y: 0.08171465, z: -0.012626634, w: -0.9849056}
m_Target: {x: -0.010432282, y: -0.98870355, z: -0.08294214, w: 0.124663696}
speed: 2
m_Value: {x: -0.15218659, y: 0.081713125, z: -0.012626397, w: -0.9848872}
m_Value: {x: 0.010432282, y: 0.9887036, z: 0.08294214, w: -0.124663696}
m_Size:
m_Target: 395.6218
m_Target: 192.96298
speed: 2
m_Value: 395.6218
m_Value: 192.96298
m_Ortho:
m_Target: 0
speed: 2
@ -537,8 +537,8 @@ MonoBehaviour:
m_AccelerationEnabled: 1
m_FieldOfViewHorizontalOrVertical: 60
m_NearClip: 0.03
m_FarClip: 10000
m_DynamicClip: 1
m_FarClip: 4096
m_DynamicClip: 0
m_OcclusionCulling: 0
m_LastSceneViewRotation: {x: 0, y: 0, z: 0, w: 0}
m_LastSceneViewOrtho: 0
@ -565,7 +565,7 @@ MonoBehaviour:
x: 708
y: 0
width: 402
height: 321
height: 328
m_MinSize: {x: 102, y: 121}
m_MaxSize: {x: 4002, y: 4021}
m_ActualView: {fileID: 9}
@ -597,7 +597,7 @@ MonoBehaviour:
x: 779
y: 73
width: 400
height: 300
height: 307
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@ -618,9 +618,9 @@ MonoBehaviour:
m_Position:
serializedVersion: 2
x: 0
y: 321
y: 328
width: 1110
height: 666
height: 659
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 2}
@ -652,7 +652,7 @@ MonoBehaviour:
m_MinSize: {x: 100, y: 200}
m_MaxSize: {x: 8096, y: 16192}
vertical: 1
controlID: 15490
controlID: 91874
--- !u!114 &12
MonoBehaviour:
m_ObjectHideFlags: 52
@ -672,8 +672,8 @@ MonoBehaviour:
y: 0
width: 392
height: 534
m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021}
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 13}
m_Panes:
- {fileID: 13}
@ -711,9 +711,9 @@ MonoBehaviour:
m_SceneHierarchy:
m_TreeViewState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_SelectedIDs: 066b0000
m_LastClickedID: 0
m_ExpandedIDs: c87bfaff5eacfaff96cafaff8c29fcffac29fcff5c5dfcff34fcfcffc033fdffa0a4fdffaaccfdff6c5cfefffa14ffff9422ffff7c24ffffa827ffffde28ffff8a2cffffa653ffff0891ffffdcfaffff82ae0000deae000062b40000f2b400001cc80000e6e20000bce5000020eb000008ec000030ef00008cef0000dc630100f8e10100906b02007a940200a4c7020080cc0200b4ce0200c2cf0200b8d3020016d40200382e0300e22e03009a330300
m_ExpandedIDs: 5e71f1ffe454f2ff2082f6ff1e92f7ffac95f7ff1a99f7ff80f8f7ffae6af8ff6670f8ffda91f9ff1897f9ffd0bff9ff22c0f9ff8ec8f9fff4c9f9ffa26dfaffc87bfaff5eacfaff96cafaff8c29fcffac29fcff5c5dfcff34fcfcffc033fdffa0a4fdffaaccfdff6c5cfefffa14ffff9422ffff7c24ffffa827ffffde28ffff8a2cffffa653ffff0891ffffdcfaffff82ae0000deae000062b40000f2b400001cc80000e6e20000bce5000020eb000008ec000030ef00008cef0000dc630100f8e10100906b02007a940200a4c7020080cc0200b4ce0200c2cf0200b8d3020016d40200382e0300e22e03009a33030088520300d8ef03007c3804009680040056830400f4c90400b4cc0400a001050052f00500
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -805,22 +805,22 @@ MonoBehaviour:
m_SkipHidden: 0
m_SearchArea: 1
m_Folders:
- Assets/Scenes
- Assets/Resources
m_Globs: []
m_OriginalText:
m_ViewMode: 1
m_StartGridSize: 16
m_LastFolders:
- Assets/Scenes
- Assets/Resources
m_LastFoldersGridSize: 16
m_LastProjectPath: E:\Projects\Aetheria-Economy
m_LockTracker:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 479}
m_SelectedIDs: 247f0000
m_LastClickedID: 32548
m_ExpandedIDs: 00000000b27e0000b47e0000b67e0000b87e0000ba7e0000bc7e0000be7e0000267f0000287f0000c8910000e298000000ca9a3b
scrollPos: {x: 0, y: 447}
m_SelectedIDs: bc7e0000
m_LastClickedID: 32444
m_ExpandedIDs: 00000000b27e0000b47e0000b67e0000b87e0000ba7e0000bc7e0000be7e0000f07e0000287f000082810000388a0000c891000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -848,7 +848,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 00000000b27e0000b47e0000b67e0000b87e0000ba7e0000bc7e0000be7e0000287f0000c891000000ca9a3b
m_ExpandedIDs: 00000000b27e0000b47e0000b67e0000b87e0000ba7e0000bc7e0000be7e0000f07e0000287f000082810000388a0000c891000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -873,8 +873,8 @@ MonoBehaviour:
m_Icon: {fileID: 0}
m_ResourceFile:
m_ListAreaState:
m_SelectedInstanceIDs:
m_LastClickedInstanceID: 0
m_SelectedInstanceIDs: 066b0000
m_LastClickedInstanceID: 27398
m_HadKeyboardFocusLastEvent: 1
m_ExpandedInstanceIDs: c6230000b2db0000fefa00000cfb0000
m_RenameOverlay:
@ -900,7 +900,7 @@ MonoBehaviour:
m_Icon: {fileID: 0}
m_ResourceFile:
m_NewAssetIndexInList: -1
m_ScrollPosition: {x: 0, y: 0}
m_ScrollPosition: {x: 0, y: 79}
m_GridSize: 16
m_SkipHiddenPackages: 0
m_DirectoriesAreaWidth: 177

File diff suppressed because it is too large Load diff