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);
loadingCanvas.DOFade(1, .5f).OnComplete(async() =>
{
var qrReader = FindObjectOfType<QRCodeReader>();
qrReader.camTexture.Stop();
OnSceneLoaded?.Invoke();
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);