Live Demo Tweaks
Copied Main Menu to gameplay scene Added Pause functionality (ESC key) Save & Restore discovered zones Applied vertical offset to asteroids (no more intersections!) Nebula shader optimized to improve early exit Nebula shader outputs light scattering to second render target Modified depth of field shader to use nebula light scattering
This commit is contained in:
parent
968783bf9c
commit
ca1ce9859d
47 changed files with 5106 additions and 2385 deletions
|
|
@ -48,7 +48,7 @@ Material:
|
|||
- _GridCeilingDensity: 0.01
|
||||
- _GridCeilingFollow: 0
|
||||
- _GridCeilingOffset: 0
|
||||
- _GridFillDensity: 0.00002
|
||||
- _GridFillDensity: 0.00001
|
||||
- _GridFloorBlend: 39.6
|
||||
- _GridFloorDensity: 1
|
||||
- _GridFloorOffset: 27.55
|
||||
|
|
@ -58,8 +58,12 @@ Material:
|
|||
- _NoiseSpeed: 0.01
|
||||
- _NoiseStrength: 150
|
||||
- _SafetyDistance: 50
|
||||
- _Scattering: 50
|
||||
- _ScatteringDensityExponent: 8
|
||||
- _ScatteringDistExponent: 0.5
|
||||
- _ScatteringMinDist: 1
|
||||
- _StepExponent: 2
|
||||
- _TintExponent: 8
|
||||
- _TintExponent: 12
|
||||
m_Colors:
|
||||
- _Tint: {r: 0.447, g: 0.447, b: 0.447, a: 1}
|
||||
- _Tint: {r: 0.3932651, g: 0.3932651, b: 0.3932651, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
|
|||
|
|
@ -43,23 +43,27 @@ Material:
|
|||
- _AlphaFloor: 0.01
|
||||
- _DepthBlend: 512
|
||||
- _DepthCeiling: 4096
|
||||
- _Gamma: 0.7
|
||||
- _Gamma: 0.5
|
||||
- _GridCeilingBlend: -300
|
||||
- _GridCeilingDensity: 0.01
|
||||
- _GridCeilingFollow: 0
|
||||
- _GridCeilingOffset: 0
|
||||
- _GridFillDensity: 0.000002
|
||||
- _GridFloorBlend: 500
|
||||
- _GridFloorDensity: 16
|
||||
- _GridFloorBlend: 50
|
||||
- _GridFloorDensity: 1
|
||||
- _GridFloorOffset: 0
|
||||
- _GridPatchBlend: 5
|
||||
- _GridPatchDensity: 0.2
|
||||
- _NoiseFrequency: 0.01
|
||||
- _NoiseSpeed: 0.02
|
||||
- _NoiseStrength: 75
|
||||
- _SafetyDistance: 35
|
||||
- _NoiseStrength: 100
|
||||
- _SafetyDistance: 53.73
|
||||
- _Scattering: 1.25
|
||||
- _ScatteringDensityExponent: 0.5
|
||||
- _ScatteringDistExponent: 0.5
|
||||
- _ScatteringMinDist: 500
|
||||
- _StepExponent: 2
|
||||
- _TintExponent: 8
|
||||
m_Colors:
|
||||
- _Tint: {r: 0.2509804, g: 0.2509804, b: 0.2509804, a: 1}
|
||||
- _Tint: {r: 0.29799998, g: 0.29799998, b: 0.29799998, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ Material:
|
|||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _Scale: 2.049001
|
||||
- _Scale: 2.2132032
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
|
|
|
|||
8
Assets/Plugins/MrtTest.meta
Normal file
8
Assets/Plugins/MrtTest.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3209431a2d3430b44bf21503301d6078
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
53
Assets/Plugins/MrtTest/MrtTest.cs
Normal file
53
Assets/Plugins/MrtTest/MrtTest.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
using UnityEngine;
|
||||
|
||||
[ExecuteInEditMode]
|
||||
public class MrtTest : MonoBehaviour
|
||||
{
|
||||
[SerializeField] Shader _shader;
|
||||
|
||||
Material _material;
|
||||
RenderBuffer[] _mrt;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
var shader = Shader.Find("Hidden/MrtTest");
|
||||
_material = new Material(shader);
|
||||
_material.hideFlags = HideFlags.DontSave;
|
||||
_mrt = new RenderBuffer[2];
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
DestroyImmediate(_material);
|
||||
_material = null;
|
||||
_mrt = null;
|
||||
}
|
||||
|
||||
void OnRenderImage(RenderTexture source, RenderTexture destination)
|
||||
{
|
||||
var rt1 = RenderTexture.GetTemporary(source.width, source.height, 0, RenderTextureFormat.Default);
|
||||
var rt2 = RenderTexture.GetTemporary(source.width, source.height, 0, RenderTextureFormat.DefaultHDR);
|
||||
|
||||
_mrt[0] = rt1.colorBuffer;
|
||||
_mrt[1] = rt2.colorBuffer;
|
||||
|
||||
// Blit with a MRT.
|
||||
Graphics.SetRenderTarget(_mrt, rt1.depthBuffer);
|
||||
Graphics.Blit(null, _material, 0);
|
||||
|
||||
// Combine them and output to the destination.
|
||||
_material.SetTexture("_SecondTex", rt1);
|
||||
_material.SetTexture("_ThirdTex", rt2);
|
||||
Graphics.Blit(source, destination, _material, 1);
|
||||
|
||||
RenderTexture.ReleaseTemporary(rt1);
|
||||
RenderTexture.ReleaseTemporary(rt2);
|
||||
}
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
var text = "Supported MRT count: ";
|
||||
text += SystemInfo.supportedRenderTargetCount;
|
||||
GUI.Label(new Rect(0, 0, 200, 200), text);
|
||||
}
|
||||
}
|
||||
13
Assets/Plugins/MrtTest/MrtTest.cs.meta
Normal file
13
Assets/Plugins/MrtTest/MrtTest.cs.meta
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8f1af47a39a6d4be9bae115859a31ef0
|
||||
timeCreated: 1460617732
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences:
|
||||
- _shader: {fileID: 4800000, guid: 9bcc79947d2854ebc8116bf2947b737e, type: 3}
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
62
Assets/Plugins/MrtTest/MrtTest.shader
Normal file
62
Assets/Plugins/MrtTest/MrtTest.shader
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
Shader "Hidden/MrtTest"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex("", 2D) = "white"{}
|
||||
_SecondTex("", 2D) = "white"{}
|
||||
_ThirdTex("", 2D) = "white"{}
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
sampler2D _MainTex;
|
||||
sampler2D _SecondTex;
|
||||
sampler2D _ThirdTex;
|
||||
|
||||
// MRT shader
|
||||
struct FragmentOutput
|
||||
{
|
||||
half4 dest0 : SV_Target0;
|
||||
half4 dest1 : SV_Target1;
|
||||
};
|
||||
|
||||
FragmentOutput frag_mrt(v2f_img i) : SV_Target
|
||||
{
|
||||
FragmentOutput o;
|
||||
o.dest0 = frac(i.uv.x * 10);
|
||||
o.dest1 = frac(i.uv.y * 10);
|
||||
return o;
|
||||
}
|
||||
|
||||
// Simple combiner
|
||||
half4 frag_combine(v2f_img i) : SV_Target
|
||||
{
|
||||
half4 t1 = tex2D(_MainTex, i.uv);
|
||||
half4 t2 = tex2D(_SecondTex, i.uv);
|
||||
half4 t3 = tex2D(_ThirdTex, i.uv);
|
||||
return half4(t1.r, t2.g, t3.b, 1);
|
||||
}
|
||||
|
||||
ENDCG
|
||||
|
||||
SubShader
|
||||
{
|
||||
Cull Off ZWrite Off ZTest Always
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert_img
|
||||
#pragma fragment frag_mrt
|
||||
ENDCG
|
||||
}
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert_img
|
||||
#pragma fragment frag_combine
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
9
Assets/Plugins/MrtTest/MrtTest.shader.meta
Normal file
9
Assets/Plugins/MrtTest/MrtTest.shader.meta
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9bcc79947d2854ebc8116bf2947b737e
|
||||
timeCreated: 1460617199
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1441
Assets/Plugins/MrtTest/Test.unity
Normal file
1441
Assets/Plugins/MrtTest/Test.unity
Normal file
File diff suppressed because it is too large
Load diff
8
Assets/Plugins/MrtTest/Test.unity.meta
Normal file
8
Assets/Plugins/MrtTest/Test.unity.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 986bd956041654cbda974b84dff2c951
|
||||
timeCreated: 1460618534
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2010
Assets/Prefabs/UI/Main Menu Canvas.prefab
Normal file
2010
Assets/Prefabs/UI/Main Menu Canvas.prefab
Normal file
File diff suppressed because it is too large
Load diff
7
Assets/Prefabs/UI/Main Menu Canvas.prefab.meta
Normal file
7
Assets/Prefabs/UI/Main Menu Canvas.prefab.meta
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3d8d9cbf10b12214e98891c1f03c1e99
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1133,13 +1133,21 @@
|
|||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": ""
|
||||
},
|
||||
{
|
||||
"name": "MainMenu",
|
||||
"type": "Button",
|
||||
"id": "a626132e-6205-4abb-9a45-4cce6446958b",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": ""
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
{
|
||||
"name": "",
|
||||
"id": "7eadec25-7b3f-4d69-92b7-c756f5f9b0dd",
|
||||
"path": "<Keyboard>/m",
|
||||
"path": "<Keyboard>/tab",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
|
|
@ -1168,6 +1176,17 @@
|
|||
"action": "Dock",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "7de0bb82-5492-49aa-aa56-8562b58ba8a8",
|
||||
"path": "<Keyboard>/escape",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "MainMenu",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
BIN
Assets/Resources/Settings.asset
(Stored with Git LFS)
BIN
Assets/Resources/Settings.asset
(Stored with Git LFS)
Binary file not shown.
|
|
@ -735,10 +735,10 @@ RectTransform:
|
|||
m_Father: {fileID: 1783772015}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 527.51, y: -40}
|
||||
m_SizeDelta: {x: 329.91, y: 56}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &101395091
|
||||
MonoBehaviour:
|
||||
|
|
@ -6258,12 +6258,12 @@ MonoBehaviour:
|
|||
Exponent: 0.25
|
||||
Minimum: 0
|
||||
Maximum: 1
|
||||
MaxTemperature: 1000
|
||||
FitToContent: 1
|
||||
CellHitPulseTime: 0.5
|
||||
ToggleEnabledColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
ToggleDisabledColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
CellBackgroundColor: {r: 0, g: 0, b: 0, a: 0.9490196}
|
||||
MinTempRange: 0
|
||||
EmptyCells: []
|
||||
--- !u!1 &411347518
|
||||
GameObject:
|
||||
|
|
@ -8848,6 +8848,447 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 582989120}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1001 &588628535
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 350889890962861326, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 350889890962861326, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 350889891057474423, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: -447.9852
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 350889891632477145, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 350889891632477145, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 350889891632477145, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 400
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 350889891632477145, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 447.9852
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 350889891632477145, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 200
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 350889891632477145, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -368.0074
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 804161809680780933, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 804161809680780933, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 804161809680780933, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 111.35
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 804161809680780933, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 55.675
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 804161809680780933, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -16
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 804161809870766536, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 804161809870766536, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 804161809870766536, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 121.96
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 804161809870766536, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 60.98
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 804161809870766536, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -16
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2381176779129949493, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2381176779129949493, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2381176779129949493, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 121.96
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2381176779129949493, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 208.72002
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2381176779129949493, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -16
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2381176780008325752, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2381176780008325752, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2381176780008325752, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 111.35
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2381176780008325752, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 55.675
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2381176780008325752, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -16
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3664209305474245377, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3664209305474245377, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3664209305474245377, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 57.96
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3664209305474245377, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 60.98
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3664209305474245377, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -16
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3664209306888449100, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3664209306888449100, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3664209306888449100, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 47.35
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3664209306888449100, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 55.675
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3664209306888449100, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -16
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043449861658, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 90.91
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584178, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: InGame
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584179, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584191, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Main Menu Canvas
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043457584191, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043829246279, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043829246279, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043829246279, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 269.7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043829246279, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 26.91
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043829246279, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 142.85
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043829246279, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -21.455
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043924106331, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043924106331, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043924106331, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 36.390015
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226043924106331, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 129.54501
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226044611060154, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226044611060154, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226044611060154, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 269.7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226044611060154, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 32
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226044611060154, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 142.85
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4533226044611060154, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -66.91
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7329274283166941234, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7329274283166941234, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7329274283166941234, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 448.32
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7329274283166941234, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 144.0148
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 3d8d9cbf10b12214e98891c1f03c1e99, type: 3}
|
||||
--- !u!114 &588628536 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 4533226043457584178, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 588628535}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3d7c7b928d043a3449b93bce9de03d1c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &594274405
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -9085,7 +9526,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &630131159
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -13278,10 +13719,10 @@ RectTransform:
|
|||
m_Father: {fileID: 1783772015}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 960.13495, y: -40}
|
||||
m_SizeDelta: {x: 146.84, y: 56}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &931657852
|
||||
MonoBehaviour:
|
||||
|
|
@ -14795,9 +15236,11 @@ MonoBehaviour:
|
|||
FollowCamera: {fileID: 887677622}
|
||||
WormholeCamera: {fileID: 1644480539}
|
||||
GameplayUI: {fileID: 346000248}
|
||||
MainMenu: {fileID: 588628536}
|
||||
Menu: {fileID: 1726632268}
|
||||
MenuMap: {fileID: 630131162}
|
||||
SectorMap: {fileID: 2132980328}
|
||||
VolumeRenderer: {fileID: 2115559093}
|
||||
SchematicDisplay: {fileID: 7628189704109037584}
|
||||
TargetSchematicDisplay: {fileID: 410701129}
|
||||
Inventory: {fileID: 1997243495}
|
||||
|
|
@ -15063,13 +15506,13 @@ MonoBehaviour:
|
|||
TargetCamera: {fileID: 2115559089}
|
||||
ParticleCalculation: {fileID: 7200000, guid: f53a4ba56f0db2a49ad9f68150bf298a, type: 3}
|
||||
ParticleMaterial: {fileID: 2100000, guid: fc00c35c3c370774c88d55240b6538ce, type: 2}
|
||||
Span: 256
|
||||
Speed: 0.125
|
||||
MinimumSize: 0.5
|
||||
MaximumSize: 3
|
||||
Spacing: 16
|
||||
Span: 512
|
||||
Speed: 0.25
|
||||
MinimumSize: 1
|
||||
MaximumSize: 1
|
||||
Spacing: 8
|
||||
Ceiling: -400
|
||||
Floor: 5
|
||||
Floor: -30
|
||||
HeightExponent: 1000
|
||||
Heightmap: {fileID: 8400000, guid: 2fc21a9d3e9647948b56e384cd9378b3, type: 2}
|
||||
ParticleColors: {fileID: 2800000, guid: 56db63da398b2d04394ddbccedce943c, type: 3}
|
||||
|
|
@ -15726,7 +16169,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!4 &1066823974
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -16456,8 +16899,8 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -80}
|
||||
m_SizeDelta: {x: 0, y: 50}
|
||||
m_AnchoredPosition: {x: 8, y: -80}
|
||||
m_SizeDelta: {x: -16, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!1 &1156729697
|
||||
GameObject:
|
||||
|
|
@ -16959,168 +17402,6 @@ MonoBehaviour:
|
|||
m_FlexibleWidth: -1
|
||||
m_FlexibleHeight: -1
|
||||
m_LayoutPriority: 1
|
||||
--- !u!1001 &1175122070
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 2056162322}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3462739465108434284, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Text Button
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 128
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 32
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434287, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_text
|
||||
value: Preview Path
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434287, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_fontSize
|
||||
value: 18
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434287, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_fontSizeBase
|
||||
value: 18
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434287, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_VerticalAlignment
|
||||
value: 512
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3462739465108434287, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
propertyPath: m_HorizontalAlignment
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: c7113183a38d6f84b8ffe6fa7c342896, type: 3}
|
||||
--- !u!224 &1175122071 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 3462739465108434285, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1175122070}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &1175122072 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 3462739465108434286, guid: c7113183a38d6f84b8ffe6fa7c342896,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1175122070}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &1176624628 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 3501282941175030939, guid: 2758dfa2744d7ad4d8877545189d116e,
|
||||
|
|
@ -17898,6 +18179,11 @@ PrefabInstance:
|
|||
propertyPath: m_Layer
|
||||
value: 13
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6977256487485077368, guid: efd1f097ce29ffa48bb0045d6502f55d,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6977256487485077373, guid: efd1f097ce29ffa48bb0045d6502f55d,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
|
|
@ -19410,10 +19696,10 @@ RectTransform:
|
|||
m_Father: {fileID: 1783772015}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 1145.4999, y: -40}
|
||||
m_SizeDelta: {x: 223.89, y: 56}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1399108419
|
||||
MonoBehaviour:
|
||||
|
|
@ -20455,10 +20741,10 @@ RectTransform:
|
|||
m_Father: {fileID: 1783772015}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 789.58997, y: -40}
|
||||
m_SizeDelta: {x: 194.25, y: 56}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1464157086
|
||||
MonoBehaviour:
|
||||
|
|
@ -21639,12 +21925,12 @@ PrefabInstance:
|
|||
- target: {fileID: 878382121558056004, guid: 2758dfa2744d7ad4d8877545189d116e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 878382121558056004, guid: 2758dfa2744d7ad4d8877545189d116e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 878382121558056004, guid: 2758dfa2744d7ad4d8877545189d116e,
|
||||
type: 3}
|
||||
|
|
@ -21659,12 +21945,12 @@ PrefabInstance:
|
|||
- target: {fileID: 878382121558056004, guid: 2758dfa2744d7ad4d8877545189d116e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 55.675
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 878382121558056004, guid: 2758dfa2744d7ad4d8877545189d116e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -16
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1713457305180270767, guid: 2758dfa2744d7ad4d8877545189d116e,
|
||||
type: 3}
|
||||
|
|
@ -22808,12 +23094,12 @@ PrefabInstance:
|
|||
- target: {fileID: 878382121558056004, guid: 2758dfa2744d7ad4d8877545189d116e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 878382121558056004, guid: 2758dfa2744d7ad4d8877545189d116e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 878382121558056004, guid: 2758dfa2744d7ad4d8877545189d116e,
|
||||
type: 3}
|
||||
|
|
@ -22828,12 +23114,12 @@ PrefabInstance:
|
|||
- target: {fileID: 878382121558056004, guid: 2758dfa2744d7ad4d8877545189d116e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 60.98
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 878382121558056004, guid: 2758dfa2744d7ad4d8877545189d116e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -16
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1713457305180270767, guid: 2758dfa2744d7ad4d8877545189d116e,
|
||||
type: 3}
|
||||
|
|
@ -24232,7 +24518,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1726632265
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -27131,13 +27417,9 @@ MonoBehaviour:
|
|||
ZoomSpeed: 0.025
|
||||
MinViewSize: 0.1
|
||||
MaxViewSize: 2
|
||||
PathAnimationButton: {fileID: 1175122072}
|
||||
PathAnimationDamping: 0.01
|
||||
PathAnimationDuration: 30
|
||||
PathAnimationDurationPadding: 1.1
|
||||
LegendPanel: {fileID: 1005841431}
|
||||
LinkAnimationDuration: 1
|
||||
IconAnimationDuration: 0.5
|
||||
LinkAnimationDuration: 0.5
|
||||
IconAnimationDuration: 0.25
|
||||
--- !u!222 &1998350932
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -27629,7 +27911,6 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 1998350929}
|
||||
- {fileID: 1005841432}
|
||||
- {fileID: 1175122071}
|
||||
m_Father: {fileID: 1726632265}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
@ -34846,12 +35127,12 @@ MonoBehaviour:
|
|||
Exponent: 0.25
|
||||
Minimum: 0
|
||||
Maximum: 1
|
||||
MaxTemperature: 1000
|
||||
FitToContent: 1
|
||||
CellHitPulseTime: 0.5
|
||||
ToggleEnabledColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
ToggleDisabledColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
CellBackgroundColor: {r: 0, g: 0, b: 0, a: 0.9490196}
|
||||
MinTempRange: 0
|
||||
EmptyCells: []
|
||||
--- !u!114 &7628189704109037583
|
||||
MonoBehaviour:
|
||||
|
|
|
|||
BIN
Assets/Scenes/ARPG_Profiles/Postprocessing Profile Main Menu.asset
(Stored with Git LFS)
BIN
Assets/Scenes/ARPG_Profiles/Postprocessing Profile Main Menu.asset
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/Scenes/ARPG_Profiles/Postprocessing Profile.asset
(Stored with Git LFS)
BIN
Assets/Scenes/ARPG_Profiles/Postprocessing Profile.asset
(Stored with Git LFS)
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
|
@ -1146,13 +1146,21 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
""expectedControlType"": ""Button"",
|
||||
""processors"": """",
|
||||
""interactions"": """"
|
||||
},
|
||||
{
|
||||
""name"": ""MainMenu"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""a626132e-6205-4abb-9a45-4cce6446958b"",
|
||||
""expectedControlType"": ""Button"",
|
||||
""processors"": """",
|
||||
""interactions"": """"
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""7eadec25-7b3f-4d69-92b7-c756f5f9b0dd"",
|
||||
""path"": ""<Keyboard>/m"",
|
||||
""path"": ""<Keyboard>/tab"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""Keyboard&Mouse"",
|
||||
|
|
@ -1181,6 +1189,17 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
""action"": ""Dock"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""7de0bb82-5492-49aa-aa56-8562b58ba8a8"",
|
||||
""path"": ""<Keyboard>/escape"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""Keyboard&Mouse"",
|
||||
""action"": ""MainMenu"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1268,6 +1287,7 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
m_Global_MapToggle = m_Global.FindAction("Map Toggle", throwIfNotFound: true);
|
||||
m_Global_Inventory = m_Global.FindAction("Inventory", throwIfNotFound: true);
|
||||
m_Global_Dock = m_Global.FindAction("Dock", throwIfNotFound: true);
|
||||
m_Global_MainMenu = m_Global.FindAction("MainMenu", throwIfNotFound: true);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
|
@ -1634,6 +1654,7 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
private readonly InputAction m_Global_MapToggle;
|
||||
private readonly InputAction m_Global_Inventory;
|
||||
private readonly InputAction m_Global_Dock;
|
||||
private readonly InputAction m_Global_MainMenu;
|
||||
public struct GlobalActions
|
||||
{
|
||||
private @AetheriaInput m_Wrapper;
|
||||
|
|
@ -1641,6 +1662,7 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
public InputAction @MapToggle => m_Wrapper.m_Global_MapToggle;
|
||||
public InputAction @Inventory => m_Wrapper.m_Global_Inventory;
|
||||
public InputAction @Dock => m_Wrapper.m_Global_Dock;
|
||||
public InputAction @MainMenu => m_Wrapper.m_Global_MainMenu;
|
||||
public InputActionMap Get() { return m_Wrapper.m_Global; }
|
||||
public void Enable() { Get().Enable(); }
|
||||
public void Disable() { Get().Disable(); }
|
||||
|
|
@ -1659,6 +1681,9 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
@Dock.started -= m_Wrapper.m_GlobalActionsCallbackInterface.OnDock;
|
||||
@Dock.performed -= m_Wrapper.m_GlobalActionsCallbackInterface.OnDock;
|
||||
@Dock.canceled -= m_Wrapper.m_GlobalActionsCallbackInterface.OnDock;
|
||||
@MainMenu.started -= m_Wrapper.m_GlobalActionsCallbackInterface.OnMainMenu;
|
||||
@MainMenu.performed -= m_Wrapper.m_GlobalActionsCallbackInterface.OnMainMenu;
|
||||
@MainMenu.canceled -= m_Wrapper.m_GlobalActionsCallbackInterface.OnMainMenu;
|
||||
}
|
||||
m_Wrapper.m_GlobalActionsCallbackInterface = instance;
|
||||
if (instance != null)
|
||||
|
|
@ -1672,6 +1697,9 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
@Dock.started += instance.OnDock;
|
||||
@Dock.performed += instance.OnDock;
|
||||
@Dock.canceled += instance.OnDock;
|
||||
@MainMenu.started += instance.OnMainMenu;
|
||||
@MainMenu.performed += instance.OnMainMenu;
|
||||
@MainMenu.canceled += instance.OnMainMenu;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1747,5 +1775,6 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
void OnMapToggle(InputAction.CallbackContext context);
|
||||
void OnInventory(InputAction.CallbackContext context);
|
||||
void OnDock(InputAction.CallbackContext context);
|
||||
void OnMainMenu(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,15 +83,17 @@ public class ActionGameManager : MonoBehaviour
|
|||
public Prototype LockIndicator;
|
||||
public PlaceUIElementWorldspace[] Crosshairs;
|
||||
public EventLog EventLog;
|
||||
[FormerlySerializedAs("SectorRenderer")] public ZoneRenderer ZoneRenderer;
|
||||
public ZoneRenderer ZoneRenderer;
|
||||
public CinemachineVirtualCamera DockCamera;
|
||||
public CinemachineVirtualCamera FollowCamera;
|
||||
public CinemachineVirtualCamera WormholeCamera;
|
||||
public CanvasGroup GameplayUI;
|
||||
public MainMenu MainMenu;
|
||||
public MenuPanel Menu;
|
||||
public MapRenderer MenuMap;
|
||||
//public SectorRenderer SectorRenderer;
|
||||
public SectorMap SectorMap;
|
||||
public VolumeSampling VolumeRenderer;
|
||||
public SchematicDisplay SchematicDisplay;
|
||||
public SchematicDisplay TargetSchematicDisplay;
|
||||
public InventoryMenu Inventory;
|
||||
|
|
@ -107,7 +109,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
// private CinemachineComposer _composer;
|
||||
|
||||
private DirectoryInfo _loadoutPath;
|
||||
private bool _editMode;
|
||||
private bool _paused;
|
||||
private float _time;
|
||||
private int _zoomLevelIndex;
|
||||
private Entity _currentEntity;
|
||||
|
|
@ -121,6 +123,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
private List<IDisposable> _shipSubscriptions = new List<IDisposable>();
|
||||
private float _severeHeatstrokePhase;
|
||||
private bool _uiHidden;
|
||||
private bool _menuShown;
|
||||
|
||||
public AetheriaInput Input { get; private set; }
|
||||
public EquippedDockingBay DockingBay { get; private set; }
|
||||
|
|
@ -167,6 +170,11 @@ public class ActionGameManager : MonoBehaviour
|
|||
SavePlayerSettings();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
Input.Dispose();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
EntityInstance.EffectManagerParent = EffectManagerParent;
|
||||
|
|
@ -195,6 +203,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
|
||||
Input.Global.MapToggle.performed += context =>
|
||||
{
|
||||
if (MainMenu.gameObject.activeSelf) return;
|
||||
if (Menu.gameObject.activeSelf && Menu.CurrentTab == MenuTab.Map)
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
|
|
@ -220,6 +229,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
|
||||
Input.Global.Inventory.performed += context =>
|
||||
{
|
||||
if (MainMenu.gameObject.activeSelf) return;
|
||||
if (Menu.gameObject.activeSelf && Menu.CurrentTab == MenuTab.Inventory)
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
|
|
@ -243,6 +253,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
|
||||
Input.Global.Dock.performed += context =>
|
||||
{
|
||||
if (MainMenu.gameObject.activeSelf) return;
|
||||
if (CurrentEntity == null)
|
||||
{
|
||||
AkSoundEngine.PostEvent("UI_Fail", gameObject);
|
||||
|
|
@ -255,6 +266,44 @@ public class ActionGameManager : MonoBehaviour
|
|||
else Undock();
|
||||
};
|
||||
|
||||
Input.Global.MainMenu.performed += context =>
|
||||
{
|
||||
if (CurrentEntity == null) return;
|
||||
if (MainMenu.gameObject.activeSelf)
|
||||
{
|
||||
_paused = false;
|
||||
VolumeRenderer.EnableDepth = true;
|
||||
MainMenu.gameObject.SetActive(false);
|
||||
if (_menuShown)
|
||||
{
|
||||
Menu.gameObject.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameplayUI.gameObject.SetActive(true);
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
Input.Player.Enable();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_paused = true;
|
||||
VolumeRenderer.EnableDepth = false;
|
||||
MainMenu.gameObject.SetActive(true);
|
||||
_menuShown = Menu.gameObject.activeSelf;
|
||||
if (_menuShown)
|
||||
{
|
||||
Menu.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameplayUI.gameObject.SetActive(false);
|
||||
Cursor.lockState = CursorLockMode.None;
|
||||
Input.Player.Disable();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Input.Player.EnterWormhole.performed += context =>
|
||||
{
|
||||
if(CurrentEntity is Ship ship)
|
||||
|
|
@ -274,6 +323,8 @@ public class ActionGameManager : MonoBehaviour
|
|||
ship.OnEnteredWormhole += () =>
|
||||
{
|
||||
PopulateLevel(wormhole.Target);
|
||||
foreach(var zone in wormhole.Target.AdjacentZones)
|
||||
CurrentSector.DiscoveredZones.Add(zone);
|
||||
SectorMap.QueueZoneReveal(wormhole.Target.AdjacentZones);
|
||||
ship.ExitWormhole(ZoneRenderer.WormholeInstances.Keys.First(w=>w.Target==oldZone.SectorZone).Position,
|
||||
Settings.GameplaySettings.WormholeExitVelocity * ItemManager.Random.NextFloat2Direction());
|
||||
|
|
@ -320,27 +371,33 @@ public class ActionGameManager : MonoBehaviour
|
|||
|
||||
Input.Player.TargetReticle.performed += context =>
|
||||
{
|
||||
var underReticle = Zone.Entities.Where(x => x != CurrentEntity)
|
||||
if (!CurrentEntity.VisibleHostiles.Any()) return;
|
||||
var underReticle = CurrentEntity.VisibleHostiles.Where(x => x != CurrentEntity)
|
||||
.MaxBy(x => dot(normalize(x.Position - CurrentEntity.Position), CurrentEntity.LookDirection));
|
||||
CurrentEntity.Target.Value = CurrentEntity.Target.Value == underReticle ? null : underReticle;
|
||||
};
|
||||
|
||||
Input.Player.TargetNearest.performed += context =>
|
||||
{
|
||||
CurrentEntity.Target.Value = Zone.Entities.Where(x=>x!=CurrentEntity)
|
||||
.MaxBy(x => length(x.Position - CurrentEntity.Position));
|
||||
if(CurrentEntity.VisibleHostiles.Any())
|
||||
{
|
||||
CurrentEntity.Target.Value = CurrentEntity.VisibleHostiles.Where(x => x != CurrentEntity)
|
||||
.MaxBy(x => length(x.Position - CurrentEntity.Position));
|
||||
}
|
||||
};
|
||||
|
||||
Input.Player.TargetNext.performed += context =>
|
||||
{
|
||||
var targets = Zone.Entities.Where(x => x != CurrentEntity).OrderBy(x => length(x.Position - CurrentEntity.Position)).ToArray();
|
||||
if (!CurrentEntity.VisibleHostiles.Any()) return;
|
||||
var targets = CurrentEntity.VisibleHostiles.Where(x => x != CurrentEntity).OrderBy(x => length(x.Position - CurrentEntity.Position)).ToArray();
|
||||
var currentTargetIndex = Array.IndexOf(targets, CurrentEntity.Target.Value);
|
||||
CurrentEntity.Target.Value = targets[(currentTargetIndex + 1) % targets.Length];
|
||||
};
|
||||
|
||||
Input.Player.TargetPrevious.performed += context =>
|
||||
{
|
||||
var targets = Zone.Entities.Where(x => x != CurrentEntity).OrderBy(x => length(x.Position - CurrentEntity.Position)).ToArray();
|
||||
if (!CurrentEntity.VisibleHostiles.Any()) return;
|
||||
var targets = CurrentEntity.VisibleHostiles.Where(x => x != CurrentEntity).OrderBy(x => length(x.Position - CurrentEntity.Position)).ToArray();
|
||||
var currentTargetIndex = Array.IndexOf(targets, CurrentEntity.Target.Value);
|
||||
CurrentEntity.Target.Value = targets[(currentTargetIndex + targets.Length - 1) % targets.Length];
|
||||
};
|
||||
|
|
@ -472,6 +529,18 @@ public class ActionGameManager : MonoBehaviour
|
|||
|
||||
StartGame();
|
||||
|
||||
ConsoleController.AddCommand("revealzones",
|
||||
_ =>
|
||||
{
|
||||
foreach (var zones in CurrentSector.Zones
|
||||
.Where(z=>!CurrentSector.DiscoveredZones.Contains(z))
|
||||
.GroupBy(z=>z.Distance[CurrentSector.Entrance])
|
||||
.OrderBy(g=>g.Key))
|
||||
{
|
||||
SectorMap.QueueZoneReveal(zones);
|
||||
}
|
||||
});
|
||||
|
||||
ConsoleController.AddCommand("give",
|
||||
args =>
|
||||
{
|
||||
|
|
@ -601,6 +670,9 @@ public class ActionGameManager : MonoBehaviour
|
|||
}
|
||||
else
|
||||
{
|
||||
foreach(var group in CurrentSector.DiscoveredZones
|
||||
.GroupBy(dz=>dz.Distance[CurrentSector.Entrance]))
|
||||
SectorMap.QueueZoneReveal(group);
|
||||
PopulateLevel(CurrentSector.Zones[PlayerSettings.CurrentRun.CurrentZone]);
|
||||
var targetEntity = Zone.Entities[PlayerSettings.CurrentRun.CurrentZoneEntity];
|
||||
if (targetEntity is OrbitalEntity orbitalEntity)
|
||||
|
|
@ -826,15 +898,12 @@ public class ActionGameManager : MonoBehaviour
|
|||
var deathTime = Time.time;
|
||||
UnbindEntity();
|
||||
CurrentEntity = null;
|
||||
// Dialog.Clear();
|
||||
// Dialog.Title.text = "You have died!";
|
||||
// Dialog.Show(() =>
|
||||
// {
|
||||
// PlayerSettings.CurrentRun = null;
|
||||
// StartGame();
|
||||
// }, null, "Try again!");
|
||||
// Dialog.transform.position = new Vector3(Screen.width / 2, Screen.height / 2);
|
||||
//Dialog.MoveToCursor();
|
||||
VolumeRenderer.EnableDepth = false;
|
||||
MainMenu.gameObject.SetActive(true);
|
||||
Menu.gameObject.SetActive(false);
|
||||
PlayerSettings.CurrentRun = null;
|
||||
SavePlayerSettings();
|
||||
SaveState();
|
||||
Observable.EveryUpdate()
|
||||
.Where(_ => Time.time - deathTime < DeathPPTransitionTime)
|
||||
.Subscribe(_ =>
|
||||
|
|
@ -894,10 +963,10 @@ public class ActionGameManager : MonoBehaviour
|
|||
|
||||
void Update()
|
||||
{
|
||||
if(!_editMode)
|
||||
if(!_paused)
|
||||
{
|
||||
_time += Time.deltaTime;
|
||||
ItemManager.Time = Time.time;
|
||||
// ItemManager.Time = _time;
|
||||
if(CurrentEntity !=null && CurrentEntity.Parent==null)
|
||||
{
|
||||
foreach (var indicator in _visibleHostileIndicators)
|
||||
|
|
@ -925,8 +994,8 @@ public class ActionGameManager : MonoBehaviour
|
|||
ship.MovementDirection = Input.Player.Move.ReadValue<Vector2>();
|
||||
}
|
||||
}
|
||||
Zone.Update(Time.deltaTime);
|
||||
}
|
||||
Zone.Update(Time.deltaTime);
|
||||
}
|
||||
|
||||
private void LateUpdate()
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ using Newtonsoft.Json;
|
|||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
|
||||
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||
public class CapacitorData : BehaviorData
|
||||
{
|
||||
[Inspectable, JsonProperty("capacity"), Key(1), RuntimeInspectable]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ using Newtonsoft.Json;
|
|||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
|
||||
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||
public class CockpitData : BehaviorData
|
||||
{
|
||||
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ using Newtonsoft.Json;
|
|||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
|
||||
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||
public class HeatStorageData : BehaviorData
|
||||
{
|
||||
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using Newtonsoft.Json;
|
|||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
|
||||
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||
public class RadiatorData : BehaviorData
|
||||
{
|
||||
[Inspectable, JsonProperty("emissivity"), Key(1), RuntimeInspectable]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using UniRx;
|
|||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
|
||||
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||
public class ReactorData : BehaviorData
|
||||
{
|
||||
[Inspectable, JsonProperty("charge"), Key(1), RuntimeInspectable]
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using Newtonsoft.Json;
|
|||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
|
||||
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||
public class ShieldData : BehaviorData
|
||||
{
|
||||
[Inspectable, JsonProperty("efficiency"), Key(1), RuntimeInspectable]
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using Newtonsoft.Json;
|
|||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
|
||||
[MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), RuntimeInspectable]
|
||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), RuntimeInspectable]
|
||||
public class ThrusterData : BehaviorData
|
||||
{
|
||||
[Inspectable, JsonProperty("thrust"), Key(1), RuntimeInspectable]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ using Newtonsoft.Json;
|
|||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
|
||||
[Union(0, typeof(InstantWeaponData)),
|
||||
[Inspectable,
|
||||
Union(0, typeof(InstantWeaponData)),
|
||||
Union(1, typeof(LauncherData)),
|
||||
Union(2, typeof(ConstantWeaponData)),
|
||||
Union(3, typeof(ChargedWeaponData)),
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ using Newtonsoft.Json;
|
|||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
|
||||
[MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(1000), RuntimeInspectable]
|
||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(1000), RuntimeInspectable]
|
||||
public class WearData : BehaviorData
|
||||
{
|
||||
[InspectableTemperature, JsonProperty("perSecond"), Key(1)]
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ public class GlobalSettingsAttribute : Attribute { }
|
|||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class ExternalEntryAttribute : Attribute { }
|
||||
|
||||
[AttributeUsage(AttributeTargets.All, Inherited = false)]
|
||||
public class InspectableAttribute : Attribute { }
|
||||
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using MessagePack;
|
||||
using MessagePack.ReactivePropertyExtension;
|
||||
using MessagePack.Resolvers;
|
||||
|
||||
public static class RegisterResolver
|
||||
|
|
@ -15,7 +16,8 @@ public static class RegisterResolver
|
|||
MathResolver.Instance,
|
||||
TypeResolver.Instance,
|
||||
NativeGuidResolver.Instance,
|
||||
StandardResolver.Instance
|
||||
StandardResolver.Instance,
|
||||
ReactivePropertyResolver.Instance
|
||||
);
|
||||
var options = MessagePackSerializerOptions.Standard.WithResolver(resolver);
|
||||
MessagePackSerializer.DefaultOptions = options;
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ public class DockingBayData : CargoBayData
|
|||
public int2 MaxSize;
|
||||
}
|
||||
|
||||
[RethinkTable("Items"), Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
||||
[RethinkTable("Items"), MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
||||
public class WeaponItemData : GearData
|
||||
{
|
||||
[Inspectable, JsonProperty("range"), Key(21)]
|
||||
|
|
|
|||
|
|
@ -34,16 +34,16 @@ public class ItemManager
|
|||
public CultCache ItemData { get; }
|
||||
public GameplaySettings GameplaySettings { get; }
|
||||
|
||||
public double Time
|
||||
{
|
||||
get => _time;
|
||||
set
|
||||
{
|
||||
_deltaTime = (float) (value - _time);
|
||||
_time = value;
|
||||
//Log($"GameContext delta time: {_deltaTime}");
|
||||
}
|
||||
}
|
||||
// public double Time
|
||||
// {
|
||||
// get => _time;
|
||||
// set
|
||||
// {
|
||||
// _deltaTime = (float) (value - _time);
|
||||
// _time = value;
|
||||
// //Log($"GameContext delta time: {_deltaTime}");
|
||||
// }
|
||||
// }
|
||||
|
||||
// private readonly Dictionary<CraftedItemData, int> Tier = new Dictionary<CraftedItemData, int>();
|
||||
|
||||
|
|
|
|||
|
|
@ -34,11 +34,15 @@ public class SavedGame
|
|||
|
||||
[Key(8)]
|
||||
public SectorGenerationSettings Settings;
|
||||
|
||||
[Key(9)]
|
||||
public int[] DiscoveredZones;
|
||||
|
||||
public SavedGame() { }
|
||||
|
||||
public SavedGame(Sector sector, Zone currentZone, Entity currentEntity)
|
||||
{
|
||||
DiscoveredZones = sector.DiscoveredZones.Select(dz => Array.IndexOf(sector.Zones, dz)).ToArray();
|
||||
Settings = sector.Settings;
|
||||
Factions = sector.HomeZones.Keys.Select(f => f.ID).ToArray();
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using System.Threading.Tasks;
|
|||
using DataStructures.ViliWonka.Heap;
|
||||
using MIConvexHull;
|
||||
using JM.LinqFaster;
|
||||
using UniRx;
|
||||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
using Random = Unity.Mathematics.Random;
|
||||
|
|
@ -14,6 +15,7 @@ public class Sector
|
|||
{
|
||||
public Dictionary<Faction, SectorZone> HomeZones = new Dictionary<Faction, SectorZone>();
|
||||
public Dictionary<Faction, SectorZone> BossZones = new Dictionary<Faction, SectorZone>();
|
||||
public HashSet<SectorZone> DiscoveredZones = new HashSet<SectorZone>();
|
||||
|
||||
public SectorGenerationSettings Settings { get; }
|
||||
public Faction[] Factions { get; }
|
||||
|
|
@ -46,6 +48,7 @@ public class Sector
|
|||
PackedContents = zone.Contents
|
||||
};
|
||||
}).ToArray();
|
||||
foreach (var i in savedGame.DiscoveredZones) DiscoveredZones.Add(Zones[i]);
|
||||
for (var i = 0; i < Zones.Length; i++)
|
||||
{
|
||||
Zones[i].AdjacentZones = savedGame.Zones[i].AdjacentZones.Select(azi => Zones[azi]).ToList();
|
||||
|
|
@ -165,6 +168,9 @@ public class Sector
|
|||
// Entrance is the zone furthest from the exit
|
||||
Entrance = Zones.MaxBy(z => Exit.Distance[z]);
|
||||
|
||||
DiscoveredZones.Add(Entrance);
|
||||
foreach(var z in Entrance.AdjacentZones) DiscoveredZones.Add(z);
|
||||
|
||||
// Find all zones on the exit path where removing that zone would disconnect the entrance from the exit
|
||||
// Disregard "corridor" zones with only two adjacent zones
|
||||
var chokePoints = ExitPath
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ public class PlanetSettings
|
|||
public ExponentialCurve FogTintRadius;
|
||||
public ExponentialCurve LightRadius;
|
||||
public ExponentialCurve BodyRadius;
|
||||
public float AsteroidVerticalOffset = -5f;
|
||||
public ExponentialLerp AsteroidSize;
|
||||
public ExponentialLerp AsteroidHitpoints;
|
||||
public ExponentialLerp AsteroidRespawnTime;
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ public class Zone
|
|||
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), pos.y);
|
||||
belt.NewPositions[i] = float3(pos.x, GetHeight(pos) + Settings.AsteroidVerticalOffset, pos.y);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,12 +42,12 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler
|
|||
public Texture2D TemperatureColor;
|
||||
public ExponentialLerp TemperatureColorCurve;
|
||||
public ExponentialLerp TemperatureAlphaCurve;
|
||||
public float MaxTemperature;
|
||||
public bool FitToContent;
|
||||
public float CellHitPulseTime;
|
||||
public Color ToggleEnabledColor;
|
||||
public Color ToggleDisabledColor;
|
||||
public Color CellBackgroundColor = new Color(0, 0, 0, .75f);
|
||||
public float MinTempRange;
|
||||
|
||||
Subject<InventoryEventData> _onBeginDrag;
|
||||
Subject<InventoryEventData> _onDrag;
|
||||
|
|
|
|||
|
|
@ -19,10 +19,9 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
public float ZoomSpeed;
|
||||
public float MinViewSize = .1f;
|
||||
public float MaxViewSize = 2;
|
||||
public Button PathAnimationButton;
|
||||
public float PathAnimationDamping;
|
||||
public float PathAnimationDuration;
|
||||
public float PathAnimationDurationPadding = 1.1f;
|
||||
// public float PathAnimationDamping = .01f;
|
||||
// public float PathAnimationDuration = 30;
|
||||
// public float PathAnimationDurationPadding = 1.1f;
|
||||
public GameObject LegendPanel;
|
||||
public float LinkAnimationDuration;
|
||||
public float IconAnimationDuration;
|
||||
|
|
@ -34,7 +33,6 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
private Transform _sectorCameraTransform;
|
||||
private Image _outputImage;
|
||||
private RenderTexture _outputTexture;
|
||||
private Vector3[] _imageCorners = new Vector3[4];
|
||||
private int2 _size;
|
||||
private bool _init;
|
||||
private float _aspectRatio;
|
||||
|
|
@ -51,46 +49,40 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
_sectorBackgroundDepth = _sectorBackgroundTransform.position.z;
|
||||
_sectorCameraTransform = SectorCamera.transform;
|
||||
_sectorCameraDepth = _sectorCameraTransform.position.z;
|
||||
PathAnimationButton.onClick.AddListener(() =>
|
||||
{
|
||||
Map.StartCoroutine(AnimatePath());
|
||||
});
|
||||
// PathAnimationButton.onClick.AddListener(() =>
|
||||
// {
|
||||
// Map.StartCoroutine(AnimatePath());
|
||||
// });
|
||||
}
|
||||
|
||||
private IEnumerator AnimatePath()
|
||||
{
|
||||
var pathZones = ActionGameManager.CurrentSector.ExitPath;
|
||||
LegendPanel.SetActive(false);
|
||||
PathAnimationButton.gameObject.SetActive(false);
|
||||
foreach (var zones in ActionGameManager.CurrentSector.Zones
|
||||
.GroupBy(z=>z.Distance[ActionGameManager.CurrentSector.Entrance])
|
||||
.OrderBy(g=>g.Key))
|
||||
{
|
||||
Map.QueueZoneReveal(zones);
|
||||
}
|
||||
|
||||
var revealCount = ActionGameManager.CurrentSector.Entrance.Distance[ActionGameManager.CurrentSector.Exit];
|
||||
Map.StartReveal(
|
||||
PathAnimationDuration / revealCount * (LinkAnimationDuration / (IconAnimationDuration + LinkAnimationDuration)),
|
||||
PathAnimationDuration / revealCount * (IconAnimationDuration / (IconAnimationDuration + LinkAnimationDuration)));
|
||||
MainCamera.enabled = false;
|
||||
SectorCamera.targetTexture = null;
|
||||
Canvas.gameObject.SetActive(false);
|
||||
SectorCamera.gameObject.SetActive(true);
|
||||
|
||||
var pathAnimationLerp = 0f;
|
||||
while (pathAnimationLerp < 1)
|
||||
{
|
||||
var currentTargetZone = pathZones[(int) (pathZones.Length * pathAnimationLerp)];
|
||||
_position = lerp(_position, currentTargetZone.Position, PathAnimationDamping);
|
||||
pathAnimationLerp += Time.deltaTime / (PathAnimationDuration * PathAnimationDurationPadding);
|
||||
UpdateCamera();
|
||||
yield return null;
|
||||
}
|
||||
|
||||
LegendPanel.SetActive(true);
|
||||
PathAnimationButton.gameObject.SetActive(true);
|
||||
}
|
||||
// private IEnumerator AnimatePath()
|
||||
// {
|
||||
// var pathZones = ActionGameManager.CurrentSector.ExitPath;
|
||||
// LegendPanel.SetActive(false);
|
||||
// PathAnimationButton.gameObject.SetActive(false);
|
||||
//
|
||||
// var revealCount = ActionGameManager.CurrentSector.Entrance.Distance[ActionGameManager.CurrentSector.Exit];
|
||||
// Map.StartReveal(
|
||||
// PathAnimationDuration / revealCount * (LinkAnimationDuration / (IconAnimationDuration + LinkAnimationDuration)),
|
||||
// PathAnimationDuration / revealCount * (IconAnimationDuration / (IconAnimationDuration + LinkAnimationDuration)));
|
||||
// MainCamera.enabled = false;
|
||||
// SectorCamera.targetTexture = null;
|
||||
// Canvas.gameObject.SetActive(false);
|
||||
// SectorCamera.gameObject.SetActive(true);
|
||||
//
|
||||
// var pathAnimationLerp = 0f;
|
||||
// while (pathAnimationLerp < 1)
|
||||
// {
|
||||
// var currentTargetZone = pathZones[(int) (pathZones.Length * pathAnimationLerp)];
|
||||
// _position = lerp(_position, currentTargetZone.Position, PathAnimationDamping);
|
||||
// pathAnimationLerp += Time.deltaTime / (PathAnimationDuration * PathAnimationDurationPadding);
|
||||
// UpdateCamera();
|
||||
// yield return null;
|
||||
// }
|
||||
//
|
||||
// LegendPanel.SetActive(true);
|
||||
// PathAnimationButton.gameObject.SetActive(true);
|
||||
// }
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,11 +18,21 @@ public class VolumeSampling : MonoBehaviour
|
|||
{
|
||||
public Material _volMaterial;
|
||||
public Transform GridTransform;
|
||||
//public int DownsampleBlurMask = 2;
|
||||
private Camera _camera;
|
||||
private RenderBuffer[] _mrt;
|
||||
private RenderTexture _blurMask;
|
||||
private Texture2D _disabledBlurMask;
|
||||
|
||||
public bool EnableDepth { get; set; } = true;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
//Debug.Log($"Supported MRT count: {SystemInfo.supportedRenderTargetCount}");
|
||||
_camera = GetComponent<Camera>();
|
||||
_mrt = new RenderBuffer[2];
|
||||
_blurMask = new RenderTexture(Screen.width, Screen.height, 0, GraphicsFormat.R8_UNorm);
|
||||
_disabledBlurMask = Color.black.ToTexture();
|
||||
}
|
||||
|
||||
[ImageEffectOpaque]
|
||||
|
|
@ -43,6 +53,19 @@ public class VolumeSampling : MonoBehaviour
|
|||
if(GridTransform != null)
|
||||
_volMaterial.SetVector("_GridTransform", new Vector4(GridTransform.position.x,GridTransform.position.z,GridTransform.localScale.x));
|
||||
|
||||
Graphics.Blit( source, destination, _volMaterial, 0 );
|
||||
_mrt[0] = destination.colorBuffer;
|
||||
_mrt[1] = _blurMask.colorBuffer;
|
||||
|
||||
// Blit with a MRT.
|
||||
Graphics.SetRenderTarget(_mrt, source.depthBuffer);
|
||||
|
||||
Graphics.Blit( source, _volMaterial, 0 );
|
||||
|
||||
//Graphics.Blit(rt1, destination);
|
||||
|
||||
if(EnableDepth)
|
||||
Shader.SetGlobalTexture("_DoFBlurTex", _blurMask);
|
||||
else
|
||||
Shader.SetGlobalTexture("_DoFBlurTex", _disabledBlurMask);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,10 @@
|
|||
_NoiseFrequency("Noise Frequency", float) = 1
|
||||
_NoiseSpeed("Noise Speed", float) = 1
|
||||
_SafetyDistance("Safety Distance", float) = 20
|
||||
_Scattering("Scattering", float) = 1
|
||||
_ScatteringMinDist("ScatteringMinDist", float) = 1
|
||||
_ScatteringDistExponent("ScatteringDistExponent", float) = 1
|
||||
_ScatteringDensityExponent("ScatteringDensityExponent", float) = 1
|
||||
}
|
||||
|
||||
CGINCLUDE;
|
||||
|
|
@ -71,13 +75,17 @@
|
|||
_NoiseFrequency,
|
||||
_NoiseStrength,
|
||||
_NoiseSpeed,
|
||||
_Scattering,
|
||||
_ScatteringDensityExponent,
|
||||
_ScatteringDistExponent,
|
||||
_ScatteringMinDist,
|
||||
_SafetyDistance;
|
||||
|
||||
// Dithering
|
||||
sampler2D _DitheringTex;
|
||||
float4 _DitheringCoords;
|
||||
|
||||
float nrand(float2 ScreenUVs)
|
||||
inline float nrand(float2 ScreenUVs)
|
||||
{
|
||||
return frac(sin(ScreenUVs.x * 12.9898 + ScreenUVs.y * 78.233) * 43758.5453);
|
||||
}
|
||||
|
|
@ -135,36 +143,32 @@
|
|||
return float4((albedo*_Tint*lightTint).rgb, fillDensity);
|
||||
}
|
||||
|
||||
void RaymarchStep( in float3 pos, in float stepSize, in float weight, inout float4 sum )
|
||||
void RaymarchStep( in float3 pos, in float stepSize, in float weight, inout float4 sum, in float scatter, inout float scatterSum)
|
||||
{
|
||||
if( sum.a <= 0.99 )
|
||||
{
|
||||
float4 col = VolumeSampleColor( pos );
|
||||
col.rgb *= weight;
|
||||
col.rgb *= weight * (1.0 - sum.a);
|
||||
|
||||
//float lerpc = col.a * (1.0 - sum.a);
|
||||
//sum = float4(lerp(sum.rgb, col.rgb, lerpc), sum.a + wt * stepSize * lerpc);
|
||||
sum += stepSize * col * col.a * (1.0 - sum.a);
|
||||
sum += stepSize * col * col.a;
|
||||
scatterSum += pow(col.a, _ScatteringDensityExponent) * scatter;
|
||||
}
|
||||
}
|
||||
|
||||
float4 RayMarch( in float3 origin, in float3 direction, in float zbuf, in float2 screenUV )
|
||||
float4 RayMarch( in float3 origin, in float3 direction, in float zbuf, in float2 screenUV, out float scatterSum )
|
||||
{
|
||||
half rand = nrand(screenUV + frac(_Time.x));
|
||||
//half rand = tex2D(_DitheringTex, screenUV * _DitheringCoords.xy + _DitheringCoords.zw).r;
|
||||
//rayOrigin += rd * (noise * SAMPLE_PERIOD);
|
||||
//half rand = tex2D(_DitheringTex, screenUV * _DitheringCoords.xy + _DitheringCoords.zw).r*2;
|
||||
half rand = nrand(screenUV + frac(_Time.x)) * 2;
|
||||
float4 sum = (float4)0.;
|
||||
scatterSum = 0.;
|
||||
|
||||
// setup sampling
|
||||
//float step = SAMPLE_PERIOD,
|
||||
//rayDist = step * rand;
|
||||
|
||||
float offset = (1.0/SAMPLE_COUNT)*rand;
|
||||
float prevRayDist = 0;
|
||||
float offset = rand/SAMPLE_COUNT;
|
||||
float rayDist = 0;
|
||||
for( int i = 0; i < SAMPLE_COUNT; i++ )
|
||||
{
|
||||
prevRayDist = rayDist;
|
||||
float prevRayDist = rayDist;
|
||||
rayDist = pow((float)i/SAMPLE_COUNT + offset,_StepExponent) * _DepthCeiling;
|
||||
float distToSurf = zbuf - rayDist;
|
||||
if( distToSurf <= 0.001 || sum.a > .99) break;
|
||||
|
|
@ -172,7 +176,7 @@
|
|||
float step = rayDist - prevRayDist;
|
||||
//float wt = (distToSurf >= step) ? 1. : distToSurf / step;
|
||||
|
||||
RaymarchStep( origin + rayDist * direction, step, 1-rayDist/_DepthCeiling, sum );
|
||||
RaymarchStep( origin + rayDist * direction, step, 1-rayDist/_DepthCeiling, sum, _Scattering/pow(max(rayDist,_ScatteringMinDist),_ScatteringDistExponent), scatterSum);
|
||||
|
||||
rayDist += step;
|
||||
}
|
||||
|
|
@ -194,20 +198,6 @@
|
|||
o.screenPos = ComputeScreenPos( o.pos );
|
||||
return o;
|
||||
}
|
||||
/*
|
||||
float3 combineColors( in float4 clouds, in float3 ro, in float3 rd )
|
||||
{
|
||||
float3 col = clouds.rgb;
|
||||
|
||||
// check if any obscurance < 1
|
||||
if( clouds.a < 0.99 )
|
||||
{
|
||||
// let some of the sky light through
|
||||
col += skyColor( ro, rd ) * (1. - clouds.a);
|
||||
}
|
||||
|
||||
return col;
|
||||
}*/
|
||||
|
||||
void computeCamera( in float2 q, out float3 rayOrigin, out float3 rd )
|
||||
{
|
||||
|
|
@ -239,9 +229,18 @@
|
|||
|
||||
return worldSpacePosition.xyz;
|
||||
}
|
||||
|
||||
// MRT shader
|
||||
struct FragmentOutput
|
||||
{
|
||||
half4 dest0 : COLOR0;
|
||||
half4 dest1 : COLOR1;
|
||||
};
|
||||
|
||||
float4 frag( v2f i ) : SV_Target //out float outDepth : SV_Depth
|
||||
FragmentOutput frag( v2f i ) : SV_Target //out float outDepth : SV_Depth
|
||||
{
|
||||
FragmentOutput o;
|
||||
|
||||
float2 q = i.screenPos.xy / i.screenPos.w;
|
||||
|
||||
// camera
|
||||
|
|
@ -259,13 +258,14 @@
|
|||
float depthValue = length(worldDepth-rayOrigin);
|
||||
|
||||
// march through volume
|
||||
float4 clouds = RayMarch( rayOrigin, rayDirection, depthValue, screenUV );
|
||||
float scatter;
|
||||
float4 clouds = RayMarch( rayOrigin, rayDirection, depthValue, screenUV, scatter );
|
||||
o.dest1 = .5 + scatter*.5;//smoothstep(1,.99,clouds.a)*pow(clouds.a,1)*.5;
|
||||
|
||||
float3 bgcol = tex2Dlod( _MainTex, float4(q, 0., 0.) );
|
||||
float3 bgcol = tex2Dlod( _MainTex, float4(q, 0., 0.) );
|
||||
// add in camera render colours, if not zfar (so we exclude skybox)
|
||||
if(clouds.a < .99 && depthValue < _DepthCeiling)
|
||||
{
|
||||
|
||||
// Blend out camera render when outside marching range
|
||||
if( depthValue >= _DepthCeiling - _DepthBlend )
|
||||
clouds.a = lerp(clouds.a, 1, (depthValue - (_DepthCeiling - _DepthBlend)) / _DepthBlend);
|
||||
|
|
@ -276,21 +276,11 @@
|
|||
|
||||
}
|
||||
clouds.a = 1.;
|
||||
|
||||
// else
|
||||
// {
|
||||
// clouds.xyz = lerp(clouds.xyz, bgcol, 1-clouds.a);
|
||||
// }
|
||||
//clouds.rgb *= clouds.a;
|
||||
|
||||
//outDepth = LinearEyeDepthToOutDepth(min(depthValue, rayDist));
|
||||
|
||||
return clouds;
|
||||
/*
|
||||
float3 col = combineColors( clouds, ro, rd );
|
||||
|
||||
// post processing
|
||||
return postProcessing( col, q );*/
|
||||
o.dest0 = clouds;
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
273
DepthOfField.hlsl
Normal file
273
DepthOfField.hlsl
Normal file
|
|
@ -0,0 +1,273 @@
|
|||
#ifndef UNITY_POSTFX_DEPTH_OF_FIELD
|
||||
#define UNITY_POSTFX_DEPTH_OF_FIELD
|
||||
|
||||
#include "../StdLib.hlsl"
|
||||
#include "../Colors.hlsl"
|
||||
#include "DiskKernels.hlsl"
|
||||
|
||||
TEXTURE2D_SAMPLER2D(_MainTex, sampler_MainTex);
|
||||
float4 _MainTex_TexelSize;
|
||||
|
||||
TEXTURE2D_SAMPLER2D(_DoFBlurTex, sampler_DoFBlurTex);
|
||||
TEXTURE2D_SAMPLER2D(_CameraDepthTexture, sampler_CameraDepthTexture);
|
||||
TEXTURE2D_SAMPLER2D(_CameraMotionVectorsTexture, sampler_CameraMotionVectorsTexture);
|
||||
|
||||
TEXTURE2D_SAMPLER2D(_CoCTex, sampler_CoCTex);
|
||||
|
||||
TEXTURE2D_SAMPLER2D(_DepthOfFieldTex, sampler_DepthOfFieldTex);
|
||||
float4 _DepthOfFieldTex_TexelSize;
|
||||
|
||||
// Camera parameters
|
||||
float _Distance;
|
||||
float _LensCoeff; // f^2 / (N * (S1 - f) * film_width * 2)
|
||||
float _MaxCoC;
|
||||
float _RcpMaxCoC;
|
||||
float _RcpAspect;
|
||||
half3 _TaaParams; // Jitter.x, Jitter.y, Blending
|
||||
|
||||
// CoC calculation
|
||||
half4 FragCoC(VaryingsDefault i) : SV_Target
|
||||
{
|
||||
return SAMPLE_TEXTURE2D(_DoFBlurTex, sampler_DoFBlurTex, i.texcoordStereo).r;
|
||||
// float depth = LinearEyeDepth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, sampler_CameraDepthTexture, i.texcoordStereo));
|
||||
// half coc = (depth - _Distance) * _LensCoeff / max(depth, 1e-4);
|
||||
// return saturate(coc * 0.5 * _RcpMaxCoC + 0.5);
|
||||
}
|
||||
|
||||
// Temporal filter
|
||||
half4 FragTempFilter(VaryingsDefault i) : SV_Target
|
||||
{
|
||||
float3 uvOffs = _MainTex_TexelSize.xyy * float3(1.0, 1.0, 0.0);
|
||||
|
||||
#if UNITY_GATHER_SUPPORTED
|
||||
|
||||
half4 cocTL = GATHER_RED_TEXTURE2D(_CoCTex, sampler_CoCTex, UnityStereoTransformScreenSpaceTex(i.texcoord - uvOffs.xy * 0.5)); // top-left
|
||||
half4 cocBR = GATHER_RED_TEXTURE2D(_CoCTex, sampler_CoCTex, UnityStereoTransformScreenSpaceTex(i.texcoord + uvOffs.xy * 0.5)); // bottom-right
|
||||
half coc1 = cocTL.x; // top
|
||||
half coc2 = cocTL.z; // left
|
||||
half coc3 = cocBR.x; // bottom
|
||||
half coc4 = cocBR.z; // right
|
||||
|
||||
#else
|
||||
|
||||
half coc1 = SAMPLE_TEXTURE2D(_CoCTex, sampler_CoCTex, UnityStereoTransformScreenSpaceTex(i.texcoord - uvOffs.xz)).r; // top
|
||||
half coc2 = SAMPLE_TEXTURE2D(_CoCTex, sampler_CoCTex, UnityStereoTransformScreenSpaceTex(i.texcoord - uvOffs.zy)).r; // left
|
||||
half coc3 = SAMPLE_TEXTURE2D(_CoCTex, sampler_CoCTex, UnityStereoTransformScreenSpaceTex(i.texcoord + uvOffs.zy)).r; // bottom
|
||||
half coc4 = SAMPLE_TEXTURE2D(_CoCTex, sampler_CoCTex, UnityStereoTransformScreenSpaceTex(i.texcoord + uvOffs.xz)).r; // right
|
||||
|
||||
#endif
|
||||
|
||||
// Dejittered center sample.
|
||||
half coc0 = SAMPLE_TEXTURE2D(_CoCTex, sampler_CoCTex, UnityStereoTransformScreenSpaceTex(i.texcoord - _TaaParams.xy)).r;
|
||||
|
||||
// CoC dilation: determine the closest point in the four neighbors
|
||||
float3 closest = float3(0.0, 0.0, coc0);
|
||||
closest = coc1 < closest.z ? float3(-uvOffs.xz, coc1) : closest;
|
||||
closest = coc2 < closest.z ? float3(-uvOffs.zy, coc2) : closest;
|
||||
closest = coc3 < closest.z ? float3( uvOffs.zy, coc3) : closest;
|
||||
closest = coc4 < closest.z ? float3( uvOffs.xz, coc4) : closest;
|
||||
|
||||
// Sample the history buffer with the motion vector at the closest point
|
||||
float2 motion = SAMPLE_TEXTURE2D(_CameraMotionVectorsTexture, sampler_CameraMotionVectorsTexture, UnityStereoTransformScreenSpaceTex(i.texcoord + closest.xy)).xy;
|
||||
half cocHis = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, UnityStereoTransformScreenSpaceTex(i.texcoord - motion)).r;
|
||||
|
||||
// Neighborhood clamping
|
||||
half cocMin = closest.z;
|
||||
half cocMax = Max3(Max3(coc0, coc1, coc2), coc3, coc4);
|
||||
cocHis = clamp(cocHis, cocMin, cocMax);
|
||||
|
||||
// Blend with the history
|
||||
return lerp(coc0, cocHis, _TaaParams.z);
|
||||
}
|
||||
|
||||
// Prefilter: downsampling and premultiplying
|
||||
half4 FragPrefilter(VaryingsDefault i) : SV_Target
|
||||
{
|
||||
#if UNITY_GATHER_SUPPORTED
|
||||
|
||||
// Sample source colors
|
||||
half4 c_r = GATHER_RED_TEXTURE2D(_MainTex, sampler_MainTex, i.texcoordStereo);
|
||||
half4 c_g = GATHER_GREEN_TEXTURE2D(_MainTex, sampler_MainTex, i.texcoordStereo);
|
||||
half4 c_b = GATHER_BLUE_TEXTURE2D(_MainTex, sampler_MainTex, i.texcoordStereo);
|
||||
|
||||
half3 c0 = half3(c_r.x, c_g.x, c_b.x);
|
||||
half3 c1 = half3(c_r.y, c_g.y, c_b.y);
|
||||
half3 c2 = half3(c_r.z, c_g.z, c_b.z);
|
||||
half3 c3 = half3(c_r.w, c_g.w, c_b.w);
|
||||
|
||||
// Sample CoCs
|
||||
half4 cocs = GATHER_TEXTURE2D(_CoCTex, sampler_CoCTex, i.texcoordStereo) * 2.0 - 1.0;
|
||||
half coc0 = cocs.x;
|
||||
half coc1 = cocs.y;
|
||||
half coc2 = cocs.z;
|
||||
half coc3 = cocs.w;
|
||||
|
||||
#else
|
||||
|
||||
float3 duv = _MainTex_TexelSize.xyx * float3(0.5, 0.5, -0.5);
|
||||
float2 uv0 = UnityStereoTransformScreenSpaceTex(i.texcoord - duv.xy);
|
||||
float2 uv1 = UnityStereoTransformScreenSpaceTex(i.texcoord - duv.zy);
|
||||
float2 uv2 = UnityStereoTransformScreenSpaceTex(i.texcoord + duv.zy);
|
||||
float2 uv3 = UnityStereoTransformScreenSpaceTex(i.texcoord + duv.xy);
|
||||
|
||||
// Sample source colors
|
||||
half3 c0 = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, uv0).rgb;
|
||||
half3 c1 = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, uv1).rgb;
|
||||
half3 c2 = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, uv2).rgb;
|
||||
half3 c3 = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, uv3).rgb;
|
||||
|
||||
// Sample CoCs
|
||||
half coc0 = SAMPLE_TEXTURE2D(_CoCTex, sampler_CoCTex, uv0).r * 2.0 - 1.0;
|
||||
half coc1 = SAMPLE_TEXTURE2D(_CoCTex, sampler_CoCTex, uv1).r * 2.0 - 1.0;
|
||||
half coc2 = SAMPLE_TEXTURE2D(_CoCTex, sampler_CoCTex, uv2).r * 2.0 - 1.0;
|
||||
half coc3 = SAMPLE_TEXTURE2D(_CoCTex, sampler_CoCTex, uv3).r * 2.0 - 1.0;
|
||||
|
||||
#endif
|
||||
|
||||
// Apply CoC and luma weights to reduce bleeding and flickering
|
||||
float w0 = abs(coc0) / (Max3(c0.r, c0.g, c0.b) + 1.0);
|
||||
float w1 = abs(coc1) / (Max3(c1.r, c1.g, c1.b) + 1.0);
|
||||
float w2 = abs(coc2) / (Max3(c2.r, c2.g, c2.b) + 1.0);
|
||||
float w3 = abs(coc3) / (Max3(c3.r, c3.g, c3.b) + 1.0);
|
||||
|
||||
// Weighted average of the color samples
|
||||
half3 avg = c0 * w0 + c1 * w1 + c2 * w2 + c3 * w3;
|
||||
avg /= max(w0 + w1 + w2 + w3, 1e-4);
|
||||
|
||||
// Select the largest CoC value
|
||||
half coc_min = min(coc0, Min3(coc1, coc2, coc3));
|
||||
half coc_max = max(coc0, Max3(coc1, coc2, coc3));
|
||||
half coc = (-coc_min > coc_max ? coc_min : coc_max) * _MaxCoC;
|
||||
|
||||
// Premultiply CoC again
|
||||
avg *= smoothstep(0, _MainTex_TexelSize.y * 2, abs(coc));
|
||||
|
||||
#if defined(UNITY_COLORSPACE_GAMMA)
|
||||
avg = SRGBToLinear(avg);
|
||||
#endif
|
||||
|
||||
return half4(avg, coc);
|
||||
}
|
||||
|
||||
// Bokeh filter with disk-shaped kernels
|
||||
half4 FragBlur(VaryingsDefault i) : SV_Target
|
||||
{
|
||||
half4 samp0 = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.texcoordStereo);
|
||||
|
||||
half4 bgAcc = 0.0; // Background: far field bokeh
|
||||
half4 fgAcc = 0.0; // Foreground: near field bokeh
|
||||
|
||||
UNITY_LOOP
|
||||
for (int si = 0; si < kSampleCount; si++)
|
||||
{
|
||||
float2 disp = kDiskKernel[si] * _MaxCoC;
|
||||
float dist = length(disp);
|
||||
|
||||
float2 duv = float2(disp.x * _RcpAspect, disp.y);
|
||||
half4 samp = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, UnityStereoTransformScreenSpaceTex(i.texcoord + duv));
|
||||
|
||||
// BG: Compare CoC of the current sample and the center sample
|
||||
// and select smaller one.
|
||||
half bgCoC = max(min(samp0.a, samp.a), 0.0);
|
||||
|
||||
// Compare the CoC to the sample distance.
|
||||
// Add a small margin to smooth out.
|
||||
const half margin = _MainTex_TexelSize.y * 2;
|
||||
half bgWeight = saturate((bgCoC - dist + margin) / margin);
|
||||
half fgWeight = saturate((-samp.a - dist + margin) / margin);
|
||||
|
||||
// Cut influence from focused areas because they're darkened by CoC
|
||||
// premultiplying. This is only needed for near field.
|
||||
fgWeight *= step(_MainTex_TexelSize.y, -samp.a);
|
||||
|
||||
// Accumulation
|
||||
bgAcc += half4(samp.rgb, 1.0) * bgWeight;
|
||||
fgAcc += half4(samp.rgb, 1.0) * fgWeight;
|
||||
}
|
||||
|
||||
// Get the weighted average.
|
||||
bgAcc.rgb /= bgAcc.a + (bgAcc.a == 0.0); // zero-div guard
|
||||
fgAcc.rgb /= fgAcc.a + (fgAcc.a == 0.0);
|
||||
|
||||
// BG: Calculate the alpha value only based on the center CoC.
|
||||
// This is a rather aggressive approximation but provides stable results.
|
||||
bgAcc.a = smoothstep(_MainTex_TexelSize.y, _MainTex_TexelSize.y * 2.0, samp0.a);
|
||||
|
||||
// FG: Normalize the total of the weights.
|
||||
fgAcc.a *= PI / kSampleCount;
|
||||
|
||||
// Alpha premultiplying
|
||||
half alpha = saturate(fgAcc.a);
|
||||
half3 rgb = lerp(bgAcc.rgb, fgAcc.rgb, alpha);
|
||||
|
||||
return half4(rgb, alpha);
|
||||
}
|
||||
|
||||
// Postfilter blur
|
||||
half4 FragPostBlur(VaryingsDefault i) : SV_Target
|
||||
{
|
||||
// 9 tap tent filter with 4 bilinear samples
|
||||
const float4 duv = _MainTex_TexelSize.xyxy * float4(0.5, 0.5, -0.5, 0);
|
||||
half4 acc;
|
||||
acc = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, UnityStereoTransformScreenSpaceTex(i.texcoord - duv.xy));
|
||||
acc += SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, UnityStereoTransformScreenSpaceTex(i.texcoord - duv.zy));
|
||||
acc += SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, UnityStereoTransformScreenSpaceTex(i.texcoord + duv.zy));
|
||||
acc += SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, UnityStereoTransformScreenSpaceTex(i.texcoord + duv.xy));
|
||||
return acc / 4.0;
|
||||
}
|
||||
|
||||
// Combine with source
|
||||
half4 FragCombine(VaryingsDefault i) : SV_Target
|
||||
{
|
||||
half4 dof = SAMPLE_TEXTURE2D(_DepthOfFieldTex, sampler_DepthOfFieldTex, i.texcoordStereo);
|
||||
half coc = SAMPLE_TEXTURE2D(_CoCTex, sampler_CoCTex, i.texcoordStereo).r;
|
||||
coc = (coc - 0.5) * 2.0 * _MaxCoC;
|
||||
|
||||
// Convert CoC to far field alpha value.
|
||||
float ffa = smoothstep(_MainTex_TexelSize.y * 2.0, _MainTex_TexelSize.y * 4.0, coc);
|
||||
|
||||
half4 color = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.texcoordStereo);
|
||||
|
||||
#if defined(UNITY_COLORSPACE_GAMMA)
|
||||
color = SRGBToLinear(color);
|
||||
#endif
|
||||
|
||||
half alpha = Max3(dof.r, dof.g, dof.b);
|
||||
|
||||
// lerp(lerp(color, dof, ffa), dof, dof.a)
|
||||
color = lerp(color, float4(dof.rgb, alpha), ffa + dof.a - ffa * dof.a);
|
||||
|
||||
#if defined(UNITY_COLORSPACE_GAMMA)
|
||||
color = LinearToSRGB(color);
|
||||
#endif
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
// Debug overlay
|
||||
half4 FragDebugOverlay(VaryingsDefault i) : SV_Target
|
||||
{
|
||||
half3 color = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.texcoordStereo).rgb;
|
||||
|
||||
// Calculate the radiuses of CoC.
|
||||
half4 src = SAMPLE_TEXTURE2D(_DepthOfFieldTex, sampler_DepthOfFieldTex, i.texcoordStereo);
|
||||
float depth = LinearEyeDepth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, sampler_CameraDepthTexture, i.texcoordStereo));
|
||||
float coc = (depth - _Distance) * _LensCoeff / depth;
|
||||
coc *= 80;
|
||||
|
||||
// Visualize CoC (white -> red -> gray)
|
||||
half3 rgb = lerp(half3(1.0, 0.0, 0.0), half3(1.0, 1.0, 1.0), saturate(-coc));
|
||||
rgb = lerp(rgb, half3(0.4, 0.4, 0.4), saturate(coc));
|
||||
|
||||
// Black and white image overlay
|
||||
rgb *= Luminance(color) + 0.5;
|
||||
|
||||
// Gamma correction
|
||||
#if !UNITY_COLORSPACE_GAMMA
|
||||
rgb = SRGBToLinear(rgb);
|
||||
#endif
|
||||
|
||||
return half4(rgb, 1.0);
|
||||
}
|
||||
|
||||
#endif // UNITY_POSTFX_DEPTH_OF_FIELD
|
||||
BIN
GameData/AetherDB.msgpack
(Stored with Git LFS)
BIN
GameData/AetherDB.msgpack
(Stored with Git LFS)
Binary file not shown.
BIN
GameData/PlayerSettings.msgpack
(Stored with Git LFS)
BIN
GameData/PlayerSettings.msgpack
(Stored with Git LFS)
Binary file not shown.
BIN
UserSettings/EditorUserSettings.asset
(Stored with Git LFS)
BIN
UserSettings/EditorUserSettings.asset
(Stored with Git LFS)
Binary file not shown.
Loading…
Reference in a new issue