edit shader

This commit is contained in:
2022-11-09 13:30:45 +05:00
parent dc088ea164
commit 213707fac7
13 changed files with 3170 additions and 307 deletions
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -93,7 +93,7 @@ Material:
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _EnvironmentReflections: 1
- _Exposure: 1.3
- _Exposure: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
+1
View File
@@ -134,6 +134,7 @@ Material:
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0, g: 78.737816, b: 1825.2128, a: 1}
- _EffectColor: {r: 0, g: 13.76295, b: 63.99999, a: 1}
- _EffectPosition: {r: -2, g: -3.15, b: -9.37, a: 0}
- _EmissionColor: {r: 12.216553, g: 1024, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
@@ -117,7 +117,7 @@ Material:
- _QueueControl: 0
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.796
- _Smoothness: 1
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
@@ -97,14 +97,14 @@ Material:
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Metallic: 1
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueControl: 0
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 1
- _Smoothness: 0.954
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
+15 -162
View File
@@ -144,9 +144,6 @@
{
"m_Id": "e5ff4971fb154d9f988a963f3e83777c"
},
{
"m_Id": "2915024b9c214e1da7d4be370c929cb4"
},
{
"m_Id": "73c6e7a38d9e48c1868eda1958ad1e39"
},
@@ -301,34 +298,6 @@
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "2915024b9c214e1da7d4be370c929cb4"
},
"m_SlotId": 1
},
"m_InputSlot": {
"m_Node": {
"m_Id": "15601a4ed7294a4f9a7a71950e5939d2"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "2915024b9c214e1da7d4be370c929cb4"
},
"m_SlotId": 1
},
"m_InputSlot": {
"m_Node": {
"m_Id": "73c6e7a38d9e48c1868eda1958ad1e39"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
@@ -665,6 +634,20 @@
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "e5ff4971fb154d9f988a963f3e83777c"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "15601a4ed7294a4f9a7a71950e5939d2"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
@@ -674,7 +657,7 @@
},
"m_InputSlot": {
"m_Node": {
"m_Id": "2915024b9c214e1da7d4be370c929cb4"
"m_Id": "73c6e7a38d9e48c1868eda1958ad1e39"
},
"m_SlotId": 0
}
@@ -1510,52 +1493,6 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.SplitNode",
"m_ObjectId": "2915024b9c214e1da7d4be370c929cb4",
"m_Group": {
"m_Id": ""
},
"m_Name": "Split",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 1297.0,
"y": -603.0000610351563,
"width": 118.0,
"height": 149.00003051757813
}
},
"m_Slots": [
{
"m_Id": "a79a22093c744bc39b0e578a2f5b4961"
},
{
"m_Id": "3b7dcc3861e14aaa9b08ec00fb500c20"
},
{
"m_Id": "e7d42599fbf34d3087c2b3d0d29782fd"
},
{
"m_Id": "76dd199a10404713b3bba839d418ce80"
},
{
"m_Id": "a447623096864ab3b4bd3c0078932ab8"
}
],
"synonyms": [
"separate"
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
@@ -1716,21 +1653,6 @@
"m_PositionSource": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "3b7dcc3861e14aaa9b08ec00fb500c20",
"m_Id": 1,
"m_DisplayName": "R",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "R",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
@@ -2688,21 +2610,6 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "76dd199a10404713b3bba839d418ce80",
"m_Id": 3,
"m_DisplayName": "B",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "B",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
@@ -3691,21 +3598,6 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "a447623096864ab3b4bd3c0078932ab8",
"m_Id": 4,
"m_DisplayName": "A",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "A",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
@@ -3739,30 +3631,6 @@
"m_DefaultType": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "a79a22093c744bc39b0e578a2f5b4961",
"m_Id": 0,
"m_DisplayName": "In",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "In",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalLitSubTarget",
@@ -5151,21 +5019,6 @@
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "e7d42599fbf34d3087c2b3d0d29782fd",
"m_Id": 2,
"m_DisplayName": "G",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "G",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
+178 -80
View File
@@ -25,7 +25,7 @@ RenderSettings:
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SubtractiveShadowColor: {r: 1, g: 1, b: 1, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
@@ -332,7 +332,7 @@ Camera:
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
@@ -378,7 +378,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &430212691
MonoBehaviour:
@@ -392,7 +392,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 619f23720390a5346b50c495d0c723e9, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &690718088
--- !u!1 &599115056
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -400,92 +400,112 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 690718089}
- component: {fileID: 690718092}
- component: {fileID: 690718091}
- component: {fileID: 690718090}
- component: {fileID: 599115061}
- component: {fileID: 599115060}
- component: {fileID: 599115059}
- component: {fileID: 599115058}
- component: {fileID: 599115057}
m_Layer: 5
m_Name: GetPictureButton
m_Name: CanvasLoading
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &690718089
--- !u!225 &599115057
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 599115056}
m_Enabled: 1
m_Alpha: 0
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!114 &599115058
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 599115056}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &599115059
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 599115056}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!223 &599115060
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 599115056}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 1
m_TargetDisplay: 0
--- !u!224 &599115061
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 690718088}
m_GameObject: {fileID: 599115056}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2118604266}
m_RootOrder: 1
m_Children:
- {fileID: 1364199673}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 120}
m_SizeDelta: {x: 168, y: 168}
m_Pivot: {x: 0.5, y: 0}
--- !u!114 &690718090
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 690718088}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Delegates:
- eventID: 4
callback:
m_PersistentCalls:
m_Calls: []
--- !u!114 &690718091
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 690718088}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 6d86aabbcd358fb41b6eb193b19a9993, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &690718092
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 690718088}
m_CullTransparentMesh: 1
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, y: 0}
--- !u!1 &697059564
GameObject:
m_ObjectHideFlags: 0
@@ -700,6 +720,7 @@ MonoBehaviour:
aspectRatioFitter: {fileID: 1514793394}
rawImage: {fileID: 1514793391}
scanFrame: {fileID: 1514793390}
camTexture: {fileID: 0}
--- !u!1 &1053156471
GameObject:
m_ObjectHideFlags: 0
@@ -731,6 +752,8 @@ MonoBehaviour:
m_EditorClassIdentifier:
sigletonComponents:
- {fileID: 430212686}
- {fileID: 599115056}
loadingCanvas: {fileID: 599115057}
--- !u!4 &1053156473
Transform:
m_ObjectHideFlags: 0
@@ -744,7 +767,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1156704440
GameObject:
@@ -1020,7 +1043,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1166376663
GameObject:
@@ -1116,6 +1139,82 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1166376663}
m_CullTransparentMesh: 1
--- !u!1 &1364199672
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1364199673}
- component: {fileID: 1364199675}
- component: {fileID: 1364199674}
m_Layer: 5
m_Name: Fade
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1364199673
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1364199672}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 599115061}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1364199674
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1364199672}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1364199675
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1364199672}
m_CullTransparentMesh: 1
--- !u!1 &1514793390
GameObject:
m_ObjectHideFlags: 0
@@ -1392,7 +1491,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2015041552
MonoBehaviour:
@@ -1442,7 +1541,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!114 &2118604263
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1517,7 +1616,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1166376664}
- {fileID: 690718089}
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+17 -4
View File
@@ -4,6 +4,7 @@ using System.Collections;
using System.Threading.Tasks;
using System.Collections.Generic;
using DG.Tweening;
using UnityEngine;
using UnityEngine.SceneManagement;
@@ -13,15 +14,27 @@ public class GameSystem : MonoBehaviour
public List<IGameComponent> gameComponents { get; private set; } = new List<IGameComponent>();
[SerializeField] GameObject[] sigletonComponents;
[SerializeField] CanvasGroup loadingCanvas;
public event Action OnSceneLoaded;
public async void LoadScene(string sceneName)
public void LoadScene(string sceneName)
{
var sceneLoadingOperation = SceneManager.LoadSceneAsync(sceneName, LoadSceneMode.Single);
while(!sceneLoadingOperation.isDone) await Task.Yield();
if(!loadingCanvas.gameObject.activeSelf)
loadingCanvas.gameObject.SetActive(true);
OnSceneLoaded?.Invoke();
loadingCanvas.DOFade(1, .5f).OnComplete(async() =>
{
var qrReader = FindObjectOfType<QRCodeReader>();
qrReader.camTexture.Stop();
var sceneLoadingOperation = SceneManager.LoadSceneAsync(sceneName, LoadSceneMode.Single);
while(!sceneLoadingOperation.isDone) await Task.Yield();
OnSceneLoaded?.Invoke();
loadingCanvas.gameObject.SetActive(false);
});
}
+40 -1
View File
@@ -1,3 +1,4 @@
using System.Linq;
using System.Collections;
using System.Collections.Generic;
@@ -9,6 +10,28 @@ public class InputHandler : MonoBehaviour, IGameComponent
private Controls inputSystem;
private Transform cameraTransform;
private float X0;
private float P0;
private readonly float F = 1;
private readonly float Q = 2;
private readonly float H = 1;
private readonly float R = 15;
private float Covariance = .1f;
private float state = 0;
float GetValueAfterFilter(float value)
{
X0 = F * state;
P0 = F * Covariance * F + Q;
var K = H *P0 / (H * P0 * H + R);
state = X0 + K * (value - H * X0);
Covariance = (1 - K * H) * P0;
return state;
}
void Awake()
{
inputSystem = new Controls();
@@ -39,7 +62,23 @@ public class InputHandler : MonoBehaviour, IGameComponent
.Gyroscope
.ReadValue<Quaternion>();
cameraTransform.rotation = phoneRotation;
// phoneRotation = new Quaternion
// (
// GetValueAfterFilter(phoneRotation.x),
// GetValueAfterFilter(phoneRotation.y),
// GetValueAfterFilter(phoneRotation.z),
// GetValueAfterFilter(phoneRotation.w)
// );
Quaternion filtredRotation = new Quaternion
(
GetValueAfterFilter(phoneRotation.x),
GetValueAfterFilter(phoneRotation.y),
GetValueAfterFilter(phoneRotation.z),
GetValueAfterFilter(phoneRotation.w)
);
cameraTransform.rotation = filtredRotation;
cameraTransform.Rotate(0, 0, 180, Space.Self);
cameraTransform.Rotate(90, 180, 0, Space.World);
}
+5 -7
View File
@@ -14,10 +14,10 @@ public class QRCodeReader : MonoBehaviour
public event Action<string> OnQRCodeRead;
[SerializeField] AspectRatioFitter aspectRatioFitter;
[SerializeField] RawImage rawImage;
[SerializeField] GameObject scanFrame;
public RawImage rawImage;
public GameObject scanFrame;
private WebCamTexture camTexture;
public WebCamTexture camTexture;
private Coroutine c_QRScanningRoutine;
void Start()
@@ -98,12 +98,10 @@ public class QRCodeReader : MonoBehaviour
}
catch { }
yield return new WaitForSeconds(1f);
yield return new WaitForSeconds(.5f);
}
camTexture.Stop();
gameObject.SetActive(false);
scanFrame.SetActive(false);
yield return new WaitForSeconds(1);
OnQRCodeRead?.Invoke(result.Text);
}
+1 -1
View File
@@ -11,7 +11,7 @@ public class SceneHandler : MonoBehaviour
async Task Start()
{
var skyboxExposure = skyboxMaterial.GetFloat("_Exposure");
var skyboxExposure = 1;
float currentExposure = 0;
skyboxMaterial.SetFloat("_Exposure", 0);
+3 -3
View File
@@ -146,12 +146,12 @@ PlayerSettings:
enable360StereoCapture: 0
isWsaHolographicRemotingEnabled: 0
enableFrameTimingStats: 0
enableOpenGLProfilerGPURecorders: 1
enableOpenGLProfilerGPURecorders: 0
useHDRDisplay: 0
D3DHDRBitDepth: 0
m_ColorGamuts: 00000000
targetPixelDensity: 30
resolutionScalingMode: 0
targetPixelDensity: 300
resolutionScalingMode: 1
resetResolutionOnWindowResize: 0
androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1
+45 -45
View File
@@ -19,7 +19,7 @@ MonoBehaviour:
width: 2560
height: 1357
m_ShowMode: 4
m_Title: Scene
m_Title: Console
m_RootView: {fileID: 10}
m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000}
@@ -43,8 +43,8 @@ MonoBehaviour:
y: 0
width: 784
height: 988
m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021}
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 22}
m_Panes:
- {fileID: 22}
@@ -69,8 +69,8 @@ MonoBehaviour:
y: 0
width: 922
height: 988
m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021}
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 21}
m_Panes:
- {fileID: 21}
@@ -96,8 +96,8 @@ MonoBehaviour:
y: 0
width: 868
height: 319
m_MinSize: {x: 102, y: 121}
m_MaxSize: {x: 4002, y: 4021}
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 23}
m_Panes:
- {fileID: 23}
@@ -127,7 +127,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 100}
m_MaxSize: {x: 16192, y: 8096}
vertical: 0
controlID: 89
controlID: 19
--- !u!114 &6
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -152,7 +152,7 @@ MonoBehaviour:
m_MinSize: {x: 400, y: 200}
m_MaxSize: {x: 32384, y: 16192}
vertical: 0
controlID: 15
controlID: 78
--- !u!114 &7
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -163,7 +163,7 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: InspectorWindow
m_Name: ftRenderLightmap
m_EditorClassIdentifier:
m_Children: []
m_Position:
@@ -172,15 +172,15 @@ MonoBehaviour:
y: 0
width: 521
height: 1307
m_MinSize: {x: 276, y: 71}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 19}
m_MinSize: {x: 271, y: 721}
m_MaxSize: {x: 271, y: 841}
m_ActualView: {fileID: 16}
m_Panes:
- {fileID: 19}
- {fileID: 16}
- {fileID: 17}
m_Selected: 0
m_LastSelected: 1
m_Selected: 1
m_LastSelected: 0
--- !u!114 &8
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -200,8 +200,8 @@ MonoBehaviour:
y: 0
width: 333
height: 988
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 20}
m_Panes:
- {fileID: 20}
@@ -328,7 +328,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192}
vertical: 1
controlID: 16
controlID: 18
--- !u!114 &14
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -354,7 +354,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 100}
m_MaxSize: {x: 24288, y: 8096}
vertical: 0
controlID: 17
controlID: 155
--- !u!114 &15
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -1564,22 +1564,22 @@ MonoBehaviour:
m_SkipHidden: 0
m_SearchArea: 1
m_Folders:
- Assets/Textures/UI/Buttons
- Assets/Scenes
m_Globs: []
m_OriginalText:
m_ViewMode: 1
m_StartGridSize: 64
m_LastFolders:
- Assets/Textures/UI/Buttons
- Assets/Scenes
m_LastFoldersGridSize: -1
m_LastProjectPath: D:\UnityProjects\CPPK-AR
m_LockTracker:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 138}
m_SelectedIDs: ce830000
m_LastClickedID: 33742
m_ExpandedIDs: 000000006e8300009a830000d083000000ca9a3bffffff7f
scrollPos: {x: 0, y: 79}
m_SelectedIDs: d4780000
m_LastClickedID: 30932
m_ExpandedIDs: 00000000ec760000ce780000da78000010790000429f000000ca9a3bffffff7f
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -1607,7 +1607,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 000000006e830000
m_ExpandedIDs: 00000000ec760000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -1737,21 +1737,21 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: ecefffff
m_ExpandedIDs: 90befdff42bffdffe4c2fdffe8c2fdffcac8fdff7cc9fdff1ecdfdff22cdfdff9ed2fdff50d3fdfff2d6fdfff6d6fdfff6dcfdffa8ddfdff4ae1fdff4ee1fdfff6e7fdffa8e8fdff4aecfdff4eecfdffe2fffdff6a04feff1e05feffb808feffd808feffca0efeff800ffeff1a13feff3a13feff4e18feff0419feff9e1cfeffbe1cfeff6a24feff2025feffbe28feffe428feff8432feff3e33feffd836fefff836fefff23ffeffaa40feff4444feff6444feffb451feff7452feff0e56feff2e56feffaa7efeffec89feffa68afeff4a8efeff4e8efeff2408ffffde08ffff240affff280affff020dffffbc0dffff020fffff060fffff7617ffff7e21ffff6425ffff1626ffff5c27ffff6027ffffdc33ffff8e34ffff3438ffff3c38ffffc43cffffce86ffffd086ffff6e87ffff96bbffff42bcffffe8d2ffff86d3ffff30fbfffff4ffffff14920000cc9d00002eb20000c0d50000a8d60000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
m_OriginalName:
m_Name: SM_Station_Pechatnici
m_OriginalName: SM_Station_Pechatnici
m_EditFieldRect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
m_UserData: 0
m_UserData: -98648
m_IsWaitingForDelay: 0
m_IsRenaming: 0
m_OriginalEventType: 11
m_OriginalEventType: 0
m_IsRenamingFilename: 0
m_ClientGUIView: {fileID: 8}
m_SearchString:
@@ -1781,8 +1781,8 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: -31667
y: -31970
x: 333
y: 73
width: 920
height: 967
m_ViewDataDictionary: {fileID: 0}
@@ -2019,9 +2019,9 @@ MonoBehaviour:
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: 194.27197, y: 1209.3735, z: 116.16136}
m_Target: {x: -6.5454726, y: 2.4603424, z: -0.019085975}
speed: 2
m_Value: {x: 233.95924, y: 1174.8583, z: 116.161354}
m_Value: {x: -6.5454726, y: 2.4603424, z: -0.019085975}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
@@ -2072,9 +2072,9 @@ MonoBehaviour:
speed: 2
m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size:
m_Target: 2255.0442
m_Target: 0.8660254
speed: 2
m_Value: 2157.937
m_Value: 0.8660254
m_Ortho:
m_Target: 1
speed: 2
@@ -2092,7 +2092,7 @@ MonoBehaviour:
m_FarClip: 10000
m_DynamicClip: 0
m_OcclusionCulling: 0
m_LastSceneViewRotation: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226}
m_LastSceneViewRotation: {x: 0.012598267, y: -0.74861985, z: -0.014484572, w: -0.6631146}
m_LastSceneViewOrtho: 0
m_ReplacementShader: {fileID: 0}
m_ReplacementString:
@@ -2158,7 +2158,7 @@ MonoBehaviour:
m_VAllowExceedBaseRangeMax: 1
m_ScaleWithWindow: 0
m_HSlider: 0
m_VSlider: 1
m_VSlider: 0
m_IgnoreScrollWheelUntilClicked: 0
m_EnableMouseInput: 1
m_EnableSliderZoomHorizontal: 0
@@ -2171,7 +2171,7 @@ MonoBehaviour:
y: 21
width: 782
height: 946
m_Scale: {x: 0.44768518, y: 0.44768518}
m_Scale: {x: 0.43796295, y: 0.43796295}
m_Translation: {x: 391, y: 473}
m_MarginLeft: 0
m_MarginRight: 0
@@ -2179,12 +2179,12 @@ MonoBehaviour:
m_MarginBottom: 0
m_LastShownAreaInsideMargins:
serializedVersion: 2
x: -873.3816
y: -1056.546
width: 1746.7632
height: 2113.092
x: -892.7696
y: -1080
width: 1785.5392
height: 2160
m_MinimalGUI: 1
m_defaultScale: 0.44768518
m_defaultScale: 0.43796295
m_LastWindowPixelSize: {x: 782, y: 967}
m_ClearInEditMode: 1
m_NoCameraWarning: 1