移植来自 github.com/yunoda-3DCG/Simple-CRT-Shader 的crtshader

滤镜参数现在支持int类型
滤镜参数支持自定义命名
This commit is contained in:
ALIENJACK\alien 2025-01-10 15:49:31 +08:00
parent 5054bfd57a
commit e5667b55a1
13 changed files with 1216 additions and 11 deletions

View File

@ -723,6 +723,81 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
animator: {fileID: 8744505332349586225} animator: {fileID: 8744505332349586225}
--- !u!1 &2011250662246569413
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2971252204166660888}
- component: {fileID: 8603130728764424453}
- component: {fileID: 5558698359590655883}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2971252204166660888
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2011250662246569413}
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: 623010347094537687}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.25}
m_AnchorMax: {x: 1, y: 0.75}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8603130728764424453
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2011250662246569413}
m_CullTransparentMesh: 1
--- !u!114 &5558698359590655883
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2011250662246569413}
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: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
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!1 &2471254561136382013 --- !u!1 &2471254561136382013
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -877,6 +952,42 @@ MonoBehaviour:
m_Icon: {fileID: 394891843266770919} m_Icon: {fileID: 394891843266770919}
ExpandFlag: {fileID: 1501213187178026014} ExpandFlag: {fileID: 1501213187178026014}
ApplyFlag: {fileID: 3335801350916860509} ApplyFlag: {fileID: 3335801350916860509}
--- !u!1 &2660711182228429640
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5502792356073001137}
m_Layer: 5
m_Name: Fill Area
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5502792356073001137
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2660711182228429640}
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:
- {fileID: 9033422041994042558}
m_Father: {fileID: 623010347094537687}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.25}
m_AnchorMax: {x: 1, y: 0.75}
m_AnchoredPosition: {x: -5, y: 0}
m_SizeDelta: {x: -20, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &3335801350916860509 --- !u!1 &3335801350916860509
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1260,6 +1371,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 2450201408575734812} - {fileID: 2450201408575734812}
- {fileID: 7216060871118576844} - {fileID: 7216060871118576844}
- {fileID: 3461365397350504029}
- {fileID: 816049057894123782} - {fileID: 816049057894123782}
m_Father: {fileID: 4478785627166277610} m_Father: {fileID: 4478785627166277610}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -1283,6 +1395,7 @@ MonoBehaviour:
m_MenuNameTxt: {fileID: 6349204039935213934} m_MenuNameTxt: {fileID: 6349204039935213934}
m_Icon: {fileID: 1062489471918314902} m_Icon: {fileID: 1062489471918314902}
com_floatEdit: {fileID: 3979886008433050043} com_floatEdit: {fileID: 3979886008433050043}
com_intEdit: {fileID: 7283495606979218283}
com_enumEdit: {fileID: 3614321873420207159} com_enumEdit: {fileID: 3614321873420207159}
--- !u!114 &4314371315188452187 --- !u!114 &4314371315188452187
MonoBehaviour: MonoBehaviour:
@ -1330,6 +1443,178 @@ MonoBehaviour:
m_FlexibleWidth: -1 m_FlexibleWidth: -1
m_FlexibleHeight: -1 m_FlexibleHeight: -1
m_LayoutPriority: 1 m_LayoutPriority: 1
--- !u!1 &5368404913088401643
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5211094055976679099}
m_Layer: 5
m_Name: Handle Slide Area
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5211094055976679099
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5368404913088401643}
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:
- {fileID: 4027954690118145370}
m_Father: {fileID: 623010347094537687}
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!1 &5564584920301875764
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7900345916139696652}
- component: {fileID: 4039086934110648845}
m_Layer: 5
m_Name: content
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7900345916139696652
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5564584920301875764}
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:
- {fileID: 623010347094537687}
- {fileID: 345486178931433765}
m_Father: {fileID: 3461365397350504029}
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 &4039086934110648845
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5564584920301875764}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 5
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1 &5830336849912211446
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3461365397350504029}
- component: {fileID: 9093150501524936851}
- component: {fileID: 7283495606979218283}
m_Layer: 5
m_Name: IntEdit
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3461365397350504029
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5830336849912211446}
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:
- {fileID: 7900345916139696652}
m_Father: {fileID: 278706555072840209}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
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 &9093150501524936851
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5830336849912211446}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: 40
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &7283495606979218283
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5830336849912211446}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: abad743de1574354f99efc5054aa6b43, type: 3}
m_Name:
m_EditorClassIdentifier:
slider: {fileID: 5919193658528722431}
txt_value: {fileID: 6075532957906331759}
--- !u!1 &5894141955990945432 --- !u!1 &5894141955990945432
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1394,6 +1679,117 @@ MonoBehaviour:
m_ChildScaleWidth: 0 m_ChildScaleWidth: 0
m_ChildScaleHeight: 0 m_ChildScaleHeight: 0
m_ReverseArrangement: 0 m_ReverseArrangement: 0
--- !u!1 &6058311224544485353
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 623010347094537687}
- component: {fileID: 5919193658528722431}
- component: {fileID: 5682207136112565641}
m_Layer: 5
m_Name: Slider
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &623010347094537687
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6058311224544485353}
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:
- {fileID: 2971252204166660888}
- {fileID: 5502792356073001137}
- {fileID: 5211094055976679099}
m_Father: {fileID: 7900345916139696652}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
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 &5919193658528722431
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6058311224544485353}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 67db9e8f0e2ae9c40bc1e2b64352a6b4, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 0
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 3790767580891084363}
m_FillRect: {fileID: 9033422041994042558}
m_HandleRect: {fileID: 4027954690118145370}
m_Direction: 0
m_MinValue: 0
m_MaxValue: 1
m_WholeNumbers: 0
m_Value: 0
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!114 &5682207136112565641
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6058311224544485353}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: 5
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &6312116949113707702 --- !u!1 &6312116949113707702
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1466,6 +1862,106 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
slider: {fileID: 6489571631904078165} slider: {fileID: 6489571631904078165}
txt_value: {fileID: 6176548475786947694} txt_value: {fileID: 6176548475786947694}
--- !u!1 &6551251729527098609
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 345486178931433765}
- component: {fileID: 7323868397581272064}
- component: {fileID: 6075532957906331759}
- component: {fileID: 6388778664118236617}
m_Layer: 5
m_Name: value
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &345486178931433765
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6551251729527098609}
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: 7900345916139696652}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
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!222 &7323868397581272064
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6551251729527098609}
m_CullTransparentMesh: 1
--- !u!114 &6075532957906331759
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6551251729527098609}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, 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_FontData:
m_Font: {fileID: 12800000, guid: 33a3bdf8f6bd1ec4eba7c4bc58183212, type: 3}
m_FontSize: 20
m_FontStyle: 0
m_BestFit: 1
m_MinSize: 2
m_MaxSize: 20
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 0
--- !u!114 &6388778664118236617
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6551251729527098609}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 50
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &6669948312920191200 --- !u!1 &6669948312920191200
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1675,6 +2171,81 @@ MonoBehaviour:
m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5}
m_EffectDistance: {x: 1.5, y: -1.5} m_EffectDistance: {x: 1.5, y: -1.5}
m_UseGraphicAlpha: 1 m_UseGraphicAlpha: 1
--- !u!1 &7579340952198812870
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9033422041994042558}
- component: {fileID: 9210239002563918603}
- component: {fileID: 4055457614720979564}
m_Layer: 5
m_Name: Fill
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9033422041994042558
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7579340952198812870}
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: 5502792356073001137}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 10, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9210239002563918603
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7579340952198812870}
m_CullTransparentMesh: 1
--- !u!114 &4055457614720979564
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7579340952198812870}
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: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
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!1 &8045610840842517781 --- !u!1 &8045610840842517781
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2064,6 +2635,81 @@ MonoBehaviour:
m_FlexibleWidth: -1 m_FlexibleWidth: -1
m_FlexibleHeight: -1 m_FlexibleHeight: -1
m_LayoutPriority: 1 m_LayoutPriority: 1
--- !u!1 &8670820869058111882
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4027954690118145370}
- component: {fileID: 4961390550090550147}
- component: {fileID: 3790767580891084363}
m_Layer: 5
m_Name: Handle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4027954690118145370
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8670820869058111882}
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: 5211094055976679099}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: -20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4961390550090550147
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8670820869058111882}
m_CullTransparentMesh: 1
--- !u!114 &3790767580891084363
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8670820869058111882}
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: 10911, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
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!1 &8884391103430529053 --- !u!1 &8884391103430529053
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -1,6 +1,7 @@
using Assets.Script.AppMain.Filter; using Assets.Script.AppMain.Filter;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using UnityEngine; using UnityEngine;
@ -53,12 +54,12 @@ namespace AxibugEmuOnline.Client
var rangeAtt = param.GetCustomAttribute<RangeAttribute>(); var rangeAtt = param.GetCustomAttribute<RangeAttribute>();
float min = 0; float min = 0;
float max = 10; float max = 10;
if (rangeAtt != null) if (rangeAtt != null) { min = rangeAtt.min; max = rangeAtt.max; }
{
min = rangeAtt.min; max = rangeAtt.max; var descrip = param.GetCustomAttribute<DescriptionAttribute>();
} string name = descrip != null ? descrip.Description : param.Name;
var editableParam = new EditableParamerter(param.Name, paramObj, min, max); var editableParam = new EditableParamerter(name, paramObj, min, max);
m_editableParamList.Add(editableParam); m_editableParamList.Add(editableParam);
} }
} }
@ -86,15 +87,23 @@ namespace AxibugEmuOnline.Client
public object MinValue { get; private set; } public object MinValue { get; private set; }
public object MaxValue { get; private set; } public object MaxValue { get; private set; }
public EditableParamerter(string name, FilterParameter paramObject, object minValue, object maxValue) public EditableParamerter(string name, FilterParameter paramObject, float minValue, float maxValue)
{ {
m_paramObject = paramObject; m_paramObject = paramObject;
Name = name; Name = name;
var paramType = paramObject.GetType(); var paramType = paramObject.GetType();
MinValue = minValue; if (paramObject.ValueType == typeof(int))
MaxValue = maxValue; {
MinValue = (int)minValue;
MaxValue = (int)maxValue;
}
else if (paramObject.ValueType == typeof(float))
{
MinValue = minValue;
MaxValue = maxValue;
}
} }
public void ResetToDefault() => m_paramObject.Value = null; public void ResetToDefault() => m_paramObject.Value = null;

View File

@ -331,6 +331,12 @@ namespace AxibugEmuOnline.Client
float.TryParse(rawStr, out floatVal); float.TryParse(rawStr, out floatVal);
return floatVal; return floatVal;
} }
else if (valueType == typeof(int))
{
int intVal;
int.TryParse(rawStr, out intVal);
return intVal;
}
else if (valueType.IsEnum) else if (valueType.IsEnum)
{ {
var names = Enum.GetNames(valueType); var names = Enum.GetNames(valueType);

View File

@ -13,7 +13,7 @@ namespace Assets.Script.AppMain.Filter
{ {
get => m_overrideValue ?? m_defaultValue; get => m_overrideValue ?? m_defaultValue;
set => m_overrideValue = value; set => m_overrideValue = value;
} }
} }
public class FilterParameter<T> : FilterParameter public class FilterParameter<T> : FilterParameter
@ -34,15 +34,40 @@ namespace Assets.Script.AppMain.Filter
public class BoolParameter : FilterParameter<bool> public class BoolParameter : FilterParameter<bool>
{ {
public BoolParameter(bool defaultValue) : base(defaultValue) { } public BoolParameter(bool defaultValue) : base(defaultValue) { }
public static implicit operator bool(BoolParameter value)
{
return value.GetValue();
}
} }
public class Vector2Parameter : FilterParameter<Vector2> public class Vector2Parameter : FilterParameter<Vector2>
{ {
public Vector2Parameter(Vector2 defaultValue) : base(defaultValue) { } public Vector2Parameter(Vector2 defaultValue) : base(defaultValue) { }
public static implicit operator Vector2(Vector2Parameter value)
{
return value.GetValue();
}
} }
public class FloatParameter : FilterParameter<float> public class FloatParameter : FilterParameter<float>
{ {
public FloatParameter(float defaultValue) : base(defaultValue) { } public FloatParameter(float defaultValue) : base(defaultValue) { }
public static implicit operator float(FloatParameter value)
{
return value.GetValue();
}
}
public class IntParameter : FilterParameter<int>
{
public IntParameter(int defaultValue) : base(defaultValue) { }
public static implicit operator int(IntParameter value)
{
return value.GetValue();
}
} }
} }

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 36463068bd4c2274cb302669fa552345
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,196 @@
using Assets.Script.AppMain.Filter;
using AxibugEmuOnline.Client;
using System.ComponentModel;
using UnityEngine;
using Random = UnityEngine.Random;
public class SimpleCRT : FilterEffect
{
public override string Name => nameof(SimpleCRT);
protected override string ShaderName => "Filter/yunoda-3DCG/SimpleCRT";
[Range(0, 1000)]
[Description("White Noise Freq")]
public IntParameter whiteNoiseFrequency = new IntParameter(1);
[Range(0, 1)]
[Description("White Noise Time Left (sec)")]
public FloatParameter whiteNoiseLength = new FloatParameter(0.1f);
private float whiteNoiseTimeLeft;
public int screenJumpFrequency = 1;
public float screenJumpLength = 0.2f;
public float screenJumpMinLevel = 0.1f;
public float screenJumpMaxLevel = 0.9f;
private float screenJumpTimeLeft;
public float flickeringStrength = 0.002f;
public float flickeringCycle = 111f;
public bool isSlippage = true;
public bool isSlippageNoise = true;
public float slippageStrength = 0.005f;
public float slippageInterval = 1f;
public float slippageScrollSpeed = 33f;
public float slippageSize = 11f;
public float chromaticAberrationStrength = 0.005f;
public bool isChromaticAberration = true;
public bool isMultipleGhost = true;
public float multipleGhostStrength = 0.01f;
public bool isScanline = true;
public bool isMonochrome = false;
public bool isLetterBox = false;
public bool isLetterBoxEdgeBlur = false;
public LeterBoxType letterBoxType;
public enum LeterBoxType
{
Black,
Blur
}
public bool isFilmDirt = false;
public Texture2D filmDirtTex;
public bool isDecalTex = false;
public Texture2D decalTex;
public Vector2 decalTexPos;
public Vector2 decalTexScale;
public Vector2Int resolutions;
#region Properties in shader
private int _WhiteNoiseOnOff;
private int _ScanlineOnOff;
private int _MonochormeOnOff;
private int _ScreenJumpLevel;
private int _FlickeringStrength;
private int _FlickeringCycle;
private int _SlippageStrength;
private int _SlippageSize;
private int _SlippageInterval;
private int _SlippageScrollSpeed;
private int _SlippageNoiseOnOff;
private int _SlippageOnOff;
private int _ChromaticAberrationStrength;
private int _ChromaticAberrationOnOff;
private int _MultipleGhostOnOff;
private int _MultipleGhostStrength;
private int _LetterBoxOnOff;
private int _LetterBoxType;
private int _LetterBoxEdgeBlurOnOff;
private int _DecalTex;
private int _DecalTexOnOff;
private int _DecalTexPos;
private int _DecalTexScale;
private int _FilmDirtOnOff;
private int _FilmDirtTex;
#endregion
protected override void OnInit(Material renderMat)
{
base.OnInit(renderMat);
_WhiteNoiseOnOff = Shader.PropertyToID("_WhiteNoiseOnOff");
_ScanlineOnOff = Shader.PropertyToID("_ScanlineOnOff");
_MonochormeOnOff = Shader.PropertyToID("_MonochormeOnOff");
_ScreenJumpLevel = Shader.PropertyToID("_ScreenJumpLevel");
_FlickeringStrength = Shader.PropertyToID("_FlickeringStrength");
_FlickeringCycle = Shader.PropertyToID("_FlickeringCycle");
_SlippageStrength = Shader.PropertyToID("_SlippageStrength");
_SlippageSize = Shader.PropertyToID("_SlippageSize");
_SlippageInterval = Shader.PropertyToID("_SlippageInterval");
_SlippageScrollSpeed = Shader.PropertyToID("_SlippageScrollSpeed");
_SlippageNoiseOnOff = Shader.PropertyToID("_SlippageNoiseOnOff");
_SlippageOnOff = Shader.PropertyToID("_SlippageOnOff");
_ChromaticAberrationStrength = Shader.PropertyToID("_ChromaticAberrationStrength");
_ChromaticAberrationOnOff = Shader.PropertyToID("_ChromaticAberrationOnOff");
_MultipleGhostOnOff = Shader.PropertyToID("_MultipleGhostOnOff");
_MultipleGhostStrength = Shader.PropertyToID("_MultipleGhostStrength");
_LetterBoxOnOff = Shader.PropertyToID("_LetterBoxOnOff");
_LetterBoxType = Shader.PropertyToID("_LetterBoxType");
_DecalTex = Shader.PropertyToID("_DecalTex");
_DecalTexOnOff = Shader.PropertyToID("_DecalTexOnOff");
_DecalTexPos = Shader.PropertyToID("_DecalTexPos");
_DecalTexScale = Shader.PropertyToID("_DecalTexScale");
_FilmDirtOnOff = Shader.PropertyToID("_FilmDirtOnOff");
_FilmDirtTex = Shader.PropertyToID("_FilmDirtTex");
}
protected override void OnRenderer(Material renderMat, Texture src, RenderTexture result)
{
SetShaderParameter(renderMat);
Graphics.Blit(src, result, renderMat);
}
private void SetShaderParameter(Material material)
{
///////White noise
whiteNoiseTimeLeft -= 0.01f;
if (whiteNoiseTimeLeft <= 0)
{
if (Random.Range(0, 1000) < whiteNoiseFrequency)
{
material.SetInteger(_WhiteNoiseOnOff, 1);
whiteNoiseTimeLeft = whiteNoiseLength;
}
else
{
material.SetInteger(_WhiteNoiseOnOff, 0);
}
}
//////
material.SetInteger(_LetterBoxOnOff, isLetterBox ? 0 : 1);
//material.SetInteger(_LetterBoxEdgeBlurOnOff, isLetterBoxEdgeBlur ? 0 : 1);
material.SetInteger(_LetterBoxType, (int)letterBoxType);
material.SetInteger(_ScanlineOnOff, isScanline ? 1 : 0);
material.SetInteger(_MonochormeOnOff, isMonochrome ? 1 : 0);
material.SetFloat(_FlickeringStrength, flickeringStrength);
material.SetFloat(_FlickeringCycle, flickeringCycle);
material.SetFloat(_ChromaticAberrationStrength, chromaticAberrationStrength);
material.SetInteger(_ChromaticAberrationOnOff, isChromaticAberration ? 1 : 0);
material.SetInteger(_MultipleGhostOnOff, isMultipleGhost ? 1 : 0);
material.SetFloat(_MultipleGhostStrength, multipleGhostStrength);
material.SetInteger(_FilmDirtOnOff, isFilmDirt ? 1 : 0);
material.SetTexture(_FilmDirtTex, filmDirtTex);
//////Slippage
material.SetInteger(_SlippageOnOff, isSlippage ? 1 : 0);
material.SetFloat(_SlippageInterval, slippageInterval);
material.SetFloat(_SlippageNoiseOnOff, isSlippageNoise ? Random.Range(0, 1f) : 1);
material.SetFloat(_SlippageScrollSpeed, slippageScrollSpeed);
material.SetFloat(_SlippageStrength, slippageStrength);
material.SetFloat(_SlippageSize, slippageSize);
//////
//////Screen Jump Noise
screenJumpTimeLeft -= 0.01f;
if (screenJumpTimeLeft <= 0)
{
if (Random.Range(0, 1000) < screenJumpFrequency)
{
var level = Random.Range(screenJumpMinLevel, screenJumpMaxLevel);
material.SetFloat(_ScreenJumpLevel, level);
screenJumpTimeLeft = screenJumpLength;
}
else
{
material.SetFloat(_ScreenJumpLevel, 0);
}
}
//////
//////Decal Texture
material.SetTexture(_DecalTex, decalTex);
material.SetInteger(_DecalTexOnOff, isDecalTex ? 1 : 0);
material.SetVector(_DecalTexPos, decalTexPos);
material.SetVector(_DecalTexScale, decalTexScale);
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: d4ffc7492874c2241827f1d70c24a1e3

View File

@ -0,0 +1,237 @@
Shader "Filter/yunoda-3DCG/SimpleCRT"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_DecalTex ("Decal Texture", 2D) = "white" {}
_FilmDirtTex ("Dirt Texture", 2D) = "white" {}
}
SubShader
{
Pass
{
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert
#pragma fragment frag
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};
struct v2f
{
float2 uv : TEXCOORD0;
float2 decaluv : TEXCOORD1;
float4 vertex : SV_POSITION;
};
sampler2D _MainTex;
float4 _MainTex_ST;
float4 _MainTex_TexelSize;
int _WhiteNoiseOnOff;
int _ScanlineOnOff;
int _MonochormeOnOff;
int _LetterBoxOnOff;
int _LetterBoxEdgeBlur;
int _LetterBoxType;
float _ScreenJumpLevel;
float _FlickeringStrength;
float _FlickeringCycle;
int _SlippageOnOff;
float _SlippageStrength;
float _SlippageInterval;
float _SlippageScrollSpeed;
float _SlippageNoiseOnOff;
float _SlippageSize;
float _ChromaticAberrationStrength;
int _ChromaticAberrationOnOff;
int _MultipleGhostOnOff;
float _MultipleGhostStrength;
sampler2D _DecalTex;
float4 _DecalTex_ST;
int _DecalTexOnOff;
float2 _DecalTexPos;
float2 _DecalTexScale;
int _FilmDirtOnOff;
sampler2D _FilmDirtTex;
float4 _FilmDirtTex_ST;
float GetRandom(float x);
float EaseIn(float t0, float t1, float t);
v2f vert (appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
o.decaluv = TRANSFORM_TEX(v.uv, _DecalTex);
return o;
}
fixed4 frag (v2f i) : SV_Target
{
float2 uv = i.uv;
/////Jump noise
uv.y = frac(uv.y + _ScreenJumpLevel);
/////
/////frickering
float flickeringNoise = GetRandom(_Time.y);
float flickeringMask = pow(abs(sin(i.uv.y * _FlickeringCycle + _Time.y)), 10);
uv.x = uv.x + (flickeringNoise * _FlickeringStrength * flickeringMask);
/////
/////slippage
float scrollSpeed = _Time.x * _SlippageScrollSpeed;
float slippageMask = pow(abs(sin(i.uv.y * _SlippageInterval + scrollSpeed)), _SlippageSize);
float stepMask = round(sin(i.uv.y * _SlippageInterval + scrollSpeed - 1));
uv.x = uv.x + (_SlippageNoiseOnOff * _SlippageStrength * slippageMask * stepMask) * _SlippageOnOff;
/////
/////Chromatic Aberration
float red = tex2D(_MainTex, float2(uv.x - _ChromaticAberrationStrength * _ChromaticAberrationOnOff, uv.y)).r;
float green = tex2D(_MainTex, float2(uv.x, uv.y)).g;
float blue = tex2D(_MainTex, float2(uv.x + _ChromaticAberrationStrength * _ChromaticAberrationOnOff, uv.y)).b;
float4 color = float4(red, green, blue, 1);
/////
/////Multiple Ghost
float4 ghost1st = tex2D(_MainTex, uv - float2(1, 0) * _MultipleGhostStrength * _MultipleGhostOnOff);
float4 ghost2nd = tex2D(_MainTex, uv - float2(1, 0) * _MultipleGhostStrength * 2 * _MultipleGhostOnOff);
color = color * 0.8 + ghost1st * 0.15 + ghost2nd * 0.05;
/////
/////File dirt
float2 pp = -1.0 + 2.0 * uv;
float time = _Time.x;
float aaRad = 0.1;
float2 nseLookup2 = pp + time * 1000;
float3 nse2 =
tex2D(_FilmDirtTex, 0.1 * nseLookup2.xy).xyz +
tex2D(_FilmDirtTex, 0.01 * nseLookup2.xy).xyz +
tex2D(_FilmDirtTex, 0.004 * nseLookup2.xy).xyz;
float thresh = 0.6;
float mul1 = smoothstep(thresh - aaRad, thresh + aaRad, nse2.x);
float mul2 = smoothstep(thresh - aaRad, thresh + aaRad, nse2.y);
float mul3 = smoothstep(thresh - aaRad, thresh + aaRad, nse2.z);
float seed = tex2D(_FilmDirtTex, float2(time * 0.35, time)).x;
float result = clamp(0, 1, seed + 0.7);
result += 0.06 * EaseIn(19.2, 19.4, time);
float band = 0.05;
if(_FilmDirtOnOff == 1)
{
if( 0.3 < seed && 0.3 + band > seed )
color *= mul1 * result;
else if( 0.6 < seed && 0.6 + band > seed )
color *= mul2 * result;
else if( 0.9 < seed && 0.9 + band > seed )
color *= mul3 * result;
}
/////
/////Letter box
float band_uv = fmod(_MainTex_TexelSize.z, 640) / _MainTex_TexelSize.z / 2;
if(i.uv.x < band_uv || 1 - band_uv < i.uv.x)
{
float pi = 6.28318530718;
float directions = 16.0;
float quality = 3.0;
float size = 8.0;
float2 Radius = size * _MainTex_ST.zw;
float4 samplingColor = tex2D(_MainTex, uv);
for(float d = 0.0; d < pi; d += pi / directions)
{
for(float i = 1.0 / quality; i <= 1.0; i += 1.0 / quality)
{
samplingColor += tex2D(_MainTex, uv + float2(cos(d), sin(d)) * 0.015 * i);
}
}
samplingColor /= quality * directions - 15.0;
if(_LetterBoxOnOff == 1)
{
color = color;
}
else if(_LetterBoxType == 0) // LetterBox is Black
{
color = 0;
}
else if(_LetterBoxType == 1) // LetterBox is Blur
{
color = samplingColor;
}
}
/////
/////White noise
if(_WhiteNoiseOnOff == 1)
{
return frac(sin(dot(i.uv, float2(12.9898, 78.233)) + _Time.x) * 43758.5453);
}
/////
/////Decal texture
float4 decal = tex2D(_DecalTex, (i.decaluv - _DecalTexPos) * _DecalTexScale) * _DecalTexOnOff;
color = color * (1 - decal.a) + decal;
/////
/////Scanline
float scanline = sin((i.uv.y + _Time.x) * 800.0) * 0.04;
color -= scanline * _ScanlineOnOff;
/////
//////scanline noise
float noiseAlpha = 1;
if(pow(sin(uv.y + _Time.y * 2), 200) >= 0.999)
{
noiseAlpha = GetRandom(uv.y);
//color *= noiseAlpha;
}
//////
//////Monochorome
if(_MonochormeOnOff == 1)
{
color.xyz = 0.299f * color.r + 0.587f * color.g + 0.114f * color.b;
}
//////
return color;
}
float GetRandom(float x)
{
return frac(sin(dot(x, float2(12.9898, 78.233))) * 43758.5453);
}
float EaseIn(float t0, float t1, float t)
{
return 2.0 * smoothstep(t0, 2.0 * t1 - t0, t);
}
ENDCG
}
}
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: fdf9f1937116ab84c97a58a4cf82fbf8
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -153,7 +153,7 @@ namespace AxibugEmuOnline.Client
private FilterEffect.EditableParamerter m_param; private FilterEffect.EditableParamerter m_param;
private FilterPreset m_preset; private FilterPreset m_preset;
public override bool Visible => m_param.ValueType.IsEnum || m_param.ValueType == typeof(float); public override bool Visible => true;
public override string Name => m_param.Name; public override string Name => m_param.Name;
public Opt_ParamEditor(Filter filter, FilterEffect.EditableParamerter editParam, FilterPreset preset) public Opt_ParamEditor(Filter filter, FilterEffect.EditableParamerter editParam, FilterPreset preset)

View File

@ -8,6 +8,8 @@ namespace AxibugEmuOnline.Client
[SerializeField] [SerializeField]
OptionUI_ValueEditItem_FloatEdit com_floatEdit; OptionUI_ValueEditItem_FloatEdit com_floatEdit;
[SerializeField] [SerializeField]
OptionUI_ValueEditItem_IntEdit com_intEdit;
[SerializeField]
OptionUI_ValueEditItem_EnumEdit com_enumEdit; OptionUI_ValueEditItem_EnumEdit com_enumEdit;
IValueEditControl m_currentCom; IValueEditControl m_currentCom;
@ -15,6 +17,7 @@ namespace AxibugEmuOnline.Client
protected override void OnSetData(OptionMenu menuData) protected override void OnSetData(OptionMenu menuData)
{ {
com_floatEdit.gameObject.SetActive(false); com_floatEdit.gameObject.SetActive(false);
com_intEdit.gameObject.SetActive(false);
com_enumEdit.gameObject.SetActive(false); com_enumEdit.gameObject.SetActive(false);
if (menuData is ValueSetMenu) if (menuData is ValueSetMenu)
@ -24,6 +27,10 @@ namespace AxibugEmuOnline.Client
{ {
m_currentCom = com_floatEdit; m_currentCom = com_floatEdit;
} }
else if(valueMenu.ValueType == typeof(int))
{
m_currentCom = com_intEdit;
}
else if (valueMenu.ValueType.IsEnum) else if (valueMenu.ValueType.IsEnum)
{ {
m_currentCom = com_enumEdit; m_currentCom = com_enumEdit;

View File

@ -0,0 +1,58 @@
using UnityEngine;
using UnityEngine.UI;
namespace AxibugEmuOnline.Client
{
public class OptionUI_ValueEditItem_IntEdit : MonoBehaviour, IValueEditControl
{
[SerializeField]
Slider slider;
[SerializeField]
Text txt_value;
int m_step;
private ValueSetMenu m_valueMenu;
private void Awake()
{
slider.onValueChanged.AddListener(OnSliderValueChanged);
}
private void OnSliderValueChanged(float value)
{
int intValue = (int)value;
txt_value.text = $"{intValue}";
if (!m_dataSetting) m_valueMenu.OnValueChanged(intValue);
}
bool m_dataSetting;
public void SetData(ValueSetMenu valueMenu)
{
m_dataSetting = true;
m_valueMenu = valueMenu;
slider.minValue = (int)valueMenu.Min;
slider.maxValue = (int)valueMenu.Max;
slider.value = (int)valueMenu.ValueRaw;
slider.wholeNumbers = true;
m_step = 1;
m_dataSetting = false;
}
public void OnLeft()
{
var newValue = Mathf.Clamp(slider.value - m_step, slider.minValue, slider.maxValue);
slider.value = newValue;
}
public void OnRight()
{
var newValue = Mathf.Clamp(slider.value + m_step, slider.minValue, slider.maxValue);
slider.value = newValue;
}
public void OnExecute()
{
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: abad743de1574354f99efc5054aa6b43