SFX added

This commit is contained in:
Sewmina Dilshan 2023-08-06 16:46:05 +05:30
parent a0ebd1d3f3
commit 50a2bec854
61 changed files with 35177 additions and 34198 deletions

View File

@ -1,22 +1,12 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1506555509391478}
m_IsPrefabParent: 1
--- !u!1 &1048958803402864
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224396785236523192}
- component: {fileID: 222833382448378890}
@ -29,12 +19,115 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &224396785236523192
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1048958803402864}
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: 224410274476360834}
m_Father: {fileID: 224412111100384724}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 169.8, y: -35.9}
m_SizeDelta: {x: 339.8, y: 71.8}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &222833382448378890
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1048958803402864}
m_CullTransparentMesh: 1
--- !u!114 &114429971286294426
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1048958803402864}
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!114 &114825474698679592
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1048958803402864}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, 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: 1
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: Highlighted
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 114429971286294426}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &1086316119044956
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224412111100384724}
- component: {fileID: 222123731056135654}
@ -47,12 +140,115 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &224412111100384724
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1086316119044956}
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: 224396785236523192}
m_Father: {fileID: 224049503732257422}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 2000, y: 1436}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &222123731056135654
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1086316119044956}
m_CullTransparentMesh: 1
--- !u!114 &114947809371510874
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1086316119044956}
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: 4c69db43dbd474a2987be5807129b4cc, 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!114 &114962388913432892
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1086316119044956}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, 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: 1
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: Highlighted
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 114947809371510874}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &1506555509391478
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224049503732257422}
- component: {fileID: 223443791425986802}
@ -65,12 +261,97 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &224049503732257422
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1506555509391478}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 224408585172404824}
- {fileID: 224412111100384724}
m_Father: {fileID: 0}
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, y: 0}
--- !u!223 &223443791425986802
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1506555509391478}
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_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 0
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 32767
m_TargetDisplay: 0
--- !u!114 &114420769206196330
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1506555509391478}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 2960, y: 1440}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 1
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &114535206133587424
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1506555509391478}
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!1 &1701400232489060
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224410274476360834}
- component: {fileID: 222763382731799498}
@ -82,42 +363,53 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1761048403840336
GameObject:
--- !u!224 &224410274476360834
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224408585172404824}
- component: {fileID: 222519335633903876}
- component: {fileID: 114502356579168518}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1701400232489060}
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: 224396785236523192}
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!222 &222763382731799498
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1701400232489060}
m_CullTransparentMesh: 1
--- !u!114 &114000294713222290
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1701400232489060}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 45
@ -132,73 +424,71 @@ MonoBehaviour:
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Close Ad
--- !u!114 &114420769206196330
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1506555509391478}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 2960, y: 1440}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 1
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!114 &114429971286294426
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1048958803402864}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
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
--- !u!1 &1761048403840336
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224408585172404824}
- component: {fileID: 222519335633903876}
- component: {fileID: 114502356579168518}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &224408585172404824
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1761048403840336}
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: 224049503732257422}
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!222 &222519335633903876
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1761048403840336}
m_CullTransparentMesh: 1
--- !u!114 &114502356579168518
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1761048403840336}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
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: 0.809}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
@ -207,266 +497,5 @@ MonoBehaviour:
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!114 &114535206133587424
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1506555509391478}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &114825474698679592
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1048958803402864}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
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_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_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 114429971286294426}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!114 &114947809371510874
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1086316119044956}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 4c69db43dbd474a2987be5807129b4cc, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!114 &114962388913432892
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1086316119044956}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
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_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_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 114947809371510874}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!222 &222123731056135654
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1086316119044956}
--- !u!222 &222519335633903876
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1761048403840336}
--- !u!222 &222763382731799498
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1701400232489060}
--- !u!222 &222833382448378890
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1048958803402864}
--- !u!223 &223443791425986802
Canvas:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1506555509391478}
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: 0
m_TargetDisplay: 0
--- !u!224 &224049503732257422
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1506555509391478}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 224408585172404824}
- {fileID: 224412111100384724}
m_Father: {fileID: 0}
m_RootOrder: 0
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, y: 0}
--- !u!224 &224396785236523192
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1048958803402864}
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_Children:
- {fileID: 224410274476360834}
m_Father: {fileID: 224412111100384724}
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: 169.8, y: -35.9}
m_SizeDelta: {x: 339.8, y: 71.8}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224408585172404824
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1761048403840336}
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_Children: []
m_Father: {fileID: 224049503732257422}
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!224 &224410274476360834
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1701400232489060}
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_Children: []
m_Father: {fileID: 224396785236523192}
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!224 &224412111100384724
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1086316119044956}
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_Children:
- {fileID: 224396785236523192}
m_Father: {fileID: 224049503732257422}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 2000, y: 1436}
m_Pivot: {x: 0.5, y: 0.5}
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

@ -1,22 +1,12 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1372156606540976}
m_IsPrefabParent: 1
--- !u!1 &1128573709916514
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224613362496813788}
- component: {fileID: 222982220858172370}
@ -29,12 +19,115 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &224613362496813788
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1128573709916514}
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: 224920559942719848}
m_Father: {fileID: 224516481964458542}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 161.38, y: -34.2}
m_SizeDelta: {x: 323, y: 68.4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &222982220858172370
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1128573709916514}
m_CullTransparentMesh: 1
--- !u!114 &114531233940747562
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1128573709916514}
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!114 &114252552421956380
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1128573709916514}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, 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: 1
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: Highlighted
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 114531233940747562}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &1266630977519298
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224230749014027406}
- component: {fileID: 222796572593907422}
@ -46,12 +139,70 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &224230749014027406
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1266630977519298}
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: 224692589100518744}
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!222 &222796572593907422
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1266630977519298}
m_CullTransparentMesh: 1
--- !u!114 &114058432909893366
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1266630977519298}
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: 0.80784315}
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!1 &1372156606540976
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224692589100518744}
- component: {fileID: 223553207263892384}
@ -64,12 +215,97 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &224692589100518744
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1372156606540976}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 224230749014027406}
- {fileID: 224516481964458542}
m_Father: {fileID: 0}
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, y: 0}
--- !u!223 &223553207263892384
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1372156606540976}
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_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 0
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 32767
m_TargetDisplay: 0
--- !u!114 &114758204355010086
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1372156606540976}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 2960, y: 1440}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0.5
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &114768781952071512
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1372156606540976}
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!1 &1776151137375062
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224516481964458542}
- component: {fileID: 222969686989629696}
@ -82,12 +318,116 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &224516481964458542
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1776151137375062}
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: 224613362496813788}
- {fileID: 224061913340101242}
m_Father: {fileID: 224692589100518744}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 2000, y: 1436}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &222969686989629696
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1776151137375062}
m_CullTransparentMesh: 1
--- !u!114 &114818721744753168
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1776151137375062}
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: 4c69db43dbd474a2987be5807129b4cc, 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!114 &114637091538056986
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1776151137375062}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, 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: 1
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: Highlighted
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 114818721744753168}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &1839101188223610
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224920559942719848}
- component: {fileID: 222848794251129344}
@ -99,143 +439,53 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1940818438327928
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224061913340101242}
- component: {fileID: 222966908609815736}
- component: {fileID: 114332259168256334}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &114058432909893366
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1266630977519298}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.80784315}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
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
--- !u!114 &114252552421956380
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1128573709916514}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
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_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_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 114531233940747562}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!114 &114332259168256334
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1940818438327928}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 45
m_FontStyle: 1
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 45
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 5 second(s) remaining
--- !u!224 &224920559942719848
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1839101188223610}
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: 224613362496813788}
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!222 &222848794251129344
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1839101188223610}
m_CullTransparentMesh: 1
--- !u!114 &114380357142010322
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1839101188223610}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 45
@ -250,298 +500,82 @@ MonoBehaviour:
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Close Ad
--- !u!114 &114531233940747562
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1128573709916514}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
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
--- !u!114 &114637091538056986
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1776151137375062}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
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_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_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 114818721744753168}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!114 &114758204355010086
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1372156606540976}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 2960, y: 1440}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0.5
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!114 &114768781952071512
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1372156606540976}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &114818721744753168
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1776151137375062}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 4c69db43dbd474a2987be5807129b4cc, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &222796572593907422
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1266630977519298}
--- !u!222 &222848794251129344
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1839101188223610}
--- !u!222 &222966908609815736
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1940818438327928}
--- !u!222 &222969686989629696
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1776151137375062}
--- !u!222 &222982220858172370
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1128573709916514}
--- !u!223 &223553207263892384
Canvas:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1372156606540976}
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: 0
m_TargetDisplay: 0
--- !u!1 &1940818438327928
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224061913340101242}
- component: {fileID: 222966908609815736}
- component: {fileID: 114332259168256334}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &224061913340101242
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1940818438327928}
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: 224516481964458542}
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: 290, y: -42.7}
m_SizeDelta: {x: 493, y: 51.4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224230749014027406
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1266630977519298}
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_Children: []
m_Father: {fileID: 224692589100518744}
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!224 &224516481964458542
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1776151137375062}
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_Children:
- {fileID: 224613362496813788}
- {fileID: 224061913340101242}
m_Father: {fileID: 224692589100518744}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 2000, y: 1436}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224613362496813788
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1128573709916514}
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_Children:
- {fileID: 224920559942719848}
m_Father: {fileID: 224516481964458542}
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: 161.38, y: -34.2}
m_SizeDelta: {x: 323, y: 68.4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224692589100518744
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1372156606540976}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 224230749014027406}
- {fileID: 224516481964458542}
m_Father: {fileID: 0}
m_RootOrder: 0
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, y: 0}
--- !u!224 &224920559942719848
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1839101188223610}
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_Children: []
m_Father: {fileID: 224613362496813788}
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!222 &222966908609815736
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1940818438327928}
m_CullTransparentMesh: 1
--- !u!114 &114332259168256334
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1940818438327928}
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: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 45
m_FontStyle: 1
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 45
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 5 second(s) remaining

View File

@ -1,33 +1,33 @@
Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl.dll
Assets/PlayServicesResolver/Editor/Google.IOSResolver.dll
Assets/PlayServicesResolver/Editor/Google.VersionHandler.dll
Assets/PlayServicesResolver/Editor/Google.JarResolver.dll
Assets/Plugins/iOS/GoogleSignIn/GoogleSignInAppController.mm
Assets/Plugins/iOS/GoogleSignIn/GoogleSignInAppController.h
Assets/Plugins/iOS/GoogleSignIn/GoogleSignIn.h
Assets/Plugins/iOS/GoogleSignIn/GoogleSignIn.mm
Assets/Parse/LICENSE
Assets/Parse/Plugins/Unity.Compat.dll
Assets/Parse/Plugins/Unity.Tasks.dll
Assets/SignInSample/MainScene.unity
Assets/SignInSample/SigninSampleScript.cs
Assets/GoogleSignIn/Impl/GoogleSignInImpl.cs
Assets/GoogleSignIn/Impl/SignInHelperObject.cs
Assets/GoogleSignIn/Impl/NativeFuture.cs
Assets/GoogleSignIn/Impl/BaseObject.cs
Assets/GoogleSignIn/GoogleSignIn.cs
Assets/GoogleSignIn/GoogleSignInConfiguration.cs
Assets/GoogleSignIn/Future.cs
Assets/GoogleSignIn/GoogleSignInUser.cs
Assets/GoogleSignIn/GoogleSignInStatusCode.cs
Assets/GoogleSignIn/Editor/GoogleSignInDependencies.xml
Assets/GoogleSignIn/Editor/GoogleSignInSupportDependencies.xml
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/maven-metadata.xml
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/maven-metadata.xml.md5
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/maven-metadata.xml.sha1
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.4/google-signin-support-1.0.4.pom.md5
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.4/google-signin-support-1.0.4.srcaar.sha1
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.4/google-signin-support-1.0.4.pom.sha1
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.4/google-signin-support-1.0.4.srcaar
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.4/google-signin-support-1.0.4.pom
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.4/google-signin-support-1.0.4.srcaar.md5
Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl.dll
Assets/PlayServicesResolver/Editor/Google.IOSResolver.dll
Assets/PlayServicesResolver/Editor/Google.VersionHandler.dll
Assets/PlayServicesResolver/Editor/Google.JarResolver.dll
Assets/Plugins/iOS/GoogleSignIn/GoogleSignInAppController.mm
Assets/Plugins/iOS/GoogleSignIn/GoogleSignInAppController.h
Assets/Plugins/iOS/GoogleSignIn/GoogleSignIn.h
Assets/Plugins/iOS/GoogleSignIn/GoogleSignIn.mm
Assets/Parse/LICENSE
Assets/Parse/Plugins/Unity.Compat.dll
Assets/Parse/Plugins/Unity.Tasks.dll
Assets/SignInSample/MainScene.unity
Assets/SignInSample/SigninSampleScript.cs
Assets/GoogleSignIn/Impl/GoogleSignInImpl.cs
Assets/GoogleSignIn/Impl/SignInHelperObject.cs
Assets/GoogleSignIn/Impl/NativeFuture.cs
Assets/GoogleSignIn/Impl/BaseObject.cs
Assets/GoogleSignIn/GoogleSignIn.cs
Assets/GoogleSignIn/GoogleSignInConfiguration.cs
Assets/GoogleSignIn/Future.cs
Assets/GoogleSignIn/GoogleSignInUser.cs
Assets/GoogleSignIn/GoogleSignInStatusCode.cs
Assets/GoogleSignIn/Editor/GoogleSignInDependencies.xml
Assets/GoogleSignIn/Editor/GoogleSignInSupportDependencies.xml
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/maven-metadata.xml
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/maven-metadata.xml.md5
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/maven-metadata.xml.sha1
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.4/google-signin-support-1.0.4.pom.md5
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.4/google-signin-support-1.0.4.srcaar.sha1
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.4/google-signin-support-1.0.4.pom.sha1
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.4/google-signin-support-1.0.4.srcaar
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.4/google-signin-support-1.0.4.pom
Assets/GoogleSignIn/Editor/m2repository/com/google/signin/google-signin-support/1.0.4/google-signin-support-1.0.4.srcaar.md5

View File

@ -1,97 +1,97 @@
Copyright (c) <dates>, <Copyright Holder> (<URL|email>),
with Reserved Font Name <Reserved Font Name>.
Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>),
with Reserved Font Name <additional Reserved Font Name>.
Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>).
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Copyright (c) <dates>, <Copyright Holder> (<URL|email>),
with Reserved Font Name <Reserved Font Name>.
Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>),
with Reserved Font Name <additional Reserved Font Name>.
Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>).
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@ -1,55 +1,55 @@
Cartoon FX Free, version 1.01
2019/03/20
© 2019 - Jean Moreno
=============================
QUICK START
-----------
This is a selection of effects from Cartoon FX Packs 1,2,3 and 4.
You can find the effects in the following folders:
/JMO Assets/Cartoon FX/CFX* Prefabs/
(* being the number of the pack the effect is from)
FULL PACKS
----------
The full commercial packs on the Unity Asset Store offer:
- way more effect prefabs
- multiple variations of the effects
- mobile-optimized versions of the effects
- CFX Spawn System (beginner-friendly way to recycle spawned effect, aka "pooling")
Open the Welcome Screen in the menu to quickly see them on the Asset Store:
Window > JMO Assets > Welcome Screens > Cartoon FX Free
PLEASE LEAVE A REVIEW OR RATE THE PACKAGE IF YOU FIND IT USEFUL!
Enjoy! :)
CONTACT
-------
Questions, suggestions, help needed?
Contact me at:
jean.moreno.public+unity@gmail.com
RELEASE NOTES
-------------
1.03
- Welcome Screen fix for Unity 2019.1
- Removed 'JMOAssets.dll', became obsolete with the Asset Store update notification system
1.02
- fixed small API deprecation as of Unity 2017.4+
1.01
- updated shaders so that they work on PS4
- updated shaders for GPU Instancing and Stereo Rendering
- updated effects with "Horizontal Billboard" particle render mode to "Billboard" with local alignment so that they can be freely rotated
1.0
Cartoon FX Free, version 1.01
2019/03/20
© 2019 - Jean Moreno
=============================
QUICK START
-----------
This is a selection of effects from Cartoon FX Packs 1,2,3 and 4.
You can find the effects in the following folders:
/JMO Assets/Cartoon FX/CFX* Prefabs/
(* being the number of the pack the effect is from)
FULL PACKS
----------
The full commercial packs on the Unity Asset Store offer:
- way more effect prefabs
- multiple variations of the effects
- mobile-optimized versions of the effects
- CFX Spawn System (beginner-friendly way to recycle spawned effect, aka "pooling")
Open the Welcome Screen in the menu to quickly see them on the Asset Store:
Window > JMO Assets > Welcome Screens > Cartoon FX Free
PLEASE LEAVE A REVIEW OR RATE THE PACKAGE IF YOU FIND IT USEFUL!
Enjoy! :)
CONTACT
-------
Questions, suggestions, help needed?
Contact me at:
jean.moreno.public+unity@gmail.com
RELEASE NOTES
-------------
1.03
- Welcome Screen fix for Unity 2019.1
- Removed 'JMOAssets.dll', became obsolete with the Asset Store update notification system
1.02
- fixed small API deprecation as of Unity 2017.4+
1.01
- updated shaders so that they work on PS4
- updated shaders for GPU Instancing and Stereo Rendering
- updated effects with "Horizontal Billboard" particle render mode to "Billboard" with local alignment so that they can be freely rotated
1.0
- initial release

View File

@ -1,239 +1,239 @@
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
// Cartoon FX - (c) 2015 - Jean Moreno
//
// Script handling the Demo scene of the Cartoon FX Packs
public class CFX_Demo_New : MonoBehaviour
{
public Renderer groundRenderer;
public Collider groundCollider;
[Space]
[Space]
public Image slowMoBtn;
public Text slowMoLabel;
public Image camRotBtn;
public Text camRotLabel;
public Image groundBtn;
public Text groundLabel;
[Space]
public Text EffectLabel;
public Text EffectIndexLabel;
//-------------------------------------------------------------
private GameObject[] ParticleExamples;
private int exampleIndex;
private bool slowMo;
private Vector3 defaultCamPosition;
private Quaternion defaultCamRotation;
private List<GameObject> onScreenParticles = new List<GameObject>();
//-------------------------------------------------------------
void Awake()
{
List<GameObject> particleExampleList = new List<GameObject>();
int nbChild = this.transform.childCount;
for(int i = 0; i < nbChild; i++)
{
GameObject child = this.transform.GetChild(i).gameObject;
particleExampleList.Add(child);
}
particleExampleList.Sort( delegate(GameObject o1, GameObject o2) { return o1.name.CompareTo(o2.name); } );
ParticleExamples = particleExampleList.ToArray();
defaultCamPosition = Camera.main.transform.position;
defaultCamRotation = Camera.main.transform.rotation;
StartCoroutine("CheckForDeletedParticles");
UpdateUI();
}
void Update()
{
if(Input.GetKeyDown(KeyCode.LeftArrow))
{
prevParticle();
}
else if(Input.GetKeyDown(KeyCode.RightArrow))
{
nextParticle();
}
else if(Input.GetKeyDown(KeyCode.Delete))
{
destroyParticles();
}
if(Input.GetMouseButtonDown(0))
{
RaycastHit hit = new RaycastHit();
if(groundCollider.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit, 9999f))
{
GameObject particle = spawnParticle();
particle.transform.position = hit.point + particle.transform.position;
}
}
float scroll = Input.GetAxis("Mouse ScrollWheel");
if(scroll != 0f)
{
Camera.main.transform.Translate(Vector3.forward * (scroll < 0f ? -1f : 1f), Space.Self);
}
if(Input.GetMouseButtonDown(2))
{
Camera.main.transform.position = defaultCamPosition;
Camera.main.transform.rotation = defaultCamRotation;
}
}
//-------------------------------------------------------------
// MESSAGES
public void OnToggleGround()
{
var c = Color.white;
groundRenderer.enabled = !groundRenderer.enabled;
c.a = groundRenderer.enabled ? 1f : 0.33f;
groundBtn.color = c;
groundLabel.color = c;
}
public void OnToggleCamera()
{
var c = Color.white;
CFX_Demo_RotateCamera.rotating = !CFX_Demo_RotateCamera.rotating;
c.a = CFX_Demo_RotateCamera.rotating ? 1f : 0.33f;
camRotBtn.color = c;
camRotLabel.color = c;
}
public void OnToggleSlowMo()
{
var c = Color.white;
slowMo = !slowMo;
if(slowMo)
{
Time.timeScale = 0.33f;
c.a = 1f;
}
else
{
Time.timeScale = 1.0f;
c.a = 0.33f;
}
slowMoBtn.color = c;
slowMoLabel.color = c;
}
public void OnPreviousEffect()
{
prevParticle();
}
public void OnNextEffect()
{
nextParticle();
}
//-------------------------------------------------------------
// UI
private void UpdateUI()
{
EffectLabel.text = ParticleExamples[exampleIndex].name;
EffectIndexLabel.text = string.Format("{0}/{1}", (exampleIndex+1).ToString("00"), ParticleExamples.Length.ToString("00"));
}
//-------------------------------------------------------------
// SYSTEM
private GameObject spawnParticle()
{
GameObject particles = (GameObject)Instantiate(ParticleExamples[exampleIndex]);
particles.transform.position = new Vector3(0,particles.transform.position.y,0);
#if UNITY_3_5
particles.SetActiveRecursively(true);
#else
particles.SetActive(true);
// for(int i = 0; i < particles.transform.childCount; i++)
// particles.transform.GetChild(i).gameObject.SetActive(true);
#endif
ParticleSystem ps = particles.GetComponent<ParticleSystem>();
#if UNITY_5_5_OR_NEWER
if (ps != null)
{
var main = ps.main;
if (main.loop)
{
ps.gameObject.AddComponent<CFX_AutoStopLoopedEffect>();
ps.gameObject.AddComponent<CFX_AutoDestructShuriken>();
}
}
#else
if(ps != null && ps.loop)
{
ps.gameObject.AddComponent<CFX_AutoStopLoopedEffect>();
ps.gameObject.AddComponent<CFX_AutoDestructShuriken>();
}
#endif
onScreenParticles.Add(particles);
return particles;
}
IEnumerator CheckForDeletedParticles()
{
while(true)
{
yield return new WaitForSeconds(5.0f);
for(int i = onScreenParticles.Count - 1; i >= 0; i--)
{
if(onScreenParticles[i] == null)
{
onScreenParticles.RemoveAt(i);
}
}
}
}
private void prevParticle()
{
exampleIndex--;
if(exampleIndex < 0) exampleIndex = ParticleExamples.Length - 1;
UpdateUI();
}
private void nextParticle()
{
exampleIndex++;
if(exampleIndex >= ParticleExamples.Length) exampleIndex = 0;
UpdateUI();
}
private void destroyParticles()
{
for(int i = onScreenParticles.Count - 1; i >= 0; i--)
{
if(onScreenParticles[i] != null)
{
GameObject.Destroy(onScreenParticles[i]);
}
onScreenParticles.RemoveAt(i);
}
}
}
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
// Cartoon FX - (c) 2015 - Jean Moreno
//
// Script handling the Demo scene of the Cartoon FX Packs
public class CFX_Demo_New : MonoBehaviour
{
public Renderer groundRenderer;
public Collider groundCollider;
[Space]
[Space]
public Image slowMoBtn;
public Text slowMoLabel;
public Image camRotBtn;
public Text camRotLabel;
public Image groundBtn;
public Text groundLabel;
[Space]
public Text EffectLabel;
public Text EffectIndexLabel;
//-------------------------------------------------------------
private GameObject[] ParticleExamples;
private int exampleIndex;
private bool slowMo;
private Vector3 defaultCamPosition;
private Quaternion defaultCamRotation;
private List<GameObject> onScreenParticles = new List<GameObject>();
//-------------------------------------------------------------
void Awake()
{
List<GameObject> particleExampleList = new List<GameObject>();
int nbChild = this.transform.childCount;
for(int i = 0; i < nbChild; i++)
{
GameObject child = this.transform.GetChild(i).gameObject;
particleExampleList.Add(child);
}
particleExampleList.Sort( delegate(GameObject o1, GameObject o2) { return o1.name.CompareTo(o2.name); } );
ParticleExamples = particleExampleList.ToArray();
defaultCamPosition = Camera.main.transform.position;
defaultCamRotation = Camera.main.transform.rotation;
StartCoroutine("CheckForDeletedParticles");
UpdateUI();
}
void Update()
{
if(Input.GetKeyDown(KeyCode.LeftArrow))
{
prevParticle();
}
else if(Input.GetKeyDown(KeyCode.RightArrow))
{
nextParticle();
}
else if(Input.GetKeyDown(KeyCode.Delete))
{
destroyParticles();
}
if(Input.GetMouseButtonDown(0))
{
RaycastHit hit = new RaycastHit();
if(groundCollider.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit, 9999f))
{
GameObject particle = spawnParticle();
particle.transform.position = hit.point + particle.transform.position;
}
}
float scroll = Input.GetAxis("Mouse ScrollWheel");
if(scroll != 0f)
{
Camera.main.transform.Translate(Vector3.forward * (scroll < 0f ? -1f : 1f), Space.Self);
}
if(Input.GetMouseButtonDown(2))
{
Camera.main.transform.position = defaultCamPosition;
Camera.main.transform.rotation = defaultCamRotation;
}
}
//-------------------------------------------------------------
// MESSAGES
public void OnToggleGround()
{
var c = Color.white;
groundRenderer.enabled = !groundRenderer.enabled;
c.a = groundRenderer.enabled ? 1f : 0.33f;
groundBtn.color = c;
groundLabel.color = c;
}
public void OnToggleCamera()
{
var c = Color.white;
CFX_Demo_RotateCamera.rotating = !CFX_Demo_RotateCamera.rotating;
c.a = CFX_Demo_RotateCamera.rotating ? 1f : 0.33f;
camRotBtn.color = c;
camRotLabel.color = c;
}
public void OnToggleSlowMo()
{
var c = Color.white;
slowMo = !slowMo;
if(slowMo)
{
Time.timeScale = 0.33f;
c.a = 1f;
}
else
{
Time.timeScale = 1.0f;
c.a = 0.33f;
}
slowMoBtn.color = c;
slowMoLabel.color = c;
}
public void OnPreviousEffect()
{
prevParticle();
}
public void OnNextEffect()
{
nextParticle();
}
//-------------------------------------------------------------
// UI
private void UpdateUI()
{
EffectLabel.text = ParticleExamples[exampleIndex].name;
EffectIndexLabel.text = string.Format("{0}/{1}", (exampleIndex+1).ToString("00"), ParticleExamples.Length.ToString("00"));
}
//-------------------------------------------------------------
// SYSTEM
private GameObject spawnParticle()
{
GameObject particles = (GameObject)Instantiate(ParticleExamples[exampleIndex]);
particles.transform.position = new Vector3(0,particles.transform.position.y,0);
#if UNITY_3_5
particles.SetActiveRecursively(true);
#else
particles.SetActive(true);
// for(int i = 0; i < particles.transform.childCount; i++)
// particles.transform.GetChild(i).gameObject.SetActive(true);
#endif
ParticleSystem ps = particles.GetComponent<ParticleSystem>();
#if UNITY_5_5_OR_NEWER
if (ps != null)
{
var main = ps.main;
if (main.loop)
{
ps.gameObject.AddComponent<CFX_AutoStopLoopedEffect>();
ps.gameObject.AddComponent<CFX_AutoDestructShuriken>();
}
}
#else
if(ps != null && ps.loop)
{
ps.gameObject.AddComponent<CFX_AutoStopLoopedEffect>();
ps.gameObject.AddComponent<CFX_AutoDestructShuriken>();
}
#endif
onScreenParticles.Add(particles);
return particles;
}
IEnumerator CheckForDeletedParticles()
{
while(true)
{
yield return new WaitForSeconds(5.0f);
for(int i = onScreenParticles.Count - 1; i >= 0; i--)
{
if(onScreenParticles[i] == null)
{
onScreenParticles.RemoveAt(i);
}
}
}
}
private void prevParticle()
{
exampleIndex--;
if(exampleIndex < 0) exampleIndex = ParticleExamples.Length - 1;
UpdateUI();
}
private void nextParticle()
{
exampleIndex++;
if(exampleIndex >= ParticleExamples.Length) exampleIndex = 0;
UpdateUI();
}
private void destroyParticles()
{
for(int i = onScreenParticles.Count - 1; i >= 0; i--)
{
if(onScreenParticles[i] != null)
{
GameObject.Destroy(onScreenParticles[i]);
}
onScreenParticles.RemoveAt(i);
}
}
}

View File

@ -1,284 +1,284 @@
; FBX 6.1.0 project file
; Copyright (C) 1997-2008 Autodesk Inc. and/or its licensors.
; All rights reserved.
; ----------------------------------------------------
FBXHeaderExtension: {
FBXHeaderVersion: 1003
FBXVersion: 6100
CreationTimeStamp: {
Version: 1000
Year: 2012
Month: 7
Day: 26
Hour: 16
Minute: 9
Second: 17
Millisecond: 234
}
Creator: "FBX SDK/FBX Plugins version 2009.3"
OtherFlags: {
FlagPLE: 0
}
}
CreationTime: "2012-07-26 16:09:17:234"
Creator: "FBX SDK/FBX Plugins build 20080926"
; Document Description
;------------------------------------------------------------------
Document: {
Name: ""
}
; Document References
;------------------------------------------------------------------
References: {
}
; Object definitions
;------------------------------------------------------------------
Definitions: {
Version: 100
Count: 3
ObjectType: "Model" {
Count: 1
}
ObjectType: "SceneInfo" {
Count: 1
}
ObjectType: "GlobalSettings" {
Count: 1
}
}
; Object properties
;------------------------------------------------------------------
Objects: {
Model: "Model::CFX_Circular", "Mesh" {
Version: 232
Properties60: {
Property: "QuaternionInterpolate", "bool", "",0
Property: "RotationOffset", "Vector3D", "",0,0,0
Property: "RotationPivot", "Vector3D", "",0,0,0
Property: "ScalingOffset", "Vector3D", "",0,0,0
Property: "ScalingPivot", "Vector3D", "",0,0,0
Property: "TranslationActive", "bool", "",0
Property: "TranslationMin", "Vector3D", "",0,0,0
Property: "TranslationMax", "Vector3D", "",0,0,0
Property: "TranslationMinX", "bool", "",0
Property: "TranslationMinY", "bool", "",0
Property: "TranslationMinZ", "bool", "",0
Property: "TranslationMaxX", "bool", "",0
Property: "TranslationMaxY", "bool", "",0
Property: "TranslationMaxZ", "bool", "",0
Property: "RotationOrder", "enum", "",0
Property: "RotationSpaceForLimitOnly", "bool", "",0
Property: "RotationStiffnessX", "double", "",0
Property: "RotationStiffnessY", "double", "",0
Property: "RotationStiffnessZ", "double", "",0
Property: "AxisLen", "double", "",10
Property: "PreRotation", "Vector3D", "",-90,0,0
Property: "PostRotation", "Vector3D", "",0,0,0
Property: "RotationActive", "bool", "",1
Property: "RotationMin", "Vector3D", "",0,0,0
Property: "RotationMax", "Vector3D", "",0,0,0
Property: "RotationMinX", "bool", "",0
Property: "RotationMinY", "bool", "",0
Property: "RotationMinZ", "bool", "",0
Property: "RotationMaxX", "bool", "",0
Property: "RotationMaxY", "bool", "",0
Property: "RotationMaxZ", "bool", "",0
Property: "InheritType", "enum", "",1
Property: "ScalingActive", "bool", "",0
Property: "ScalingMin", "Vector3D", "",1,1,1
Property: "ScalingMax", "Vector3D", "",1,1,1
Property: "ScalingMinX", "bool", "",0
Property: "ScalingMinY", "bool", "",0
Property: "ScalingMinZ", "bool", "",0
Property: "ScalingMaxX", "bool", "",0
Property: "ScalingMaxY", "bool", "",0
Property: "ScalingMaxZ", "bool", "",0
Property: "GeometricTranslation", "Vector3D", "",0,0,0
Property: "GeometricRotation", "Vector3D", "",90,-0,0
Property: "GeometricScaling", "Vector3D", "",3.59999990463257,3.59999990463257,3.59999990463257
Property: "MinDampRangeX", "double", "",0
Property: "MinDampRangeY", "double", "",0
Property: "MinDampRangeZ", "double", "",0
Property: "MaxDampRangeX", "double", "",0
Property: "MaxDampRangeY", "double", "",0
Property: "MaxDampRangeZ", "double", "",0
Property: "MinDampStrengthX", "double", "",0
Property: "MinDampStrengthY", "double", "",0
Property: "MinDampStrengthZ", "double", "",0
Property: "MaxDampStrengthX", "double", "",0
Property: "MaxDampStrengthY", "double", "",0
Property: "MaxDampStrengthZ", "double", "",0
Property: "PreferedAngleX", "double", "",0
Property: "PreferedAngleY", "double", "",0
Property: "PreferedAngleZ", "double", "",0
Property: "LookAtProperty", "object", ""
Property: "UpVectorProperty", "object", ""
Property: "Show", "bool", "",1
Property: "NegativePercentShapeSupport", "bool", "",1
Property: "DefaultAttributeIndex", "int", "",0
Property: "Lcl Translation", "Lcl Translation", "A+",0,0,0
Property: "Lcl Rotation", "Lcl Rotation", "A+",0,0,0
Property: "Lcl Scaling", "Lcl Scaling", "A+",1,1,1
Property: "Visibility", "Visibility", "A+",1
Property: "Color", "ColorRGB", "N",0.83921568627451,0.894117647058824,0.6
Property: "BBoxMin", "Vector3D", "N",0,0,0
Property: "BBoxMax", "Vector3D", "N",0,0,0
}
MultiLayer: 0
MultiTake: 1
Shading: T
Culling: "CullingOff"
Vertices: 10,1.57766021402495e-006,-1.01514160633087e-006,9.23879528045654,2.14576721191406e-006,3.82683372497559,7.07106781005859
,2.86102294921875e-006,7.07106637954712,3.82683420181274,2.86102294921875e-006,9.23879528045654,-4.37113897078234e-007
,2.86102294921875e-006,10,-3.82683515548706,2.86102294921875e-006,9.23879528045654,-7.07106781005859,2.86102294921875e-006
,7.07106637954712,-9.23879528045654,2.14576721191406e-006,3.82683420181274,-10,1.57766044139862e-006,4.94816390528285e-007
,-9.23879623413086,9.5367431640625e-007,-3.82683300971985,-7.07107019424438,4.76837158203125e-007,-7.07106685638428
,-3.82683563232422,0,-9.23879432678223,1.19248809937744e-007,0,-10,3.8268358707428,0,-9.23879432678223,7.07107019424438
,4.76837158203125e-007,-7.07106685638428,9.23879718780518,9.5367431640625e-007,-3.82683038711548
PolygonVertexIndex: 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,-1
Edges: 14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,15
GeometryVersion: 124
LayerElementNormal: 0 {
Version: 101
Name: ""
MappingInformationType: "ByPolygonVertex"
ReferenceInformationType: "Direct"
Normals: 3.64384722414501e-015,1,-1.55395511569623e-007,3.64384680062854e-015,1,-1.55395497358768e-007,3.64384722414501e-015
,1,-1.55395511569623e-007,3.64384722414501e-015,1,-1.55395511569623e-007,3.64384722414501e-015,1,-1.55395511569623e-007
,3.64384680062854e-015,1,-1.55395497358768e-007,3.64384722414501e-015,1,-1.55395511569623e-007,3.64384722414501e-015
,1,-1.55395511569623e-007,3.64384722414501e-015,1,-1.55395511569623e-007,3.64384722414501e-015,1,-1.55395511569623e-007
,3.64384722414501e-015,1,-1.55395511569623e-007,3.64384722414501e-015,1,-1.55395511569623e-007,3.64384722414501e-015
,1,-1.55395511569623e-007,3.64384722414501e-015,1,-1.55395511569623e-007,3.64384722414501e-015,1,-1.55395511569623e-007
,3.64384722414501e-015,1,-1.55395511569623e-007
}
LayerElementUV: 0 {
Version: 101
Name: "UVChannel_1"
MappingInformationType: "ByPolygonVertex"
ReferenceInformationType: "IndexToDirect"
UV: 0.691341459751129,0.961939871311188,0.853553235530853,0.853553533554077,0.961939692497253,0.691341817378998,1
,0.5,0.961939692497253,0.308658242225647,0.853553295135498,0.146446526050568,0.691341638565063,0.038060188293457
,0.499999940395355,0,0.308658272027969,0.0380602180957794,0.146446645259857,0.146446585655212,0.0380602180957794
,0.308658242225647,0,0.499999970197678,0.0380602180957794,0.691341698169708,0.146446585655212,0.853553354740143
,0.308658242225647,0.961939811706543,0.499999970197678,1
UVIndex: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
}
LayerElementSmoothing: 0 {
Version: 102
Name: ""
MappingInformationType: "ByPolygon"
ReferenceInformationType: "Direct"
Smoothing: 1
}
Layer: 0 {
Version: 100
LayerElement: {
Type: "LayerElementNormal"
TypedIndex: 0
}
LayerElement: {
Type: "LayerElementUV"
TypedIndex: 0
}
LayerElement: {
Type: "LayerElementSmoothing"
TypedIndex: 0
}
}
NodeAttributeName: "Geometry::CFX_Circular_ncl1_1"
}
SceneInfo: "SceneInfo::GlobalInfo", "UserData" {
Type: "UserData"
Version: 100
MetaData: {
Version: 100
Title: ""
Subject: ""
Author: ""
Keywords: ""
Revision: ""
Comment: ""
}
Properties60: {
Property: "DocumentUrl", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CartoonEffects AssetStore\Assets\Cartoon FX\Mesh\Mesh_Circular.FBX"
Property: "SrcDocumentUrl", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CartoonEffects AssetStore\Assets\Cartoon FX\Mesh\Mesh_Circular.FBX"
Property: "Original", "Compound", ""
Property: "Original|ApplicationVendor", "KString", "", "Autodesk"
Property: "Original|ApplicationName", "KString", "", "3ds Max"
Property: "Original|ApplicationVersion", "KString", "", "2009.3"
Property: "Original|DateTime_GMT", "DateTime", "", "26/07/2012 14:09:17.218"
Property: "Original|FileName", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CartoonEffects AssetStore\Assets\Cartoon FX\Mesh\Mesh_Circular.FBX"
Property: "LastSaved", "Compound", ""
Property: "LastSaved|ApplicationVendor", "KString", "", "Autodesk"
Property: "LastSaved|ApplicationName", "KString", "", "3ds Max"
Property: "LastSaved|ApplicationVersion", "KString", "", "2009.3"
Property: "LastSaved|DateTime_GMT", "DateTime", "", "26/07/2012 14:09:17.218"
}
}
GlobalSettings: {
Version: 1000
Properties60: {
Property: "UpAxis", "int", "",1
Property: "UpAxisSign", "int", "",1
Property: "FrontAxis", "int", "",2
Property: "FrontAxisSign", "int", "",1
Property: "CoordAxis", "int", "",0
Property: "CoordAxisSign", "int", "",1
Property: "UnitScaleFactor", "double", "",0.1
}
}
}
; Object connections
;------------------------------------------------------------------
Connections: {
Connect: "OO", "Model::CFX_Circular", "Model::Scene"
}
;Takes and animation section
;----------------------------------------------------
Takes: {
Current: "Take 001"
}
;Version 5 settings
;------------------------------------------------------------------
Version5: {
AmbientRenderSettings: {
Version: 101
AmbientLightColor: 0,0,0,1
}
FogOptions: {
FlogEnable: 0
FogMode: 0
FogDensity: 0.002
FogStart: 0.3
FogEnd: 1000
FogColor: 1,1,1,1
}
Settings: {
FrameRate: "30"
TimeFormat: 1
SnapOnFrames: 0
ReferenceTimeIndex: -1
TimeLineStartTime: 0
TimeLineStopTime: 153953860000
}
RendererSetting: {
DefaultCamera: "Producer Perspective"
DefaultViewingMode: 0
}
}
; FBX 6.1.0 project file
; Copyright (C) 1997-2008 Autodesk Inc. and/or its licensors.
; All rights reserved.
; ----------------------------------------------------
FBXHeaderExtension: {
FBXHeaderVersion: 1003
FBXVersion: 6100
CreationTimeStamp: {
Version: 1000
Year: 2012
Month: 7
Day: 26
Hour: 16
Minute: 9
Second: 17
Millisecond: 234
}
Creator: "FBX SDK/FBX Plugins version 2009.3"
OtherFlags: {
FlagPLE: 0
}
}
CreationTime: "2012-07-26 16:09:17:234"
Creator: "FBX SDK/FBX Plugins build 20080926"
; Document Description
;------------------------------------------------------------------
Document: {
Name: ""
}
; Document References
;------------------------------------------------------------------
References: {
}
; Object definitions
;------------------------------------------------------------------
Definitions: {
Version: 100
Count: 3
ObjectType: "Model" {
Count: 1
}
ObjectType: "SceneInfo" {
Count: 1
}
ObjectType: "GlobalSettings" {
Count: 1
}
}
; Object properties
;------------------------------------------------------------------
Objects: {
Model: "Model::CFX_Circular", "Mesh" {
Version: 232
Properties60: {
Property: "QuaternionInterpolate", "bool", "",0
Property: "RotationOffset", "Vector3D", "",0,0,0
Property: "RotationPivot", "Vector3D", "",0,0,0
Property: "ScalingOffset", "Vector3D", "",0,0,0
Property: "ScalingPivot", "Vector3D", "",0,0,0
Property: "TranslationActive", "bool", "",0
Property: "TranslationMin", "Vector3D", "",0,0,0
Property: "TranslationMax", "Vector3D", "",0,0,0
Property: "TranslationMinX", "bool", "",0
Property: "TranslationMinY", "bool", "",0
Property: "TranslationMinZ", "bool", "",0
Property: "TranslationMaxX", "bool", "",0
Property: "TranslationMaxY", "bool", "",0
Property: "TranslationMaxZ", "bool", "",0
Property: "RotationOrder", "enum", "",0
Property: "RotationSpaceForLimitOnly", "bool", "",0
Property: "RotationStiffnessX", "double", "",0
Property: "RotationStiffnessY", "double", "",0
Property: "RotationStiffnessZ", "double", "",0
Property: "AxisLen", "double", "",10
Property: "PreRotation", "Vector3D", "",-90,0,0
Property: "PostRotation", "Vector3D", "",0,0,0
Property: "RotationActive", "bool", "",1
Property: "RotationMin", "Vector3D", "",0,0,0
Property: "RotationMax", "Vector3D", "",0,0,0
Property: "RotationMinX", "bool", "",0
Property: "RotationMinY", "bool", "",0
Property: "RotationMinZ", "bool", "",0
Property: "RotationMaxX", "bool", "",0
Property: "RotationMaxY", "bool", "",0
Property: "RotationMaxZ", "bool", "",0
Property: "InheritType", "enum", "",1
Property: "ScalingActive", "bool", "",0
Property: "ScalingMin", "Vector3D", "",1,1,1
Property: "ScalingMax", "Vector3D", "",1,1,1
Property: "ScalingMinX", "bool", "",0
Property: "ScalingMinY", "bool", "",0
Property: "ScalingMinZ", "bool", "",0
Property: "ScalingMaxX", "bool", "",0
Property: "ScalingMaxY", "bool", "",0
Property: "ScalingMaxZ", "bool", "",0
Property: "GeometricTranslation", "Vector3D", "",0,0,0
Property: "GeometricRotation", "Vector3D", "",90,-0,0
Property: "GeometricScaling", "Vector3D", "",3.59999990463257,3.59999990463257,3.59999990463257
Property: "MinDampRangeX", "double", "",0
Property: "MinDampRangeY", "double", "",0
Property: "MinDampRangeZ", "double", "",0
Property: "MaxDampRangeX", "double", "",0
Property: "MaxDampRangeY", "double", "",0
Property: "MaxDampRangeZ", "double", "",0
Property: "MinDampStrengthX", "double", "",0
Property: "MinDampStrengthY", "double", "",0
Property: "MinDampStrengthZ", "double", "",0
Property: "MaxDampStrengthX", "double", "",0
Property: "MaxDampStrengthY", "double", "",0
Property: "MaxDampStrengthZ", "double", "",0
Property: "PreferedAngleX", "double", "",0
Property: "PreferedAngleY", "double", "",0
Property: "PreferedAngleZ", "double", "",0
Property: "LookAtProperty", "object", ""
Property: "UpVectorProperty", "object", ""
Property: "Show", "bool", "",1
Property: "NegativePercentShapeSupport", "bool", "",1
Property: "DefaultAttributeIndex", "int", "",0
Property: "Lcl Translation", "Lcl Translation", "A+",0,0,0
Property: "Lcl Rotation", "Lcl Rotation", "A+",0,0,0
Property: "Lcl Scaling", "Lcl Scaling", "A+",1,1,1
Property: "Visibility", "Visibility", "A+",1
Property: "Color", "ColorRGB", "N",0.83921568627451,0.894117647058824,0.6
Property: "BBoxMin", "Vector3D", "N",0,0,0
Property: "BBoxMax", "Vector3D", "N",0,0,0
}
MultiLayer: 0
MultiTake: 1
Shading: T
Culling: "CullingOff"
Vertices: 10,1.57766021402495e-006,-1.01514160633087e-006,9.23879528045654,2.14576721191406e-006,3.82683372497559,7.07106781005859
,2.86102294921875e-006,7.07106637954712,3.82683420181274,2.86102294921875e-006,9.23879528045654,-4.37113897078234e-007
,2.86102294921875e-006,10,-3.82683515548706,2.86102294921875e-006,9.23879528045654,-7.07106781005859,2.86102294921875e-006
,7.07106637954712,-9.23879528045654,2.14576721191406e-006,3.82683420181274,-10,1.57766044139862e-006,4.94816390528285e-007
,-9.23879623413086,9.5367431640625e-007,-3.82683300971985,-7.07107019424438,4.76837158203125e-007,-7.07106685638428
,-3.82683563232422,0,-9.23879432678223,1.19248809937744e-007,0,-10,3.8268358707428,0,-9.23879432678223,7.07107019424438
,4.76837158203125e-007,-7.07106685638428,9.23879718780518,9.5367431640625e-007,-3.82683038711548
PolygonVertexIndex: 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,-1
Edges: 14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,15
GeometryVersion: 124
LayerElementNormal: 0 {
Version: 101
Name: ""
MappingInformationType: "ByPolygonVertex"
ReferenceInformationType: "Direct"
Normals: 3.64384722414501e-015,1,-1.55395511569623e-007,3.64384680062854e-015,1,-1.55395497358768e-007,3.64384722414501e-015
,1,-1.55395511569623e-007,3.64384722414501e-015,1,-1.55395511569623e-007,3.64384722414501e-015,1,-1.55395511569623e-007
,3.64384680062854e-015,1,-1.55395497358768e-007,3.64384722414501e-015,1,-1.55395511569623e-007,3.64384722414501e-015
,1,-1.55395511569623e-007,3.64384722414501e-015,1,-1.55395511569623e-007,3.64384722414501e-015,1,-1.55395511569623e-007
,3.64384722414501e-015,1,-1.55395511569623e-007,3.64384722414501e-015,1,-1.55395511569623e-007,3.64384722414501e-015
,1,-1.55395511569623e-007,3.64384722414501e-015,1,-1.55395511569623e-007,3.64384722414501e-015,1,-1.55395511569623e-007
,3.64384722414501e-015,1,-1.55395511569623e-007
}
LayerElementUV: 0 {
Version: 101
Name: "UVChannel_1"
MappingInformationType: "ByPolygonVertex"
ReferenceInformationType: "IndexToDirect"
UV: 0.691341459751129,0.961939871311188,0.853553235530853,0.853553533554077,0.961939692497253,0.691341817378998,1
,0.5,0.961939692497253,0.308658242225647,0.853553295135498,0.146446526050568,0.691341638565063,0.038060188293457
,0.499999940395355,0,0.308658272027969,0.0380602180957794,0.146446645259857,0.146446585655212,0.0380602180957794
,0.308658242225647,0,0.499999970197678,0.0380602180957794,0.691341698169708,0.146446585655212,0.853553354740143
,0.308658242225647,0.961939811706543,0.499999970197678,1
UVIndex: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
}
LayerElementSmoothing: 0 {
Version: 102
Name: ""
MappingInformationType: "ByPolygon"
ReferenceInformationType: "Direct"
Smoothing: 1
}
Layer: 0 {
Version: 100
LayerElement: {
Type: "LayerElementNormal"
TypedIndex: 0
}
LayerElement: {
Type: "LayerElementUV"
TypedIndex: 0
}
LayerElement: {
Type: "LayerElementSmoothing"
TypedIndex: 0
}
}
NodeAttributeName: "Geometry::CFX_Circular_ncl1_1"
}
SceneInfo: "SceneInfo::GlobalInfo", "UserData" {
Type: "UserData"
Version: 100
MetaData: {
Version: 100
Title: ""
Subject: ""
Author: ""
Keywords: ""
Revision: ""
Comment: ""
}
Properties60: {
Property: "DocumentUrl", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CartoonEffects AssetStore\Assets\Cartoon FX\Mesh\Mesh_Circular.FBX"
Property: "SrcDocumentUrl", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CartoonEffects AssetStore\Assets\Cartoon FX\Mesh\Mesh_Circular.FBX"
Property: "Original", "Compound", ""
Property: "Original|ApplicationVendor", "KString", "", "Autodesk"
Property: "Original|ApplicationName", "KString", "", "3ds Max"
Property: "Original|ApplicationVersion", "KString", "", "2009.3"
Property: "Original|DateTime_GMT", "DateTime", "", "26/07/2012 14:09:17.218"
Property: "Original|FileName", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CartoonEffects AssetStore\Assets\Cartoon FX\Mesh\Mesh_Circular.FBX"
Property: "LastSaved", "Compound", ""
Property: "LastSaved|ApplicationVendor", "KString", "", "Autodesk"
Property: "LastSaved|ApplicationName", "KString", "", "3ds Max"
Property: "LastSaved|ApplicationVersion", "KString", "", "2009.3"
Property: "LastSaved|DateTime_GMT", "DateTime", "", "26/07/2012 14:09:17.218"
}
}
GlobalSettings: {
Version: 1000
Properties60: {
Property: "UpAxis", "int", "",1
Property: "UpAxisSign", "int", "",1
Property: "FrontAxis", "int", "",2
Property: "FrontAxisSign", "int", "",1
Property: "CoordAxis", "int", "",0
Property: "CoordAxisSign", "int", "",1
Property: "UnitScaleFactor", "double", "",0.1
}
}
}
; Object connections
;------------------------------------------------------------------
Connections: {
Connect: "OO", "Model::CFX_Circular", "Model::Scene"
}
;Takes and animation section
;----------------------------------------------------
Takes: {
Current: "Take 001"
}
;Version 5 settings
;------------------------------------------------------------------
Version5: {
AmbientRenderSettings: {
Version: 101
AmbientLightColor: 0,0,0,1
}
FogOptions: {
FlogEnable: 0
FogMode: 0
FogDensity: 0.002
FogStart: 0.3
FogEnd: 1000
FogColor: 1,1,1,1
}
Settings: {
FrameRate: "30"
TimeFormat: 1
SnapOnFrames: 0
ReferenceTimeIndex: -1
TimeLineStartTime: 0
TimeLineStopTime: 153953860000
}
RendererSetting: {
DefaultCamera: "Producer Perspective"
DefaultViewingMode: 0
}
}

View File

@ -1,344 +1,344 @@
; FBX 6.1.0 project file
; Copyright (C) 1997-2008 Autodesk Inc. and/or its licensors.
; All rights reserved.
; ----------------------------------------------------
FBXHeaderExtension: {
FBXHeaderVersion: 1003
FBXVersion: 6100
CreationTimeStamp: {
Version: 1000
Year: 2012
Month: 8
Day: 8
Hour: 16
Minute: 8
Second: 48
Millisecond: 219
}
Creator: "FBX SDK/FBX Plugins version 2009.3"
OtherFlags: {
FlagPLE: 0
}
}
CreationTime: "2012-08-08 16:08:48:219"
Creator: "FBX SDK/FBX Plugins build 20080926"
; Document Description
;------------------------------------------------------------------
Document: {
Name: ""
}
; Document References
;------------------------------------------------------------------
References: {
}
; Object definitions
;------------------------------------------------------------------
Definitions: {
Version: 100
Count: 3
ObjectType: "Model" {
Count: 1
}
ObjectType: "SceneInfo" {
Count: 1
}
ObjectType: "GlobalSettings" {
Count: 1
}
}
; Object properties
;------------------------------------------------------------------
Objects: {
Model: "Model::CFX_Circular2", "Mesh" {
Version: 232
Properties60: {
Property: "QuaternionInterpolate", "bool", "",0
Property: "RotationOffset", "Vector3D", "",0,0,0
Property: "RotationPivot", "Vector3D", "",0,0,0
Property: "ScalingOffset", "Vector3D", "",0,0,0
Property: "ScalingPivot", "Vector3D", "",0,0,0
Property: "TranslationActive", "bool", "",0
Property: "TranslationMin", "Vector3D", "",0,0,0
Property: "TranslationMax", "Vector3D", "",0,0,0
Property: "TranslationMinX", "bool", "",0
Property: "TranslationMinY", "bool", "",0
Property: "TranslationMinZ", "bool", "",0
Property: "TranslationMaxX", "bool", "",0
Property: "TranslationMaxY", "bool", "",0
Property: "TranslationMaxZ", "bool", "",0
Property: "RotationOrder", "enum", "",0
Property: "RotationSpaceForLimitOnly", "bool", "",0
Property: "RotationStiffnessX", "double", "",0
Property: "RotationStiffnessY", "double", "",0
Property: "RotationStiffnessZ", "double", "",0
Property: "AxisLen", "double", "",10
Property: "PreRotation", "Vector3D", "",-90,0,0
Property: "PostRotation", "Vector3D", "",0,0,0
Property: "RotationActive", "bool", "",1
Property: "RotationMin", "Vector3D", "",0,0,0
Property: "RotationMax", "Vector3D", "",0,0,0
Property: "RotationMinX", "bool", "",0
Property: "RotationMinY", "bool", "",0
Property: "RotationMinZ", "bool", "",0
Property: "RotationMaxX", "bool", "",0
Property: "RotationMaxY", "bool", "",0
Property: "RotationMaxZ", "bool", "",0
Property: "InheritType", "enum", "",1
Property: "ScalingActive", "bool", "",0
Property: "ScalingMin", "Vector3D", "",1,1,1
Property: "ScalingMax", "Vector3D", "",1,1,1
Property: "ScalingMinX", "bool", "",0
Property: "ScalingMinY", "bool", "",0
Property: "ScalingMinZ", "bool", "",0
Property: "ScalingMaxX", "bool", "",0
Property: "ScalingMaxY", "bool", "",0
Property: "ScalingMaxZ", "bool", "",0
Property: "GeometricTranslation", "Vector3D", "",0,0,0
Property: "GeometricRotation", "Vector3D", "",90,-0,0
Property: "GeometricScaling", "Vector3D", "",1,1,1
Property: "MinDampRangeX", "double", "",0
Property: "MinDampRangeY", "double", "",0
Property: "MinDampRangeZ", "double", "",0
Property: "MaxDampRangeX", "double", "",0
Property: "MaxDampRangeY", "double", "",0
Property: "MaxDampRangeZ", "double", "",0
Property: "MinDampStrengthX", "double", "",0
Property: "MinDampStrengthY", "double", "",0
Property: "MinDampStrengthZ", "double", "",0
Property: "MaxDampStrengthX", "double", "",0
Property: "MaxDampStrengthY", "double", "",0
Property: "MaxDampStrengthZ", "double", "",0
Property: "PreferedAngleX", "double", "",0
Property: "PreferedAngleY", "double", "",0
Property: "PreferedAngleZ", "double", "",0
Property: "LookAtProperty", "object", ""
Property: "UpVectorProperty", "object", ""
Property: "Show", "bool", "",1
Property: "NegativePercentShapeSupport", "bool", "",1
Property: "DefaultAttributeIndex", "int", "",0
Property: "Lcl Translation", "Lcl Translation", "A+",0,0,0
Property: "Lcl Rotation", "Lcl Rotation", "A+",0,0,0
Property: "Lcl Scaling", "Lcl Scaling", "A+",1,1,1
Property: "Visibility", "Visibility", "A+",1
Property: "Color", "ColorRGB", "N",0.109803921568627,0.349019607843137,0.694117647058824
Property: "BBoxMin", "Vector3D", "N",0,0,0
Property: "BBoxMax", "Vector3D", "N",0,0,0
}
MultiLayer: 0
MultiTake: 1
Shading: T
Culling: "CullingOff"
Vertices: 60,0,0,58.8471183776855,11.7054195404053,0,55.4327735900879,22.9610061645508,0,49.8881759643555,33.3342132568359,0
,42.4264068603516,42.4264068603516,0,33.3342132568359,49.8881797790527,0,22.9610061645508,55.4327735900879,0,11.7054214477539
,58.8471145629883,0,4.52987387689063e-006,60,0,-11.7054128646851,58.8471183776855,0,-22.9609966278076,55.4327735900879
,0,-33.3342094421387,49.8881797790527,0,-42.4264068603516,42.4264068603516,0,-49.8881797790527,33.3342094421387,0
,-55.4327774047852,22.9609966278076,0,-58.8471183776855,11.7054052352905,0,-60,-1.95504817384062e-005,0,-58.847110748291
,-11.7054433822632,0,-55.4327621459961,-22.9610328674316,0,-49.8881568908691,-33.3342437744141,0,-42.4263801574707
,-42.4264335632324,0,-33.3341789245605,-49.8882026672363,0,-22.9609603881836,-55.432788848877,0,-11.7053670883179
,-58.8471260070801,0,5.79359511903021e-005,-60,0,11.7054805755615,-58.8471031188965,0,22.9610691070557,-55.432746887207
,0,33.3342742919922,-49.8881378173828,0,42.4264602661133,-42.4263534545898,0,49.8882217407227,-33.3341445922852,0
,55.432804107666,-22.9609260559082,0,58.8471336364746,-11.7053298950195,0,60,0,5,58.8471183776855,11.7054195404053
,5,55.4327735900879,22.9610061645508,5,49.8881759643555,33.3342132568359,5,42.4264068603516,42.4264068603516,5,33.3342132568359
,49.8881797790527,5,22.9610061645508,55.4327735900879,5,11.7054214477539,58.8471145629883,5,4.52987387689063e-006
,60,5,-11.7054128646851,58.8471183776855,5,-22.9609966278076,55.4327735900879,5,-33.3342094421387,49.8881797790527
,5,-42.4264068603516,42.4264068603516,5,-49.8881797790527,33.3342094421387,5,-55.4327774047852,22.9609966278076,5
,-58.8471183776855,11.7054052352905,5,-60,-1.95504817384062e-005,5,-58.847110748291,-11.7054433822632,5,-55.4327621459961
,-22.9610328674316,5,-49.8881568908691,-33.3342437744141,5,-42.4263801574707,-42.4264335632324,5,-33.3341789245605
,-49.8882026672363,5,-22.9609603881836,-55.432788848877,5,-11.7053670883179,-58.8471260070801,5,5.79359511903021e-005
,-60,5,11.7054805755615,-58.8471031188965,5,22.9610691070557,-55.432746887207,5,33.3342742919922,-49.8881378173828
,5,42.4264602661133,-42.4263534545898,5,49.8882217407227,-33.3341445922852,5,55.432804107666,-22.9609260559082,5,58.8471336364746
,-11.7053298950195,5
PolygonVertexIndex: 0,1,33,-33,1,2,34,-34,2,3,35,-35,3,4,36,-36,4,5,37,-37,5,6,38,-38,6,7,39,-39,7,8,40,-40,8,9,41,-41,9,10,42,-42,10
,11,43,-43,11,12,44,-44,12,13,45,-45,13,14,46,-46,14,15,47,-47,15,16,48,-48,16,17,49,-49,17,18,50,-50,18,19,51,-51
,19,20,52,-52,20,21,53,-53,21,22,54,-54,22,23,55,-55,23,24,56,-56,24,25,57,-57,25,26,58,-58,26,27,59,-59,27,28,60
,-60,28,29,61,-61,29,30,62,-62,30,31,63,-63,31,0,32,-64
Edges: 0,1,2,3,4,5,6,8,9,10,12,13,14,16,17,18,20,21,22,24,25,26,28,29,30,32,33,34,36,37,38,40,41,42,44,45,46,48,49,50,52
,53,54,56,57,58,60,61,62,64,65,66,68,69,70,72,73,74,76,77,78,80,81,82,84,85,86,88,89,90,92,93,94,96,97,98,100,101
,102,104,105,106,108,109,110,112,113,114,116,117,118,120,121,122,124,126
GeometryVersion: 124
LayerElementNormal: 0 {
Version: 101
Name: ""
MappingInformationType: "ByPolygonVertex"
ReferenceInformationType: "Direct"
Normals: 1,2.66903668943996e-007,0,0.980785310268402,0.195090264081955,0,0.980785310268402,0.195090264081955,0,1,2.66903668943996e-007
,0,0.980785310268402,0.195090264081955,0,0.923879504203796,0.382683545351028,0,0.923879504203796,0.382683545351028
,0,0.980785310268402,0.195090264081955,0,0.923879504203796,0.382683545351028,0,0.831469595432281,0.555570244789124
,0,0.831469595432281,0.555570244789124,0,0.923879504203796,0.382683545351028,0,0.831469595432281,0.555570244789124
,0,0.70710688829422,0.707106709480286,0,0.70710688829422,0.707106709480286,0,0.831469595432281,0.555570244789124
,0,0.70710688829422,0.707106709480286,0,0.555570244789124,0.831469595432281,0,0.555570244789124,0.831469595432281
,0,0.70710688829422,0.707106709480286,0,0.555570244789124,0.831469595432281,0,0.382683277130127,0.923879623413086
,0,0.382683277130127,0.923879623413086,0,0.555570244789124,0.831469595432281,0,0.382683277130127,0.923879623413086
,0,0.195090293884277,0.980785310268402,0,0.195090293884277,0.980785310268402,0,0.382683277130127,0.923879623413086
,0,0.195090293884277,0.980785310268402,0,1.66814800195425e-007,1,0,1.66814800195425e-007,1,0,0.195090293884277
,0.980785310268402,0,1.66814800195425e-007,1,0,-0.195090278983116,0.980785310268402,0,-0.195090278983116,0.980785310268402
,0,1.66814800195425e-007,1,0,-0.195090278983116,0.980785310268402,0,-0.382683306932449,0.923879623413086,0,-0.382683306932449
,0.923879623413086,0,-0.195090278983116,0.980785310268402,0,-0.382683306932449,0.923879623413086,0,-0.555570185184479
,0.831469714641571,0,-0.555570185184479,0.831469714641571,0,-0.382683306932449,0.923879623413086,0,-0.555570185184479
,0.831469714641571,0,-0.70710688829422,0.70710676908493,0,-0.70710688829422,0.70710676908493,0,-0.555570185184479
,0.831469714641571,0,-0.70710688829422,0.70710676908493,0,-0.831469655036926,0.555570244789124,0,-0.831469655036926
,0.555570244789124,0,-0.70710688829422,0.70710676908493,0,-0.831469655036926,0.555570244789124,0,-0.923879623413086
,0.382683277130127,0,-0.923879623413086,0.382683277130127,0,-0.831469655036926,0.555570244789124,0,-0.923879623413086
,0.382683277130127,0,-0.980785310268402,0.195090040564537,0,-0.980785310268402,0.195090040564537,0,-0.923879623413086
,0.382683277130127,0,-0.980785310268402,0.195090040564537,0,-1,-3.3362960039085e-007,0,-1,-3.3362960039085e-007
,0,-0.980785310268402,0.195090040564537,0,-1,-3.3362960039085e-007,0,-0.980785250663757,-0.19509069621563,0,-0.980785250663757
,-0.19509069621563,0,-1,-3.3362960039085e-007,0,-0.980785250663757,-0.19509069621563,0,-0.923879325389862,-0.382683843374252
,0,-0.923879325389862,-0.382683843374252,0,-0.980785250663757,-0.19509069621563,0,-0.923879325389862,-0.382683843374252
,0,-0.831469357013702,-0.555570781230927,0,-0.831469357013702,-0.555570781230927,0,-0.923879325389862,-0.382683843374252
,0,-0.831469357013702,-0.555570781230927,0,-0.707106411457062,-0.707107186317444,0,-0.707106411457062,-0.707107186317444
,0,-0.831469357013702,-0.555570781230927,0,-0.707106411457062,-0.707107186317444,0,-0.555569529533386,-0.831470131874084
,0,-0.555569529533386,-0.831470131874084,0,-0.707106411457062,-0.707107186317444,0,-0.555569529533386,-0.831470131874084
,0,-0.382682532072067,-0.92387992143631,0,-0.382682532072067,-0.92387992143631,0,-0.555569529533386,-0.831470131874084
,0,-0.382682532072067,-0.92387992143631,0,-0.195089533925056,-0.980785489082336,0,-0.195089533925056,-0.980785489082336
,0,-0.382682532072067,-0.92387992143631,0,-0.195089533925056,-0.980785489082336,0,9.86590293905465e-007,-1,0
,9.86590293905465e-007,-1,0,-0.195089533925056,-0.980785489082336,0,9.86590293905465e-007,-1,0,0.1950913220644
,-0.980785071849823,0,0.1950913220644,-0.980785071849823,0,9.86590293905465e-007,-1,0,0.1950913220644,-0.980785071849823
,0,0.382684379816055,-0.923879206180573,0,0.382684379816055,-0.923879206180573,0,0.1950913220644,-0.980785071849823
,0,0.382684379816055,-0.923879206180573,0,0.555571258068085,-0.831468880176544,0,0.555571258068085,-0.831468880176544
,0,0.382684379816055,-0.923879206180573,0,0.555571258068085,-0.831468880176544,0,0.707107782363892,-0.707105815410614
,0,0.707107782363892,-0.707105815410614,0,0.555571258068085,-0.831468880176544,0,0.707107782363892,-0.707105815410614
,0,0.831470429897308,-0.555569112300873,0,0.831470429897308,-0.555569112300873,0,0.707107782363892,-0.707105815410614
,0,0.831470429897308,-0.555569112300873,0,0.923880100250244,-0.382682114839554,0,0.923880100250244,-0.382682114839554
,0,0.831470429897308,-0.555569112300873,0,0.923880100250244,-0.382682114839554,0,0.980785548686981,-0.195089265704155
,0,0.980785548686981,-0.195089265704155,0,0.923880100250244,-0.382682114839554,0,0.980785548686981,-0.195089265704155
,0,1,2.66903668943996e-007,0,1,2.66903668943996e-007,0,0.980785548686981,-0.195089265704155,0
}
LayerElementUV: 0 {
Version: 101
Name: "UVChannel_1"
MappingInformationType: "ByPolygonVertex"
ReferenceInformationType: "IndexToDirect"
UV: 0.75,0,0.78125,0,0.8125,0,0.84375,0,0.875,0,0.90625,0,0.9375,0,0.96875,0,1,0,0.0312500111758709,0,0.0624999850988388
,0,0.09375,0,0.125000014901161,0,0.156250014901161,0,0.187500029802322,0,0.218750044703484,0,0.250000059604645
,0,0.281250059604645,0,0.312500089406967,0,0.34375011920929,0,0.37500011920929,0,0.40625011920929,0,0.437500149011612
,0,0.468750149011612,0,0.500000178813934,0,0.531250178813934,0,0.562500178813934,0,0.593750178813934,0,0.625000238418579
,0,0.656250238418579,0,0.687500238418579,0,0.718750238418579,0,0.75,1,0.78125,1,0.8125,1,0.84375,1,0.875,1,0.90625
,1,0.9375,1,0.96875,1,1,1,0.0312500111758709,1,0.0624999850988388,1,0.09375,1,0.125000014901161,1,0.156250014901161
,1,0.187500029802322,1,0.218750044703484,1,0.250000059604645,1,0.281250059604645,1,0.312500089406967,1,0.34375011920929
,1,0.37500011920929,1,0.40625011920929,1,0.437500149011612,1,0.468750149011612,1,0.500000178813934,1,0.531250178813934
,1,0.562500178813934,1,0.593750178813934,1,0.625000238418579,1,0.656250238418579,1,0.687500238418579,1,0.718750238418579
,1,1.03125,0,1.03125,1
UVIndex: 0,1,33,32,1,2,34,33,2,3,35,34,3,4,36,35,4,5,37,36,5,6,38,37,6,7,39,38,7,8,40,39,8,64,65,40,9,10,42,41,10,11,43
,42,11,12,44,43,12,13,45,44,13,14,46,45,14,15,47,46,15,16,48,47,16,17,49,48,17,18,50,49,18,19,51,50,19,20,52
,51,20,21,53,52,21,22,54,53,22,23,55,54,23,24,56,55,24,25,57,56,25,26,58,57,26,27,59,58,27,28,60,59,28,29,61
,60,29,30,62,61,30,31,63,62,31,0,32,63
}
LayerElementSmoothing: 0 {
Version: 102
Name: ""
MappingInformationType: "ByPolygon"
ReferenceInformationType: "Direct"
Smoothing: 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
}
Layer: 0 {
Version: 100
LayerElement: {
Type: "LayerElementNormal"
TypedIndex: 0
}
LayerElement: {
Type: "LayerElementUV"
TypedIndex: 0
}
LayerElement: {
Type: "LayerElementSmoothing"
TypedIndex: 0
}
}
NodeAttributeName: "Geometry::CFX_Circular2_ncl1_1"
}
SceneInfo: "SceneInfo::GlobalInfo", "UserData" {
Type: "UserData"
Version: 100
MetaData: {
Version: 100
Title: ""
Subject: ""
Author: ""
Keywords: ""
Revision: ""
Comment: ""
}
Properties60: {
Property: "DocumentUrl", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CARTOON EFFECT PACKS\CartoonEffects 2 AssetStore\Assets\Cartoon FX\Mesh\CFX_Mesh_Circular2.FBX"
Property: "SrcDocumentUrl", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CARTOON EFFECT PACKS\CartoonEffects 2 AssetStore\Assets\Cartoon FX\Mesh\CFX_Mesh_Circular2.FBX"
Property: "Original", "Compound", ""
Property: "Original|ApplicationVendor", "KString", "", "Autodesk"
Property: "Original|ApplicationName", "KString", "", "3ds Max"
Property: "Original|ApplicationVersion", "KString", "", "2009.3"
Property: "Original|DateTime_GMT", "DateTime", "", "08/08/2012 14:08:48.203"
Property: "Original|FileName", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CARTOON EFFECT PACKS\CartoonEffects 2 AssetStore\Assets\Cartoon FX\Mesh\CFX_Mesh_Circular2.FBX"
Property: "LastSaved", "Compound", ""
Property: "LastSaved|ApplicationVendor", "KString", "", "Autodesk"
Property: "LastSaved|ApplicationName", "KString", "", "3ds Max"
Property: "LastSaved|ApplicationVersion", "KString", "", "2009.3"
Property: "LastSaved|DateTime_GMT", "DateTime", "", "08/08/2012 14:08:48.203"
}
}
GlobalSettings: {
Version: 1000
Properties60: {
Property: "UpAxis", "int", "",1
Property: "UpAxisSign", "int", "",1
Property: "FrontAxis", "int", "",2
Property: "FrontAxisSign", "int", "",1
Property: "CoordAxis", "int", "",0
Property: "CoordAxisSign", "int", "",1
Property: "UnitScaleFactor", "double", "",0.1
}
}
}
; Object connections
;------------------------------------------------------------------
Connections: {
Connect: "OO", "Model::CFX_Circular2", "Model::Scene"
}
;Takes and animation section
;----------------------------------------------------
Takes: {
Current: "Take 001"
}
;Version 5 settings
;------------------------------------------------------------------
Version5: {
AmbientRenderSettings: {
Version: 101
AmbientLightColor: 0,0,0,1
}
FogOptions: {
FlogEnable: 0
FogMode: 0
FogDensity: 0.002
FogStart: 0.3
FogEnd: 1000
FogColor: 1,1,1,1
}
Settings: {
FrameRate: "30"
TimeFormat: 1
SnapOnFrames: 0
ReferenceTimeIndex: -1
TimeLineStartTime: 0
TimeLineStopTime: 153953860000
}
RendererSetting: {
DefaultCamera: "Producer Perspective"
DefaultViewingMode: 0
}
}
; FBX 6.1.0 project file
; Copyright (C) 1997-2008 Autodesk Inc. and/or its licensors.
; All rights reserved.
; ----------------------------------------------------
FBXHeaderExtension: {
FBXHeaderVersion: 1003
FBXVersion: 6100
CreationTimeStamp: {
Version: 1000
Year: 2012
Month: 8
Day: 8
Hour: 16
Minute: 8
Second: 48
Millisecond: 219
}
Creator: "FBX SDK/FBX Plugins version 2009.3"
OtherFlags: {
FlagPLE: 0
}
}
CreationTime: "2012-08-08 16:08:48:219"
Creator: "FBX SDK/FBX Plugins build 20080926"
; Document Description
;------------------------------------------------------------------
Document: {
Name: ""
}
; Document References
;------------------------------------------------------------------
References: {
}
; Object definitions
;------------------------------------------------------------------
Definitions: {
Version: 100
Count: 3
ObjectType: "Model" {
Count: 1
}
ObjectType: "SceneInfo" {
Count: 1
}
ObjectType: "GlobalSettings" {
Count: 1
}
}
; Object properties
;------------------------------------------------------------------
Objects: {
Model: "Model::CFX_Circular2", "Mesh" {
Version: 232
Properties60: {
Property: "QuaternionInterpolate", "bool", "",0
Property: "RotationOffset", "Vector3D", "",0,0,0
Property: "RotationPivot", "Vector3D", "",0,0,0
Property: "ScalingOffset", "Vector3D", "",0,0,0
Property: "ScalingPivot", "Vector3D", "",0,0,0
Property: "TranslationActive", "bool", "",0
Property: "TranslationMin", "Vector3D", "",0,0,0
Property: "TranslationMax", "Vector3D", "",0,0,0
Property: "TranslationMinX", "bool", "",0
Property: "TranslationMinY", "bool", "",0
Property: "TranslationMinZ", "bool", "",0
Property: "TranslationMaxX", "bool", "",0
Property: "TranslationMaxY", "bool", "",0
Property: "TranslationMaxZ", "bool", "",0
Property: "RotationOrder", "enum", "",0
Property: "RotationSpaceForLimitOnly", "bool", "",0
Property: "RotationStiffnessX", "double", "",0
Property: "RotationStiffnessY", "double", "",0
Property: "RotationStiffnessZ", "double", "",0
Property: "AxisLen", "double", "",10
Property: "PreRotation", "Vector3D", "",-90,0,0
Property: "PostRotation", "Vector3D", "",0,0,0
Property: "RotationActive", "bool", "",1
Property: "RotationMin", "Vector3D", "",0,0,0
Property: "RotationMax", "Vector3D", "",0,0,0
Property: "RotationMinX", "bool", "",0
Property: "RotationMinY", "bool", "",0
Property: "RotationMinZ", "bool", "",0
Property: "RotationMaxX", "bool", "",0
Property: "RotationMaxY", "bool", "",0
Property: "RotationMaxZ", "bool", "",0
Property: "InheritType", "enum", "",1
Property: "ScalingActive", "bool", "",0
Property: "ScalingMin", "Vector3D", "",1,1,1
Property: "ScalingMax", "Vector3D", "",1,1,1
Property: "ScalingMinX", "bool", "",0
Property: "ScalingMinY", "bool", "",0
Property: "ScalingMinZ", "bool", "",0
Property: "ScalingMaxX", "bool", "",0
Property: "ScalingMaxY", "bool", "",0
Property: "ScalingMaxZ", "bool", "",0
Property: "GeometricTranslation", "Vector3D", "",0,0,0
Property: "GeometricRotation", "Vector3D", "",90,-0,0
Property: "GeometricScaling", "Vector3D", "",1,1,1
Property: "MinDampRangeX", "double", "",0
Property: "MinDampRangeY", "double", "",0
Property: "MinDampRangeZ", "double", "",0
Property: "MaxDampRangeX", "double", "",0
Property: "MaxDampRangeY", "double", "",0
Property: "MaxDampRangeZ", "double", "",0
Property: "MinDampStrengthX", "double", "",0
Property: "MinDampStrengthY", "double", "",0
Property: "MinDampStrengthZ", "double", "",0
Property: "MaxDampStrengthX", "double", "",0
Property: "MaxDampStrengthY", "double", "",0
Property: "MaxDampStrengthZ", "double", "",0
Property: "PreferedAngleX", "double", "",0
Property: "PreferedAngleY", "double", "",0
Property: "PreferedAngleZ", "double", "",0
Property: "LookAtProperty", "object", ""
Property: "UpVectorProperty", "object", ""
Property: "Show", "bool", "",1
Property: "NegativePercentShapeSupport", "bool", "",1
Property: "DefaultAttributeIndex", "int", "",0
Property: "Lcl Translation", "Lcl Translation", "A+",0,0,0
Property: "Lcl Rotation", "Lcl Rotation", "A+",0,0,0
Property: "Lcl Scaling", "Lcl Scaling", "A+",1,1,1
Property: "Visibility", "Visibility", "A+",1
Property: "Color", "ColorRGB", "N",0.109803921568627,0.349019607843137,0.694117647058824
Property: "BBoxMin", "Vector3D", "N",0,0,0
Property: "BBoxMax", "Vector3D", "N",0,0,0
}
MultiLayer: 0
MultiTake: 1
Shading: T
Culling: "CullingOff"
Vertices: 60,0,0,58.8471183776855,11.7054195404053,0,55.4327735900879,22.9610061645508,0,49.8881759643555,33.3342132568359,0
,42.4264068603516,42.4264068603516,0,33.3342132568359,49.8881797790527,0,22.9610061645508,55.4327735900879,0,11.7054214477539
,58.8471145629883,0,4.52987387689063e-006,60,0,-11.7054128646851,58.8471183776855,0,-22.9609966278076,55.4327735900879
,0,-33.3342094421387,49.8881797790527,0,-42.4264068603516,42.4264068603516,0,-49.8881797790527,33.3342094421387,0
,-55.4327774047852,22.9609966278076,0,-58.8471183776855,11.7054052352905,0,-60,-1.95504817384062e-005,0,-58.847110748291
,-11.7054433822632,0,-55.4327621459961,-22.9610328674316,0,-49.8881568908691,-33.3342437744141,0,-42.4263801574707
,-42.4264335632324,0,-33.3341789245605,-49.8882026672363,0,-22.9609603881836,-55.432788848877,0,-11.7053670883179
,-58.8471260070801,0,5.79359511903021e-005,-60,0,11.7054805755615,-58.8471031188965,0,22.9610691070557,-55.432746887207
,0,33.3342742919922,-49.8881378173828,0,42.4264602661133,-42.4263534545898,0,49.8882217407227,-33.3341445922852,0
,55.432804107666,-22.9609260559082,0,58.8471336364746,-11.7053298950195,0,60,0,5,58.8471183776855,11.7054195404053
,5,55.4327735900879,22.9610061645508,5,49.8881759643555,33.3342132568359,5,42.4264068603516,42.4264068603516,5,33.3342132568359
,49.8881797790527,5,22.9610061645508,55.4327735900879,5,11.7054214477539,58.8471145629883,5,4.52987387689063e-006
,60,5,-11.7054128646851,58.8471183776855,5,-22.9609966278076,55.4327735900879,5,-33.3342094421387,49.8881797790527
,5,-42.4264068603516,42.4264068603516,5,-49.8881797790527,33.3342094421387,5,-55.4327774047852,22.9609966278076,5
,-58.8471183776855,11.7054052352905,5,-60,-1.95504817384062e-005,5,-58.847110748291,-11.7054433822632,5,-55.4327621459961
,-22.9610328674316,5,-49.8881568908691,-33.3342437744141,5,-42.4263801574707,-42.4264335632324,5,-33.3341789245605
,-49.8882026672363,5,-22.9609603881836,-55.432788848877,5,-11.7053670883179,-58.8471260070801,5,5.79359511903021e-005
,-60,5,11.7054805755615,-58.8471031188965,5,22.9610691070557,-55.432746887207,5,33.3342742919922,-49.8881378173828
,5,42.4264602661133,-42.4263534545898,5,49.8882217407227,-33.3341445922852,5,55.432804107666,-22.9609260559082,5,58.8471336364746
,-11.7053298950195,5
PolygonVertexIndex: 0,1,33,-33,1,2,34,-34,2,3,35,-35,3,4,36,-36,4,5,37,-37,5,6,38,-38,6,7,39,-39,7,8,40,-40,8,9,41,-41,9,10,42,-42,10
,11,43,-43,11,12,44,-44,12,13,45,-45,13,14,46,-46,14,15,47,-47,15,16,48,-48,16,17,49,-49,17,18,50,-50,18,19,51,-51
,19,20,52,-52,20,21,53,-53,21,22,54,-54,22,23,55,-55,23,24,56,-56,24,25,57,-57,25,26,58,-58,26,27,59,-59,27,28,60
,-60,28,29,61,-61,29,30,62,-62,30,31,63,-63,31,0,32,-64
Edges: 0,1,2,3,4,5,6,8,9,10,12,13,14,16,17,18,20,21,22,24,25,26,28,29,30,32,33,34,36,37,38,40,41,42,44,45,46,48,49,50,52
,53,54,56,57,58,60,61,62,64,65,66,68,69,70,72,73,74,76,77,78,80,81,82,84,85,86,88,89,90,92,93,94,96,97,98,100,101
,102,104,105,106,108,109,110,112,113,114,116,117,118,120,121,122,124,126
GeometryVersion: 124
LayerElementNormal: 0 {
Version: 101
Name: ""
MappingInformationType: "ByPolygonVertex"
ReferenceInformationType: "Direct"
Normals: 1,2.66903668943996e-007,0,0.980785310268402,0.195090264081955,0,0.980785310268402,0.195090264081955,0,1,2.66903668943996e-007
,0,0.980785310268402,0.195090264081955,0,0.923879504203796,0.382683545351028,0,0.923879504203796,0.382683545351028
,0,0.980785310268402,0.195090264081955,0,0.923879504203796,0.382683545351028,0,0.831469595432281,0.555570244789124
,0,0.831469595432281,0.555570244789124,0,0.923879504203796,0.382683545351028,0,0.831469595432281,0.555570244789124
,0,0.70710688829422,0.707106709480286,0,0.70710688829422,0.707106709480286,0,0.831469595432281,0.555570244789124
,0,0.70710688829422,0.707106709480286,0,0.555570244789124,0.831469595432281,0,0.555570244789124,0.831469595432281
,0,0.70710688829422,0.707106709480286,0,0.555570244789124,0.831469595432281,0,0.382683277130127,0.923879623413086
,0,0.382683277130127,0.923879623413086,0,0.555570244789124,0.831469595432281,0,0.382683277130127,0.923879623413086
,0,0.195090293884277,0.980785310268402,0,0.195090293884277,0.980785310268402,0,0.382683277130127,0.923879623413086
,0,0.195090293884277,0.980785310268402,0,1.66814800195425e-007,1,0,1.66814800195425e-007,1,0,0.195090293884277
,0.980785310268402,0,1.66814800195425e-007,1,0,-0.195090278983116,0.980785310268402,0,-0.195090278983116,0.980785310268402
,0,1.66814800195425e-007,1,0,-0.195090278983116,0.980785310268402,0,-0.382683306932449,0.923879623413086,0,-0.382683306932449
,0.923879623413086,0,-0.195090278983116,0.980785310268402,0,-0.382683306932449,0.923879623413086,0,-0.555570185184479
,0.831469714641571,0,-0.555570185184479,0.831469714641571,0,-0.382683306932449,0.923879623413086,0,-0.555570185184479
,0.831469714641571,0,-0.70710688829422,0.70710676908493,0,-0.70710688829422,0.70710676908493,0,-0.555570185184479
,0.831469714641571,0,-0.70710688829422,0.70710676908493,0,-0.831469655036926,0.555570244789124,0,-0.831469655036926
,0.555570244789124,0,-0.70710688829422,0.70710676908493,0,-0.831469655036926,0.555570244789124,0,-0.923879623413086
,0.382683277130127,0,-0.923879623413086,0.382683277130127,0,-0.831469655036926,0.555570244789124,0,-0.923879623413086
,0.382683277130127,0,-0.980785310268402,0.195090040564537,0,-0.980785310268402,0.195090040564537,0,-0.923879623413086
,0.382683277130127,0,-0.980785310268402,0.195090040564537,0,-1,-3.3362960039085e-007,0,-1,-3.3362960039085e-007
,0,-0.980785310268402,0.195090040564537,0,-1,-3.3362960039085e-007,0,-0.980785250663757,-0.19509069621563,0,-0.980785250663757
,-0.19509069621563,0,-1,-3.3362960039085e-007,0,-0.980785250663757,-0.19509069621563,0,-0.923879325389862,-0.382683843374252
,0,-0.923879325389862,-0.382683843374252,0,-0.980785250663757,-0.19509069621563,0,-0.923879325389862,-0.382683843374252
,0,-0.831469357013702,-0.555570781230927,0,-0.831469357013702,-0.555570781230927,0,-0.923879325389862,-0.382683843374252
,0,-0.831469357013702,-0.555570781230927,0,-0.707106411457062,-0.707107186317444,0,-0.707106411457062,-0.707107186317444
,0,-0.831469357013702,-0.555570781230927,0,-0.707106411457062,-0.707107186317444,0,-0.555569529533386,-0.831470131874084
,0,-0.555569529533386,-0.831470131874084,0,-0.707106411457062,-0.707107186317444,0,-0.555569529533386,-0.831470131874084
,0,-0.382682532072067,-0.92387992143631,0,-0.382682532072067,-0.92387992143631,0,-0.555569529533386,-0.831470131874084
,0,-0.382682532072067,-0.92387992143631,0,-0.195089533925056,-0.980785489082336,0,-0.195089533925056,-0.980785489082336
,0,-0.382682532072067,-0.92387992143631,0,-0.195089533925056,-0.980785489082336,0,9.86590293905465e-007,-1,0
,9.86590293905465e-007,-1,0,-0.195089533925056,-0.980785489082336,0,9.86590293905465e-007,-1,0,0.1950913220644
,-0.980785071849823,0,0.1950913220644,-0.980785071849823,0,9.86590293905465e-007,-1,0,0.1950913220644,-0.980785071849823
,0,0.382684379816055,-0.923879206180573,0,0.382684379816055,-0.923879206180573,0,0.1950913220644,-0.980785071849823
,0,0.382684379816055,-0.923879206180573,0,0.555571258068085,-0.831468880176544,0,0.555571258068085,-0.831468880176544
,0,0.382684379816055,-0.923879206180573,0,0.555571258068085,-0.831468880176544,0,0.707107782363892,-0.707105815410614
,0,0.707107782363892,-0.707105815410614,0,0.555571258068085,-0.831468880176544,0,0.707107782363892,-0.707105815410614
,0,0.831470429897308,-0.555569112300873,0,0.831470429897308,-0.555569112300873,0,0.707107782363892,-0.707105815410614
,0,0.831470429897308,-0.555569112300873,0,0.923880100250244,-0.382682114839554,0,0.923880100250244,-0.382682114839554
,0,0.831470429897308,-0.555569112300873,0,0.923880100250244,-0.382682114839554,0,0.980785548686981,-0.195089265704155
,0,0.980785548686981,-0.195089265704155,0,0.923880100250244,-0.382682114839554,0,0.980785548686981,-0.195089265704155
,0,1,2.66903668943996e-007,0,1,2.66903668943996e-007,0,0.980785548686981,-0.195089265704155,0
}
LayerElementUV: 0 {
Version: 101
Name: "UVChannel_1"
MappingInformationType: "ByPolygonVertex"
ReferenceInformationType: "IndexToDirect"
UV: 0.75,0,0.78125,0,0.8125,0,0.84375,0,0.875,0,0.90625,0,0.9375,0,0.96875,0,1,0,0.0312500111758709,0,0.0624999850988388
,0,0.09375,0,0.125000014901161,0,0.156250014901161,0,0.187500029802322,0,0.218750044703484,0,0.250000059604645
,0,0.281250059604645,0,0.312500089406967,0,0.34375011920929,0,0.37500011920929,0,0.40625011920929,0,0.437500149011612
,0,0.468750149011612,0,0.500000178813934,0,0.531250178813934,0,0.562500178813934,0,0.593750178813934,0,0.625000238418579
,0,0.656250238418579,0,0.687500238418579,0,0.718750238418579,0,0.75,1,0.78125,1,0.8125,1,0.84375,1,0.875,1,0.90625
,1,0.9375,1,0.96875,1,1,1,0.0312500111758709,1,0.0624999850988388,1,0.09375,1,0.125000014901161,1,0.156250014901161
,1,0.187500029802322,1,0.218750044703484,1,0.250000059604645,1,0.281250059604645,1,0.312500089406967,1,0.34375011920929
,1,0.37500011920929,1,0.40625011920929,1,0.437500149011612,1,0.468750149011612,1,0.500000178813934,1,0.531250178813934
,1,0.562500178813934,1,0.593750178813934,1,0.625000238418579,1,0.656250238418579,1,0.687500238418579,1,0.718750238418579
,1,1.03125,0,1.03125,1
UVIndex: 0,1,33,32,1,2,34,33,2,3,35,34,3,4,36,35,4,5,37,36,5,6,38,37,6,7,39,38,7,8,40,39,8,64,65,40,9,10,42,41,10,11,43
,42,11,12,44,43,12,13,45,44,13,14,46,45,14,15,47,46,15,16,48,47,16,17,49,48,17,18,50,49,18,19,51,50,19,20,52
,51,20,21,53,52,21,22,54,53,22,23,55,54,23,24,56,55,24,25,57,56,25,26,58,57,26,27,59,58,27,28,60,59,28,29,61
,60,29,30,62,61,30,31,63,62,31,0,32,63
}
LayerElementSmoothing: 0 {
Version: 102
Name: ""
MappingInformationType: "ByPolygon"
ReferenceInformationType: "Direct"
Smoothing: 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
}
Layer: 0 {
Version: 100
LayerElement: {
Type: "LayerElementNormal"
TypedIndex: 0
}
LayerElement: {
Type: "LayerElementUV"
TypedIndex: 0
}
LayerElement: {
Type: "LayerElementSmoothing"
TypedIndex: 0
}
}
NodeAttributeName: "Geometry::CFX_Circular2_ncl1_1"
}
SceneInfo: "SceneInfo::GlobalInfo", "UserData" {
Type: "UserData"
Version: 100
MetaData: {
Version: 100
Title: ""
Subject: ""
Author: ""
Keywords: ""
Revision: ""
Comment: ""
}
Properties60: {
Property: "DocumentUrl", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CARTOON EFFECT PACKS\CartoonEffects 2 AssetStore\Assets\Cartoon FX\Mesh\CFX_Mesh_Circular2.FBX"
Property: "SrcDocumentUrl", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CARTOON EFFECT PACKS\CartoonEffects 2 AssetStore\Assets\Cartoon FX\Mesh\CFX_Mesh_Circular2.FBX"
Property: "Original", "Compound", ""
Property: "Original|ApplicationVendor", "KString", "", "Autodesk"
Property: "Original|ApplicationName", "KString", "", "3ds Max"
Property: "Original|ApplicationVersion", "KString", "", "2009.3"
Property: "Original|DateTime_GMT", "DateTime", "", "08/08/2012 14:08:48.203"
Property: "Original|FileName", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CARTOON EFFECT PACKS\CartoonEffects 2 AssetStore\Assets\Cartoon FX\Mesh\CFX_Mesh_Circular2.FBX"
Property: "LastSaved", "Compound", ""
Property: "LastSaved|ApplicationVendor", "KString", "", "Autodesk"
Property: "LastSaved|ApplicationName", "KString", "", "3ds Max"
Property: "LastSaved|ApplicationVersion", "KString", "", "2009.3"
Property: "LastSaved|DateTime_GMT", "DateTime", "", "08/08/2012 14:08:48.203"
}
}
GlobalSettings: {
Version: 1000
Properties60: {
Property: "UpAxis", "int", "",1
Property: "UpAxisSign", "int", "",1
Property: "FrontAxis", "int", "",2
Property: "FrontAxisSign", "int", "",1
Property: "CoordAxis", "int", "",0
Property: "CoordAxisSign", "int", "",1
Property: "UnitScaleFactor", "double", "",0.1
}
}
}
; Object connections
;------------------------------------------------------------------
Connections: {
Connect: "OO", "Model::CFX_Circular2", "Model::Scene"
}
;Takes and animation section
;----------------------------------------------------
Takes: {
Current: "Take 001"
}
;Version 5 settings
;------------------------------------------------------------------
Version5: {
AmbientRenderSettings: {
Version: 101
AmbientLightColor: 0,0,0,1
}
FogOptions: {
FlogEnable: 0
FogMode: 0
FogDensity: 0.002
FogStart: 0.3
FogEnd: 1000
FogColor: 1,1,1,1
}
Settings: {
FrameRate: "30"
TimeFormat: 1
SnapOnFrames: 0
ReferenceTimeIndex: -1
TimeLineStartTime: 0
TimeLineStopTime: 153953860000
}
RendererSetting: {
DefaultCamera: "Producer Perspective"
DefaultViewingMode: 0
}
}

View File

@ -1,396 +1,396 @@
; FBX 6.1.0 project file
; Copyright (C) 1997-2008 Autodesk Inc. and/or its licensors.
; All rights reserved.
; ----------------------------------------------------
FBXHeaderExtension: {
FBXHeaderVersion: 1003
FBXVersion: 6100
CreationTimeStamp: {
Version: 1000
Year: 2012
Month: 8
Day: 3
Hour: 11
Minute: 6
Second: 39
Millisecond: 796
}
Creator: "FBX SDK/FBX Plugins version 2009.3"
OtherFlags: {
FlagPLE: 0
}
}
CreationTime: "2012-08-03 11:06:39:796"
Creator: "FBX SDK/FBX Plugins build 20080926"
; Document Description
;------------------------------------------------------------------
Document: {
Name: ""
}
; Document References
;------------------------------------------------------------------
References: {
}
; Object definitions
;------------------------------------------------------------------
Definitions: {
Version: 100
Count: 3
ObjectType: "Model" {
Count: 1
}
ObjectType: "SceneInfo" {
Count: 1
}
ObjectType: "GlobalSettings" {
Count: 1
}
}
; Object properties
;------------------------------------------------------------------
Objects: {
Model: "Model::CFX_CircularAngle", "Mesh" {
Version: 232
Properties60: {
Property: "QuaternionInterpolate", "bool", "",0
Property: "RotationOffset", "Vector3D", "",0,0,0
Property: "RotationPivot", "Vector3D", "",0,0,0
Property: "ScalingOffset", "Vector3D", "",0,0,0
Property: "ScalingPivot", "Vector3D", "",0,0,0
Property: "TranslationActive", "bool", "",0
Property: "TranslationMin", "Vector3D", "",0,0,0
Property: "TranslationMax", "Vector3D", "",0,0,0
Property: "TranslationMinX", "bool", "",0
Property: "TranslationMinY", "bool", "",0
Property: "TranslationMinZ", "bool", "",0
Property: "TranslationMaxX", "bool", "",0
Property: "TranslationMaxY", "bool", "",0
Property: "TranslationMaxZ", "bool", "",0
Property: "RotationOrder", "enum", "",0
Property: "RotationSpaceForLimitOnly", "bool", "",0
Property: "RotationStiffnessX", "double", "",0
Property: "RotationStiffnessY", "double", "",0
Property: "RotationStiffnessZ", "double", "",0
Property: "AxisLen", "double", "",10
Property: "PreRotation", "Vector3D", "",-90,0,0
Property: "PostRotation", "Vector3D", "",0,0,0
Property: "RotationActive", "bool", "",1
Property: "RotationMin", "Vector3D", "",0,0,0
Property: "RotationMax", "Vector3D", "",0,0,0
Property: "RotationMinX", "bool", "",0
Property: "RotationMinY", "bool", "",0
Property: "RotationMinZ", "bool", "",0
Property: "RotationMaxX", "bool", "",0
Property: "RotationMaxY", "bool", "",0
Property: "RotationMaxZ", "bool", "",0
Property: "InheritType", "enum", "",1
Property: "ScalingActive", "bool", "",0
Property: "ScalingMin", "Vector3D", "",1,1,1
Property: "ScalingMax", "Vector3D", "",1,1,1
Property: "ScalingMinX", "bool", "",0
Property: "ScalingMinY", "bool", "",0
Property: "ScalingMinZ", "bool", "",0
Property: "ScalingMaxX", "bool", "",0
Property: "ScalingMaxY", "bool", "",0
Property: "ScalingMaxZ", "bool", "",0
Property: "GeometricTranslation", "Vector3D", "",0,-10.1933441162109,4.45565234485912e-007
Property: "GeometricRotation", "Vector3D", "",-90,0,0
Property: "GeometricScaling", "Vector3D", "",2.06424999237061,2.06424999237061,2.06424999237061
Property: "MinDampRangeX", "double", "",0
Property: "MinDampRangeY", "double", "",0
Property: "MinDampRangeZ", "double", "",0
Property: "MaxDampRangeX", "double", "",0
Property: "MaxDampRangeY", "double", "",0
Property: "MaxDampRangeZ", "double", "",0
Property: "MinDampStrengthX", "double", "",0
Property: "MinDampStrengthY", "double", "",0
Property: "MinDampStrengthZ", "double", "",0
Property: "MaxDampStrengthX", "double", "",0
Property: "MaxDampStrengthY", "double", "",0
Property: "MaxDampStrengthZ", "double", "",0
Property: "PreferedAngleX", "double", "",0
Property: "PreferedAngleY", "double", "",0
Property: "PreferedAngleZ", "double", "",0
Property: "LookAtProperty", "object", ""
Property: "UpVectorProperty", "object", ""
Property: "Show", "bool", "",1
Property: "NegativePercentShapeSupport", "bool", "",1
Property: "DefaultAttributeIndex", "int", "",0
Property: "Lcl Translation", "Lcl Translation", "A+",0,0,0
Property: "Lcl Rotation", "Lcl Rotation", "A+",0,0,0
Property: "Lcl Scaling", "Lcl Scaling", "A+",1,1,1
Property: "Visibility", "Visibility", "A+",1
Property: "Color", "ColorRGB", "N",0.423529411764706,0.0313725490196078,0.533333333333333
Property: "BBoxMin", "Vector3D", "N",0,0,0
Property: "BBoxMax", "Vector3D", "N",0,0,0
}
MultiLayer: 0
MultiTake: 1
Shading: T
Culling: "CullingOff"
Vertices: 30.5999412536621,0,4.93803739547729,30.0119724273682,5.9697527885437,4.93803739547729,28.270658493042,11.710090637207
,4.93803739547729,25.4429206848145,17.000415802002,4.93803739547729,21.6374263763428,21.6374263763428,4.93803739547729
,17.000415802002,25.4429225921631,4.93803739547729,11.710090637207,28.2706604003906,4.93803739547729,5.96975326538086
,30.0119724273682,4.93803739547729,2.31023136620934e-006,30.5999412536621,4.93803739547729,-5.96974897384644,30.0119724273682
,4.93803739547729,-11.7100858688354,28.2706604003906,4.93803739547729,-17.0004138946533,25.4429225921631,4.93803739547729
,-21.6374263763428,21.6374263763428,4.93803739547729,-25.4429225921631,17.0004138946533,4.93803739547729,-28.2706623077393
,11.7100858688354,4.93803739547729,-30.0119743347168,5.96974515914917,4.93803739547729,-30.5999412536621,-9.97072675090749e-006
,4.93803739547729,-30.0119686126709,-5.96976470947266,4.93803739547729,-28.2706546783447,-11.7101039886475,4.93803739547729
,-25.4429111480713,-17.000431060791,4.93803739547729,-21.6374111175537,-21.6374397277832,4.93803739547729,-17.0003986358643
,-25.4429340362549,4.93803739547729,-11.7100677490234,-28.2706680297852,4.93803739547729,-5.96972560882568,-30.0119781494141
,4.93803739547729,2.95472782454453e-005,-30.5999412536621,4.93803739547729,5.96978378295898,-30.0119647979736,4.93803739547729
,11.7101221084595,-28.2706470489502,4.93803739547729,17.0004463195801,-25.4429016113281,4.93803739547729,21.6374530792236
,-21.6373977661133,4.93803739547729,25.442943572998,-17.0003814697266,4.93803739547729,28.2706756591797,-11.7100496292114
,4.93803739547729,30.0119819641113,-5.96970653533936,4.93803739547729,26.9941177368164,-1.09717211671523e-006,9.76329135894775
,26.475435256958,5.26629066467285,9.76329135894775,24.9393138885498,10.3302021026611,9.76329135894775,22.4447898864746
,14.9971284866333,9.76329135894775,19.0877246856689,19.0877265930176,9.76329135894775,14.9971256256104,22.4447917938232
,9.76329135894775,10.3301992416382,24.9393177032471,9.76329135894775,5.26629018783569,26.475435256958,9.76329135894775
,-3.46167325915303e-007,26.994119644165,9.76329135894775,-5.26629066467285,26.475435256958,9.76329135894775,-10.3302021026611
,24.9393177032471,9.76329135894775,-14.9971303939819,22.4447917938232,9.76329135894775,-19.0877265930176,19.0877265930176
,9.76329135894775,-22.4447937011719,14.9971265792847,9.76329135894775,-24.9393215179443,10.3301982879639,9.76329135894775
,-26.4754390716553,5.26628446578979,9.76329135894775,-26.9941215515137,-9.89297404885292e-006,9.76329135894775,-26.4754333496094
,-5.26630306243896,9.76329135894775,-24.9393138885498,-10.3302154541016,9.76329135894775,-22.4447822570801,-14.997142791748
,9.76329135894775,-19.0877151489258,-19.0877361297607,9.76329135894775,-14.9971170425415,-22.4448013305664,9.76329135894775
,-10.3301858901978,-24.939323425293,9.76329135894775,-5.26627016067505,-26.4754409790039,9.76329135894775,2.36813357332721e-005
,-26.994119644165,9.76329135894775,5.26631736755371,-26.4754276275635,9.76329135894775,10.3302268981934,-24.939302444458
,9.76329135894775,14.9971523284912,-22.4447746276855,9.76329135894775,19.0877475738525,-19.0876998901367,9.76329135894775
,22.4448070526123,-14.9970998764038,9.76329135894775,24.9393291473389,-10.3301668167114,9.76329135894775,26.4754409790039
,-5.26625204086304,9.76329135894775
PolygonVertexIndex: 0,32,33,-2,1,33,34,-3,2,34,35,-4,3,35,36,-5,4,36,37,-6,5,37,38,-7,6,38,39,-8,7,39,40,-9,8,40,41,-10,9,41,42,-11,10
,42,43,-12,11,43,44,-13,12,44,45,-14,13,45,46,-15,14,46,47,-16,15,47,48,-17,16,48,49,-18,17,49,50,-19,18,50,51,-20
,19,51,52,-21,20,52,53,-22,21,53,54,-23,22,54,55,-24,23,55,56,-25,24,56,57,-26,25,57,58,-27,26,58,59,-28,27,59,60
,-29,28,60,61,-30,29,61,62,-31,30,62,63,-32,31,63,32,-1
Edges: 3,7,11,15,19,23,27,31,35,39,43,47,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,2,1,0,6,5,10
,9,14,13,18,17,22,21,26,25,30,29,34,33,38,37,42,41,46,45,50,49,54,53,58,57,62,61,66,65,70,69,74,73,78,77,82,81,86
,85,90,89,94,93,98,97,102,101,106,105,110,109,114,113,118,117,122,121,125
GeometryVersion: 124
LayerElementNormal: 0 {
Version: 101
Name: ""
MappingInformationType: "ByPolygonVertex"
ReferenceInformationType: "Direct"
Normals: -0.801044046878815,-2.39718644934328e-007,-0.598605394363403,-0.801044046878815,-2.38498500948481e-007,-0.598605394363403
,-0.785652339458466,-0.156275928020477,-0.598605334758759,-0.785652279853821,-0.156275942921638,-0.598605275154114
,-0.785652279853821,-0.156275942921638,-0.598605275154114,-0.785652339458466,-0.156275928020477,-0.598605334758759
,-0.740068316459656,-0.306546449661255,-0.598605275154114,-0.740068316459656,-0.306546449661255,-0.598605275154114
,-0.740068316459656,-0.306546449661255,-0.598605275154114,-0.740068316459656,-0.306546449661255,-0.598605275154114
,-0.666043937206268,-0.445036262273788,-0.598605275154114,-0.666043937206268,-0.445036232471466,-0.598605215549469
,-0.666043937206268,-0.445036232471466,-0.598605215549469,-0.666043937206268,-0.445036262273788,-0.598605275154114
,-0.566423773765564,-0.566423773765564,-0.598605275154114,-0.566423773765564,-0.566423714160919,-0.598605334758759
,-0.566423773765564,-0.566423714160919,-0.598605334758759,-0.566423773765564,-0.566423773765564,-0.598605275154114
,-0.445036292076111,-0.666043877601624,-0.598605334758759,-0.445036351680756,-0.666043817996979,-0.598605394363403
,-0.445036351680756,-0.666043817996979,-0.598605394363403,-0.445036292076111,-0.666043877601624,-0.598605334758759
,-0.306546300649643,-0.740068316459656,-0.598605334758759,-0.306546330451965,-0.740068316459656,-0.598605334758759
,-0.306546330451965,-0.740068316459656,-0.598605334758759,-0.306546300649643,-0.740068316459656,-0.598605334758759
,-0.156275853514671,-0.785652339458466,-0.598605275154114,-0.156275883316994,-0.785652279853821,-0.598605275154114
,-0.156275883316994,-0.785652279853821,-0.598605275154114,-0.156275853514671,-0.785652339458466,-0.598605275154114
,2.29325447520523e-008,-0.801044106483459,-0.598605275154114,-1.97706153670651e-008,-0.801044106483459,-0.598605275154114
,-1.97706153670651e-008,-0.801044106483459,-0.598605275154114,2.29325447520523e-008,-0.801044106483459,-0.598605275154114
,0.156275868415833,-0.78565239906311,-0.598605096340179,0.156275853514671,-0.785652458667755,-0.598605155944824
,0.156275853514671,-0.785652458667755,-0.598605155944824,0.156275868415833,-0.78565239906311,-0.598605096340179
,0.306546300649643,-0.74006849527359,-0.598605036735535,0.306546270847321,-0.740068554878235,-0.598605036735535
,0.306546270847321,-0.740068554878235,-0.598605036735535,0.306546300649643,-0.74006849527359,-0.598605036735535
,0.445036381483078,-0.666044116020203,-0.598605036735535,0.445036321878433,-0.666044116020203,-0.59860497713089
,0.445036321878433,-0.666044116020203,-0.59860497713089,0.445036381483078,-0.666044116020203,-0.598605036735535
,0.566423892974854,-0.566423892974854,-0.598605036735535,0.566423892974854,-0.566423892974854,-0.598605096340179
,0.566423892974854,-0.566423892974854,-0.598605096340179,0.566423892974854,-0.566423892974854,-0.598605036735535
,0.666043996810913,-0.445036470890045,-0.598605036735535,0.666044056415558,-0.445036381483078,-0.598605036735535
,0.666044056415558,-0.445036381483078,-0.598605036735535,0.666043996810913,-0.445036470890045,-0.598605036735535
,0.74006861448288,-0.306546330451965,-0.59860497713089,0.74006861448288,-0.306546330451965,-0.598604917526245
,0.74006861448288,-0.306546330451965,-0.598604917526245,0.74006861448288,-0.306546330451965,-0.59860497713089
,0.785652637481689,-0.156275644898415,-0.59860497713089,0.785652637481689,-0.156275674700737,-0.598605036735535
,0.785652637481689,-0.156275674700737,-0.598605036735535,0.785652637481689,-0.156275644898415,-0.59860497713089
,0.801044285297394,4.26545284426538e-007,-0.598605036735535,0.801044344902039,4.02826316303617e-007,-0.598605096340179
,0.801044344902039,4.02826316303617e-007,-0.598605096340179,0.801044285297394,4.26545284426538e-007,-0.598605036735535
,0.785652458667755,0.156276196241379,-0.598605036735535,0.785652458667755,0.15627621114254,-0.59860497713089
,0.785652458667755,0.15627621114254,-0.59860497713089,0.785652458667755,0.156276196241379,-0.598605036735535
,0.740068376064301,0.306546717882156,-0.598605036735535,0.740068376064301,0.306546717882156,-0.598605036735535
,0.740068376064301,0.306546717882156,-0.598605036735535,0.740068376064301,0.306546717882156,-0.598605036735535
,0.666043639183044,0.445036917924881,-0.598605036735535,0.666043639183044,0.445036917924881,-0.598605036735535
,0.666043639183044,0.445036917924881,-0.598605036735535,0.666043639183044,0.445036917924881,-0.598605036735535
,0.56642359495163,0.566424071788788,-0.598605036735535,0.56642359495163,0.566424190998077,-0.598605096340179
,0.56642359495163,0.566424190998077,-0.598605096340179,0.56642359495163,0.566424071788788,-0.598605036735535
,0.445035964250565,0.666044235229492,-0.598605096340179,0.445035964250565,0.666044294834137,-0.598605155944824
,0.445035964250565,0.666044294834137,-0.598605155944824,0.445035964250565,0.666044235229492,-0.598605096340179
,0.306545823812485,0.740068674087524,-0.598605096340179,0.306545794010162,0.740068674087524,-0.598605096340179
,0.306545794010162,0.740068674087524,-0.598605096340179,0.306545823812485,0.740068674087524,-0.598605096340179
,0.156275317072868,0.7856525182724,-0.598605155944824,0.156275272369385,0.785652577877045,-0.598605155944824
,0.156275272369385,0.785652577877045,-0.598605155944824,0.156275317072868,0.7856525182724,-0.598605155944824
,-9.26474740481353e-007,0.801044106483459,-0.598605275154114,-9.56403596319433e-007,0.801044225692749,-0.598605275154114
,-9.56403596319433e-007,0.801044225692749,-0.598605275154114,-9.26474740481353e-007,0.801044106483459,-0.598605275154114
,-0.156276792287827,0.785652101039886,-0.598605453968048,-0.156276792287827,0.785652041435242,-0.598605394363403
,-0.156276792287827,0.785652041435242,-0.598605394363403,-0.156276792287827,0.785652101039886,-0.598605453968048
,-0.306546926498413,0.740067958831787,-0.598605394363403,-0.30654701590538,0.740067899227142,-0.598605453968048
,-0.30654701590538,0.740067899227142,-0.598605453968048,-0.306546926498413,0.740067958831787,-0.598605394363403
,-0.445036947727203,0.666043281555176,-0.598605334758759,-0.445037066936493,0.666043281555176,-0.598605394363403
,-0.445037066936493,0.666043281555176,-0.598605394363403,-0.445036947727203,0.666043281555176,-0.598605334758759
,-0.566424429416656,0.566422998905182,-0.598605394363403,-0.566424489021301,0.566422939300537,-0.598605334758759
,-0.566424489021301,0.566422939300537,-0.598605334758759,-0.566424429416656,0.566422998905182,-0.598605394363403
,-0.666044473648071,0.445035517215729,-0.598605334758759,-0.666044414043427,0.445035398006439,-0.598605334758759
,-0.666044414043427,0.445035398006439,-0.598605334758759,-0.666044473648071,0.445035517215729,-0.598605334758759
,-0.740068674087524,0.306545346975327,-0.598605334758759,-0.74006861448288,0.306545317173004,-0.598605334758759
,-0.74006861448288,0.306545317173004,-0.598605334758759,-0.740068674087524,0.306545346975327,-0.598605334758759
,-0.78565239906311,0.156275063753128,-0.598605513572693,-0.78565239906311,0.156275004148483,-0.598605453968048
,-0.78565239906311,0.156275004148483,-0.598605453968048,-0.78565239906311,0.156275063753128,-0.598605513572693
,-0.801044046878815,-2.38498500948481e-007,-0.598605394363403,-0.801044046878815,-2.39718644934328e-007,-0.598605394363403
}
LayerElementUV: 0 {
Version: 101
Name: "UVChannel_1"
MappingInformationType: "ByPolygonVertex"
ReferenceInformationType: "IndexToDirect"
UV: 0.5,0.75,0.451227396726608,0.745196342468262,0.404329121112823,0.730969846248627,0.361107438802719,0.707867383956909
,0.323223292827606,0.676776647567749,0.292132616043091,0.638892531394959,0.269030123949051,0.595670819282532
,0.254803687334061,0.548772573471069,0.25,0.5,0.254803687334061,0.451227426528931,0.269030123949051,0.404329180717468
,0.292132616043091,0.361107468605042,0.323223322629929,0.323223292827606,0.361107468605042,0.292132616043091
,0.404329180717468,0.269030094146729,0.451227486133575,0.254803657531738,0.50000011920929,0.25,0.548772692680359
,0.254803717136383,0.595670938491821,0.269030153751373,0.638892650604248,0.292132675647736,0.676776826381683
,0.323223441839218,0.707867503166199,0.361107587814331,0.730969965457916,0.40432932972908,0.745196342468262,0.45122766494751
,0.75,0.500000238418579,0.745196223258972,0.548772871494293,0.730969786643982,0.595671117305756,0.70786726474762
,0.638892829418182,0.67677640914917,0.676776945590973,0.638892233371735,0.707867562770844,0.595670521259308,0.730970025062561
,0.548772215843201,0.745196402072906,0.499999970197678,1,0.402454823255539,0.990392625331879,0.402454823255539
,0.990392625331879,0.308658272027969,0.961939692497253,0.308658272027969,0.961939692497253,0.222214877605438
,0.915734767913818,0.222214877605438,0.915734767913818,0.146446585655212,0.853553354740143,0.146446585655212
,0.853553354740143,0.0842652022838593,0.777785062789917,0.0842652022838593,0.777785062789917,0.0380602478981018
,0.691341698169708,0.0380602478981018,0.691341698169708,0.00960737466812134,0.597545146942139,0.00960737466812134
,0.597545146942139,2.98023223876953e-008,0.5,2.98023223876953e-008,0.5,0.00960737466812134,0.402454882860184
,0.00960737466812134,0.402454882860184,0.0380602478981018,0.308658361434937,0.0380602478981018,0.308658361434937
,0.0842652022838593,0.222214907407761,0.0842652022838593,0.222214907407761,0.146446645259857,0.146446585655212
,0.146446645259857,0.146446585655212,0.222214967012405,0.0842652022838593,0.222214967012405,0.0842652022838593
,0.308658361434937,0.0380602180957794,0.308658361434937,0.0380602180957794,0.402454972267151,0.00960734486579895
,0.402454972267151,0.00960734486579895,0.500000178813934,2.98023223876953e-008,0.500000178813934,2.98023223876953e-008
,0.597545385360718,0.00960743427276611,0.597545385360718,0.00960743427276611,0.691341936588287,0.038060337305069
,0.691341936588287,0.038060337305069,0.777785360813141,0.0842653810977936,0.777785360813141,0.0842653810977936
,0.853553652763367,0.146446883678436,0.853553652763367,0.146446883678436,0.915735006332397,0.222215205430985
,0.915735006332397,0.222215205430985,0.961939930915833,0.30865865945816,0.961939930915833,0.30865865945816,0.990392684936523
,0.402455300092697,0.990392684936523,0.402455300092697,1,0.500000476837158,1,0.500000476837158,0.990392506122589
,0.597545683383942,0.990392506122589,0.597545683383942,0.961939573287964,0.691342234611511,0.961939573287964
,0.691342234611511,0.915734469890594,0.777785658836365,0.915734469890594,0.777785658836365,0.853552877902985
,0.853553891181946,0.853552877902985,0.853553891181946,0.777784466743469,0.915735125541687,0.777784466743469
,0.915735125541687,0.691341042518616,0.961940050125122,0.691341042518616,0.961940050125122,0.597544372081757
,0.990392804145813,0.597544372081757,0.990392804145813,0.499999970197678,1
UVIndex: 32,0,1,33,34,1,2,35,36,2,3,37,38,3,4,39,40,4,5,41,42,5,6,43,44,6,7,45,46,7,8,47,48,8,9,49,50,9,10,51,52,10,11
,53,54,11,12,55,56,12,13,57,58,13,14,59,60,14,15,61,62,15,16,63,64,16,17,65,66,17,18,67,68,18,19,69,70,19,20
,71,72,20,21,73,74,21,22,75,76,22,23,77,78,23,24,79,80,24,25,81,82,25,26,83,84,26,27,85,86,27,28,87,88,28,29
,89,90,29,30,91,92,30,31,93,94,31,0,95
}
LayerElementSmoothing: 0 {
Version: 102
Name: ""
MappingInformationType: "ByPolygon"
ReferenceInformationType: "Direct"
Smoothing: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
}
Layer: 0 {
Version: 100
LayerElement: {
Type: "LayerElementNormal"
TypedIndex: 0
}
LayerElement: {
Type: "LayerElementUV"
TypedIndex: 0
}
LayerElement: {
Type: "LayerElementSmoothing"
TypedIndex: 0
}
}
NodeAttributeName: "Geometry::CFX_CircularAngle_ncl1_1"
}
SceneInfo: "SceneInfo::GlobalInfo", "UserData" {
Type: "UserData"
Version: 100
MetaData: {
Version: 100
Title: ""
Subject: ""
Author: ""
Keywords: ""
Revision: ""
Comment: ""
}
Properties60: {
Property: "DocumentUrl", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CARTOON EFFECT PACKS\CartoonEffects 2 AssetStore\Assets\Cartoon FX\Mesh\CFX_Mesh_CircularAngle.FBX"
Property: "SrcDocumentUrl", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CARTOON EFFECT PACKS\CartoonEffects 2 AssetStore\Assets\Cartoon FX\Mesh\CFX_Mesh_CircularAngle.FBX"
Property: "Original", "Compound", ""
Property: "Original|ApplicationVendor", "KString", "", "Autodesk"
Property: "Original|ApplicationName", "KString", "", "3ds Max"
Property: "Original|ApplicationVersion", "KString", "", "2009.3"
Property: "Original|DateTime_GMT", "DateTime", "", "03/08/2012 09:06:39.796"
Property: "Original|FileName", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CARTOON EFFECT PACKS\CartoonEffects 2 AssetStore\Assets\Cartoon FX\Mesh\CFX_Mesh_CircularAngle.FBX"
Property: "LastSaved", "Compound", ""
Property: "LastSaved|ApplicationVendor", "KString", "", "Autodesk"
Property: "LastSaved|ApplicationName", "KString", "", "3ds Max"
Property: "LastSaved|ApplicationVersion", "KString", "", "2009.3"
Property: "LastSaved|DateTime_GMT", "DateTime", "", "03/08/2012 09:06:39.796"
}
}
GlobalSettings: {
Version: 1000
Properties60: {
Property: "UpAxis", "int", "",1
Property: "UpAxisSign", "int", "",1
Property: "FrontAxis", "int", "",2
Property: "FrontAxisSign", "int", "",1
Property: "CoordAxis", "int", "",0
Property: "CoordAxisSign", "int", "",1
Property: "UnitScaleFactor", "double", "",0.1
}
}
}
; Object connections
;------------------------------------------------------------------
Connections: {
Connect: "OO", "Model::CFX_CircularAngle", "Model::Scene"
}
;Takes and animation section
;----------------------------------------------------
Takes: {
Current: "Take 001"
}
;Version 5 settings
;------------------------------------------------------------------
Version5: {
AmbientRenderSettings: {
Version: 101
AmbientLightColor: 0,0,0,1
}
FogOptions: {
FlogEnable: 0
FogMode: 0
FogDensity: 0.002
FogStart: 0.3
FogEnd: 1000
FogColor: 1,1,1,1
}
Settings: {
FrameRate: "30"
TimeFormat: 1
SnapOnFrames: 0
ReferenceTimeIndex: -1
TimeLineStartTime: 0
TimeLineStopTime: 153953860000
}
RendererSetting: {
DefaultCamera: "Producer Perspective"
DefaultViewingMode: 0
}
}
; FBX 6.1.0 project file
; Copyright (C) 1997-2008 Autodesk Inc. and/or its licensors.
; All rights reserved.
; ----------------------------------------------------
FBXHeaderExtension: {
FBXHeaderVersion: 1003
FBXVersion: 6100
CreationTimeStamp: {
Version: 1000
Year: 2012
Month: 8
Day: 3
Hour: 11
Minute: 6
Second: 39
Millisecond: 796
}
Creator: "FBX SDK/FBX Plugins version 2009.3"
OtherFlags: {
FlagPLE: 0
}
}
CreationTime: "2012-08-03 11:06:39:796"
Creator: "FBX SDK/FBX Plugins build 20080926"
; Document Description
;------------------------------------------------------------------
Document: {
Name: ""
}
; Document References
;------------------------------------------------------------------
References: {
}
; Object definitions
;------------------------------------------------------------------
Definitions: {
Version: 100
Count: 3
ObjectType: "Model" {
Count: 1
}
ObjectType: "SceneInfo" {
Count: 1
}
ObjectType: "GlobalSettings" {
Count: 1
}
}
; Object properties
;------------------------------------------------------------------
Objects: {
Model: "Model::CFX_CircularAngle", "Mesh" {
Version: 232
Properties60: {
Property: "QuaternionInterpolate", "bool", "",0
Property: "RotationOffset", "Vector3D", "",0,0,0
Property: "RotationPivot", "Vector3D", "",0,0,0
Property: "ScalingOffset", "Vector3D", "",0,0,0
Property: "ScalingPivot", "Vector3D", "",0,0,0
Property: "TranslationActive", "bool", "",0
Property: "TranslationMin", "Vector3D", "",0,0,0
Property: "TranslationMax", "Vector3D", "",0,0,0
Property: "TranslationMinX", "bool", "",0
Property: "TranslationMinY", "bool", "",0
Property: "TranslationMinZ", "bool", "",0
Property: "TranslationMaxX", "bool", "",0
Property: "TranslationMaxY", "bool", "",0
Property: "TranslationMaxZ", "bool", "",0
Property: "RotationOrder", "enum", "",0
Property: "RotationSpaceForLimitOnly", "bool", "",0
Property: "RotationStiffnessX", "double", "",0
Property: "RotationStiffnessY", "double", "",0
Property: "RotationStiffnessZ", "double", "",0
Property: "AxisLen", "double", "",10
Property: "PreRotation", "Vector3D", "",-90,0,0
Property: "PostRotation", "Vector3D", "",0,0,0
Property: "RotationActive", "bool", "",1
Property: "RotationMin", "Vector3D", "",0,0,0
Property: "RotationMax", "Vector3D", "",0,0,0
Property: "RotationMinX", "bool", "",0
Property: "RotationMinY", "bool", "",0
Property: "RotationMinZ", "bool", "",0
Property: "RotationMaxX", "bool", "",0
Property: "RotationMaxY", "bool", "",0
Property: "RotationMaxZ", "bool", "",0
Property: "InheritType", "enum", "",1
Property: "ScalingActive", "bool", "",0
Property: "ScalingMin", "Vector3D", "",1,1,1
Property: "ScalingMax", "Vector3D", "",1,1,1
Property: "ScalingMinX", "bool", "",0
Property: "ScalingMinY", "bool", "",0
Property: "ScalingMinZ", "bool", "",0
Property: "ScalingMaxX", "bool", "",0
Property: "ScalingMaxY", "bool", "",0
Property: "ScalingMaxZ", "bool", "",0
Property: "GeometricTranslation", "Vector3D", "",0,-10.1933441162109,4.45565234485912e-007
Property: "GeometricRotation", "Vector3D", "",-90,0,0
Property: "GeometricScaling", "Vector3D", "",2.06424999237061,2.06424999237061,2.06424999237061
Property: "MinDampRangeX", "double", "",0
Property: "MinDampRangeY", "double", "",0
Property: "MinDampRangeZ", "double", "",0
Property: "MaxDampRangeX", "double", "",0
Property: "MaxDampRangeY", "double", "",0
Property: "MaxDampRangeZ", "double", "",0
Property: "MinDampStrengthX", "double", "",0
Property: "MinDampStrengthY", "double", "",0
Property: "MinDampStrengthZ", "double", "",0
Property: "MaxDampStrengthX", "double", "",0
Property: "MaxDampStrengthY", "double", "",0
Property: "MaxDampStrengthZ", "double", "",0
Property: "PreferedAngleX", "double", "",0
Property: "PreferedAngleY", "double", "",0
Property: "PreferedAngleZ", "double", "",0
Property: "LookAtProperty", "object", ""
Property: "UpVectorProperty", "object", ""
Property: "Show", "bool", "",1
Property: "NegativePercentShapeSupport", "bool", "",1
Property: "DefaultAttributeIndex", "int", "",0
Property: "Lcl Translation", "Lcl Translation", "A+",0,0,0
Property: "Lcl Rotation", "Lcl Rotation", "A+",0,0,0
Property: "Lcl Scaling", "Lcl Scaling", "A+",1,1,1
Property: "Visibility", "Visibility", "A+",1
Property: "Color", "ColorRGB", "N",0.423529411764706,0.0313725490196078,0.533333333333333
Property: "BBoxMin", "Vector3D", "N",0,0,0
Property: "BBoxMax", "Vector3D", "N",0,0,0
}
MultiLayer: 0
MultiTake: 1
Shading: T
Culling: "CullingOff"
Vertices: 30.5999412536621,0,4.93803739547729,30.0119724273682,5.9697527885437,4.93803739547729,28.270658493042,11.710090637207
,4.93803739547729,25.4429206848145,17.000415802002,4.93803739547729,21.6374263763428,21.6374263763428,4.93803739547729
,17.000415802002,25.4429225921631,4.93803739547729,11.710090637207,28.2706604003906,4.93803739547729,5.96975326538086
,30.0119724273682,4.93803739547729,2.31023136620934e-006,30.5999412536621,4.93803739547729,-5.96974897384644,30.0119724273682
,4.93803739547729,-11.7100858688354,28.2706604003906,4.93803739547729,-17.0004138946533,25.4429225921631,4.93803739547729
,-21.6374263763428,21.6374263763428,4.93803739547729,-25.4429225921631,17.0004138946533,4.93803739547729,-28.2706623077393
,11.7100858688354,4.93803739547729,-30.0119743347168,5.96974515914917,4.93803739547729,-30.5999412536621,-9.97072675090749e-006
,4.93803739547729,-30.0119686126709,-5.96976470947266,4.93803739547729,-28.2706546783447,-11.7101039886475,4.93803739547729
,-25.4429111480713,-17.000431060791,4.93803739547729,-21.6374111175537,-21.6374397277832,4.93803739547729,-17.0003986358643
,-25.4429340362549,4.93803739547729,-11.7100677490234,-28.2706680297852,4.93803739547729,-5.96972560882568,-30.0119781494141
,4.93803739547729,2.95472782454453e-005,-30.5999412536621,4.93803739547729,5.96978378295898,-30.0119647979736,4.93803739547729
,11.7101221084595,-28.2706470489502,4.93803739547729,17.0004463195801,-25.4429016113281,4.93803739547729,21.6374530792236
,-21.6373977661133,4.93803739547729,25.442943572998,-17.0003814697266,4.93803739547729,28.2706756591797,-11.7100496292114
,4.93803739547729,30.0119819641113,-5.96970653533936,4.93803739547729,26.9941177368164,-1.09717211671523e-006,9.76329135894775
,26.475435256958,5.26629066467285,9.76329135894775,24.9393138885498,10.3302021026611,9.76329135894775,22.4447898864746
,14.9971284866333,9.76329135894775,19.0877246856689,19.0877265930176,9.76329135894775,14.9971256256104,22.4447917938232
,9.76329135894775,10.3301992416382,24.9393177032471,9.76329135894775,5.26629018783569,26.475435256958,9.76329135894775
,-3.46167325915303e-007,26.994119644165,9.76329135894775,-5.26629066467285,26.475435256958,9.76329135894775,-10.3302021026611
,24.9393177032471,9.76329135894775,-14.9971303939819,22.4447917938232,9.76329135894775,-19.0877265930176,19.0877265930176
,9.76329135894775,-22.4447937011719,14.9971265792847,9.76329135894775,-24.9393215179443,10.3301982879639,9.76329135894775
,-26.4754390716553,5.26628446578979,9.76329135894775,-26.9941215515137,-9.89297404885292e-006,9.76329135894775,-26.4754333496094
,-5.26630306243896,9.76329135894775,-24.9393138885498,-10.3302154541016,9.76329135894775,-22.4447822570801,-14.997142791748
,9.76329135894775,-19.0877151489258,-19.0877361297607,9.76329135894775,-14.9971170425415,-22.4448013305664,9.76329135894775
,-10.3301858901978,-24.939323425293,9.76329135894775,-5.26627016067505,-26.4754409790039,9.76329135894775,2.36813357332721e-005
,-26.994119644165,9.76329135894775,5.26631736755371,-26.4754276275635,9.76329135894775,10.3302268981934,-24.939302444458
,9.76329135894775,14.9971523284912,-22.4447746276855,9.76329135894775,19.0877475738525,-19.0876998901367,9.76329135894775
,22.4448070526123,-14.9970998764038,9.76329135894775,24.9393291473389,-10.3301668167114,9.76329135894775,26.4754409790039
,-5.26625204086304,9.76329135894775
PolygonVertexIndex: 0,32,33,-2,1,33,34,-3,2,34,35,-4,3,35,36,-5,4,36,37,-6,5,37,38,-7,6,38,39,-8,7,39,40,-9,8,40,41,-10,9,41,42,-11,10
,42,43,-12,11,43,44,-13,12,44,45,-14,13,45,46,-15,14,46,47,-16,15,47,48,-17,16,48,49,-18,17,49,50,-19,18,50,51,-20
,19,51,52,-21,20,52,53,-22,21,53,54,-23,22,54,55,-24,23,55,56,-25,24,56,57,-26,25,57,58,-27,26,58,59,-28,27,59,60
,-29,28,60,61,-30,29,61,62,-31,30,62,63,-32,31,63,32,-1
Edges: 3,7,11,15,19,23,27,31,35,39,43,47,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,2,1,0,6,5,10
,9,14,13,18,17,22,21,26,25,30,29,34,33,38,37,42,41,46,45,50,49,54,53,58,57,62,61,66,65,70,69,74,73,78,77,82,81,86
,85,90,89,94,93,98,97,102,101,106,105,110,109,114,113,118,117,122,121,125
GeometryVersion: 124
LayerElementNormal: 0 {
Version: 101
Name: ""
MappingInformationType: "ByPolygonVertex"
ReferenceInformationType: "Direct"
Normals: -0.801044046878815,-2.39718644934328e-007,-0.598605394363403,-0.801044046878815,-2.38498500948481e-007,-0.598605394363403
,-0.785652339458466,-0.156275928020477,-0.598605334758759,-0.785652279853821,-0.156275942921638,-0.598605275154114
,-0.785652279853821,-0.156275942921638,-0.598605275154114,-0.785652339458466,-0.156275928020477,-0.598605334758759
,-0.740068316459656,-0.306546449661255,-0.598605275154114,-0.740068316459656,-0.306546449661255,-0.598605275154114
,-0.740068316459656,-0.306546449661255,-0.598605275154114,-0.740068316459656,-0.306546449661255,-0.598605275154114
,-0.666043937206268,-0.445036262273788,-0.598605275154114,-0.666043937206268,-0.445036232471466,-0.598605215549469
,-0.666043937206268,-0.445036232471466,-0.598605215549469,-0.666043937206268,-0.445036262273788,-0.598605275154114
,-0.566423773765564,-0.566423773765564,-0.598605275154114,-0.566423773765564,-0.566423714160919,-0.598605334758759
,-0.566423773765564,-0.566423714160919,-0.598605334758759,-0.566423773765564,-0.566423773765564,-0.598605275154114
,-0.445036292076111,-0.666043877601624,-0.598605334758759,-0.445036351680756,-0.666043817996979,-0.598605394363403
,-0.445036351680756,-0.666043817996979,-0.598605394363403,-0.445036292076111,-0.666043877601624,-0.598605334758759
,-0.306546300649643,-0.740068316459656,-0.598605334758759,-0.306546330451965,-0.740068316459656,-0.598605334758759
,-0.306546330451965,-0.740068316459656,-0.598605334758759,-0.306546300649643,-0.740068316459656,-0.598605334758759
,-0.156275853514671,-0.785652339458466,-0.598605275154114,-0.156275883316994,-0.785652279853821,-0.598605275154114
,-0.156275883316994,-0.785652279853821,-0.598605275154114,-0.156275853514671,-0.785652339458466,-0.598605275154114
,2.29325447520523e-008,-0.801044106483459,-0.598605275154114,-1.97706153670651e-008,-0.801044106483459,-0.598605275154114
,-1.97706153670651e-008,-0.801044106483459,-0.598605275154114,2.29325447520523e-008,-0.801044106483459,-0.598605275154114
,0.156275868415833,-0.78565239906311,-0.598605096340179,0.156275853514671,-0.785652458667755,-0.598605155944824
,0.156275853514671,-0.785652458667755,-0.598605155944824,0.156275868415833,-0.78565239906311,-0.598605096340179
,0.306546300649643,-0.74006849527359,-0.598605036735535,0.306546270847321,-0.740068554878235,-0.598605036735535
,0.306546270847321,-0.740068554878235,-0.598605036735535,0.306546300649643,-0.74006849527359,-0.598605036735535
,0.445036381483078,-0.666044116020203,-0.598605036735535,0.445036321878433,-0.666044116020203,-0.59860497713089
,0.445036321878433,-0.666044116020203,-0.59860497713089,0.445036381483078,-0.666044116020203,-0.598605036735535
,0.566423892974854,-0.566423892974854,-0.598605036735535,0.566423892974854,-0.566423892974854,-0.598605096340179
,0.566423892974854,-0.566423892974854,-0.598605096340179,0.566423892974854,-0.566423892974854,-0.598605036735535
,0.666043996810913,-0.445036470890045,-0.598605036735535,0.666044056415558,-0.445036381483078,-0.598605036735535
,0.666044056415558,-0.445036381483078,-0.598605036735535,0.666043996810913,-0.445036470890045,-0.598605036735535
,0.74006861448288,-0.306546330451965,-0.59860497713089,0.74006861448288,-0.306546330451965,-0.598604917526245
,0.74006861448288,-0.306546330451965,-0.598604917526245,0.74006861448288,-0.306546330451965,-0.59860497713089
,0.785652637481689,-0.156275644898415,-0.59860497713089,0.785652637481689,-0.156275674700737,-0.598605036735535
,0.785652637481689,-0.156275674700737,-0.598605036735535,0.785652637481689,-0.156275644898415,-0.59860497713089
,0.801044285297394,4.26545284426538e-007,-0.598605036735535,0.801044344902039,4.02826316303617e-007,-0.598605096340179
,0.801044344902039,4.02826316303617e-007,-0.598605096340179,0.801044285297394,4.26545284426538e-007,-0.598605036735535
,0.785652458667755,0.156276196241379,-0.598605036735535,0.785652458667755,0.15627621114254,-0.59860497713089
,0.785652458667755,0.15627621114254,-0.59860497713089,0.785652458667755,0.156276196241379,-0.598605036735535
,0.740068376064301,0.306546717882156,-0.598605036735535,0.740068376064301,0.306546717882156,-0.598605036735535
,0.740068376064301,0.306546717882156,-0.598605036735535,0.740068376064301,0.306546717882156,-0.598605036735535
,0.666043639183044,0.445036917924881,-0.598605036735535,0.666043639183044,0.445036917924881,-0.598605036735535
,0.666043639183044,0.445036917924881,-0.598605036735535,0.666043639183044,0.445036917924881,-0.598605036735535
,0.56642359495163,0.566424071788788,-0.598605036735535,0.56642359495163,0.566424190998077,-0.598605096340179
,0.56642359495163,0.566424190998077,-0.598605096340179,0.56642359495163,0.566424071788788,-0.598605036735535
,0.445035964250565,0.666044235229492,-0.598605096340179,0.445035964250565,0.666044294834137,-0.598605155944824
,0.445035964250565,0.666044294834137,-0.598605155944824,0.445035964250565,0.666044235229492,-0.598605096340179
,0.306545823812485,0.740068674087524,-0.598605096340179,0.306545794010162,0.740068674087524,-0.598605096340179
,0.306545794010162,0.740068674087524,-0.598605096340179,0.306545823812485,0.740068674087524,-0.598605096340179
,0.156275317072868,0.7856525182724,-0.598605155944824,0.156275272369385,0.785652577877045,-0.598605155944824
,0.156275272369385,0.785652577877045,-0.598605155944824,0.156275317072868,0.7856525182724,-0.598605155944824
,-9.26474740481353e-007,0.801044106483459,-0.598605275154114,-9.56403596319433e-007,0.801044225692749,-0.598605275154114
,-9.56403596319433e-007,0.801044225692749,-0.598605275154114,-9.26474740481353e-007,0.801044106483459,-0.598605275154114
,-0.156276792287827,0.785652101039886,-0.598605453968048,-0.156276792287827,0.785652041435242,-0.598605394363403
,-0.156276792287827,0.785652041435242,-0.598605394363403,-0.156276792287827,0.785652101039886,-0.598605453968048
,-0.306546926498413,0.740067958831787,-0.598605394363403,-0.30654701590538,0.740067899227142,-0.598605453968048
,-0.30654701590538,0.740067899227142,-0.598605453968048,-0.306546926498413,0.740067958831787,-0.598605394363403
,-0.445036947727203,0.666043281555176,-0.598605334758759,-0.445037066936493,0.666043281555176,-0.598605394363403
,-0.445037066936493,0.666043281555176,-0.598605394363403,-0.445036947727203,0.666043281555176,-0.598605334758759
,-0.566424429416656,0.566422998905182,-0.598605394363403,-0.566424489021301,0.566422939300537,-0.598605334758759
,-0.566424489021301,0.566422939300537,-0.598605334758759,-0.566424429416656,0.566422998905182,-0.598605394363403
,-0.666044473648071,0.445035517215729,-0.598605334758759,-0.666044414043427,0.445035398006439,-0.598605334758759
,-0.666044414043427,0.445035398006439,-0.598605334758759,-0.666044473648071,0.445035517215729,-0.598605334758759
,-0.740068674087524,0.306545346975327,-0.598605334758759,-0.74006861448288,0.306545317173004,-0.598605334758759
,-0.74006861448288,0.306545317173004,-0.598605334758759,-0.740068674087524,0.306545346975327,-0.598605334758759
,-0.78565239906311,0.156275063753128,-0.598605513572693,-0.78565239906311,0.156275004148483,-0.598605453968048
,-0.78565239906311,0.156275004148483,-0.598605453968048,-0.78565239906311,0.156275063753128,-0.598605513572693
,-0.801044046878815,-2.38498500948481e-007,-0.598605394363403,-0.801044046878815,-2.39718644934328e-007,-0.598605394363403
}
LayerElementUV: 0 {
Version: 101
Name: "UVChannel_1"
MappingInformationType: "ByPolygonVertex"
ReferenceInformationType: "IndexToDirect"
UV: 0.5,0.75,0.451227396726608,0.745196342468262,0.404329121112823,0.730969846248627,0.361107438802719,0.707867383956909
,0.323223292827606,0.676776647567749,0.292132616043091,0.638892531394959,0.269030123949051,0.595670819282532
,0.254803687334061,0.548772573471069,0.25,0.5,0.254803687334061,0.451227426528931,0.269030123949051,0.404329180717468
,0.292132616043091,0.361107468605042,0.323223322629929,0.323223292827606,0.361107468605042,0.292132616043091
,0.404329180717468,0.269030094146729,0.451227486133575,0.254803657531738,0.50000011920929,0.25,0.548772692680359
,0.254803717136383,0.595670938491821,0.269030153751373,0.638892650604248,0.292132675647736,0.676776826381683
,0.323223441839218,0.707867503166199,0.361107587814331,0.730969965457916,0.40432932972908,0.745196342468262,0.45122766494751
,0.75,0.500000238418579,0.745196223258972,0.548772871494293,0.730969786643982,0.595671117305756,0.70786726474762
,0.638892829418182,0.67677640914917,0.676776945590973,0.638892233371735,0.707867562770844,0.595670521259308,0.730970025062561
,0.548772215843201,0.745196402072906,0.499999970197678,1,0.402454823255539,0.990392625331879,0.402454823255539
,0.990392625331879,0.308658272027969,0.961939692497253,0.308658272027969,0.961939692497253,0.222214877605438
,0.915734767913818,0.222214877605438,0.915734767913818,0.146446585655212,0.853553354740143,0.146446585655212
,0.853553354740143,0.0842652022838593,0.777785062789917,0.0842652022838593,0.777785062789917,0.0380602478981018
,0.691341698169708,0.0380602478981018,0.691341698169708,0.00960737466812134,0.597545146942139,0.00960737466812134
,0.597545146942139,2.98023223876953e-008,0.5,2.98023223876953e-008,0.5,0.00960737466812134,0.402454882860184
,0.00960737466812134,0.402454882860184,0.0380602478981018,0.308658361434937,0.0380602478981018,0.308658361434937
,0.0842652022838593,0.222214907407761,0.0842652022838593,0.222214907407761,0.146446645259857,0.146446585655212
,0.146446645259857,0.146446585655212,0.222214967012405,0.0842652022838593,0.222214967012405,0.0842652022838593
,0.308658361434937,0.0380602180957794,0.308658361434937,0.0380602180957794,0.402454972267151,0.00960734486579895
,0.402454972267151,0.00960734486579895,0.500000178813934,2.98023223876953e-008,0.500000178813934,2.98023223876953e-008
,0.597545385360718,0.00960743427276611,0.597545385360718,0.00960743427276611,0.691341936588287,0.038060337305069
,0.691341936588287,0.038060337305069,0.777785360813141,0.0842653810977936,0.777785360813141,0.0842653810977936
,0.853553652763367,0.146446883678436,0.853553652763367,0.146446883678436,0.915735006332397,0.222215205430985
,0.915735006332397,0.222215205430985,0.961939930915833,0.30865865945816,0.961939930915833,0.30865865945816,0.990392684936523
,0.402455300092697,0.990392684936523,0.402455300092697,1,0.500000476837158,1,0.500000476837158,0.990392506122589
,0.597545683383942,0.990392506122589,0.597545683383942,0.961939573287964,0.691342234611511,0.961939573287964
,0.691342234611511,0.915734469890594,0.777785658836365,0.915734469890594,0.777785658836365,0.853552877902985
,0.853553891181946,0.853552877902985,0.853553891181946,0.777784466743469,0.915735125541687,0.777784466743469
,0.915735125541687,0.691341042518616,0.961940050125122,0.691341042518616,0.961940050125122,0.597544372081757
,0.990392804145813,0.597544372081757,0.990392804145813,0.499999970197678,1
UVIndex: 32,0,1,33,34,1,2,35,36,2,3,37,38,3,4,39,40,4,5,41,42,5,6,43,44,6,7,45,46,7,8,47,48,8,9,49,50,9,10,51,52,10,11
,53,54,11,12,55,56,12,13,57,58,13,14,59,60,14,15,61,62,15,16,63,64,16,17,65,66,17,18,67,68,18,19,69,70,19,20
,71,72,20,21,73,74,21,22,75,76,22,23,77,78,23,24,79,80,24,25,81,82,25,26,83,84,26,27,85,86,27,28,87,88,28,29
,89,90,29,30,91,92,30,31,93,94,31,0,95
}
LayerElementSmoothing: 0 {
Version: 102
Name: ""
MappingInformationType: "ByPolygon"
ReferenceInformationType: "Direct"
Smoothing: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
}
Layer: 0 {
Version: 100
LayerElement: {
Type: "LayerElementNormal"
TypedIndex: 0
}
LayerElement: {
Type: "LayerElementUV"
TypedIndex: 0
}
LayerElement: {
Type: "LayerElementSmoothing"
TypedIndex: 0
}
}
NodeAttributeName: "Geometry::CFX_CircularAngle_ncl1_1"
}
SceneInfo: "SceneInfo::GlobalInfo", "UserData" {
Type: "UserData"
Version: 100
MetaData: {
Version: 100
Title: ""
Subject: ""
Author: ""
Keywords: ""
Revision: ""
Comment: ""
}
Properties60: {
Property: "DocumentUrl", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CARTOON EFFECT PACKS\CartoonEffects 2 AssetStore\Assets\Cartoon FX\Mesh\CFX_Mesh_CircularAngle.FBX"
Property: "SrcDocumentUrl", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CARTOON EFFECT PACKS\CartoonEffects 2 AssetStore\Assets\Cartoon FX\Mesh\CFX_Mesh_CircularAngle.FBX"
Property: "Original", "Compound", ""
Property: "Original|ApplicationVendor", "KString", "", "Autodesk"
Property: "Original|ApplicationName", "KString", "", "3ds Max"
Property: "Original|ApplicationVersion", "KString", "", "2009.3"
Property: "Original|DateTime_GMT", "DateTime", "", "03/08/2012 09:06:39.796"
Property: "Original|FileName", "KString", "", "C:\Documents and Settings\Jean\Bureau\UNITY3D\UNITY PROJECTS\CARTOON EFFECT PACKS\CartoonEffects 2 AssetStore\Assets\Cartoon FX\Mesh\CFX_Mesh_CircularAngle.FBX"
Property: "LastSaved", "Compound", ""
Property: "LastSaved|ApplicationVendor", "KString", "", "Autodesk"
Property: "LastSaved|ApplicationName", "KString", "", "3ds Max"
Property: "LastSaved|ApplicationVersion", "KString", "", "2009.3"
Property: "LastSaved|DateTime_GMT", "DateTime", "", "03/08/2012 09:06:39.796"
}
}
GlobalSettings: {
Version: 1000
Properties60: {
Property: "UpAxis", "int", "",1
Property: "UpAxisSign", "int", "",1
Property: "FrontAxis", "int", "",2
Property: "FrontAxisSign", "int", "",1
Property: "CoordAxis", "int", "",0
Property: "CoordAxisSign", "int", "",1
Property: "UnitScaleFactor", "double", "",0.1
}
}
}
; Object connections
;------------------------------------------------------------------
Connections: {
Connect: "OO", "Model::CFX_CircularAngle", "Model::Scene"
}
;Takes and animation section
;----------------------------------------------------
Takes: {
Current: "Take 001"
}
;Version 5 settings
;------------------------------------------------------------------
Version5: {
AmbientRenderSettings: {
Version: 101
AmbientLightColor: 0,0,0,1
}
FogOptions: {
FlogEnable: 0
FogMode: 0
FogDensity: 0.002
FogStart: 0.3
FogEnd: 1000
FogColor: 1,1,1,1
}
Settings: {
FrameRate: "30"
TimeFormat: 1
SnapOnFrames: 0
ReferenceTimeIndex: -1
TimeLineStartTime: 0
TimeLineStopTime: 153953860000
}
RendererSetting: {
DefaultCamera: "Producer Perspective"
DefaultViewingMode: 0
}
}

View File

@ -1,275 +1,275 @@
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
using System.Collections.Generic;
using System.IO;
// Parse conditional expressions from CFXR_MaterialInspector to show/hide some parts of the UI easily
namespace CartoonFX
{
public static class ExpressionParser
{
public delegate bool EvaluateFunction(string content);
//--------------------------------------------------------------------------------------------------------------------------------
// Main Function to use
static public bool EvaluateExpression(string expression, EvaluateFunction evalFunction)
{
//Remove white spaces and double && ||
string cleanExpr = "";
for(int i = 0; i < expression.Length; i++)
{
switch(expression[i])
{
case ' ': break;
case '&': cleanExpr += expression[i]; i++; break;
case '|': cleanExpr += expression[i]; i++; break;
default: cleanExpr += expression[i]; break;
}
}
List<Token> tokens = new List<Token>();
StringReader reader = new StringReader(cleanExpr);
Token t = null;
do
{
t = new Token(reader);
tokens.Add(t);
} while(t.type != Token.TokenType.EXPR_END);
List<Token> polishNotation = Token.TransformToPolishNotation(tokens);
var enumerator = polishNotation.GetEnumerator();
enumerator.MoveNext();
Expression root = MakeExpression(ref enumerator, evalFunction);
return root.Evaluate();
}
//--------------------------------------------------------------------------------------------------------------------------------
// Expression Token
public class Token
{
static Dictionary<char, KeyValuePair<TokenType, string>> typesDict = new Dictionary<char, KeyValuePair<TokenType, string>>()
{
{'(', new KeyValuePair<TokenType, string>(TokenType.OPEN_PAREN, "(")},
{')', new KeyValuePair<TokenType, string>(TokenType.CLOSE_PAREN, ")")},
{'!', new KeyValuePair<TokenType, string>(TokenType.UNARY_OP, "NOT")},
{'&', new KeyValuePair<TokenType, string>(TokenType.BINARY_OP, "AND")},
{'|', new KeyValuePair<TokenType, string>(TokenType.BINARY_OP, "OR")}
};
public enum TokenType
{
OPEN_PAREN,
CLOSE_PAREN,
UNARY_OP,
BINARY_OP,
LITERAL,
EXPR_END
}
public TokenType type;
public string value;
public Token(StringReader s)
{
int c = s.Read();
if(c == -1)
{
type = TokenType.EXPR_END;
value = "";
return;
}
char ch = (char)c;
//Special case: solve bug where !COND_FALSE_1 && COND_FALSE_2 would return True
bool embeddedNot = (ch == '!' && s.Peek() != '(');
if(typesDict.ContainsKey(ch) && !embeddedNot)
{
type = typesDict[ch].Key;
value = typesDict[ch].Value;
}
else
{
string str = "";
str += ch;
while(s.Peek() != -1 && !typesDict.ContainsKey((char)s.Peek()))
{
str += (char)s.Read();
}
type = TokenType.LITERAL;
value = str;
}
}
static public List<Token> TransformToPolishNotation(List<Token> infixTokenList)
{
Queue<Token> outputQueue = new Queue<Token>();
Stack<Token> stack = new Stack<Token>();
int index = 0;
while(infixTokenList.Count > index)
{
Token t = infixTokenList[index];
switch(t.type)
{
case Token.TokenType.LITERAL:
outputQueue.Enqueue(t);
break;
case Token.TokenType.BINARY_OP:
case Token.TokenType.UNARY_OP:
case Token.TokenType.OPEN_PAREN:
stack.Push(t);
break;
case Token.TokenType.CLOSE_PAREN:
while(stack.Peek().type != Token.TokenType.OPEN_PAREN)
{
outputQueue.Enqueue(stack.Pop());
}
stack.Pop();
if(stack.Count > 0 && stack.Peek().type == Token.TokenType.UNARY_OP)
{
outputQueue.Enqueue(stack.Pop());
}
break;
default:
break;
}
index++;
}
while(stack.Count > 0)
{
outputQueue.Enqueue(stack.Pop());
}
var list = new List<Token>(outputQueue);
list.Reverse();
return list;
}
}
//--------------------------------------------------------------------------------------------------------------------------------
// Boolean Expression Classes
public abstract class Expression
{
public abstract bool Evaluate();
}
public class ExpressionLeaf : Expression
{
private string content;
private EvaluateFunction evalFunction;
public ExpressionLeaf(EvaluateFunction _evalFunction, string _content)
{
this.evalFunction = _evalFunction;
this.content = _content;
}
override public bool Evaluate()
{
//embedded not, see special case in Token declaration
if(content.StartsWith("!"))
{
return !this.evalFunction(content.Substring(1));
}
return this.evalFunction(content);
}
}
public class ExpressionAnd : Expression
{
private Expression left;
private Expression right;
public ExpressionAnd(Expression _left, Expression _right)
{
this.left = _left;
this.right = _right;
}
override public bool Evaluate()
{
return left.Evaluate() && right.Evaluate();
}
}
public class ExpressionOr : Expression
{
private Expression left;
private Expression right;
public ExpressionOr(Expression _left, Expression _right)
{
this.left = _left;
this.right = _right;
}
override public bool Evaluate()
{
return left.Evaluate() || right.Evaluate();
}
}
public class ExpressionNot : Expression
{
private Expression expr;
public ExpressionNot(Expression _expr)
{
this.expr = _expr;
}
override public bool Evaluate()
{
return !expr.Evaluate();
}
}
static public Expression MakeExpression(ref List<Token>.Enumerator polishNotationTokensEnumerator, EvaluateFunction _evalFunction)
{
if(polishNotationTokensEnumerator.Current.type == Token.TokenType.LITERAL)
{
Expression lit = new ExpressionLeaf(_evalFunction, polishNotationTokensEnumerator.Current.value);
polishNotationTokensEnumerator.MoveNext();
return lit;
}
else
{
if(polishNotationTokensEnumerator.Current.value == "NOT")
{
polishNotationTokensEnumerator.MoveNext();
Expression operand = MakeExpression(ref polishNotationTokensEnumerator, _evalFunction);
return new ExpressionNot(operand);
}
else if(polishNotationTokensEnumerator.Current.value == "AND")
{
polishNotationTokensEnumerator.MoveNext();
Expression left = MakeExpression(ref polishNotationTokensEnumerator, _evalFunction);
Expression right = MakeExpression(ref polishNotationTokensEnumerator, _evalFunction);
return new ExpressionAnd(left, right);
}
else if(polishNotationTokensEnumerator.Current.value == "OR")
{
polishNotationTokensEnumerator.MoveNext();
Expression left = MakeExpression(ref polishNotationTokensEnumerator, _evalFunction);
Expression right = MakeExpression(ref polishNotationTokensEnumerator, _evalFunction);
return new ExpressionOr(left, right);
}
}
return null;
}
}
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
using System.Collections.Generic;
using System.IO;
// Parse conditional expressions from CFXR_MaterialInspector to show/hide some parts of the UI easily
namespace CartoonFX
{
public static class ExpressionParser
{
public delegate bool EvaluateFunction(string content);
//--------------------------------------------------------------------------------------------------------------------------------
// Main Function to use
static public bool EvaluateExpression(string expression, EvaluateFunction evalFunction)
{
//Remove white spaces and double && ||
string cleanExpr = "";
for(int i = 0; i < expression.Length; i++)
{
switch(expression[i])
{
case ' ': break;
case '&': cleanExpr += expression[i]; i++; break;
case '|': cleanExpr += expression[i]; i++; break;
default: cleanExpr += expression[i]; break;
}
}
List<Token> tokens = new List<Token>();
StringReader reader = new StringReader(cleanExpr);
Token t = null;
do
{
t = new Token(reader);
tokens.Add(t);
} while(t.type != Token.TokenType.EXPR_END);
List<Token> polishNotation = Token.TransformToPolishNotation(tokens);
var enumerator = polishNotation.GetEnumerator();
enumerator.MoveNext();
Expression root = MakeExpression(ref enumerator, evalFunction);
return root.Evaluate();
}
//--------------------------------------------------------------------------------------------------------------------------------
// Expression Token
public class Token
{
static Dictionary<char, KeyValuePair<TokenType, string>> typesDict = new Dictionary<char, KeyValuePair<TokenType, string>>()
{
{'(', new KeyValuePair<TokenType, string>(TokenType.OPEN_PAREN, "(")},
{')', new KeyValuePair<TokenType, string>(TokenType.CLOSE_PAREN, ")")},
{'!', new KeyValuePair<TokenType, string>(TokenType.UNARY_OP, "NOT")},
{'&', new KeyValuePair<TokenType, string>(TokenType.BINARY_OP, "AND")},
{'|', new KeyValuePair<TokenType, string>(TokenType.BINARY_OP, "OR")}
};
public enum TokenType
{
OPEN_PAREN,
CLOSE_PAREN,
UNARY_OP,
BINARY_OP,
LITERAL,
EXPR_END
}
public TokenType type;
public string value;
public Token(StringReader s)
{
int c = s.Read();
if(c == -1)
{
type = TokenType.EXPR_END;
value = "";
return;
}
char ch = (char)c;
//Special case: solve bug where !COND_FALSE_1 && COND_FALSE_2 would return True
bool embeddedNot = (ch == '!' && s.Peek() != '(');
if(typesDict.ContainsKey(ch) && !embeddedNot)
{
type = typesDict[ch].Key;
value = typesDict[ch].Value;
}
else
{
string str = "";
str += ch;
while(s.Peek() != -1 && !typesDict.ContainsKey((char)s.Peek()))
{
str += (char)s.Read();
}
type = TokenType.LITERAL;
value = str;
}
}
static public List<Token> TransformToPolishNotation(List<Token> infixTokenList)
{
Queue<Token> outputQueue = new Queue<Token>();
Stack<Token> stack = new Stack<Token>();
int index = 0;
while(infixTokenList.Count > index)
{
Token t = infixTokenList[index];
switch(t.type)
{
case Token.TokenType.LITERAL:
outputQueue.Enqueue(t);
break;
case Token.TokenType.BINARY_OP:
case Token.TokenType.UNARY_OP:
case Token.TokenType.OPEN_PAREN:
stack.Push(t);
break;
case Token.TokenType.CLOSE_PAREN:
while(stack.Peek().type != Token.TokenType.OPEN_PAREN)
{
outputQueue.Enqueue(stack.Pop());
}
stack.Pop();
if(stack.Count > 0 && stack.Peek().type == Token.TokenType.UNARY_OP)
{
outputQueue.Enqueue(stack.Pop());
}
break;
default:
break;
}
index++;
}
while(stack.Count > 0)
{
outputQueue.Enqueue(stack.Pop());
}
var list = new List<Token>(outputQueue);
list.Reverse();
return list;
}
}
//--------------------------------------------------------------------------------------------------------------------------------
// Boolean Expression Classes
public abstract class Expression
{
public abstract bool Evaluate();
}
public class ExpressionLeaf : Expression
{
private string content;
private EvaluateFunction evalFunction;
public ExpressionLeaf(EvaluateFunction _evalFunction, string _content)
{
this.evalFunction = _evalFunction;
this.content = _content;
}
override public bool Evaluate()
{
//embedded not, see special case in Token declaration
if(content.StartsWith("!"))
{
return !this.evalFunction(content.Substring(1));
}
return this.evalFunction(content);
}
}
public class ExpressionAnd : Expression
{
private Expression left;
private Expression right;
public ExpressionAnd(Expression _left, Expression _right)
{
this.left = _left;
this.right = _right;
}
override public bool Evaluate()
{
return left.Evaluate() && right.Evaluate();
}
}
public class ExpressionOr : Expression
{
private Expression left;
private Expression right;
public ExpressionOr(Expression _left, Expression _right)
{
this.left = _left;
this.right = _right;
}
override public bool Evaluate()
{
return left.Evaluate() || right.Evaluate();
}
}
public class ExpressionNot : Expression
{
private Expression expr;
public ExpressionNot(Expression _expr)
{
this.expr = _expr;
}
override public bool Evaluate()
{
return !expr.Evaluate();
}
}
static public Expression MakeExpression(ref List<Token>.Enumerator polishNotationTokensEnumerator, EvaluateFunction _evalFunction)
{
if(polishNotationTokensEnumerator.Current.type == Token.TokenType.LITERAL)
{
Expression lit = new ExpressionLeaf(_evalFunction, polishNotationTokensEnumerator.Current.value);
polishNotationTokensEnumerator.MoveNext();
return lit;
}
else
{
if(polishNotationTokensEnumerator.Current.value == "NOT")
{
polishNotationTokensEnumerator.MoveNext();
Expression operand = MakeExpression(ref polishNotationTokensEnumerator, _evalFunction);
return new ExpressionNot(operand);
}
else if(polishNotationTokensEnumerator.Current.value == "AND")
{
polishNotationTokensEnumerator.MoveNext();
Expression left = MakeExpression(ref polishNotationTokensEnumerator, _evalFunction);
Expression right = MakeExpression(ref polishNotationTokensEnumerator, _evalFunction);
return new ExpressionAnd(left, right);
}
else if(polishNotationTokensEnumerator.Current.value == "OR")
{
polishNotationTokensEnumerator.MoveNext();
Expression left = MakeExpression(ref polishNotationTokensEnumerator, _evalFunction);
Expression right = MakeExpression(ref polishNotationTokensEnumerator, _evalFunction);
return new ExpressionOr(left, right);
}
}
return null;
}
}
}

View File

@ -1,362 +1,362 @@
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
using UnityEngine;
using UnityEditor;
// GUI Styles and UI methods
namespace CartoonFX
{
public static class Styles
{
//================================================================================================================================
// GUI Styles
//================================================================================================================================
//================================================================================================================================
// (x) close button
static GUIStyle _closeCrossButton;
public static GUIStyle CloseCrossButton
{
get
{
if(_closeCrossButton == null)
{
//Try to load GUISkin according to its GUID
//Assumes that its .meta file should always stick with it!
string guiSkinPath = AssetDatabase.GUIDToAssetPath("02d396fa782e5d7438e231ea9f8be23c");
var gs = AssetDatabase.LoadAssetAtPath<GUISkin>(guiSkinPath);
if(gs != null)
{
_closeCrossButton = System.Array.Find<GUIStyle>(gs.customStyles, x => x.name == "CloseCrossButton");
}
//Else fall back to minibutton
if(_closeCrossButton == null)
_closeCrossButton = EditorStyles.miniButton;
}
return _closeCrossButton;
}
}
//================================================================================================================================
// Shuriken Toggle with label alignment fix
static GUIStyle _shurikenToggle;
public static GUIStyle ShurikenToggle
{
get
{
if(_shurikenToggle == null)
{
_shurikenToggle = new GUIStyle("ShurikenToggle");
_shurikenToggle.fontSize = 9;
_shurikenToggle.contentOffset = new Vector2(16, -1);
if(EditorGUIUtility.isProSkin)
{
var textColor = new Color(.8f, .8f, .8f);
_shurikenToggle.normal.textColor = textColor;
_shurikenToggle.active.textColor = textColor;
_shurikenToggle.focused.textColor = textColor;
_shurikenToggle.hover.textColor = textColor;
_shurikenToggle.onNormal.textColor = textColor;
_shurikenToggle.onActive.textColor = textColor;
_shurikenToggle.onFocused.textColor = textColor;
_shurikenToggle.onHover.textColor = textColor;
}
}
return _shurikenToggle;
}
}
//================================================================================================================================
// Bold mini-label (the one from EditorStyles isn't actually "mini")
static GUIStyle _miniBoldLabel;
public static GUIStyle MiniBoldLabel
{
get
{
if(_miniBoldLabel == null)
{
_miniBoldLabel = new GUIStyle(EditorStyles.boldLabel);
_miniBoldLabel.fontSize = 10;
_miniBoldLabel.margin = new RectOffset(0, 0, 0, 0);
}
return _miniBoldLabel;
}
}
//================================================================================================================================
// Bold mini-foldout
static GUIStyle _miniBoldFoldout;
public static GUIStyle MiniBoldFoldout
{
get
{
if(_miniBoldFoldout == null)
{
_miniBoldFoldout = new GUIStyle(EditorStyles.foldout);
_miniBoldFoldout.fontSize = 10;
_miniBoldFoldout.fontStyle = FontStyle.Bold;
_miniBoldFoldout.margin = new RectOffset(0, 0, 0, 0);
}
return _miniBoldFoldout;
}
}
//================================================================================================================================
// Gray right-aligned label for Orderable List (Material Animator)
static GUIStyle _PropertyTypeLabel;
public static GUIStyle PropertyTypeLabel
{
get
{
if(_PropertyTypeLabel == null)
{
_PropertyTypeLabel = new GUIStyle(EditorStyles.label);
_PropertyTypeLabel.alignment = TextAnchor.MiddleRight;
_PropertyTypeLabel.normal.textColor = Color.gray;
_PropertyTypeLabel.fontSize = 9;
}
return _PropertyTypeLabel;
}
}
// Dark Gray right-aligned label for Orderable List (Material Animator)
static GUIStyle _PropertyTypeLabelFocused;
public static GUIStyle PropertyTypeLabelFocused
{
get
{
if(_PropertyTypeLabelFocused == null)
{
_PropertyTypeLabelFocused = new GUIStyle(EditorStyles.label);
_PropertyTypeLabelFocused.alignment = TextAnchor.MiddleRight;
_PropertyTypeLabelFocused.normal.textColor = new Color(.2f, .2f, .2f);
_PropertyTypeLabelFocused.fontSize = 9;
}
return _PropertyTypeLabelFocused;
}
}
//================================================================================================================================
// Rounded Box
static GUIStyle _roundedBox;
public static GUIStyle RoundedBox
{
get
{
if(_roundedBox == null)
{
_roundedBox = new GUIStyle(EditorStyles.helpBox);
}
return _roundedBox;
}
}
//================================================================================================================================
// Center White Label ("Editing Spline" label in Scene View)
static GUIStyle _CenteredWhiteLabel;
public static GUIStyle CenteredWhiteLabel
{
get
{
if(_CenteredWhiteLabel == null)
{
_CenteredWhiteLabel = new GUIStyle(EditorStyles.centeredGreyMiniLabel);
_CenteredWhiteLabel.fontSize = 20;
_CenteredWhiteLabel.normal.textColor = Color.white;
}
return _CenteredWhiteLabel;
}
}
//================================================================================================================================
// Used to draw lines for separators
static public GUIStyle _LineStyle;
static public GUIStyle LineStyle
{
get
{
if(_LineStyle == null)
{
_LineStyle = new GUIStyle();
_LineStyle.normal.background = EditorGUIUtility.whiteTexture;
_LineStyle.stretchWidth = true;
}
return _LineStyle;
}
}
//================================================================================================================================
// HelpBox with rich text formatting support
static GUIStyle _HelpBoxRichTextStyle;
static public GUIStyle HelpBoxRichTextStyle
{
get
{
if(_HelpBoxRichTextStyle == null)
{
_HelpBoxRichTextStyle = new GUIStyle("HelpBox");
_HelpBoxRichTextStyle.richText = true;
}
return _HelpBoxRichTextStyle;
}
}
//================================================================================================================================
// Material Blue Header
static public GUIStyle _MaterialHeaderStyle;
static public GUIStyle MaterialHeaderStyle
{
get
{
if(_MaterialHeaderStyle == null)
{
_MaterialHeaderStyle = new GUIStyle(EditorStyles.label);
_MaterialHeaderStyle.fontStyle = FontStyle.Bold;
_MaterialHeaderStyle.fontSize = 11;
_MaterialHeaderStyle.padding.top = 0;
_MaterialHeaderStyle.padding.bottom = 0;
_MaterialHeaderStyle.normal.textColor = EditorGUIUtility.isProSkin ? new Color32(75, 128, 255, 255) : new Color32(0, 50, 230, 255);
_MaterialHeaderStyle.stretchWidth = true;
}
return _MaterialHeaderStyle;
}
}
//================================================================================================================================
// Material Header emboss effect
static public GUIStyle _MaterialHeaderStyleHighlight;
static public GUIStyle MaterialHeaderStyleHighlight
{
get
{
if(_MaterialHeaderStyleHighlight == null)
{
_MaterialHeaderStyleHighlight = new GUIStyle(MaterialHeaderStyle);
_MaterialHeaderStyleHighlight.contentOffset = new Vector2(1, 1);
_MaterialHeaderStyleHighlight.normal.textColor = EditorGUIUtility.isProSkin ? new Color32(255, 255, 255, 16) : new Color32(255, 255, 255, 32);
}
return _MaterialHeaderStyleHighlight;
}
}
//================================================================================================================================
// Filled rectangle
static private GUIStyle _WhiteRectangleStyle;
static public void DrawRectangle(Rect position, Color color)
{
var col = GUI.color;
GUI.color *= color;
DrawRectangle(position);
GUI.color = col;
}
static public void DrawRectangle(Rect position)
{
if(_WhiteRectangleStyle == null)
{
_WhiteRectangleStyle = new GUIStyle();
_WhiteRectangleStyle.normal.background = EditorGUIUtility.whiteTexture;
}
if(Event.current != null && Event.current.type == EventType.Repaint)
{
_WhiteRectangleStyle.Draw(position, false, false, false, false);
}
}
//================================================================================================================================
// Methods
//================================================================================================================================
static public void DrawLine(float height = 2f)
{
DrawLine(Color.black, height);
}
static public void DrawLine(Color color, float height = 1f)
{
Rect position = GUILayoutUtility.GetRect(0f, float.MaxValue, height, height, LineStyle);
DrawLine(position, color);
}
static public void DrawLine(Rect position, Color color)
{
if(Event.current.type == EventType.Repaint)
{
Color orgColor = GUI.color;
GUI.color = orgColor * color;
LineStyle.Draw(position, false, false, false, false);
GUI.color = orgColor;
}
}
static public void MaterialDrawHeader(GUIContent guiContent)
{
var rect = GUILayoutUtility.GetRect(guiContent, MaterialHeaderStyle);
GUI.Label(rect, guiContent, MaterialHeaderStyleHighlight);
GUI.Label(rect, guiContent, MaterialHeaderStyle);
}
static public void MaterialDrawSeparator()
{
GUILayout.Space(4);
if(EditorGUIUtility.isProSkin)
DrawLine(new Color(.3f, .3f, .3f, 1f), 1);
else
DrawLine(new Color(.6f, .6f, .6f, 1f), 1);
GUILayout.Space(4);
}
static public void MaterialDrawSeparatorDouble()
{
GUILayout.Space(6);
if(EditorGUIUtility.isProSkin)
{
DrawLine(new Color(.1f, .1f, .1f, 1f), 1);
DrawLine(new Color(.4f, .4f, .4f, 1f), 1);
}
else
{
DrawLine(new Color(.3f, .3f, .3f, 1f), 1);
DrawLine(new Color(.9f, .9f, .9f, 1f), 1);
}
GUILayout.Space(6);
}
//built-in console icons, also used in help box
static Texture2D warnIcon;
static Texture2D infoIcon;
static Texture2D errorIcon;
static public void HelpBoxRichText(Rect position, string message, MessageType msgType)
{
Texture2D icon = null;
switch(msgType)
{
case MessageType.Warning: icon = warnIcon ?? (warnIcon = EditorGUIUtility.Load("console.warnicon") as Texture2D); break;
case MessageType.Info: icon = infoIcon ?? (infoIcon = EditorGUIUtility.Load("console.infoicon") as Texture2D); break;
case MessageType.Error: icon = errorIcon ?? (errorIcon = EditorGUIUtility.Load("console.erroricon") as Texture2D); break;
}
EditorGUI.LabelField(position, GUIContent.none, new GUIContent(message, icon), HelpBoxRichTextStyle);
}
static public void HelpBoxRichText(string message, MessageType msgType)
{
Texture2D icon = null;
switch(msgType)
{
case MessageType.Warning: icon = warnIcon ?? (warnIcon = EditorGUIUtility.Load("console.warnicon") as Texture2D); break;
case MessageType.Info: icon = infoIcon ?? (infoIcon = EditorGUIUtility.Load("console.infoicon") as Texture2D); break;
case MessageType.Error: icon = errorIcon ?? (errorIcon = EditorGUIUtility.Load("console.erroricon") as Texture2D); break;
}
EditorGUILayout.LabelField(GUIContent.none, new GUIContent(message, icon), HelpBoxRichTextStyle);
}
}
}
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
using UnityEngine;
using UnityEditor;
// GUI Styles and UI methods
namespace CartoonFX
{
public static class Styles
{
//================================================================================================================================
// GUI Styles
//================================================================================================================================
//================================================================================================================================
// (x) close button
static GUIStyle _closeCrossButton;
public static GUIStyle CloseCrossButton
{
get
{
if(_closeCrossButton == null)
{
//Try to load GUISkin according to its GUID
//Assumes that its .meta file should always stick with it!
string guiSkinPath = AssetDatabase.GUIDToAssetPath("02d396fa782e5d7438e231ea9f8be23c");
var gs = AssetDatabase.LoadAssetAtPath<GUISkin>(guiSkinPath);
if(gs != null)
{
_closeCrossButton = System.Array.Find<GUIStyle>(gs.customStyles, x => x.name == "CloseCrossButton");
}
//Else fall back to minibutton
if(_closeCrossButton == null)
_closeCrossButton = EditorStyles.miniButton;
}
return _closeCrossButton;
}
}
//================================================================================================================================
// Shuriken Toggle with label alignment fix
static GUIStyle _shurikenToggle;
public static GUIStyle ShurikenToggle
{
get
{
if(_shurikenToggle == null)
{
_shurikenToggle = new GUIStyle("ShurikenToggle");
_shurikenToggle.fontSize = 9;
_shurikenToggle.contentOffset = new Vector2(16, -1);
if(EditorGUIUtility.isProSkin)
{
var textColor = new Color(.8f, .8f, .8f);
_shurikenToggle.normal.textColor = textColor;
_shurikenToggle.active.textColor = textColor;
_shurikenToggle.focused.textColor = textColor;
_shurikenToggle.hover.textColor = textColor;
_shurikenToggle.onNormal.textColor = textColor;
_shurikenToggle.onActive.textColor = textColor;
_shurikenToggle.onFocused.textColor = textColor;
_shurikenToggle.onHover.textColor = textColor;
}
}
return _shurikenToggle;
}
}
//================================================================================================================================
// Bold mini-label (the one from EditorStyles isn't actually "mini")
static GUIStyle _miniBoldLabel;
public static GUIStyle MiniBoldLabel
{
get
{
if(_miniBoldLabel == null)
{
_miniBoldLabel = new GUIStyle(EditorStyles.boldLabel);
_miniBoldLabel.fontSize = 10;
_miniBoldLabel.margin = new RectOffset(0, 0, 0, 0);
}
return _miniBoldLabel;
}
}
//================================================================================================================================
// Bold mini-foldout
static GUIStyle _miniBoldFoldout;
public static GUIStyle MiniBoldFoldout
{
get
{
if(_miniBoldFoldout == null)
{
_miniBoldFoldout = new GUIStyle(EditorStyles.foldout);
_miniBoldFoldout.fontSize = 10;
_miniBoldFoldout.fontStyle = FontStyle.Bold;
_miniBoldFoldout.margin = new RectOffset(0, 0, 0, 0);
}
return _miniBoldFoldout;
}
}
//================================================================================================================================
// Gray right-aligned label for Orderable List (Material Animator)
static GUIStyle _PropertyTypeLabel;
public static GUIStyle PropertyTypeLabel
{
get
{
if(_PropertyTypeLabel == null)
{
_PropertyTypeLabel = new GUIStyle(EditorStyles.label);
_PropertyTypeLabel.alignment = TextAnchor.MiddleRight;
_PropertyTypeLabel.normal.textColor = Color.gray;
_PropertyTypeLabel.fontSize = 9;
}
return _PropertyTypeLabel;
}
}
// Dark Gray right-aligned label for Orderable List (Material Animator)
static GUIStyle _PropertyTypeLabelFocused;
public static GUIStyle PropertyTypeLabelFocused
{
get
{
if(_PropertyTypeLabelFocused == null)
{
_PropertyTypeLabelFocused = new GUIStyle(EditorStyles.label);
_PropertyTypeLabelFocused.alignment = TextAnchor.MiddleRight;
_PropertyTypeLabelFocused.normal.textColor = new Color(.2f, .2f, .2f);
_PropertyTypeLabelFocused.fontSize = 9;
}
return _PropertyTypeLabelFocused;
}
}
//================================================================================================================================
// Rounded Box
static GUIStyle _roundedBox;
public static GUIStyle RoundedBox
{
get
{
if(_roundedBox == null)
{
_roundedBox = new GUIStyle(EditorStyles.helpBox);
}
return _roundedBox;
}
}
//================================================================================================================================
// Center White Label ("Editing Spline" label in Scene View)
static GUIStyle _CenteredWhiteLabel;
public static GUIStyle CenteredWhiteLabel
{
get
{
if(_CenteredWhiteLabel == null)
{
_CenteredWhiteLabel = new GUIStyle(EditorStyles.centeredGreyMiniLabel);
_CenteredWhiteLabel.fontSize = 20;
_CenteredWhiteLabel.normal.textColor = Color.white;
}
return _CenteredWhiteLabel;
}
}
//================================================================================================================================
// Used to draw lines for separators
static public GUIStyle _LineStyle;
static public GUIStyle LineStyle
{
get
{
if(_LineStyle == null)
{
_LineStyle = new GUIStyle();
_LineStyle.normal.background = EditorGUIUtility.whiteTexture;
_LineStyle.stretchWidth = true;
}
return _LineStyle;
}
}
//================================================================================================================================
// HelpBox with rich text formatting support
static GUIStyle _HelpBoxRichTextStyle;
static public GUIStyle HelpBoxRichTextStyle
{
get
{
if(_HelpBoxRichTextStyle == null)
{
_HelpBoxRichTextStyle = new GUIStyle("HelpBox");
_HelpBoxRichTextStyle.richText = true;
}
return _HelpBoxRichTextStyle;
}
}
//================================================================================================================================
// Material Blue Header
static public GUIStyle _MaterialHeaderStyle;
static public GUIStyle MaterialHeaderStyle
{
get
{
if(_MaterialHeaderStyle == null)
{
_MaterialHeaderStyle = new GUIStyle(EditorStyles.label);
_MaterialHeaderStyle.fontStyle = FontStyle.Bold;
_MaterialHeaderStyle.fontSize = 11;
_MaterialHeaderStyle.padding.top = 0;
_MaterialHeaderStyle.padding.bottom = 0;
_MaterialHeaderStyle.normal.textColor = EditorGUIUtility.isProSkin ? new Color32(75, 128, 255, 255) : new Color32(0, 50, 230, 255);
_MaterialHeaderStyle.stretchWidth = true;
}
return _MaterialHeaderStyle;
}
}
//================================================================================================================================
// Material Header emboss effect
static public GUIStyle _MaterialHeaderStyleHighlight;
static public GUIStyle MaterialHeaderStyleHighlight
{
get
{
if(_MaterialHeaderStyleHighlight == null)
{
_MaterialHeaderStyleHighlight = new GUIStyle(MaterialHeaderStyle);
_MaterialHeaderStyleHighlight.contentOffset = new Vector2(1, 1);
_MaterialHeaderStyleHighlight.normal.textColor = EditorGUIUtility.isProSkin ? new Color32(255, 255, 255, 16) : new Color32(255, 255, 255, 32);
}
return _MaterialHeaderStyleHighlight;
}
}
//================================================================================================================================
// Filled rectangle
static private GUIStyle _WhiteRectangleStyle;
static public void DrawRectangle(Rect position, Color color)
{
var col = GUI.color;
GUI.color *= color;
DrawRectangle(position);
GUI.color = col;
}
static public void DrawRectangle(Rect position)
{
if(_WhiteRectangleStyle == null)
{
_WhiteRectangleStyle = new GUIStyle();
_WhiteRectangleStyle.normal.background = EditorGUIUtility.whiteTexture;
}
if(Event.current != null && Event.current.type == EventType.Repaint)
{
_WhiteRectangleStyle.Draw(position, false, false, false, false);
}
}
//================================================================================================================================
// Methods
//================================================================================================================================
static public void DrawLine(float height = 2f)
{
DrawLine(Color.black, height);
}
static public void DrawLine(Color color, float height = 1f)
{
Rect position = GUILayoutUtility.GetRect(0f, float.MaxValue, height, height, LineStyle);
DrawLine(position, color);
}
static public void DrawLine(Rect position, Color color)
{
if(Event.current.type == EventType.Repaint)
{
Color orgColor = GUI.color;
GUI.color = orgColor * color;
LineStyle.Draw(position, false, false, false, false);
GUI.color = orgColor;
}
}
static public void MaterialDrawHeader(GUIContent guiContent)
{
var rect = GUILayoutUtility.GetRect(guiContent, MaterialHeaderStyle);
GUI.Label(rect, guiContent, MaterialHeaderStyleHighlight);
GUI.Label(rect, guiContent, MaterialHeaderStyle);
}
static public void MaterialDrawSeparator()
{
GUILayout.Space(4);
if(EditorGUIUtility.isProSkin)
DrawLine(new Color(.3f, .3f, .3f, 1f), 1);
else
DrawLine(new Color(.6f, .6f, .6f, 1f), 1);
GUILayout.Space(4);
}
static public void MaterialDrawSeparatorDouble()
{
GUILayout.Space(6);
if(EditorGUIUtility.isProSkin)
{
DrawLine(new Color(.1f, .1f, .1f, 1f), 1);
DrawLine(new Color(.4f, .4f, .4f, 1f), 1);
}
else
{
DrawLine(new Color(.3f, .3f, .3f, 1f), 1);
DrawLine(new Color(.9f, .9f, .9f, 1f), 1);
}
GUILayout.Space(6);
}
//built-in console icons, also used in help box
static Texture2D warnIcon;
static Texture2D infoIcon;
static Texture2D errorIcon;
static public void HelpBoxRichText(Rect position, string message, MessageType msgType)
{
Texture2D icon = null;
switch(msgType)
{
case MessageType.Warning: icon = warnIcon ?? (warnIcon = EditorGUIUtility.Load("console.warnicon") as Texture2D); break;
case MessageType.Info: icon = infoIcon ?? (infoIcon = EditorGUIUtility.Load("console.infoicon") as Texture2D); break;
case MessageType.Error: icon = errorIcon ?? (errorIcon = EditorGUIUtility.Load("console.erroricon") as Texture2D); break;
}
EditorGUI.LabelField(position, GUIContent.none, new GUIContent(message, icon), HelpBoxRichTextStyle);
}
static public void HelpBoxRichText(string message, MessageType msgType)
{
Texture2D icon = null;
switch(msgType)
{
case MessageType.Warning: icon = warnIcon ?? (warnIcon = EditorGUIUtility.Load("console.warnicon") as Texture2D); break;
case MessageType.Info: icon = infoIcon ?? (infoIcon = EditorGUIUtility.Load("console.infoicon") as Texture2D); break;
case MessageType.Error: icon = errorIcon ?? (errorIcon = EditorGUIUtility.Load("console.erroricon") as Texture2D); break;
}
EditorGUILayout.LabelField(GUIContent.none, new GUIContent(message, icon), HelpBoxRichTextStyle);
}
}
}

View File

@ -1,287 +1,287 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace CartoonFX
{
public partial class CFXR_Effect : MonoBehaviour
{
[System.Serializable]
public class CameraShake
{
public enum ShakeSpace
{
Screen,
World
}
static public bool editorPreview = true;
//--------------------------------------------------------------------------------------------------------------------------------
public bool enabled = false;
[Space]
public bool useMainCamera = true;
public List<Camera> cameras = new List<Camera>();
[Space]
public float delay = 0.0f;
public float duration = 1.0f;
public ShakeSpace shakeSpace = ShakeSpace.Screen;
public Vector3 shakeStrength = new Vector3(0.1f, 0.1f, 0.1f);
public AnimationCurve shakeCurve = AnimationCurve.Linear(0, 1, 1, 0);
[Space]
[Range(0, 0.1f)] public float shakesDelay = 0;
[System.NonSerialized] public bool isShaking;
Dictionary<Camera, Vector3> camerasPreRenderPosition = new Dictionary<Camera, Vector3>();
Vector3 shakeVector;
float delaysTimer;
//--------------------------------------------------------------------------------------------------------------------------------
// STATIC
// Use static methods to dispatch the Camera callbacks, to ensure that ScreenShake components are called in an order in PreRender,
// and in the _reverse_ order for PostRender, so that the final Camera position is the same as it is originally (allowing concurrent
// screen shake to be active)
static bool s_CallbackRegistered;
static List<CameraShake> s_CameraShakes = new List<CameraShake>();
#if UNITY_2019_1_OR_NEWER
static void OnPreRenderCamera_Static_URP(ScriptableRenderContext context, Camera cam)
{
OnPreRenderCamera_Static(cam);
}
static void OnPostRenderCamera_Static_URP(ScriptableRenderContext context, Camera cam)
{
OnPostRenderCamera_Static(cam);
}
#endif
static void OnPreRenderCamera_Static(Camera cam)
{
int count = s_CameraShakes.Count;
for (int i = 0; i < count; i++)
{
var ss = s_CameraShakes[i];
ss.onPreRenderCamera(cam);
}
}
static void OnPostRenderCamera_Static(Camera cam)
{
int count = s_CameraShakes.Count;
for (int i = count-1; i >= 0; i--)
{
var ss = s_CameraShakes[i];
ss.onPostRenderCamera(cam);
}
}
static void RegisterStaticCallback(CameraShake cameraShake)
{
s_CameraShakes.Add(cameraShake);
if (!s_CallbackRegistered)
{
#if UNITY_2019_1_OR_NEWER
#if UNITY_2019_3_OR_NEWER
if (GraphicsSettings.currentRenderPipeline == null)
#else
if (GraphicsSettings.renderPipelineAsset == null)
#endif
{
// Built-in Render Pipeline
Camera.onPreRender += OnPreRenderCamera_Static;
Camera.onPostRender += OnPostRenderCamera_Static;
}
else
{
// URP
RenderPipelineManager.beginCameraRendering += OnPreRenderCamera_Static_URP;
RenderPipelineManager.endCameraRendering += OnPostRenderCamera_Static_URP;
}
#else
Camera.onPreRender += OnPreRenderCamera_Static;
Camera.onPostRender += OnPostRenderCamera_Static;
#endif
s_CallbackRegistered = true;
}
}
static void UnregisterStaticCallback(CameraShake cameraShake)
{
s_CameraShakes.Remove(cameraShake);
if (s_CallbackRegistered && s_CameraShakes.Count == 0)
{
#if UNITY_2019_1_OR_NEWER
#if UNITY_2019_3_OR_NEWER
if (GraphicsSettings.currentRenderPipeline == null)
#else
if (GraphicsSettings.renderPipelineAsset == null)
#endif
{
// Built-in Render Pipeline
Camera.onPreRender -= OnPreRenderCamera_Static;
Camera.onPostRender -= OnPostRenderCamera_Static;
}
else
{
// URP
RenderPipelineManager.beginCameraRendering -= OnPreRenderCamera_Static_URP;
RenderPipelineManager.endCameraRendering -= OnPostRenderCamera_Static_URP;
}
#else
Camera.onPreRender -= OnPreRenderCamera_Static;
Camera.onPostRender -= OnPostRenderCamera_Static;
#endif
s_CallbackRegistered = false;
}
}
//--------------------------------------------------------------------------------------------------------------------------------
void onPreRenderCamera(Camera cam)
{
#if UNITY_EDITOR
//add scene view camera if necessary
if (SceneView.currentDrawingSceneView != null && SceneView.currentDrawingSceneView.camera == cam && !camerasPreRenderPosition.ContainsKey(cam))
{
camerasPreRenderPosition.Add(cam, cam.transform.localPosition);
}
#endif
if (isShaking && camerasPreRenderPosition.ContainsKey(cam))
{
camerasPreRenderPosition[cam] = cam.transform.localPosition;
if (Time.timeScale <= 0) return;
switch (shakeSpace)
{
case ShakeSpace.Screen: cam.transform.localPosition += cam.transform.rotation * shakeVector; break;
case ShakeSpace.World: cam.transform.localPosition += shakeVector; break;
}
}
}
void onPostRenderCamera(Camera cam)
{
if (camerasPreRenderPosition.ContainsKey(cam))
{
cam.transform.localPosition = camerasPreRenderPosition[cam];
}
}
public void fetchCameras()
{
#if UNITY_EDITOR
if (!EditorApplication.isPlayingOrWillChangePlaymode)
{
return;
}
#endif
foreach (var cam in cameras)
{
if (cam == null) continue;
camerasPreRenderPosition.Remove(cam);
}
cameras.Clear();
if (useMainCamera && Camera.main != null)
{
cameras.Add(Camera.main);
}
foreach (var cam in cameras)
{
if (cam == null) continue;
if (!camerasPreRenderPosition.ContainsKey(cam))
{
camerasPreRenderPosition.Add(cam, Vector3.zero);
}
}
}
public void StartShake()
{
if (isShaking)
{
StopShake();
}
isShaking = true;
RegisterStaticCallback(this);
}
public void StopShake()
{
isShaking = false;
shakeVector = Vector3.zero;
UnregisterStaticCallback(this);
}
public void animate(float time)
{
#if UNITY_EDITOR
if (!editorPreview && !EditorApplication.isPlaying)
{
shakeVector = Vector3.zero;
return;
}
#endif
float totalDuration = duration + delay;
if (time < totalDuration)
{
if (time < delay)
{
return;
}
if (!isShaking)
{
this.StartShake();
}
// duration of the camera shake
float delta = Mathf.Clamp01(time/totalDuration);
// delay between each camera move
if (shakesDelay > 0)
{
delaysTimer += Time.deltaTime;
if (delaysTimer < shakesDelay)
{
return;
}
else
{
while (delaysTimer >= shakesDelay)
{
delaysTimer -= shakesDelay;
}
}
}
var randomVec = new Vector3(Random.value, Random.value, Random.value);
var shakeVec = Vector3.Scale(randomVec, shakeStrength) * (Random.value > 0.5f ? -1 : 1);
shakeVector = shakeVec * shakeCurve.Evaluate(delta) * GLOBAL_CAMERA_SHAKE_MULTIPLIER;
}
else if (isShaking)
{
StopShake();
}
}
}
}
}
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace CartoonFX
{
public partial class CFXR_Effect : MonoBehaviour
{
[System.Serializable]
public class CameraShake
{
public enum ShakeSpace
{
Screen,
World
}
static public bool editorPreview = true;
//--------------------------------------------------------------------------------------------------------------------------------
public bool enabled = false;
[Space]
public bool useMainCamera = true;
public List<Camera> cameras = new List<Camera>();
[Space]
public float delay = 0.0f;
public float duration = 1.0f;
public ShakeSpace shakeSpace = ShakeSpace.Screen;
public Vector3 shakeStrength = new Vector3(0.1f, 0.1f, 0.1f);
public AnimationCurve shakeCurve = AnimationCurve.Linear(0, 1, 1, 0);
[Space]
[Range(0, 0.1f)] public float shakesDelay = 0;
[System.NonSerialized] public bool isShaking;
Dictionary<Camera, Vector3> camerasPreRenderPosition = new Dictionary<Camera, Vector3>();
Vector3 shakeVector;
float delaysTimer;
//--------------------------------------------------------------------------------------------------------------------------------
// STATIC
// Use static methods to dispatch the Camera callbacks, to ensure that ScreenShake components are called in an order in PreRender,
// and in the _reverse_ order for PostRender, so that the final Camera position is the same as it is originally (allowing concurrent
// screen shake to be active)
static bool s_CallbackRegistered;
static List<CameraShake> s_CameraShakes = new List<CameraShake>();
#if UNITY_2019_1_OR_NEWER
static void OnPreRenderCamera_Static_URP(ScriptableRenderContext context, Camera cam)
{
OnPreRenderCamera_Static(cam);
}
static void OnPostRenderCamera_Static_URP(ScriptableRenderContext context, Camera cam)
{
OnPostRenderCamera_Static(cam);
}
#endif
static void OnPreRenderCamera_Static(Camera cam)
{
int count = s_CameraShakes.Count;
for (int i = 0; i < count; i++)
{
var ss = s_CameraShakes[i];
ss.onPreRenderCamera(cam);
}
}
static void OnPostRenderCamera_Static(Camera cam)
{
int count = s_CameraShakes.Count;
for (int i = count-1; i >= 0; i--)
{
var ss = s_CameraShakes[i];
ss.onPostRenderCamera(cam);
}
}
static void RegisterStaticCallback(CameraShake cameraShake)
{
s_CameraShakes.Add(cameraShake);
if (!s_CallbackRegistered)
{
#if UNITY_2019_1_OR_NEWER
#if UNITY_2019_3_OR_NEWER
if (GraphicsSettings.currentRenderPipeline == null)
#else
if (GraphicsSettings.renderPipelineAsset == null)
#endif
{
// Built-in Render Pipeline
Camera.onPreRender += OnPreRenderCamera_Static;
Camera.onPostRender += OnPostRenderCamera_Static;
}
else
{
// URP
RenderPipelineManager.beginCameraRendering += OnPreRenderCamera_Static_URP;
RenderPipelineManager.endCameraRendering += OnPostRenderCamera_Static_URP;
}
#else
Camera.onPreRender += OnPreRenderCamera_Static;
Camera.onPostRender += OnPostRenderCamera_Static;
#endif
s_CallbackRegistered = true;
}
}
static void UnregisterStaticCallback(CameraShake cameraShake)
{
s_CameraShakes.Remove(cameraShake);
if (s_CallbackRegistered && s_CameraShakes.Count == 0)
{
#if UNITY_2019_1_OR_NEWER
#if UNITY_2019_3_OR_NEWER
if (GraphicsSettings.currentRenderPipeline == null)
#else
if (GraphicsSettings.renderPipelineAsset == null)
#endif
{
// Built-in Render Pipeline
Camera.onPreRender -= OnPreRenderCamera_Static;
Camera.onPostRender -= OnPostRenderCamera_Static;
}
else
{
// URP
RenderPipelineManager.beginCameraRendering -= OnPreRenderCamera_Static_URP;
RenderPipelineManager.endCameraRendering -= OnPostRenderCamera_Static_URP;
}
#else
Camera.onPreRender -= OnPreRenderCamera_Static;
Camera.onPostRender -= OnPostRenderCamera_Static;
#endif
s_CallbackRegistered = false;
}
}
//--------------------------------------------------------------------------------------------------------------------------------
void onPreRenderCamera(Camera cam)
{
#if UNITY_EDITOR
//add scene view camera if necessary
if (SceneView.currentDrawingSceneView != null && SceneView.currentDrawingSceneView.camera == cam && !camerasPreRenderPosition.ContainsKey(cam))
{
camerasPreRenderPosition.Add(cam, cam.transform.localPosition);
}
#endif
if (isShaking && camerasPreRenderPosition.ContainsKey(cam))
{
camerasPreRenderPosition[cam] = cam.transform.localPosition;
if (Time.timeScale <= 0) return;
switch (shakeSpace)
{
case ShakeSpace.Screen: cam.transform.localPosition += cam.transform.rotation * shakeVector; break;
case ShakeSpace.World: cam.transform.localPosition += shakeVector; break;
}
}
}
void onPostRenderCamera(Camera cam)
{
if (camerasPreRenderPosition.ContainsKey(cam))
{
cam.transform.localPosition = camerasPreRenderPosition[cam];
}
}
public void fetchCameras()
{
#if UNITY_EDITOR
if (!EditorApplication.isPlayingOrWillChangePlaymode)
{
return;
}
#endif
foreach (var cam in cameras)
{
if (cam == null) continue;
camerasPreRenderPosition.Remove(cam);
}
cameras.Clear();
if (useMainCamera && Camera.main != null)
{
cameras.Add(Camera.main);
}
foreach (var cam in cameras)
{
if (cam == null) continue;
if (!camerasPreRenderPosition.ContainsKey(cam))
{
camerasPreRenderPosition.Add(cam, Vector3.zero);
}
}
}
public void StartShake()
{
if (isShaking)
{
StopShake();
}
isShaking = true;
RegisterStaticCallback(this);
}
public void StopShake()
{
isShaking = false;
shakeVector = Vector3.zero;
UnregisterStaticCallback(this);
}
public void animate(float time)
{
#if UNITY_EDITOR
if (!editorPreview && !EditorApplication.isPlaying)
{
shakeVector = Vector3.zero;
return;
}
#endif
float totalDuration = duration + delay;
if (time < totalDuration)
{
if (time < delay)
{
return;
}
if (!isShaking)
{
this.StartShake();
}
// duration of the camera shake
float delta = Mathf.Clamp01(time/totalDuration);
// delay between each camera move
if (shakesDelay > 0)
{
delaysTimer += Time.deltaTime;
if (delaysTimer < shakesDelay)
{
return;
}
else
{
while (delaysTimer >= shakesDelay)
{
delaysTimer -= shakesDelay;
}
}
}
var randomVec = new Vector3(Random.value, Random.value, Random.value);
var shakeVec = Vector3.Scale(randomVec, shakeStrength) * (Random.value > 0.5f ? -1 : 1);
shakeVector = shakeVec * shakeCurve.Evaluate(delta) * GLOBAL_CAMERA_SHAKE_MULTIPLIER;
}
else if (isShaking)
{
StopShake();
}
}
}
}
}

View File

@ -1,419 +1,419 @@
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2022 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
using System.Collections.Generic;
using UnityEngine;
using Object = UnityEngine.Object;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace CartoonFX
{
[RequireComponent(typeof(ParticleSystem))]
public class CFXR_ParticleText : MonoBehaviour
{
[Header("Dynamic")]
[Tooltip("Allow changing the text at runtime with the 'UpdateText' method. If disabled, this script will be excluded from the build.")]
public bool isDynamic;
[Header("Text")]
[SerializeField] string text;
[SerializeField] float size = 1f;
[SerializeField] float letterSpacing = 0.44f;
[Header("Colors")]
[SerializeField] Color backgroundColor = new Color(0, 0, 0, 1);
[SerializeField] Color color1 = new Color(1, 1, 1, 1);
[SerializeField] Color color2 = new Color(0, 0, 1, 1);
[Header("Delay")]
[SerializeField] float delay = 0.05f;
[SerializeField] bool cumulativeDelay = false;
[Range(0f, 2f)] [SerializeField] float compensateLifetime = 0;
[Header("Misc")]
[SerializeField] float lifetimeMultiplier = 1f;
[Range(-90f, 90f)] [SerializeField] float rotation = -5f;
[SerializeField] float sortingFudgeOffset = 0.1f;
#pragma warning disable 0649
[SerializeField] CFXR_ParticleTextFontAsset font;
#pragma warning restore 0649
#if UNITY_EDITOR
[HideInInspector] [SerializeField] bool autoUpdateEditor = true;
void OnValidate()
{
if (text == null || font == null)
{
return;
}
// parse text to only allow valid characters
List<char> allowed = new List<char>(font.CharSequence.ToCharArray());
allowed.Add(' ');
char[] chars;
switch (font.letterCase)
{
case CFXR_ParticleTextFontAsset.LetterCase.Lower: chars = text.ToLowerInvariant().ToCharArray(); break;
case CFXR_ParticleTextFontAsset.LetterCase.Upper: chars = text.ToUpperInvariant().ToCharArray(); break;
default:
case CFXR_ParticleTextFontAsset.LetterCase.Both: chars = text.ToCharArray(); break;
}
string newText = "";
foreach (var c in chars)
{
if (allowed.Contains(c))
{
newText += c;
}
}
text = newText;
// prevent negative or 0 size
size = Mathf.Max(0.001f, size);
// delay so that we are allowed to destroy GameObjects
if (autoUpdateEditor && !EditorApplication.isPlayingOrWillChangePlaymode)
{
EditorApplication.delayCall += () => { UpdateText(null); };
}
}
#endif
void Awake()
{
if (!isDynamic)
{
Destroy(this);
return;
}
InitializeFirstParticle();
}
float baseLifetime;
float baseScaleX;
float baseScaleY;
float baseScaleZ;
Vector3 basePivot;
void InitializeFirstParticle()
{
if (isDynamic && this.transform.childCount == 0)
{
throw new System.Exception("[CFXR_ParticleText] A disabled GameObject with a ParticleSystem component is required as the first child when 'isDyanmic' is enabled, so that its settings can be used as a base for the generated characters.");
}
var ps = isDynamic ? this.transform.GetChild(0).GetComponent<ParticleSystem>() : this.GetComponent<ParticleSystem>();
var main = ps.main;
baseLifetime = main.startLifetime.constant;
baseScaleX = main.startSizeXMultiplier;
baseScaleY = main.startSizeYMultiplier;
baseScaleZ = main.startSizeZMultiplier;
basePivot = ps.GetComponent<ParticleSystemRenderer>().pivot;
if (isDynamic)
{
basePivot.x = 0; // make sure to not offset the text horizontally
ps.gameObject.SetActive(false); // ensure first child is inactive
ps.gameObject.name = "MODEL";
}
}
public void UpdateText(
string newText = null,
float? newSize = null,
Color? newColor1 = null, Color? newColor2 = null, Color? newBackgroundColor = null,
float? newLifetimeMultiplier = null
)
{
#if UNITY_EDITOR
// Only allow updating text for GameObjects that aren't prefabs, since we are possibly destroying/adding GameObjects
if (this == null)
{
return;
}
var prefabInstanceStatus = PrefabUtility.GetPrefabInstanceStatus(this);
var prefabAssetType = PrefabUtility.GetPrefabAssetType(this);
if (!(prefabInstanceStatus == PrefabInstanceStatus.NotAPrefab && prefabAssetType == PrefabAssetType.NotAPrefab))
{
return;
}
if (!Application.isPlaying)
{
InitializeFirstParticle();
}
#endif
if (Application.isPlaying && !isDynamic)
{
throw new System.Exception("[CFXR_ParticleText] You cannot update the text at runtime if it's not marked as dynamic.");
}
if (newText != null)
{
switch (font.letterCase)
{
case CFXR_ParticleTextFontAsset.LetterCase.Lower:
newText = newText.ToLowerInvariant();
break;
case CFXR_ParticleTextFontAsset.LetterCase.Upper:
newText = newText.ToUpperInvariant();
break;
}
// Verify that new text doesn't contain invalid characters
foreach (char c in newText)
{
if (char.IsWhiteSpace(c)) continue;
if (font.CharSequence.IndexOf(c) < 0)
{
throw new System.Exception("[CFXR_ParticleText] Invalid character supplied for the dynamic text: '" + c + "'\nThe allowed characters from the selected font are: " + font.CharSequence);
}
}
this.text = newText;
}
if (newSize != null) this.size = newSize.Value;
if (newColor1 != null) this.color1 = newColor1.Value;
if (newColor2 != null) this.color2 = newColor2.Value;
if (newBackgroundColor != null) this.backgroundColor = newBackgroundColor.Value;
if (newLifetimeMultiplier != null) this.lifetimeMultiplier = newLifetimeMultiplier.Value;
if (text == null || font == null || !font.IsValid())
{
return;
}
if (this.transform.childCount == 0)
{
throw new System.Exception("[CFXR_ParticleText] A disabled GameObject with a ParticleSystem component is required as the first child when 'isDyanmic' is enabled, so that its settings can be used as a base for the generated characters.");
}
// process text and calculate total width offset
float totalWidth = 0f;
int charCount = 0;
for (int i = 0; i < text.Length; i++)
{
if (char.IsWhiteSpace(text[i]))
{
if (i > 0)
{
totalWidth += letterSpacing * size;
}
}
else
{
charCount++;
if (i > 0)
{
int index = font.CharSequence.IndexOf(text[i]);
var sprite = font.CharSprites[index];
float charWidth = sprite.rect.width + font.CharKerningOffsets[index].post + font.CharKerningOffsets[index].pre;
totalWidth += (charWidth * 0.01f + letterSpacing) * size;
}
}
}
#if UNITY_EDITOR
// delete all children in editor, to make sure we refresh the particle systems based on the first one
if (!Application.isPlaying)
{
int length = this.transform.childCount;
int overflow = 0;
while (this.transform.childCount > 1)
{
Object.DestroyImmediate(this.transform.GetChild(this.transform.childCount - 1).gameObject);
overflow++;
if (overflow > 1000)
{
// just in case...
Debug.LogError("Overflow!");
break;
}
}
}
#endif
if (charCount > 0)
{
// calculate needed instances
int childCount = this.transform.childCount - (isDynamic ? 1 : 0); // first one is the particle source and always deactivated
if (childCount < charCount)
{
// instantiate new letter GameObjects if needed
GameObject model = isDynamic ? this.transform.GetChild(0).gameObject : null;
for (int i = childCount; i < charCount; i++)
{
var newLetter = isDynamic ? Instantiate(model, this.transform) : new GameObject();
if (!isDynamic)
{
newLetter.transform.SetParent(this.transform);
newLetter.AddComponent<ParticleSystem>();
}
newLetter.transform.localPosition = Vector3.zero;
newLetter.transform.localRotation = Quaternion.identity;
}
}
// update each letter
float offset = totalWidth / 2f;
totalWidth = 0f;
int currentChild = isDynamic ? 0 : -1;
// when not dynamic, we use CopySerialized to propagate the settings to the instances
var sourceParticle = isDynamic ? null : this.GetComponent<ParticleSystem>();
var sourceParticleRenderer = this.GetComponent<ParticleSystemRenderer>();
for (int i = 0; i < text.Length; i++)
{
var letter = text[i];
if (char.IsWhiteSpace(letter))
{
totalWidth += letterSpacing * size;
}
else
{
currentChild++;
int index = font.CharSequence.IndexOf(text[i]);
var sprite = font.CharSprites[index];
// calculate char particle size ratio
var ratio = size * sprite.rect.width / 50f;
// calculate char position
totalWidth += font.CharKerningOffsets[index].pre * 0.01f * size;
var position = (totalWidth - offset) / ratio;
float charWidth = sprite.rect.width + font.CharKerningOffsets[index].post;
totalWidth += (charWidth * 0.01f + letterSpacing) * size;
// update particle system for this letter
var letterObj = this.transform.GetChild(currentChild).gameObject;
letterObj.name = letter.ToString();
var ps = letterObj.GetComponent<ParticleSystem>();
#if UNITY_EDITOR
if (!isDynamic)
{
EditorUtility.CopySerialized(sourceParticle, ps);
ps.gameObject.SetActive(true);
}
#endif
var mainModule = ps.main;
mainModule.startSizeXMultiplier = baseScaleX * ratio;
mainModule.startSizeYMultiplier = baseScaleY * ratio;
mainModule.startSizeZMultiplier = baseScaleZ * ratio;
ps.textureSheetAnimation.SetSprite(0, sprite);
mainModule.startRotation = Mathf.Deg2Rad * rotation;
mainModule.startColor = backgroundColor;
var customData = ps.customData;
customData.enabled = true;
customData.SetColor(ParticleSystemCustomData.Custom1, color1);
customData.SetColor(ParticleSystemCustomData.Custom2, color2);
if (cumulativeDelay)
{
mainModule.startDelay = delay * i;
mainModule.startLifetime = Mathf.LerpUnclamped(baseLifetime, baseLifetime + (delay * (text.Length - i)), compensateLifetime / lifetimeMultiplier);
}
else
{
mainModule.startDelay = delay;
}
mainModule.startLifetime = mainModule.startLifetime.constant * lifetimeMultiplier;
// particle system renderer parameters
var particleRenderer = ps.GetComponent<ParticleSystemRenderer>();
#if UNITY_EDITOR
if (!isDynamic)
{
EditorUtility.CopySerialized(sourceParticleRenderer, particleRenderer);
}
#endif
particleRenderer.enabled = true;
particleRenderer.pivot = new Vector3(basePivot.x + position, basePivot.y, basePivot.z);
particleRenderer.sortingFudge += i * sortingFudgeOffset;
}
}
}
// set active state for needed letters only
for (int i = 1, l = this.transform.childCount; i < l; i++)
{
this.transform.GetChild(i).gameObject.SetActive(i <= charCount);
}
#if UNITY_EDITOR
// automatically play the effect in Editor
if (!Application.isPlaying)
{
this.GetComponent<ParticleSystem>().Clear(true);
this.GetComponent<ParticleSystem>().Play(true);
}
#endif
}
}
#if UNITY_EDITOR
[CustomEditor(typeof(CFXR_ParticleText))]
public class ParticleTextEditor : Editor
{
CFXR_ParticleText CastTarget
{
get { return (CFXR_ParticleText) this.target; }
}
GUIContent GUIContent_AutoUpdateToggle = new GUIContent("Auto-update", "Automatically regenerate the text when a property is changed.");
GUIContent GUIContent_UpdateTextButton = new GUIContent(" Update Text ", "Regenerate the text and create new letter GameObjects if needed.");
public override void OnInspectorGUI()
{
var prefab = PrefabUtility.GetPrefabInstanceStatus(target);
if (prefab != PrefabInstanceStatus.NotAPrefab)
{
EditorGUILayout.HelpBox("Cartoon FX Particle Text doesn't work on Prefab Instances, as it needs to destroy/create children GameObjects.\nYou can right-click on the object, and select \"Unpack Prefab\" to make it an independent Game Object.",
MessageType.Warning);
return;
}
base.OnInspectorGUI();
serializedObject.Update();
SerializedProperty autoUpdateBool = serializedObject.FindProperty("autoUpdateEditor");
GUILayout.Space(8);
GUILayout.BeginHorizontal();
{
GUILayout.FlexibleSpace();
autoUpdateBool.boolValue = GUILayout.Toggle(autoUpdateBool.boolValue, GUIContent_AutoUpdateToggle, GUILayout.Height(30));
if (GUILayout.Button(GUIContent_UpdateTextButton, GUILayout.Height(30)))
{
CastTarget.UpdateText(null);
}
}
GUILayout.EndHorizontal();
if (GUI.changed)
{
serializedObject.ApplyModifiedProperties();
}
}
}
#endif
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2022 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
using System.Collections.Generic;
using UnityEngine;
using Object = UnityEngine.Object;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace CartoonFX
{
[RequireComponent(typeof(ParticleSystem))]
public class CFXR_ParticleText : MonoBehaviour
{
[Header("Dynamic")]
[Tooltip("Allow changing the text at runtime with the 'UpdateText' method. If disabled, this script will be excluded from the build.")]
public bool isDynamic;
[Header("Text")]
[SerializeField] string text;
[SerializeField] float size = 1f;
[SerializeField] float letterSpacing = 0.44f;
[Header("Colors")]
[SerializeField] Color backgroundColor = new Color(0, 0, 0, 1);
[SerializeField] Color color1 = new Color(1, 1, 1, 1);
[SerializeField] Color color2 = new Color(0, 0, 1, 1);
[Header("Delay")]
[SerializeField] float delay = 0.05f;
[SerializeField] bool cumulativeDelay = false;
[Range(0f, 2f)] [SerializeField] float compensateLifetime = 0;
[Header("Misc")]
[SerializeField] float lifetimeMultiplier = 1f;
[Range(-90f, 90f)] [SerializeField] float rotation = -5f;
[SerializeField] float sortingFudgeOffset = 0.1f;
#pragma warning disable 0649
[SerializeField] CFXR_ParticleTextFontAsset font;
#pragma warning restore 0649
#if UNITY_EDITOR
[HideInInspector] [SerializeField] bool autoUpdateEditor = true;
void OnValidate()
{
if (text == null || font == null)
{
return;
}
// parse text to only allow valid characters
List<char> allowed = new List<char>(font.CharSequence.ToCharArray());
allowed.Add(' ');
char[] chars;
switch (font.letterCase)
{
case CFXR_ParticleTextFontAsset.LetterCase.Lower: chars = text.ToLowerInvariant().ToCharArray(); break;
case CFXR_ParticleTextFontAsset.LetterCase.Upper: chars = text.ToUpperInvariant().ToCharArray(); break;
default:
case CFXR_ParticleTextFontAsset.LetterCase.Both: chars = text.ToCharArray(); break;
}
string newText = "";
foreach (var c in chars)
{
if (allowed.Contains(c))
{
newText += c;
}
}
text = newText;
// prevent negative or 0 size
size = Mathf.Max(0.001f, size);
// delay so that we are allowed to destroy GameObjects
if (autoUpdateEditor && !EditorApplication.isPlayingOrWillChangePlaymode)
{
EditorApplication.delayCall += () => { UpdateText(null); };
}
}
#endif
void Awake()
{
if (!isDynamic)
{
Destroy(this);
return;
}
InitializeFirstParticle();
}
float baseLifetime;
float baseScaleX;
float baseScaleY;
float baseScaleZ;
Vector3 basePivot;
void InitializeFirstParticle()
{
if (isDynamic && this.transform.childCount == 0)
{
throw new System.Exception("[CFXR_ParticleText] A disabled GameObject with a ParticleSystem component is required as the first child when 'isDyanmic' is enabled, so that its settings can be used as a base for the generated characters.");
}
var ps = isDynamic ? this.transform.GetChild(0).GetComponent<ParticleSystem>() : this.GetComponent<ParticleSystem>();
var main = ps.main;
baseLifetime = main.startLifetime.constant;
baseScaleX = main.startSizeXMultiplier;
baseScaleY = main.startSizeYMultiplier;
baseScaleZ = main.startSizeZMultiplier;
basePivot = ps.GetComponent<ParticleSystemRenderer>().pivot;
if (isDynamic)
{
basePivot.x = 0; // make sure to not offset the text horizontally
ps.gameObject.SetActive(false); // ensure first child is inactive
ps.gameObject.name = "MODEL";
}
}
public void UpdateText(
string newText = null,
float? newSize = null,
Color? newColor1 = null, Color? newColor2 = null, Color? newBackgroundColor = null,
float? newLifetimeMultiplier = null
)
{
#if UNITY_EDITOR
// Only allow updating text for GameObjects that aren't prefabs, since we are possibly destroying/adding GameObjects
if (this == null)
{
return;
}
var prefabInstanceStatus = PrefabUtility.GetPrefabInstanceStatus(this);
var prefabAssetType = PrefabUtility.GetPrefabAssetType(this);
if (!(prefabInstanceStatus == PrefabInstanceStatus.NotAPrefab && prefabAssetType == PrefabAssetType.NotAPrefab))
{
return;
}
if (!Application.isPlaying)
{
InitializeFirstParticle();
}
#endif
if (Application.isPlaying && !isDynamic)
{
throw new System.Exception("[CFXR_ParticleText] You cannot update the text at runtime if it's not marked as dynamic.");
}
if (newText != null)
{
switch (font.letterCase)
{
case CFXR_ParticleTextFontAsset.LetterCase.Lower:
newText = newText.ToLowerInvariant();
break;
case CFXR_ParticleTextFontAsset.LetterCase.Upper:
newText = newText.ToUpperInvariant();
break;
}
// Verify that new text doesn't contain invalid characters
foreach (char c in newText)
{
if (char.IsWhiteSpace(c)) continue;
if (font.CharSequence.IndexOf(c) < 0)
{
throw new System.Exception("[CFXR_ParticleText] Invalid character supplied for the dynamic text: '" + c + "'\nThe allowed characters from the selected font are: " + font.CharSequence);
}
}
this.text = newText;
}
if (newSize != null) this.size = newSize.Value;
if (newColor1 != null) this.color1 = newColor1.Value;
if (newColor2 != null) this.color2 = newColor2.Value;
if (newBackgroundColor != null) this.backgroundColor = newBackgroundColor.Value;
if (newLifetimeMultiplier != null) this.lifetimeMultiplier = newLifetimeMultiplier.Value;
if (text == null || font == null || !font.IsValid())
{
return;
}
if (this.transform.childCount == 0)
{
throw new System.Exception("[CFXR_ParticleText] A disabled GameObject with a ParticleSystem component is required as the first child when 'isDyanmic' is enabled, so that its settings can be used as a base for the generated characters.");
}
// process text and calculate total width offset
float totalWidth = 0f;
int charCount = 0;
for (int i = 0; i < text.Length; i++)
{
if (char.IsWhiteSpace(text[i]))
{
if (i > 0)
{
totalWidth += letterSpacing * size;
}
}
else
{
charCount++;
if (i > 0)
{
int index = font.CharSequence.IndexOf(text[i]);
var sprite = font.CharSprites[index];
float charWidth = sprite.rect.width + font.CharKerningOffsets[index].post + font.CharKerningOffsets[index].pre;
totalWidth += (charWidth * 0.01f + letterSpacing) * size;
}
}
}
#if UNITY_EDITOR
// delete all children in editor, to make sure we refresh the particle systems based on the first one
if (!Application.isPlaying)
{
int length = this.transform.childCount;
int overflow = 0;
while (this.transform.childCount > 1)
{
Object.DestroyImmediate(this.transform.GetChild(this.transform.childCount - 1).gameObject);
overflow++;
if (overflow > 1000)
{
// just in case...
Debug.LogError("Overflow!");
break;
}
}
}
#endif
if (charCount > 0)
{
// calculate needed instances
int childCount = this.transform.childCount - (isDynamic ? 1 : 0); // first one is the particle source and always deactivated
if (childCount < charCount)
{
// instantiate new letter GameObjects if needed
GameObject model = isDynamic ? this.transform.GetChild(0).gameObject : null;
for (int i = childCount; i < charCount; i++)
{
var newLetter = isDynamic ? Instantiate(model, this.transform) : new GameObject();
if (!isDynamic)
{
newLetter.transform.SetParent(this.transform);
newLetter.AddComponent<ParticleSystem>();
}
newLetter.transform.localPosition = Vector3.zero;
newLetter.transform.localRotation = Quaternion.identity;
}
}
// update each letter
float offset = totalWidth / 2f;
totalWidth = 0f;
int currentChild = isDynamic ? 0 : -1;
// when not dynamic, we use CopySerialized to propagate the settings to the instances
var sourceParticle = isDynamic ? null : this.GetComponent<ParticleSystem>();
var sourceParticleRenderer = this.GetComponent<ParticleSystemRenderer>();
for (int i = 0; i < text.Length; i++)
{
var letter = text[i];
if (char.IsWhiteSpace(letter))
{
totalWidth += letterSpacing * size;
}
else
{
currentChild++;
int index = font.CharSequence.IndexOf(text[i]);
var sprite = font.CharSprites[index];
// calculate char particle size ratio
var ratio = size * sprite.rect.width / 50f;
// calculate char position
totalWidth += font.CharKerningOffsets[index].pre * 0.01f * size;
var position = (totalWidth - offset) / ratio;
float charWidth = sprite.rect.width + font.CharKerningOffsets[index].post;
totalWidth += (charWidth * 0.01f + letterSpacing) * size;
// update particle system for this letter
var letterObj = this.transform.GetChild(currentChild).gameObject;
letterObj.name = letter.ToString();
var ps = letterObj.GetComponent<ParticleSystem>();
#if UNITY_EDITOR
if (!isDynamic)
{
EditorUtility.CopySerialized(sourceParticle, ps);
ps.gameObject.SetActive(true);
}
#endif
var mainModule = ps.main;
mainModule.startSizeXMultiplier = baseScaleX * ratio;
mainModule.startSizeYMultiplier = baseScaleY * ratio;
mainModule.startSizeZMultiplier = baseScaleZ * ratio;
ps.textureSheetAnimation.SetSprite(0, sprite);
mainModule.startRotation = Mathf.Deg2Rad * rotation;
mainModule.startColor = backgroundColor;
var customData = ps.customData;
customData.enabled = true;
customData.SetColor(ParticleSystemCustomData.Custom1, color1);
customData.SetColor(ParticleSystemCustomData.Custom2, color2);
if (cumulativeDelay)
{
mainModule.startDelay = delay * i;
mainModule.startLifetime = Mathf.LerpUnclamped(baseLifetime, baseLifetime + (delay * (text.Length - i)), compensateLifetime / lifetimeMultiplier);
}
else
{
mainModule.startDelay = delay;
}
mainModule.startLifetime = mainModule.startLifetime.constant * lifetimeMultiplier;
// particle system renderer parameters
var particleRenderer = ps.GetComponent<ParticleSystemRenderer>();
#if UNITY_EDITOR
if (!isDynamic)
{
EditorUtility.CopySerialized(sourceParticleRenderer, particleRenderer);
}
#endif
particleRenderer.enabled = true;
particleRenderer.pivot = new Vector3(basePivot.x + position, basePivot.y, basePivot.z);
particleRenderer.sortingFudge += i * sortingFudgeOffset;
}
}
}
// set active state for needed letters only
for (int i = 1, l = this.transform.childCount; i < l; i++)
{
this.transform.GetChild(i).gameObject.SetActive(i <= charCount);
}
#if UNITY_EDITOR
// automatically play the effect in Editor
if (!Application.isPlaying)
{
this.GetComponent<ParticleSystem>().Clear(true);
this.GetComponent<ParticleSystem>().Play(true);
}
#endif
}
}
#if UNITY_EDITOR
[CustomEditor(typeof(CFXR_ParticleText))]
public class ParticleTextEditor : Editor
{
CFXR_ParticleText CastTarget
{
get { return (CFXR_ParticleText) this.target; }
}
GUIContent GUIContent_AutoUpdateToggle = new GUIContent("Auto-update", "Automatically regenerate the text when a property is changed.");
GUIContent GUIContent_UpdateTextButton = new GUIContent(" Update Text ", "Regenerate the text and create new letter GameObjects if needed.");
public override void OnInspectorGUI()
{
var prefab = PrefabUtility.GetPrefabInstanceStatus(target);
if (prefab != PrefabInstanceStatus.NotAPrefab)
{
EditorGUILayout.HelpBox("Cartoon FX Particle Text doesn't work on Prefab Instances, as it needs to destroy/create children GameObjects.\nYou can right-click on the object, and select \"Unpack Prefab\" to make it an independent Game Object.",
MessageType.Warning);
return;
}
base.OnInspectorGUI();
serializedObject.Update();
SerializedProperty autoUpdateBool = serializedObject.FindProperty("autoUpdateEditor");
GUILayout.Space(8);
GUILayout.BeginHorizontal();
{
GUILayout.FlexibleSpace();
autoUpdateBool.boolValue = GUILayout.Toggle(autoUpdateBool.boolValue, GUIContent_AutoUpdateToggle, GUILayout.Height(30));
if (GUILayout.Button(GUIContent_UpdateTextButton, GUILayout.Height(30)))
{
CastTarget.UpdateText(null);
}
}
GUILayout.EndHorizontal();
if (GUI.changed)
{
serializedObject.ApplyModifiedProperties();
}
}
}
#endif
}

View File

@ -1,128 +1,128 @@
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace CartoonFX
{
public class CFXR_ParticleTextFontAsset : ScriptableObject
{
public enum LetterCase
{
Both,
Upper,
Lower
}
public string CharSequence = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!?-.#@$ ";
public LetterCase letterCase = LetterCase.Upper;
public Sprite[] CharSprites;
public Kerning[] CharKerningOffsets;
[System.Serializable]
public class Kerning
{
public string name = "A";
public float pre = 0f;
public float post = 0f;
}
void OnValidate()
{
this.hideFlags = HideFlags.None;
if (CharKerningOffsets == null || CharKerningOffsets.Length != CharSequence.Length)
{
CharKerningOffsets = new Kerning[CharSequence.Length];
for (int i = 0; i < CharKerningOffsets.Length; i++)
{
CharKerningOffsets[i] = new Kerning() { name = CharSequence[i].ToString() };
}
}
}
public bool IsValid()
{
bool valid = !string.IsNullOrEmpty(CharSequence) && CharSprites != null && CharSprites.Length == CharSequence.Length && CharKerningOffsets != null && CharKerningOffsets.Length == CharSprites.Length;
if (!valid)
{
Debug.LogError(string.Format("Invalid ParticleTextFontAsset: '{0}'\n", this.name), this);
}
return valid;
}
#if UNITY_EDITOR
// [MenuItem("Tools/Create font asset")]
static void CreateFontAsset()
{
var instance = CreateInstance<CFXR_ParticleTextFontAsset>();
AssetDatabase.CreateAsset(instance, "Assets/Font.asset");
}
#endif
}
#if UNITY_EDITOR
[CustomEditor(typeof(CFXR_ParticleTextFontAsset))]
public class ParticleTextFontAssetEditor : Editor
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
GUILayout.BeginHorizontal();
if (GUILayout.Button("Export Kerning"))
{
var ptfa = this.target as CFXR_ParticleTextFontAsset;
var path = EditorUtility.SaveFilePanel("Export Kerning Settings", Application.dataPath, ptfa.name + " kerning", ".txt");
if (!string.IsNullOrEmpty(path))
{
string output = "";
foreach (var k in ptfa.CharKerningOffsets)
{
output += k.name + "\t" + k.pre + "\t" + k.post + "\n";
}
System.IO.File.WriteAllText(path, output);
}
}
if (GUILayout.Button("Import Kerning"))
{
var path = EditorUtility.OpenFilePanel("Import Kerning Settings", Application.dataPath, "txt");
if (!string.IsNullOrEmpty(path))
{
var text = System.IO.File.ReadAllText(path);
var split = text.Split(new string[] { "\n" }, System.StringSplitOptions.RemoveEmptyEntries);
var ptfa = this.target as CFXR_ParticleTextFontAsset;
Undo.RecordObject(ptfa, "Import Kerning Settings");
List<CFXR_ParticleTextFontAsset.Kerning> kerningList = new List<CFXR_ParticleTextFontAsset.Kerning>(ptfa.CharKerningOffsets);
for (int i = 0; i < split.Length; i++)
{
var data = split[i].Split('\t');
foreach (var cko in kerningList)
{
if (cko.name == data[0])
{
cko.pre = float.Parse(data[1]);
cko.post = float.Parse(data[2]);
break;
}
}
}
ptfa.CharKerningOffsets = kerningList.ToArray();
}
}
GUILayout.EndHorizontal();
}
}
#endif
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace CartoonFX
{
public class CFXR_ParticleTextFontAsset : ScriptableObject
{
public enum LetterCase
{
Both,
Upper,
Lower
}
public string CharSequence = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!?-.#@$ ";
public LetterCase letterCase = LetterCase.Upper;
public Sprite[] CharSprites;
public Kerning[] CharKerningOffsets;
[System.Serializable]
public class Kerning
{
public string name = "A";
public float pre = 0f;
public float post = 0f;
}
void OnValidate()
{
this.hideFlags = HideFlags.None;
if (CharKerningOffsets == null || CharKerningOffsets.Length != CharSequence.Length)
{
CharKerningOffsets = new Kerning[CharSequence.Length];
for (int i = 0; i < CharKerningOffsets.Length; i++)
{
CharKerningOffsets[i] = new Kerning() { name = CharSequence[i].ToString() };
}
}
}
public bool IsValid()
{
bool valid = !string.IsNullOrEmpty(CharSequence) && CharSprites != null && CharSprites.Length == CharSequence.Length && CharKerningOffsets != null && CharKerningOffsets.Length == CharSprites.Length;
if (!valid)
{
Debug.LogError(string.Format("Invalid ParticleTextFontAsset: '{0}'\n", this.name), this);
}
return valid;
}
#if UNITY_EDITOR
// [MenuItem("Tools/Create font asset")]
static void CreateFontAsset()
{
var instance = CreateInstance<CFXR_ParticleTextFontAsset>();
AssetDatabase.CreateAsset(instance, "Assets/Font.asset");
}
#endif
}
#if UNITY_EDITOR
[CustomEditor(typeof(CFXR_ParticleTextFontAsset))]
public class ParticleTextFontAssetEditor : Editor
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
GUILayout.BeginHorizontal();
if (GUILayout.Button("Export Kerning"))
{
var ptfa = this.target as CFXR_ParticleTextFontAsset;
var path = EditorUtility.SaveFilePanel("Export Kerning Settings", Application.dataPath, ptfa.name + " kerning", ".txt");
if (!string.IsNullOrEmpty(path))
{
string output = "";
foreach (var k in ptfa.CharKerningOffsets)
{
output += k.name + "\t" + k.pre + "\t" + k.post + "\n";
}
System.IO.File.WriteAllText(path, output);
}
}
if (GUILayout.Button("Import Kerning"))
{
var path = EditorUtility.OpenFilePanel("Import Kerning Settings", Application.dataPath, "txt");
if (!string.IsNullOrEmpty(path))
{
var text = System.IO.File.ReadAllText(path);
var split = text.Split(new string[] { "\n" }, System.StringSplitOptions.RemoveEmptyEntries);
var ptfa = this.target as CFXR_ParticleTextFontAsset;
Undo.RecordObject(ptfa, "Import Kerning Settings");
List<CFXR_ParticleTextFontAsset.Kerning> kerningList = new List<CFXR_ParticleTextFontAsset.Kerning>(ptfa.CharKerningOffsets);
for (int i = 0; i < split.Length; i++)
{
var data = split[i].Split('\t');
foreach (var cko in kerningList)
{
if (cko.name == data[0])
{
cko.pre = float.Parse(data[1]);
cko.post = float.Parse(data[2]);
break;
}
}
}
ptfa.CharKerningOffsets = kerningList.ToArray();
}
}
GUILayout.EndHorizontal();
}
}
#endif
}

View File

@ -1,176 +1,176 @@
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
Shader "Cartoon FX/Remaster/Particle Screen Distortion"
{
Properties
{
[Toggle(_ALPHATEST_ON)] _UseAlphaClip ("Alpha Clipping (Cutout)", Float) = 0
//# IF_KEYWORD _ALPHATEST_ON
_Cutoff ("Cutoff Threshold", Range(0.001,1)) = 0.1
//# END_IF
//# --------------------------------------------------------
[Toggle(_FADING_ON)] _UseSP ("Soft Particles", Float) = 0
//# IF_KEYWORD _FADING_ON
_SoftParticlesFadeDistanceNear ("Near Fade", Float) = 0
_SoftParticlesFadeDistanceFar ("Far Fade", Float) = 1
//# END_IF
//#
[Toggle(_CFXR_EDGE_FADING)] _UseEF ("Edge Fade", Float) = 0
//# IF_KEYWORD _CFXR_EDGE_FADING
_EdgeFadePow ("Edge Fade Power", Float) = 1
//# END_IF
//# ========================================================
//# Texture
//#
[NoScaleOffset] _ScreenDistortionTex ("Distortion Texture", 2D) = "bump" {}
_ScreenDistortionScale ("Distortion Scale", Range(-0.5, 0.5)) = 0.1
//# ========================================================
//# Debug
//#
[Toggle(_DEBUG_VISUALIZE_DISTORTION)] _DebugVisualize ("Visualize Distortion Particles", Float) = 0
}
Category
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
}
Blend SrcAlpha OneMinusSrcAlpha, One One
ZWrite Off
Cull Off
//====================================================================================================================================
// Universal Rendering Pipeline
Subshader
{
Pass
{
Name "BASE_URP"
Tags { "LightMode"="UniversalForward" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:ParticleInstancingSetup
#pragma multi_compile_fog
//#pragma multi_compile_fwdbase
//#pragma multi_compile SHADOWS_SCREEN
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _DEBUG_VISUALIZE_DISTORTION
#define CFXR_URP
#define CFXR_SCREEN_DISTORTION_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
// Same as above with 'Universal2D' instead and DISABLE_SOFT_PARTICLES keyword
Pass
{
Name "BASE_URP"
Tags { "LightMode"="Universal2D" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:ParticleInstancingSetup
#pragma multi_compile_fog
//#pragma multi_compile_fwdbase
//#pragma multi_compile SHADOWS_SCREEN
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _DEBUG_VISUALIZE_DISTORTION
#define CFXR_URP
#define DISABLE_SOFT_PARTICLES
#define CFXR_SCREEN_DISTORTION_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
//====================================================================================================================================
// Built-in Rendering Pipeline
SubShader
{
GrabPass
{
Tags { "LightMode" = "Always" }
"_GrabTexture"
}
Pass
{
Name "BASE"
Tags { "LightMode"="ForwardBase" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
//vertInstancingSetup writes to global, not allowed with DXC
// #pragma never_use_dxc
// #pragma target 2.5
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:vertInstancingSetup
#pragma multi_compile_particles
#pragma multi_compile_fog
//#pragma multi_compile_fwdbase
//#pragma multi_compile SHADOWS_SCREEN
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _DEBUG_VISUALIZE_DISTORTION
#include "UnityStandardParticleInstancing.cginc"
#define CFXR_SCREEN_DISTORTION_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
}
CustomEditor "CartoonFX.MaterialInspector"
}
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
Shader "Cartoon FX/Remaster/Particle Screen Distortion"
{
Properties
{
[Toggle(_ALPHATEST_ON)] _UseAlphaClip ("Alpha Clipping (Cutout)", Float) = 0
//# IF_KEYWORD _ALPHATEST_ON
_Cutoff ("Cutoff Threshold", Range(0.001,1)) = 0.1
//# END_IF
//# --------------------------------------------------------
[Toggle(_FADING_ON)] _UseSP ("Soft Particles", Float) = 0
//# IF_KEYWORD _FADING_ON
_SoftParticlesFadeDistanceNear ("Near Fade", Float) = 0
_SoftParticlesFadeDistanceFar ("Far Fade", Float) = 1
//# END_IF
//#
[Toggle(_CFXR_EDGE_FADING)] _UseEF ("Edge Fade", Float) = 0
//# IF_KEYWORD _CFXR_EDGE_FADING
_EdgeFadePow ("Edge Fade Power", Float) = 1
//# END_IF
//# ========================================================
//# Texture
//#
[NoScaleOffset] _ScreenDistortionTex ("Distortion Texture", 2D) = "bump" {}
_ScreenDistortionScale ("Distortion Scale", Range(-0.5, 0.5)) = 0.1
//# ========================================================
//# Debug
//#
[Toggle(_DEBUG_VISUALIZE_DISTORTION)] _DebugVisualize ("Visualize Distortion Particles", Float) = 0
}
Category
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
}
Blend SrcAlpha OneMinusSrcAlpha, One One
ZWrite Off
Cull Off
//====================================================================================================================================
// Universal Rendering Pipeline
Subshader
{
Pass
{
Name "BASE_URP"
Tags { "LightMode"="UniversalForward" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:ParticleInstancingSetup
#pragma multi_compile_fog
//#pragma multi_compile_fwdbase
//#pragma multi_compile SHADOWS_SCREEN
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _DEBUG_VISUALIZE_DISTORTION
#define CFXR_URP
#define CFXR_SCREEN_DISTORTION_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
// Same as above with 'Universal2D' instead and DISABLE_SOFT_PARTICLES keyword
Pass
{
Name "BASE_URP"
Tags { "LightMode"="Universal2D" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:ParticleInstancingSetup
#pragma multi_compile_fog
//#pragma multi_compile_fwdbase
//#pragma multi_compile SHADOWS_SCREEN
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _DEBUG_VISUALIZE_DISTORTION
#define CFXR_URP
#define DISABLE_SOFT_PARTICLES
#define CFXR_SCREEN_DISTORTION_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
//====================================================================================================================================
// Built-in Rendering Pipeline
SubShader
{
GrabPass
{
Tags { "LightMode" = "Always" }
"_GrabTexture"
}
Pass
{
Name "BASE"
Tags { "LightMode"="ForwardBase" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
//vertInstancingSetup writes to global, not allowed with DXC
// #pragma never_use_dxc
// #pragma target 2.5
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:vertInstancingSetup
#pragma multi_compile_particles
#pragma multi_compile_fog
//#pragma multi_compile_fwdbase
//#pragma multi_compile SHADOWS_SCREEN
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _DEBUG_VISUALIZE_DISTORTION
#include "UnityStandardParticleInstancing.cginc"
#define CFXR_SCREEN_DISTORTION_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
}
CustomEditor "CartoonFX.MaterialInspector"
}

View File

@ -1,274 +1,274 @@
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
Shader "Cartoon FX/Remaster/Particle Procedural Glow"
{
Properties
{
//# Blending
//#
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Blend Source", Float) = 5
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Blend Destination", Float) = 10
//# --------------------------------------------------------
[Toggle(_CFXR_DISSOLVE)] _UseDissolve ("Enable Dissolve", Float) = 0
//# IF_KEYWORD _CFXR_DISSOLVE
[NoScaleOffset] _DissolveTex ("Dissolve Texture", 2D) = "gray" {}
_DissolveSmooth ("Dissolve Smoothing", Range(0.0001,0.5)) = 0.1
[ToggleNoKeyword] _InvertDissolveTex ("Invert Dissolve Texture", Float) = 0
//# END_IF
//# --------------------------------------------------------
//# Procedural Circle
//#
[KeywordEnum(P0, P2, P4, P8)] _CFXR_GLOW_POW ("Apply Power of", Float) = 0
_GlowMin ("Circle Min", Float) = 0
_GlowMax ("Circle Max", Float) = 1
//#
_MaxValue ("Max Value", Float) = 10
//# --------------------------------------------------------
[Toggle(_CFXR_HDR_BOOST)] _HdrBoost ("Enable HDR Multiplier", Float) = 0
//# IF_KEYWORD _CFXR_HDR_BOOST
_HdrMultiply ("HDR Multiplier", Float) = 2
//# END_IF
//# --------------------------------------------------------
[Toggle(_FADING_ON)] _UseSP ("Soft Particles", Float) = 0
//# IF_KEYWORD _FADING_ON
_SoftParticlesFadeDistanceNear ("Near Fade", Float) = 0
_SoftParticlesFadeDistanceFar ("Far Fade", Float) = 1
//# END_IF
//# ========================================================
//# Shadows
//#
[KeywordEnum(Off,On,CustomTexture)] _CFXR_DITHERED_SHADOWS ("Dithered Shadows", Float) = 0
//# IF_KEYWORD _CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
_ShadowStrength ("Shadows Strength Max", Range(0,1)) = 1.0
//# IF_KEYWORD _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
_DitherCustom ("Dithering 3D Texture", 3D) = "black" {}
//# END_IF
//# END_IF
}
Category
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
}
Blend [_SrcBlend] [_DstBlend], One One
Cull Off
ZWrite Off
//====================================================================================================================================
// Universal Rendering Pipeline
SubShader
{
Pass
{
Name "BASE"
Tags { "LightMode"="UniversalForward" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:ParticleInstancingSetup
#pragma multi_compile_fog
#pragma shader_feature_local _ _CFXR_GLOW_POW_P2 _CFXR_GLOW_POW_P4 _CFXR_GLOW_POW_P8
#pragma shader_feature_local _ _CFXR_HDR_BOOST
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#define CFXR_URP
#define CFXR_GLOW_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
// Same as above with 'Universal2D' instead and DISABLE_SOFT_PARTICLES keyword
Pass
{
Name "BASE"
Tags { "LightMode"="Universal2D" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:ParticleInstancingSetup
#pragma multi_compile_fog
#pragma shader_feature_local _ _CFXR_GLOW_POW_P2 _CFXR_GLOW_POW_P4 _CFXR_GLOW_POW_P8
#pragma shader_feature_local _ _CFXR_HDR_BOOST
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#define CFXR_URP
#define DISABLE_SOFT_PARTICLES
#define CFXR_GLOW_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
//--------------------------------------------------------------------------------------------------------------------------------
Pass
{
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma shader_feature_local _ _CFXR_GLOW_POW_P2 _CFXR_GLOW_POW_P4 _CFXR_GLOW_POW_P8
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON
#pragma multi_compile_shadowcaster
#pragma shader_feature_local _ _CFXR_DITHERED_SHADOWS_ON _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
#if (_CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE) && !defined(SHADER_API_GLES)
#pragma target 3.0 //needed for VPOS
#endif
#define CFXR_URP
#define PASS_SHADOW_CASTER
#define CFXR_GLOW_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
//====================================================================================================================================
// Built-in Rendering Pipeline
SubShader
{
Pass
{
Name "BASE"
Tags { "LightMode"="ForwardBase" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
//vertInstancingSetup writes to global, not allowed with DXC
// #pragma never_use_dxc
// #pragma target 2.5
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:vertInstancingSetup
#pragma multi_compile_particles
#pragma multi_compile_fog
#pragma shader_feature_local _ _CFXR_GLOW_POW_P2 _CFXR_GLOW_POW_P4 _CFXR_GLOW_POW_P8
#pragma shader_feature_local _ _CFXR_HDR_BOOST
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#include "UnityStandardParticleInstancing.cginc"
#define CFXR_GLOW_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
//--------------------------------------------------------------------------------------------------------------------------------
Pass
{
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
//vertInstancingSetup writes to global, not allowed with DXC
// #pragma never_use_dxc
// #pragma target 2.5
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:vertInstancingSetup
#pragma shader_feature_local _ _CFXR_GLOW_POW_P2 _CFXR_GLOW_POW_P4 _CFXR_GLOW_POW_P8
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON
#pragma multi_compile_shadowcaster
#pragma shader_feature_local _ _CFXR_DITHERED_SHADOWS_ON _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
#if (_CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE) && !defined(SHADER_API_GLES)
#pragma target 3.0 //needed for VPOS
#endif
#include "UnityStandardParticleInstancing.cginc"
#define PASS_SHADOW_CASTER
#define CFXR_GLOW_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
}
CustomEditor "CartoonFX.MaterialInspector"
}
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
Shader "Cartoon FX/Remaster/Particle Procedural Glow"
{
Properties
{
//# Blending
//#
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Blend Source", Float) = 5
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Blend Destination", Float) = 10
//# --------------------------------------------------------
[Toggle(_CFXR_DISSOLVE)] _UseDissolve ("Enable Dissolve", Float) = 0
//# IF_KEYWORD _CFXR_DISSOLVE
[NoScaleOffset] _DissolveTex ("Dissolve Texture", 2D) = "gray" {}
_DissolveSmooth ("Dissolve Smoothing", Range(0.0001,0.5)) = 0.1
[ToggleNoKeyword] _InvertDissolveTex ("Invert Dissolve Texture", Float) = 0
//# END_IF
//# --------------------------------------------------------
//# Procedural Circle
//#
[KeywordEnum(P0, P2, P4, P8)] _CFXR_GLOW_POW ("Apply Power of", Float) = 0
_GlowMin ("Circle Min", Float) = 0
_GlowMax ("Circle Max", Float) = 1
//#
_MaxValue ("Max Value", Float) = 10
//# --------------------------------------------------------
[Toggle(_CFXR_HDR_BOOST)] _HdrBoost ("Enable HDR Multiplier", Float) = 0
//# IF_KEYWORD _CFXR_HDR_BOOST
_HdrMultiply ("HDR Multiplier", Float) = 2
//# END_IF
//# --------------------------------------------------------
[Toggle(_FADING_ON)] _UseSP ("Soft Particles", Float) = 0
//# IF_KEYWORD _FADING_ON
_SoftParticlesFadeDistanceNear ("Near Fade", Float) = 0
_SoftParticlesFadeDistanceFar ("Far Fade", Float) = 1
//# END_IF
//# ========================================================
//# Shadows
//#
[KeywordEnum(Off,On,CustomTexture)] _CFXR_DITHERED_SHADOWS ("Dithered Shadows", Float) = 0
//# IF_KEYWORD _CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
_ShadowStrength ("Shadows Strength Max", Range(0,1)) = 1.0
//# IF_KEYWORD _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
_DitherCustom ("Dithering 3D Texture", 3D) = "black" {}
//# END_IF
//# END_IF
}
Category
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
}
Blend [_SrcBlend] [_DstBlend], One One
Cull Off
ZWrite Off
//====================================================================================================================================
// Universal Rendering Pipeline
SubShader
{
Pass
{
Name "BASE"
Tags { "LightMode"="UniversalForward" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:ParticleInstancingSetup
#pragma multi_compile_fog
#pragma shader_feature_local _ _CFXR_GLOW_POW_P2 _CFXR_GLOW_POW_P4 _CFXR_GLOW_POW_P8
#pragma shader_feature_local _ _CFXR_HDR_BOOST
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#define CFXR_URP
#define CFXR_GLOW_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
// Same as above with 'Universal2D' instead and DISABLE_SOFT_PARTICLES keyword
Pass
{
Name "BASE"
Tags { "LightMode"="Universal2D" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:ParticleInstancingSetup
#pragma multi_compile_fog
#pragma shader_feature_local _ _CFXR_GLOW_POW_P2 _CFXR_GLOW_POW_P4 _CFXR_GLOW_POW_P8
#pragma shader_feature_local _ _CFXR_HDR_BOOST
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#define CFXR_URP
#define DISABLE_SOFT_PARTICLES
#define CFXR_GLOW_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
//--------------------------------------------------------------------------------------------------------------------------------
Pass
{
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma shader_feature_local _ _CFXR_GLOW_POW_P2 _CFXR_GLOW_POW_P4 _CFXR_GLOW_POW_P8
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON
#pragma multi_compile_shadowcaster
#pragma shader_feature_local _ _CFXR_DITHERED_SHADOWS_ON _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
#if (_CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE) && !defined(SHADER_API_GLES)
#pragma target 3.0 //needed for VPOS
#endif
#define CFXR_URP
#define PASS_SHADOW_CASTER
#define CFXR_GLOW_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
//====================================================================================================================================
// Built-in Rendering Pipeline
SubShader
{
Pass
{
Name "BASE"
Tags { "LightMode"="ForwardBase" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
//vertInstancingSetup writes to global, not allowed with DXC
// #pragma never_use_dxc
// #pragma target 2.5
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:vertInstancingSetup
#pragma multi_compile_particles
#pragma multi_compile_fog
#pragma shader_feature_local _ _CFXR_GLOW_POW_P2 _CFXR_GLOW_POW_P4 _CFXR_GLOW_POW_P8
#pragma shader_feature_local _ _CFXR_HDR_BOOST
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#include "UnityStandardParticleInstancing.cginc"
#define CFXR_GLOW_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
//--------------------------------------------------------------------------------------------------------------------------------
Pass
{
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
//vertInstancingSetup writes to global, not allowed with DXC
// #pragma never_use_dxc
// #pragma target 2.5
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:vertInstancingSetup
#pragma shader_feature_local _ _CFXR_GLOW_POW_P2 _CFXR_GLOW_POW_P4 _CFXR_GLOW_POW_P8
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON
#pragma multi_compile_shadowcaster
#pragma shader_feature_local _ _CFXR_DITHERED_SHADOWS_ON _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
#if (_CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE) && !defined(SHADER_API_GLES)
#pragma target 3.0 //needed for VPOS
#endif
#include "UnityStandardParticleInstancing.cginc"
#define PASS_SHADOW_CASTER
#define CFXR_GLOW_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
}
CustomEditor "CartoonFX.MaterialInspector"
}

View File

@ -1,276 +1,276 @@
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
Shader "Cartoon FX/Remaster/Particle Procedural Ring"
{
Properties
{
//# Blending
//#
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Blend Source", Float) = 5
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Blend Destination", Float) = 10
//# --------------------------------------------------------
[Toggle(_CFXR_DISSOLVE)] _UseDissolve ("Enable Dissolve", Float) = 0
//# IF_KEYWORD _CFXR_DISSOLVE
[NoScaleOffset] _DissolveTex ("Dissolve Texture", 2D) = "gray" {}
_DissolveSmooth ("Dissolve Smoothing", Range(0.0001,0.5)) = 0.1
[ToggleNoKeyword] _InvertDissolveTex ("Invert Dissolve Texture", Float) = 0
//# END_IF
//# --------------------------------------------------------
//# Textures
//#
_MainTex ("Texture", 2D) = "white" {}
[Toggle(_CFXR_SINGLE_CHANNEL)] _SingleChannel ("Single Channel Texture", Float) = 0
//# --------------------------------------------------------
//# Ring
//#
[Toggle(_CFXR_RADIAL_UV)] _UseRadialUV ("Enable Radial UVs", Float) = 0
_RingTopOffset ("Ring Offset", float) = 0.05
[Toggle(_CFXR_WORLD_SPACE_RING)] _WorldSpaceRing ("World Space", Float) = 0
//# --------------------------------------------------------
[Toggle(_CFXR_HDR_BOOST)] _HdrBoost ("Enable HDR Multiplier", Float) = 0
//# IF_KEYWORD _CFXR_HDR_BOOST
_HdrMultiply ("HDR Multiplier", Float) = 2
//# END_IF
//# --------------------------------------------------------
[Toggle(_FADING_ON)] _UseSP ("Soft Particles", Float) = 0
//# IF_KEYWORD _FADING_ON
_SoftParticlesFadeDistanceNear ("Near Fade", Float) = 0
_SoftParticlesFadeDistanceFar ("Far Fade", Float) = 1
//# END_IF
//# ========================================================
//# Shadows
//#
[KeywordEnum(Off,On,CustomTexture)] _CFXR_DITHERED_SHADOWS ("Dithered Shadows", Float) = 0
//# IF_KEYWORD _CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
_ShadowStrength ("Shadows Strength Max", Range(0,1)) = 1.0
//# IF_KEYWORD _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
_DitherCustom ("Dithering 3D Texture", 3D) = "black" {}
//# END_IF
//# END_IF
}
Category
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Blend [_SrcBlend] [_DstBlend]
Cull Off
ZWrite Off
//====================================================================================================================================
// Universal Rendering Pipeline
SubShader
{
Pass
{
Name "BASE"
Tags { "LightMode"="UniversalForward" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
#pragma multi_compile_fog
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_RADIAL_UV
#pragma shader_feature_local _ _CFXR_WORLD_SPACE_RING
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_HDR_BOOST
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#define CFXR_URP
#define CFXR_PROCEDURAL_RING_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
// Same as above with 'Universal2D' instead and DISABLE_SOFT_PARTICLES keyword
Pass
{
Name "BASE"
Tags { "LightMode"="Universal2D" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
#pragma multi_compile_fog
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_RADIAL_UV
#pragma shader_feature_local _ _CFXR_WORLD_SPACE_RING
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_HDR_BOOST
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#define CFXR_URP
#define DISABLE_SOFT_PARTICLES
#define CFXR_PROCEDURAL_RING_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
//--------------------------------------------------------------------------------------------------------------------------------
Pass
{
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_RADIAL_UV
#pragma shader_feature_local _ _CFXR_WORLD_SPACE_RING
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#pragma multi_compile_shadowcaster
#pragma shader_feature_local _ _CFXR_DITHERED_SHADOWS_ON _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
#if (_CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE) && !defined(SHADER_API_GLES)
#pragma target 3.0 //needed for VPOS
#endif
#define CFXR_URP
#define PASS_SHADOW_CASTER
#define CFXR_PROCEDURAL_RING_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
//====================================================================================================================================
// Built-in Rendering Pipeline
SubShader
{
Pass
{
Name "BASE"
Tags { "LightMode"="ForwardBase" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
#pragma multi_compile_particles
// #pragma multi_compile_instancing
#pragma multi_compile_fog
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_RADIAL_UV
#pragma shader_feature_local _ _CFXR_WORLD_SPACE_RING
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_HDR_BOOST
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#define CFXR_PROCEDURAL_RING_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
//--------------------------------------------------------------------------------------------------------------------------------
Pass
{
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_RADIAL_UV
#pragma shader_feature_local _ _CFXR_WORLD_SPACE_RING
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#pragma multi_compile_shadowcaster
#pragma shader_feature_local _ _CFXR_DITHERED_SHADOWS_ON _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
#if (_CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE) && !defined(SHADER_API_GLES)
#pragma target 3.0 //needed for VPOS
#endif
#define PASS_SHADOW_CASTER
#define CFXR_PROCEDURAL_RING_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
}
CustomEditor "CartoonFX.MaterialInspector"
}
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
Shader "Cartoon FX/Remaster/Particle Procedural Ring"
{
Properties
{
//# Blending
//#
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Blend Source", Float) = 5
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Blend Destination", Float) = 10
//# --------------------------------------------------------
[Toggle(_CFXR_DISSOLVE)] _UseDissolve ("Enable Dissolve", Float) = 0
//# IF_KEYWORD _CFXR_DISSOLVE
[NoScaleOffset] _DissolveTex ("Dissolve Texture", 2D) = "gray" {}
_DissolveSmooth ("Dissolve Smoothing", Range(0.0001,0.5)) = 0.1
[ToggleNoKeyword] _InvertDissolveTex ("Invert Dissolve Texture", Float) = 0
//# END_IF
//# --------------------------------------------------------
//# Textures
//#
_MainTex ("Texture", 2D) = "white" {}
[Toggle(_CFXR_SINGLE_CHANNEL)] _SingleChannel ("Single Channel Texture", Float) = 0
//# --------------------------------------------------------
//# Ring
//#
[Toggle(_CFXR_RADIAL_UV)] _UseRadialUV ("Enable Radial UVs", Float) = 0
_RingTopOffset ("Ring Offset", float) = 0.05
[Toggle(_CFXR_WORLD_SPACE_RING)] _WorldSpaceRing ("World Space", Float) = 0
//# --------------------------------------------------------
[Toggle(_CFXR_HDR_BOOST)] _HdrBoost ("Enable HDR Multiplier", Float) = 0
//# IF_KEYWORD _CFXR_HDR_BOOST
_HdrMultiply ("HDR Multiplier", Float) = 2
//# END_IF
//# --------------------------------------------------------
[Toggle(_FADING_ON)] _UseSP ("Soft Particles", Float) = 0
//# IF_KEYWORD _FADING_ON
_SoftParticlesFadeDistanceNear ("Near Fade", Float) = 0
_SoftParticlesFadeDistanceFar ("Far Fade", Float) = 1
//# END_IF
//# ========================================================
//# Shadows
//#
[KeywordEnum(Off,On,CustomTexture)] _CFXR_DITHERED_SHADOWS ("Dithered Shadows", Float) = 0
//# IF_KEYWORD _CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
_ShadowStrength ("Shadows Strength Max", Range(0,1)) = 1.0
//# IF_KEYWORD _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
_DitherCustom ("Dithering 3D Texture", 3D) = "black" {}
//# END_IF
//# END_IF
}
Category
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Blend [_SrcBlend] [_DstBlend]
Cull Off
ZWrite Off
//====================================================================================================================================
// Universal Rendering Pipeline
SubShader
{
Pass
{
Name "BASE"
Tags { "LightMode"="UniversalForward" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
#pragma multi_compile_fog
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_RADIAL_UV
#pragma shader_feature_local _ _CFXR_WORLD_SPACE_RING
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_HDR_BOOST
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#define CFXR_URP
#define CFXR_PROCEDURAL_RING_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
// Same as above with 'Universal2D' instead and DISABLE_SOFT_PARTICLES keyword
Pass
{
Name "BASE"
Tags { "LightMode"="Universal2D" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
#pragma multi_compile_fog
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_RADIAL_UV
#pragma shader_feature_local _ _CFXR_WORLD_SPACE_RING
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_HDR_BOOST
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#define CFXR_URP
#define DISABLE_SOFT_PARTICLES
#define CFXR_PROCEDURAL_RING_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
//--------------------------------------------------------------------------------------------------------------------------------
Pass
{
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_RADIAL_UV
#pragma shader_feature_local _ _CFXR_WORLD_SPACE_RING
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#pragma multi_compile_shadowcaster
#pragma shader_feature_local _ _CFXR_DITHERED_SHADOWS_ON _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
#if (_CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE) && !defined(SHADER_API_GLES)
#pragma target 3.0 //needed for VPOS
#endif
#define CFXR_URP
#define PASS_SHADOW_CASTER
#define CFXR_PROCEDURAL_RING_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
//====================================================================================================================================
// Built-in Rendering Pipeline
SubShader
{
Pass
{
Name "BASE"
Tags { "LightMode"="ForwardBase" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
#pragma multi_compile_particles
// #pragma multi_compile_instancing
#pragma multi_compile_fog
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_RADIAL_UV
#pragma shader_feature_local _ _CFXR_WORLD_SPACE_RING
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_HDR_BOOST
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#define CFXR_PROCEDURAL_RING_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
//--------------------------------------------------------------------------------------------------------------------------------
Pass
{
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_RADIAL_UV
#pragma shader_feature_local _ _CFXR_WORLD_SPACE_RING
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#pragma multi_compile_shadowcaster
#pragma shader_feature_local _ _CFXR_DITHERED_SHADOWS_ON _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
#if (_CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE) && !defined(SHADER_API_GLES)
#pragma target 3.0 //needed for VPOS
#endif
#define PASS_SHADOW_CASTER
#define CFXR_PROCEDURAL_RING_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
}
CustomEditor "CartoonFX.MaterialInspector"
}

View File

@ -1,449 +1,449 @@
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
Shader "Cartoon FX/Remaster/Particle Ubershader"
{
Properties
{
//# Blending
//#
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Blend Source", Float) = 5
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Blend Destination", Float) = 10
[KeywordEnumNoPrefix(Alpha Blending, _ALPHABLEND_ON, Alpha Blending Premultiplied, _ALPHAPREMULTIPLY_ON, Multiplicative, _ALPHAMODULATE_ON, Additive, _CFXR_ADDITIVE)] _BlendingType ("Blending Type", Float) = 0
//#
[ToggleNoKeyword] _ZWrite ("Depth Write", Float) = 0
[Toggle(_ALPHATEST_ON)] _UseAlphaClip ("Alpha Clipping (Cutout)", Float) = 0
//# IF_KEYWORD _ALPHATEST_ON
_Cutoff ("Cutoff Threshold", Range(0.001,1)) = 0.1
//# END_IF
//# --------------------------------------------------------
[Toggle(_FADING_ON)] _UseSP ("Soft Particles", Float) = 0
//# IF_KEYWORD _FADING_ON
_SoftParticlesFadeDistanceNear ("Near Fade", Float) = 0
_SoftParticlesFadeDistanceFar ("Far Fade", Float) = 1
//# END_IF
//#
[Toggle(_CFXR_EDGE_FADING)] _UseEF ("Edge Fade", Float) = 0
//# IF_KEYWORD _CFXR_EDGE_FADING
_EdgeFadePow ("Edge Fade Power", Float) = 1
//# END_IF
//#
//# ========================================================
//# Effects
//#
[Toggle(_CFXR_DISSOLVE)] _UseDissolve ("Enable Dissolve", Float) = 0
//# IF_KEYWORD _CFXR_DISSOLVE
_DissolveTex ("Dissolve Texture", 2D) = "gray" {}
_DissolveSmooth ("Dissolve Smoothing", Range(0.0001,0.5)) = 0.1
[ToggleNoKeyword] _InvertDissolveTex ("Invert Dissolve Texture", Float) = 0
[ToggleNoKeyword] _DoubleDissolve ("Double Dissolve", Float) = 0
[Toggle(_CFXR_DISSOLVE_ALONG_UV_X)] _UseDissolveOffsetUV ("Dissolve offset along X", Float) = 0
//# IF_KEYWORD _CFXR_DISSOLVE_ALONG_UV_X
_DissolveScroll ("UV Scrolling", Vector) = (0,0,0,0)
//# END_IF
//# END_IF
//# --------------------------------------------------------
[Toggle(_CFXR_UV_DISTORTION)] _UseUVDistortion ("Enable UV Distortion", Float) = 0
//# IF_KEYWORD _CFXR_UV_DISTORTION
[NoScaleOffset] _DistortTex ("Distortion Texture", 2D) = "gray" {}
_DistortScrolling ("Scroll (XY) Tile (ZW)", Vector) = (0,0,1,1)
[Toggle(_CFXR_UV2_DISTORTION)] _UseUV2Distortion ("Use UV2", Float) = 0
_Distort ("Distortion Strength", Range(0,2.0)) = 0.1
[ToggleNoKeyword] _FadeAlongU ("Fade along Y", Float) = 0
[Toggle(_CFXR_UV_DISTORTION_ADD)] _UVDistortionAdd ("Add to base UV", Float) = 0
//# END_IF
//# ========================================================
//# Colors
//#
[NoScaleOffset] _MainTex ("Texture", 2D) = "white" {}
[Toggle(_CFXR_SINGLE_CHANNEL)] _SingleChannel ("Single Channel Texture", Float) = 0
//# --------------------------------------------------------
[KeywordEnum(Off,1x,2x)] _CFXR_OVERLAYTEX ("Enable Overlay Texture", Float) = 0
//# IF_KEYWORD _CFXR_OVERLAYTEX_1X || _CFXR_OVERLAYTEX_2X
[KeywordEnum(RGBA,RGB,A)] _CFXR_OVERLAYBLEND ("Overlay Blend Channels", Float) = 0
[NoScaleOffset] _OverlayTex ("Overlay Texture", 2D) = "white" {}
_OverlayTex_Scroll ("Overlay Scrolling / Scale", Vector) = (0.1,0.1,1,1)
//# END_IF
//# --------------------------------------------------------
[Toggle(_FLIPBOOK_BLENDING)] _UseFB ("Flipbook Blending", Float) = 0
//# --------------------------------------------------------
[Toggle(_CFXR_SECONDCOLOR_LERP)] _UseSecondColor ("Secondary Vertex Color (TEXCOORD2)", Float) = 0
//# IF_KEYWORD _CFXR_SECONDCOLOR_LERP
[NoScaleOffset] _SecondColorTex ("Second Color Map", 2D) = "black" {}
_SecondColorSmooth ("Second Color Smoothing", Range(0.0001,0.5)) = 0.2
//# END_IF
//# --------------------------------------------------------
[Toggle(_CFXR_FONT_COLORS)] _UseFontColor ("Use Font Colors", Float) = 0
// //# --------------------------------------------------------
//
// [Toggle(_CFXR_GRADIENTMAP)] _UseGradientMap ("Gradient Map", Float) = 0
// //# IF_KEYWORD _CFXR_GRADIENTMAP
// [NoScaleOffset] _GradientMap ("Gradient Map", 2D) = "black" {}
// //# END_IF
//# --------------------------------------------------------
[Toggle(_CFXR_HDR_BOOST)] _HdrBoost ("Enable HDR Multiplier", Float) = 0
//# IF_KEYWORD _CFXR_HDR_BOOST
_HdrMultiply ("HDR Multiplier", Float) = 2
//# END_IF
//# --------------------------------------------------------
//# Lighting
//#
[KeywordEnumNoPrefix(Off, _, Direct, _CFXR_LIGHTING_DIRECT, Indirect, _CFXR_LIGHTING_INDIRECT, Both, _CFXR_LIGHTING_ALL)] _UseLighting ("Mode", Float) = 0
//# IF_KEYWORD _CFXR_LIGHTING_DIRECT || _CFXR_LIGHTING_ALL
_DirectLightingRamp ("Direct Lighting Ramp", Range(0,1)) = 1.0
//# END_IF
//#
//# IF_KEYWORD _CFXR_LIGHTING_DIRECT || _CFXR_LIGHTING_INDIRECT || _CFXR_LIGHTING_ALL
[Toggle(_NORMALMAP)] _UseNormalMap ("Enable Normal Map", Float) = 0
//# IF_KEYWORD _NORMALMAP
[NoScaleOffset] _BumpMap ("Normal Map", 2D) = "bump" {}
_BumpScale ("Normal Scale", Range(-1, 1)) = 1.0
//# END_IF
//#
[Toggle(_EMISSION)] _UseEmission ("Enable Emission (TEXCOORD2)", Float) = 0
//#
[Toggle(_CFXR_LIGHTING_WPOS_OFFSET)] _UseLightingWorldPosOffset ("Enable World Pos. Offset", Float) = 0
//# IF_KEYWORD _CFXR_LIGHTING_WPOS_OFFSET
_LightingWorldPosStrength ("Offset Strength", Range(0,1)) = 0.2
//# END_IF
//#
[Toggle(_CFXR_LIGHTING_BACK)] _UseBackLighting ("Enable Backlighting", Float) = 0
//# IF_KEYWORD _CFXR_LIGHTING_BACK
_DirLightScreenAtten ("Dir. Light Screen Attenuation", Range(0, 5)) = 1.0
_BacklightTransmittance ("Backlight Transmittance", Range(0, 2)) = 1.0
//# END_IF
//#
//# IF_KEYWORD _CFXR_LIGHTING_INDIRECT || _CFXR_LIGHTING_ALL
_IndirectLightingMix ("Indirect Lighting Mix", Range(0,1)) = 0.5
//# END_IF
_ShadowColor ("Shadow Color", Color) = (0,0,0,1)
//#
//# END_IF
//# ========================================================
//# Shadows
//#
[KeywordEnum(Off,On,CustomTexture)] _CFXR_DITHERED_SHADOWS ("Dithered Shadows", Float) = 0
//# IF_KEYWORD _CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
_ShadowStrength ("Shadows Strength Max", Range(0,1)) = 1.0
//# IF_KEYWORD _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
_DitherCustom ("Dithering 3D Texture", 3D) = "black" {}
//# END_IF
//# END_IF
// _ReceivedShadowsStrength ("Received Shadows Strength", Range(0,1)) = 0.5
}
Category
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
}
Blend [_SrcBlend] [_DstBlend], One One
ZWrite [_ZWrite]
Cull Off
//====================================================================================================================================
// Universal Rendering Pipeline
Subshader
{
Pass
{
Name "BASE_URP"
Tags { "LightMode"="UniversalForward" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:ParticleInstancingSetup
#pragma multi_compile_fog
//#pragma multi_compile_fwdbase
//#pragma multi_compile SHADOWS_SCREEN
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_DISSOLVE_ALONG_UV_X
#pragma shader_feature_local _ _CFXR_UV_DISTORTION
#pragma shader_feature_local _ _CFXR_UV2_DISTORTION
#pragma shader_feature_local _ _CFXR_UV_DISTORTION_ADD
// #pragma shader_feature_local _ _CFXR_GRADIENTMAP
#pragma shader_feature_local _ _CFXR_SECONDCOLOR_LERP _CFXR_FONT_COLORS
#pragma shader_feature_local _ _CFXR_OVERLAYTEX_1X _CFXR_OVERLAYTEX_2X
#pragma shader_feature_local _ _CFXR_OVERLAYBLEND_A _CFXR_OVERLAYBLEND_RGB
#pragma shader_feature_local _ _CFXR_HDR_BOOST
#pragma shader_feature_local _ _CFXR_EDGE_FADING
#pragma shader_feature_local _ _CFXR_LIGHTING_DIRECT _CFXR_LIGHTING_INDIRECT _CFXR_LIGHTING_ALL
#pragma shader_feature_local _ _CFXR_LIGHTING_WPOS_OFFSET
#pragma shader_feature_local _ _CFXR_LIGHTING_BACK
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _NORMALMAP
#pragma shader_feature_local _ _EMISSION
#pragma shader_feature_local _ _FLIPBOOK_BLENDING
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#define CFXR_URP
#define CFXR_UBERSHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
// Same as above with 'Universal2D' instead and DISABLE_SOFT_PARTICLES keyword
Pass
{
Name "BASE_URP"
Tags { "LightMode"="Universal2D" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:ParticleInstancingSetup
#pragma multi_compile_fog
//#pragma multi_compile_fwdbase
//#pragma multi_compile SHADOWS_SCREEN
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_DISSOLVE_ALONG_UV_X
#pragma shader_feature_local _ _CFXR_UV_DISTORTION
#pragma shader_feature_local _ _CFXR_UV2_DISTORTION
#pragma shader_feature_local _ _CFXR_UV_DISTORTION_ADD
// #pragma shader_feature_local _ _CFXR_GRADIENTMAP
#pragma shader_feature_local _ _CFXR_SECONDCOLOR_LERP _CFXR_FONT_COLORS
#pragma shader_feature_local _ _CFXR_OVERLAYTEX_1X _CFXR_OVERLAYTEX_2X
#pragma shader_feature_local _ _CFXR_OVERLAYBLEND_A _CFXR_OVERLAYBLEND_RGB
#pragma shader_feature_local _ _CFXR_HDR_BOOST
#pragma shader_feature_local _ _CFXR_EDGE_FADING
#pragma shader_feature_local _ _CFXR_LIGHTING_DIRECT _CFXR_LIGHTING_INDIRECT _CFXR_LIGHTING_ALL
#pragma shader_feature_local _ _CFXR_LIGHTING_WPOS_OFFSET
#pragma shader_feature_local _ _CFXR_LIGHTING_BACK
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _NORMALMAP
#pragma shader_feature_local _ _EMISSION
#pragma shader_feature_local _ _FLIPBOOK_BLENDING
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#define CFXR_UPR
#define DISABLE_SOFT_PARTICLES
#define CFXR_UBERSHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
//--------------------------------------------------------------------------------------------------------------------------------
Pass
{
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_DISSOLVE_ALONG_UV_X
#pragma shader_feature_local _ _CFXR_UV_DISTORTION
#pragma shader_feature_local _ _CFXR_UV2_DISTORTION
#pragma shader_feature_local _ _CFXR_UV_DISTORTION_ADD
#pragma shader_feature_local _ _CFXR_OVERLAYTEX_1X _CFXR_OVERLAYTEX_2X
#pragma shader_feature_local _ _CFXR_OVERLAYBLEND_A _CFXR_OVERLAYBLEND_RGB
#pragma shader_feature_local _ _FLIPBOOK_BLENDING
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#pragma multi_compile_shadowcaster
#pragma shader_feature_local _ _CFXR_DITHERED_SHADOWS_ON _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
#if (_CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE) && !defined(SHADER_API_GLES)
#pragma target 3.0 //needed for VPOS
#endif
#define CFXR_UPR
#define PASS_SHADOW_CASTER
#define CFXR_UBERSHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
//====================================================================================================================================
// Built-in Rendering Pipeline
SubShader
{
Pass
{
Name "BASE"
Tags { "LightMode"="ForwardBase" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
//vertInstancingSetup writes to global, not allowed with DXC
// #pragma never_use_dxc
// #pragma target 2.5
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:vertInstancingSetup
#pragma multi_compile_particles
#pragma multi_compile_fog
//#pragma multi_compile_fwdbase
//#pragma multi_compile SHADOWS_SCREEN
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_DISSOLVE_ALONG_UV_X
#pragma shader_feature_local _ _CFXR_UV_DISTORTION
#pragma shader_feature_local _ _CFXR_UV2_DISTORTION
#pragma shader_feature_local _ _CFXR_UV_DISTORTION_ADD
// #pragma shader_feature_local _ _CFXR_GRADIENTMAP
#pragma shader_feature_local _ _CFXR_SECONDCOLOR_LERP _CFXR_FONT_COLORS
#pragma shader_feature_local _ _CFXR_OVERLAYTEX_1X _CFXR_OVERLAYTEX_2X
#pragma shader_feature_local _ _CFXR_OVERLAYBLEND_A _CFXR_OVERLAYBLEND_RGB
#pragma shader_feature_local _ _CFXR_HDR_BOOST
#pragma shader_feature_local _ _CFXR_EDGE_FADING
#pragma shader_feature_local _ _CFXR_LIGHTING_DIRECT _CFXR_LIGHTING_INDIRECT _CFXR_LIGHTING_ALL
#pragma shader_feature_local _ _CFXR_LIGHTING_WPOS_OFFSET
#pragma shader_feature_local _ _CFXR_LIGHTING_BACK
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _NORMALMAP
#pragma shader_feature_local _ _EMISSION
#pragma shader_feature_local _ _FLIPBOOK_BLENDING
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#include "UnityStandardParticleInstancing.cginc"
#define CFXR_UBERSHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
//--------------------------------------------------------------------------------------------------------------------------------
Pass
{
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
//vertInstancingSetup writes to global, not allowed with DXC
// #pragma never_use_dxc
// #pragma target 2.5
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:vertInstancingSetup
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_DISSOLVE_ALONG_UV_X
#pragma shader_feature_local _ _CFXR_UV_DISTORTION
#pragma shader_feature_local _ _CFXR_UV2_DISTORTION
#pragma shader_feature_local _ _CFXR_UV_DISTORTION_ADD
#pragma shader_feature_local _ _CFXR_OVERLAYTEX_1X _CFXR_OVERLAYTEX_2X
#pragma shader_feature_local _ _CFXR_OVERLAYBLEND_A _CFXR_OVERLAYBLEND_RGB
#pragma shader_feature_local _ _FLIPBOOK_BLENDING
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#pragma multi_compile_shadowcaster
#pragma shader_feature_local _ _CFXR_DITHERED_SHADOWS_ON _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
#if (_CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE) && !defined(SHADER_API_GLES)
#pragma target 3.0 //needed for VPOS
#endif
#include "UnityStandardParticleInstancing.cginc"
#define PASS_SHADOW_CASTER
#define CFXR_UBERSHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
}
CustomEditor "CartoonFX.MaterialInspector"
}
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
Shader "Cartoon FX/Remaster/Particle Ubershader"
{
Properties
{
//# Blending
//#
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Blend Source", Float) = 5
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Blend Destination", Float) = 10
[KeywordEnumNoPrefix(Alpha Blending, _ALPHABLEND_ON, Alpha Blending Premultiplied, _ALPHAPREMULTIPLY_ON, Multiplicative, _ALPHAMODULATE_ON, Additive, _CFXR_ADDITIVE)] _BlendingType ("Blending Type", Float) = 0
//#
[ToggleNoKeyword] _ZWrite ("Depth Write", Float) = 0
[Toggle(_ALPHATEST_ON)] _UseAlphaClip ("Alpha Clipping (Cutout)", Float) = 0
//# IF_KEYWORD _ALPHATEST_ON
_Cutoff ("Cutoff Threshold", Range(0.001,1)) = 0.1
//# END_IF
//# --------------------------------------------------------
[Toggle(_FADING_ON)] _UseSP ("Soft Particles", Float) = 0
//# IF_KEYWORD _FADING_ON
_SoftParticlesFadeDistanceNear ("Near Fade", Float) = 0
_SoftParticlesFadeDistanceFar ("Far Fade", Float) = 1
//# END_IF
//#
[Toggle(_CFXR_EDGE_FADING)] _UseEF ("Edge Fade", Float) = 0
//# IF_KEYWORD _CFXR_EDGE_FADING
_EdgeFadePow ("Edge Fade Power", Float) = 1
//# END_IF
//#
//# ========================================================
//# Effects
//#
[Toggle(_CFXR_DISSOLVE)] _UseDissolve ("Enable Dissolve", Float) = 0
//# IF_KEYWORD _CFXR_DISSOLVE
_DissolveTex ("Dissolve Texture", 2D) = "gray" {}
_DissolveSmooth ("Dissolve Smoothing", Range(0.0001,0.5)) = 0.1
[ToggleNoKeyword] _InvertDissolveTex ("Invert Dissolve Texture", Float) = 0
[ToggleNoKeyword] _DoubleDissolve ("Double Dissolve", Float) = 0
[Toggle(_CFXR_DISSOLVE_ALONG_UV_X)] _UseDissolveOffsetUV ("Dissolve offset along X", Float) = 0
//# IF_KEYWORD _CFXR_DISSOLVE_ALONG_UV_X
_DissolveScroll ("UV Scrolling", Vector) = (0,0,0,0)
//# END_IF
//# END_IF
//# --------------------------------------------------------
[Toggle(_CFXR_UV_DISTORTION)] _UseUVDistortion ("Enable UV Distortion", Float) = 0
//# IF_KEYWORD _CFXR_UV_DISTORTION
[NoScaleOffset] _DistortTex ("Distortion Texture", 2D) = "gray" {}
_DistortScrolling ("Scroll (XY) Tile (ZW)", Vector) = (0,0,1,1)
[Toggle(_CFXR_UV2_DISTORTION)] _UseUV2Distortion ("Use UV2", Float) = 0
_Distort ("Distortion Strength", Range(0,2.0)) = 0.1
[ToggleNoKeyword] _FadeAlongU ("Fade along Y", Float) = 0
[Toggle(_CFXR_UV_DISTORTION_ADD)] _UVDistortionAdd ("Add to base UV", Float) = 0
//# END_IF
//# ========================================================
//# Colors
//#
[NoScaleOffset] _MainTex ("Texture", 2D) = "white" {}
[Toggle(_CFXR_SINGLE_CHANNEL)] _SingleChannel ("Single Channel Texture", Float) = 0
//# --------------------------------------------------------
[KeywordEnum(Off,1x,2x)] _CFXR_OVERLAYTEX ("Enable Overlay Texture", Float) = 0
//# IF_KEYWORD _CFXR_OVERLAYTEX_1X || _CFXR_OVERLAYTEX_2X
[KeywordEnum(RGBA,RGB,A)] _CFXR_OVERLAYBLEND ("Overlay Blend Channels", Float) = 0
[NoScaleOffset] _OverlayTex ("Overlay Texture", 2D) = "white" {}
_OverlayTex_Scroll ("Overlay Scrolling / Scale", Vector) = (0.1,0.1,1,1)
//# END_IF
//# --------------------------------------------------------
[Toggle(_FLIPBOOK_BLENDING)] _UseFB ("Flipbook Blending", Float) = 0
//# --------------------------------------------------------
[Toggle(_CFXR_SECONDCOLOR_LERP)] _UseSecondColor ("Secondary Vertex Color (TEXCOORD2)", Float) = 0
//# IF_KEYWORD _CFXR_SECONDCOLOR_LERP
[NoScaleOffset] _SecondColorTex ("Second Color Map", 2D) = "black" {}
_SecondColorSmooth ("Second Color Smoothing", Range(0.0001,0.5)) = 0.2
//# END_IF
//# --------------------------------------------------------
[Toggle(_CFXR_FONT_COLORS)] _UseFontColor ("Use Font Colors", Float) = 0
// //# --------------------------------------------------------
//
// [Toggle(_CFXR_GRADIENTMAP)] _UseGradientMap ("Gradient Map", Float) = 0
// //# IF_KEYWORD _CFXR_GRADIENTMAP
// [NoScaleOffset] _GradientMap ("Gradient Map", 2D) = "black" {}
// //# END_IF
//# --------------------------------------------------------
[Toggle(_CFXR_HDR_BOOST)] _HdrBoost ("Enable HDR Multiplier", Float) = 0
//# IF_KEYWORD _CFXR_HDR_BOOST
_HdrMultiply ("HDR Multiplier", Float) = 2
//# END_IF
//# --------------------------------------------------------
//# Lighting
//#
[KeywordEnumNoPrefix(Off, _, Direct, _CFXR_LIGHTING_DIRECT, Indirect, _CFXR_LIGHTING_INDIRECT, Both, _CFXR_LIGHTING_ALL)] _UseLighting ("Mode", Float) = 0
//# IF_KEYWORD _CFXR_LIGHTING_DIRECT || _CFXR_LIGHTING_ALL
_DirectLightingRamp ("Direct Lighting Ramp", Range(0,1)) = 1.0
//# END_IF
//#
//# IF_KEYWORD _CFXR_LIGHTING_DIRECT || _CFXR_LIGHTING_INDIRECT || _CFXR_LIGHTING_ALL
[Toggle(_NORMALMAP)] _UseNormalMap ("Enable Normal Map", Float) = 0
//# IF_KEYWORD _NORMALMAP
[NoScaleOffset] _BumpMap ("Normal Map", 2D) = "bump" {}
_BumpScale ("Normal Scale", Range(-1, 1)) = 1.0
//# END_IF
//#
[Toggle(_EMISSION)] _UseEmission ("Enable Emission (TEXCOORD2)", Float) = 0
//#
[Toggle(_CFXR_LIGHTING_WPOS_OFFSET)] _UseLightingWorldPosOffset ("Enable World Pos. Offset", Float) = 0
//# IF_KEYWORD _CFXR_LIGHTING_WPOS_OFFSET
_LightingWorldPosStrength ("Offset Strength", Range(0,1)) = 0.2
//# END_IF
//#
[Toggle(_CFXR_LIGHTING_BACK)] _UseBackLighting ("Enable Backlighting", Float) = 0
//# IF_KEYWORD _CFXR_LIGHTING_BACK
_DirLightScreenAtten ("Dir. Light Screen Attenuation", Range(0, 5)) = 1.0
_BacklightTransmittance ("Backlight Transmittance", Range(0, 2)) = 1.0
//# END_IF
//#
//# IF_KEYWORD _CFXR_LIGHTING_INDIRECT || _CFXR_LIGHTING_ALL
_IndirectLightingMix ("Indirect Lighting Mix", Range(0,1)) = 0.5
//# END_IF
_ShadowColor ("Shadow Color", Color) = (0,0,0,1)
//#
//# END_IF
//# ========================================================
//# Shadows
//#
[KeywordEnum(Off,On,CustomTexture)] _CFXR_DITHERED_SHADOWS ("Dithered Shadows", Float) = 0
//# IF_KEYWORD _CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
_ShadowStrength ("Shadows Strength Max", Range(0,1)) = 1.0
//# IF_KEYWORD _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
_DitherCustom ("Dithering 3D Texture", 3D) = "black" {}
//# END_IF
//# END_IF
// _ReceivedShadowsStrength ("Received Shadows Strength", Range(0,1)) = 0.5
}
Category
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
}
Blend [_SrcBlend] [_DstBlend], One One
ZWrite [_ZWrite]
Cull Off
//====================================================================================================================================
// Universal Rendering Pipeline
Subshader
{
Pass
{
Name "BASE_URP"
Tags { "LightMode"="UniversalForward" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:ParticleInstancingSetup
#pragma multi_compile_fog
//#pragma multi_compile_fwdbase
//#pragma multi_compile SHADOWS_SCREEN
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_DISSOLVE_ALONG_UV_X
#pragma shader_feature_local _ _CFXR_UV_DISTORTION
#pragma shader_feature_local _ _CFXR_UV2_DISTORTION
#pragma shader_feature_local _ _CFXR_UV_DISTORTION_ADD
// #pragma shader_feature_local _ _CFXR_GRADIENTMAP
#pragma shader_feature_local _ _CFXR_SECONDCOLOR_LERP _CFXR_FONT_COLORS
#pragma shader_feature_local _ _CFXR_OVERLAYTEX_1X _CFXR_OVERLAYTEX_2X
#pragma shader_feature_local _ _CFXR_OVERLAYBLEND_A _CFXR_OVERLAYBLEND_RGB
#pragma shader_feature_local _ _CFXR_HDR_BOOST
#pragma shader_feature_local _ _CFXR_EDGE_FADING
#pragma shader_feature_local _ _CFXR_LIGHTING_DIRECT _CFXR_LIGHTING_INDIRECT _CFXR_LIGHTING_ALL
#pragma shader_feature_local _ _CFXR_LIGHTING_WPOS_OFFSET
#pragma shader_feature_local _ _CFXR_LIGHTING_BACK
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _NORMALMAP
#pragma shader_feature_local _ _EMISSION
#pragma shader_feature_local _ _FLIPBOOK_BLENDING
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#define CFXR_URP
#define CFXR_UBERSHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
// Same as above with 'Universal2D' instead and DISABLE_SOFT_PARTICLES keyword
Pass
{
Name "BASE_URP"
Tags { "LightMode"="Universal2D" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:ParticleInstancingSetup
#pragma multi_compile_fog
//#pragma multi_compile_fwdbase
//#pragma multi_compile SHADOWS_SCREEN
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_DISSOLVE_ALONG_UV_X
#pragma shader_feature_local _ _CFXR_UV_DISTORTION
#pragma shader_feature_local _ _CFXR_UV2_DISTORTION
#pragma shader_feature_local _ _CFXR_UV_DISTORTION_ADD
// #pragma shader_feature_local _ _CFXR_GRADIENTMAP
#pragma shader_feature_local _ _CFXR_SECONDCOLOR_LERP _CFXR_FONT_COLORS
#pragma shader_feature_local _ _CFXR_OVERLAYTEX_1X _CFXR_OVERLAYTEX_2X
#pragma shader_feature_local _ _CFXR_OVERLAYBLEND_A _CFXR_OVERLAYBLEND_RGB
#pragma shader_feature_local _ _CFXR_HDR_BOOST
#pragma shader_feature_local _ _CFXR_EDGE_FADING
#pragma shader_feature_local _ _CFXR_LIGHTING_DIRECT _CFXR_LIGHTING_INDIRECT _CFXR_LIGHTING_ALL
#pragma shader_feature_local _ _CFXR_LIGHTING_WPOS_OFFSET
#pragma shader_feature_local _ _CFXR_LIGHTING_BACK
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _NORMALMAP
#pragma shader_feature_local _ _EMISSION
#pragma shader_feature_local _ _FLIPBOOK_BLENDING
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#define CFXR_UPR
#define DISABLE_SOFT_PARTICLES
#define CFXR_UBERSHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
//--------------------------------------------------------------------------------------------------------------------------------
Pass
{
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_DISSOLVE_ALONG_UV_X
#pragma shader_feature_local _ _CFXR_UV_DISTORTION
#pragma shader_feature_local _ _CFXR_UV2_DISTORTION
#pragma shader_feature_local _ _CFXR_UV_DISTORTION_ADD
#pragma shader_feature_local _ _CFXR_OVERLAYTEX_1X _CFXR_OVERLAYTEX_2X
#pragma shader_feature_local _ _CFXR_OVERLAYBLEND_A _CFXR_OVERLAYBLEND_RGB
#pragma shader_feature_local _ _FLIPBOOK_BLENDING
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#pragma multi_compile_shadowcaster
#pragma shader_feature_local _ _CFXR_DITHERED_SHADOWS_ON _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
#if (_CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE) && !defined(SHADER_API_GLES)
#pragma target 3.0 //needed for VPOS
#endif
#define CFXR_UPR
#define PASS_SHADOW_CASTER
#define CFXR_UBERSHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
//====================================================================================================================================
// Built-in Rendering Pipeline
SubShader
{
Pass
{
Name "BASE"
Tags { "LightMode"="ForwardBase" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
//vertInstancingSetup writes to global, not allowed with DXC
// #pragma never_use_dxc
// #pragma target 2.5
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:vertInstancingSetup
#pragma multi_compile_particles
#pragma multi_compile_fog
//#pragma multi_compile_fwdbase
//#pragma multi_compile SHADOWS_SCREEN
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_DISSOLVE_ALONG_UV_X
#pragma shader_feature_local _ _CFXR_UV_DISTORTION
#pragma shader_feature_local _ _CFXR_UV2_DISTORTION
#pragma shader_feature_local _ _CFXR_UV_DISTORTION_ADD
// #pragma shader_feature_local _ _CFXR_GRADIENTMAP
#pragma shader_feature_local _ _CFXR_SECONDCOLOR_LERP _CFXR_FONT_COLORS
#pragma shader_feature_local _ _CFXR_OVERLAYTEX_1X _CFXR_OVERLAYTEX_2X
#pragma shader_feature_local _ _CFXR_OVERLAYBLEND_A _CFXR_OVERLAYBLEND_RGB
#pragma shader_feature_local _ _CFXR_HDR_BOOST
#pragma shader_feature_local _ _CFXR_EDGE_FADING
#pragma shader_feature_local _ _CFXR_LIGHTING_DIRECT _CFXR_LIGHTING_INDIRECT _CFXR_LIGHTING_ALL
#pragma shader_feature_local _ _CFXR_LIGHTING_WPOS_OFFSET
#pragma shader_feature_local _ _CFXR_LIGHTING_BACK
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _NORMALMAP
#pragma shader_feature_local _ _EMISSION
#pragma shader_feature_local _ _FLIPBOOK_BLENDING
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#include "UnityStandardParticleInstancing.cginc"
#define CFXR_UBERSHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
//--------------------------------------------------------------------------------------------------------------------------------
Pass
{
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
//vertInstancingSetup writes to global, not allowed with DXC
// #pragma never_use_dxc
// #pragma target 2.5
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:vertInstancingSetup
#pragma shader_feature_local _ _CFXR_SINGLE_CHANNEL
#pragma shader_feature_local _ _CFXR_DISSOLVE
#pragma shader_feature_local _ _CFXR_DISSOLVE_ALONG_UV_X
#pragma shader_feature_local _ _CFXR_UV_DISTORTION
#pragma shader_feature_local _ _CFXR_UV2_DISTORTION
#pragma shader_feature_local _ _CFXR_UV_DISTORTION_ADD
#pragma shader_feature_local _ _CFXR_OVERLAYTEX_1X _CFXR_OVERLAYTEX_2X
#pragma shader_feature_local _ _CFXR_OVERLAYBLEND_A _CFXR_OVERLAYBLEND_RGB
#pragma shader_feature_local _ _FLIPBOOK_BLENDING
#pragma shader_feature_local _ _ALPHATEST_ON
#pragma shader_feature_local _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _CFXR_ADDITIVE
#pragma multi_compile_shadowcaster
#pragma shader_feature_local _ _CFXR_DITHERED_SHADOWS_ON _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
#if (_CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE) && !defined(SHADER_API_GLES)
#pragma target 3.0 //needed for VPOS
#endif
#include "UnityStandardParticleInstancing.cginc"
#define PASS_SHADOW_CASTER
#define CFXR_UBERSHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
}
CustomEditor "CartoonFX.MaterialInspector"
}

View File

@ -1,360 +1,360 @@
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
#if defined(UNITY_PARTICLE_INSTANCING_ENABLED)
#pragma exclude_renderers gles
#endif
#if defined(GLOBAL_DISABLE_SOFT_PARTICLES) && !defined(DISABLE_SOFT_PARTICLES)
#define DISABLE_SOFT_PARTICLES
#endif
#if defined(CFXR_URP)
float LinearEyeDepthURP(float depth, float4 zBufferParam)
{
return 1.0 / (zBufferParam.z * depth + zBufferParam.w);
}
float SoftParticles(float near, float far, float4 projection)
{
float sceneZ = SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, UNITY_PROJ_COORD(projection)).r;
#if defined(SOFT_PARTICLES_ORTHOGRAPHIC)
// orthographic camera
#if defined(UNITY_REVERSED_Z)
sceneZ = 1.0f - sceneZ;
#endif
sceneZ = (sceneZ * _ProjectionParams.z) + _ProjectionParams.y;
#else
// perspective camera
sceneZ = LinearEyeDepthURP(sceneZ, _ZBufferParams);
#endif
float fade = saturate (far * ((sceneZ - near) - projection.z));
return fade;
}
#else
float SoftParticles(float near, float far, float4 projection)
{
float sceneZ = (SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, UNITY_PROJ_COORD(projection)));
#if defined(SOFT_PARTICLES_ORTHOGRAPHIC)
// orthographic camera
#if defined(UNITY_REVERSED_Z)
sceneZ = 1.0f - sceneZ;
#endif
sceneZ = (sceneZ * _ProjectionParams.z) + _ProjectionParams.y;
#else
// perspective camera
sceneZ = LinearEyeDepth(sceneZ);
#endif
float fade = saturate (far * ((sceneZ - near) - projection.z));
return fade;
}
#endif
float LinearToGammaSpaceApprox(float value)
{
return max(1.055h * pow(value, 0.416666667h) - 0.055h, 0.h);
}
// Same as UnityStandardUtils.cginc, but without the SHADER_TARGET limitation
half3 UnpackScaleNormal_CFXR(half4 packednormal, half bumpScale)
{
#if defined(UNITY_NO_DXT5nm)
half3 normal = packednormal.xyz * 2 - 1;
// #if (SHADER_TARGET >= 30)
// SM2.0: instruction count limitation
// SM2.0: normal scaler is not supported
normal.xy *= bumpScale;
// #endif
return normal;
#else
// This do the trick
packednormal.x *= packednormal.w;
half3 normal;
normal.xy = (packednormal.xy * 2 - 1);
// #if (SHADER_TARGET >= 30)
// SM2.0: instruction count limitation
// SM2.0: normal scaler is not supported
normal.xy *= bumpScale;
// #endif
normal.z = sqrt(1.0 - saturate(dot(normal.xy, normal.xy)));
return normal;
#endif
}
//Macros
// Project Position
#if !defined(PASS_SHADOW_CASTER) && !defined(GLOBAL_DISABLE_SOFT_PARTICLES) && !defined(DISABLE_SOFT_PARTICLES) && ( (defined(SOFTPARTICLES_ON) || defined(CFXR_URP) || defined(SOFT_PARTICLES_ORTHOGRAPHIC)) && defined(_FADING_ON) )
#define vertProjPos(o, clipPos) \
o.projPos = ComputeScreenPos(clipPos); \
COMPUTE_EYEDEPTH(o.projPos.z);
#else
#define vertProjPos(o, clipPos)
#endif
// Soft Particles
#if !defined(PASS_SHADOW_CASTER) && !defined(GLOBAL_DISABLE_SOFT_PARTICLES) && !defined(DISABLE_SOFT_PARTICLES) && ((defined(SOFTPARTICLES_ON) || defined(CFXR_URP) || defined(SOFT_PARTICLES_ORTHOGRAPHIC)) && defined(_FADING_ON))
#define fragSoftParticlesFade(i, color) \
color *= SoftParticles(_SoftParticlesFadeDistanceNear, _SoftParticlesFadeDistanceFar, i.projPos);
#else
#define fragSoftParticlesFade(i, color)
#endif
// Edge fade (note: particle meshes are already in world space)
#if !defined(PASS_SHADOW_CASTER) && defined(_CFXR_EDGE_FADING)
#define vertEdgeFade(v, color) \
float3 viewDir = UnityWorldSpaceViewDir(v.vertex); \
float ndv = abs(dot(normalize(viewDir), v.normal.xyz)); \
color *= saturate(pow(ndv, _EdgeFadePow));
#else
#define vertEdgeFade(v, color)
#endif
// Fog
#if _ALPHABLEND_ON
#define applyFog(i, color, alpha) UNITY_APPLY_FOG_COLOR(i.fogCoord, color, unity_FogColor);
#elif _ALPHAPREMULTIPLY_ON
#define applyFog(i, color, alpha) UNITY_APPLY_FOG_COLOR(i.fogCoord, color, alpha * unity_FogColor);
#elif _CFXR_ADDITIVE
#define applyFog(i, color, alpha) UNITY_APPLY_FOG_COLOR(i.fogCoord, color, half4(0, 0, 0, 0));
#elif _ALPHAMODULATE_ON
#define applyFog(i, color, alpha) UNITY_APPLY_FOG_COLOR(i.fogCoord, color, half4(1, 1, 1, 1));
#else
#define applyFog(i, color, alpha) UNITY_APPLY_FOG_COLOR(i.fogCoord, color, unity_FogColor);
#endif
// Vertex program
#if defined(PASS_SHADOW_CASTER)
void vert(appdata v, v2f_shadowCaster o, out float4 opos)
#else
v2f vert(appdata v, v2f o)
#endif
{
UNITY_TRANSFER_FOG(o, o.pos);
vertProjPos(o, o.pos);
vertEdgeFade(v, o.color.a);
#if defined(PASS_SHADOW_CASTER)
TRANSFER_SHADOW_CASTER_NOPOS(o, opos);
#else
return o;
#endif
}
// Fragment program
#if defined(PASS_SHADOW_CASTER)
float4 frag(v2f_shadowCaster i, UNITY_VPOS_TYPE vpos, half3 particleColor, half particleAlpha, half dissolve, half dissolveTime, half doubleDissolveWidth) : SV_Target
#else
half4 frag(v2f i, half3 particleColor, half particleAlpha, half dissolve, half dissolveTime, half doubleDissolveWidth) : SV_Target
#endif
{
#if _CFXR_DISSOLVE
// Dissolve
half time = lerp(-_DissolveSmooth, 1+_DissolveSmooth, dissolveTime);
particleAlpha *= smoothstep(dissolve - _DissolveSmooth, dissolve + _DissolveSmooth, time);
if (doubleDissolveWidth > 0)
{
half dissolveSubtract = smoothstep(dissolve - _DissolveSmooth, dissolve + _DissolveSmooth, time - doubleDissolveWidth);
particleAlpha = saturate(particleAlpha - dissolveSubtract);
}
#endif
//Blending
#if _ALPHAPREMULTIPLY_ON
particleColor *= particleAlpha;
#endif
#if _ALPHAMODULATE_ON
particleColor.rgb = lerp(float3(1,1,1), particleColor.rgb, particleAlpha);
#endif
#if _ALPHATEST_ON
clip(particleAlpha - _Cutoff);
#endif
#if !defined(PASS_SHADOW_CASTER)
// Fog & Soft Particles
applyFog(i, particleColor, particleAlpha);
fragSoftParticlesFade(i, particleAlpha);
#endif
// Prevent alpha from exceeding 1
particleAlpha = min(particleAlpha, 1.0);
#if !defined(PASS_SHADOW_CASTER)
return float4(particleColor, particleAlpha);
#else
//--------------------------------------------------------------------------------------------------------------------------------
// Shadow Caster Pass
#if _CFXR_ADDITIVE
half alpha = max(particleColor.r, max(particleColor.g, particleColor.b)) * particleAlpha;
#else
half alpha = particleAlpha;
#endif
#if (_CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE) && !defined(SHADER_API_GLES)
alpha = min(alpha, _ShadowStrength);
// Use dither mask for alpha blended shadows, based on pixel position xy
// and alpha level. Our dither texture is 4x4x16.
#if _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
half texSize = _DitherCustom_TexelSize.z;
alpha = tex3D(_DitherCustom, float3(vpos.xy*(1 / texSize), alpha*(1 - (1 / (texSize*texSize))))).a;
#else
alpha = tex3D(_DitherMaskLOD, float3(vpos.xy*0.25, alpha*0.9375)).a;
#endif
#endif
clip(alpha - 0.01);
SHADOW_CASTER_FRAGMENT(i)
#endif
}
// ================================================================================================================================
// ParticlesInstancing.hlsl
// ================================================================================================================================
#if defined(CFXR_URP)
#if defined(UNITY_PROCEDURAL_INSTANCING_ENABLED) && !defined(SHADER_TARGET_SURFACE_ANALYSIS)
#define UNITY_PARTICLE_INSTANCING_ENABLED
#endif
#if defined(UNITY_PARTICLE_INSTANCING_ENABLED)
#ifndef UNITY_PARTICLE_INSTANCE_DATA
#define UNITY_PARTICLE_INSTANCE_DATA DefaultParticleInstanceData
#endif
struct DefaultParticleInstanceData
{
float3x4 transform;
uint color;
float animFrame;
};
StructuredBuffer<UNITY_PARTICLE_INSTANCE_DATA> unity_ParticleInstanceData;
float4 unity_ParticleUVShiftData;
float unity_ParticleUseMeshColors;
void ParticleInstancingMatrices(out float4x4 objectToWorld, out float4x4 worldToObject)
{
UNITY_PARTICLE_INSTANCE_DATA data = unity_ParticleInstanceData[unity_InstanceID];
// transform matrix
objectToWorld._11_21_31_41 = float4(data.transform._11_21_31, 0.0f);
objectToWorld._12_22_32_42 = float4(data.transform._12_22_32, 0.0f);
objectToWorld._13_23_33_43 = float4(data.transform._13_23_33, 0.0f);
objectToWorld._14_24_34_44 = float4(data.transform._14_24_34, 1.0f);
// inverse transform matrix (TODO: replace with a library implementation if/when available)
float3x3 worldToObject3x3;
worldToObject3x3[0] = objectToWorld[1].yzx * objectToWorld[2].zxy - objectToWorld[1].zxy * objectToWorld[2].yzx;
worldToObject3x3[1] = objectToWorld[0].zxy * objectToWorld[2].yzx - objectToWorld[0].yzx * objectToWorld[2].zxy;
worldToObject3x3[2] = objectToWorld[0].yzx * objectToWorld[1].zxy - objectToWorld[0].zxy * objectToWorld[1].yzx;
float det = dot(objectToWorld[0].xyz, worldToObject3x3[0]);
worldToObject3x3 = transpose(worldToObject3x3);
worldToObject3x3 *= rcp(det);
float3 worldToObjectPosition = mul(worldToObject3x3, -objectToWorld._14_24_34);
worldToObject._11_21_31_41 = float4(worldToObject3x3._11_21_31, 0.0f);
worldToObject._12_22_32_42 = float4(worldToObject3x3._12_22_32, 0.0f);
worldToObject._13_23_33_43 = float4(worldToObject3x3._13_23_33, 0.0f);
worldToObject._14_24_34_44 = float4(worldToObjectPosition, 1.0f);
}
void ParticleInstancingSetup()
{
ParticleInstancingMatrices(unity_ObjectToWorld, unity_WorldToObject);
}
#else
void ParticleInstancingSetup() {}
#endif
#endif
// ================================================================================================================================
// Instancing functions
// ================================================================================================================================
float4 UnpackFromR8G8B8A8(uint rgba)
{
return float4(rgba & 255, (rgba >> 8) & 255, (rgba >> 16) & 255, (rgba >> 24) & 255) * (1.0 / 255);
}
half4 GetParticleColor(half4 color)
{
#if defined(UNITY_PARTICLE_INSTANCING_ENABLED)
#if !defined(UNITY_PARTICLE_INSTANCE_DATA_NO_COLOR)
UNITY_PARTICLE_INSTANCE_DATA data = unity_ParticleInstanceData[unity_InstanceID];
color = lerp(half4(1.0, 1.0, 1.0, 1.0), color, unity_ParticleUseMeshColors);
color *= UnpackFromR8G8B8A8(data.color);
#endif
#endif
return color;
}
void GetParticleTexcoords(out float2 outputTexcoord, out float2 outputTexcoord2, out float outputBlend, in float4 inputTexcoords, in float inputBlend)
{
#if defined(UNITY_PARTICLE_INSTANCING_ENABLED)
if (unity_ParticleUVShiftData.x != 0.0)
{
UNITY_PARTICLE_INSTANCE_DATA data = unity_ParticleInstanceData[unity_InstanceID];
float numTilesX = unity_ParticleUVShiftData.y;
float2 animScale = unity_ParticleUVShiftData.zw;
#ifdef UNITY_PARTICLE_INSTANCE_DATA_NO_ANIM_FRAME
float sheetIndex = 0.0;
#else
float sheetIndex = data.animFrame;
#endif
float index0 = floor(sheetIndex);
float vIdx0 = floor(index0 / numTilesX);
float uIdx0 = floor(index0 - vIdx0 * numTilesX);
float2 offset0 = float2(uIdx0 * animScale.x, (1.0 - animScale.y) - vIdx0 * animScale.y); // Copied from built-in as is and it looks like upside-down flip
outputTexcoord = inputTexcoords.xy * animScale.xy + offset0.xy;
#ifdef _FLIPBOOKBLENDING_ON
float index1 = floor(sheetIndex + 1.0);
float vIdx1 = floor(index1 / numTilesX);
float uIdx1 = floor(index1 - vIdx1 * numTilesX);
float2 offset1 = float2(uIdx1 * animScale.x, (1.0 - animScale.y) - vIdx1 * animScale.y);
outputTexcoord2.xy = inputTexcoords.xy * animScale.xy + offset1.xy;
outputBlend = frac(sheetIndex);
#endif
}
else
#endif
{
outputTexcoord = inputTexcoords.xy;
#ifdef _FLIPBOOKBLENDING_ON
outputTexcoord2.xy = inputTexcoords.zw;
outputBlend = inputBlend;
#endif
}
#ifndef _FLIPBOOKBLENDING_ON
outputTexcoord2.xy = inputTexcoords.xy;
outputBlend = 0.5;
#endif
}
void GetParticleTexcoords(out float2 outputTexcoord, in float2 inputTexcoord)
{
float2 dummyTexcoord2 = 0.0;
float dummyBlend = 0.0;
GetParticleTexcoords(outputTexcoord, dummyTexcoord2, dummyBlend, inputTexcoord.xyxy, 0.0);
}
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
#if defined(UNITY_PARTICLE_INSTANCING_ENABLED)
#pragma exclude_renderers gles
#endif
#if defined(GLOBAL_DISABLE_SOFT_PARTICLES) && !defined(DISABLE_SOFT_PARTICLES)
#define DISABLE_SOFT_PARTICLES
#endif
#if defined(CFXR_URP)
float LinearEyeDepthURP(float depth, float4 zBufferParam)
{
return 1.0 / (zBufferParam.z * depth + zBufferParam.w);
}
float SoftParticles(float near, float far, float4 projection)
{
float sceneZ = SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, UNITY_PROJ_COORD(projection)).r;
#if defined(SOFT_PARTICLES_ORTHOGRAPHIC)
// orthographic camera
#if defined(UNITY_REVERSED_Z)
sceneZ = 1.0f - sceneZ;
#endif
sceneZ = (sceneZ * _ProjectionParams.z) + _ProjectionParams.y;
#else
// perspective camera
sceneZ = LinearEyeDepthURP(sceneZ, _ZBufferParams);
#endif
float fade = saturate (far * ((sceneZ - near) - projection.z));
return fade;
}
#else
float SoftParticles(float near, float far, float4 projection)
{
float sceneZ = (SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, UNITY_PROJ_COORD(projection)));
#if defined(SOFT_PARTICLES_ORTHOGRAPHIC)
// orthographic camera
#if defined(UNITY_REVERSED_Z)
sceneZ = 1.0f - sceneZ;
#endif
sceneZ = (sceneZ * _ProjectionParams.z) + _ProjectionParams.y;
#else
// perspective camera
sceneZ = LinearEyeDepth(sceneZ);
#endif
float fade = saturate (far * ((sceneZ - near) - projection.z));
return fade;
}
#endif
float LinearToGammaSpaceApprox(float value)
{
return max(1.055h * pow(value, 0.416666667h) - 0.055h, 0.h);
}
// Same as UnityStandardUtils.cginc, but without the SHADER_TARGET limitation
half3 UnpackScaleNormal_CFXR(half4 packednormal, half bumpScale)
{
#if defined(UNITY_NO_DXT5nm)
half3 normal = packednormal.xyz * 2 - 1;
// #if (SHADER_TARGET >= 30)
// SM2.0: instruction count limitation
// SM2.0: normal scaler is not supported
normal.xy *= bumpScale;
// #endif
return normal;
#else
// This do the trick
packednormal.x *= packednormal.w;
half3 normal;
normal.xy = (packednormal.xy * 2 - 1);
// #if (SHADER_TARGET >= 30)
// SM2.0: instruction count limitation
// SM2.0: normal scaler is not supported
normal.xy *= bumpScale;
// #endif
normal.z = sqrt(1.0 - saturate(dot(normal.xy, normal.xy)));
return normal;
#endif
}
//Macros
// Project Position
#if !defined(PASS_SHADOW_CASTER) && !defined(GLOBAL_DISABLE_SOFT_PARTICLES) && !defined(DISABLE_SOFT_PARTICLES) && ( (defined(SOFTPARTICLES_ON) || defined(CFXR_URP) || defined(SOFT_PARTICLES_ORTHOGRAPHIC)) && defined(_FADING_ON) )
#define vertProjPos(o, clipPos) \
o.projPos = ComputeScreenPos(clipPos); \
COMPUTE_EYEDEPTH(o.projPos.z);
#else
#define vertProjPos(o, clipPos)
#endif
// Soft Particles
#if !defined(PASS_SHADOW_CASTER) && !defined(GLOBAL_DISABLE_SOFT_PARTICLES) && !defined(DISABLE_SOFT_PARTICLES) && ((defined(SOFTPARTICLES_ON) || defined(CFXR_URP) || defined(SOFT_PARTICLES_ORTHOGRAPHIC)) && defined(_FADING_ON))
#define fragSoftParticlesFade(i, color) \
color *= SoftParticles(_SoftParticlesFadeDistanceNear, _SoftParticlesFadeDistanceFar, i.projPos);
#else
#define fragSoftParticlesFade(i, color)
#endif
// Edge fade (note: particle meshes are already in world space)
#if !defined(PASS_SHADOW_CASTER) && defined(_CFXR_EDGE_FADING)
#define vertEdgeFade(v, color) \
float3 viewDir = UnityWorldSpaceViewDir(v.vertex); \
float ndv = abs(dot(normalize(viewDir), v.normal.xyz)); \
color *= saturate(pow(ndv, _EdgeFadePow));
#else
#define vertEdgeFade(v, color)
#endif
// Fog
#if _ALPHABLEND_ON
#define applyFog(i, color, alpha) UNITY_APPLY_FOG_COLOR(i.fogCoord, color, unity_FogColor);
#elif _ALPHAPREMULTIPLY_ON
#define applyFog(i, color, alpha) UNITY_APPLY_FOG_COLOR(i.fogCoord, color, alpha * unity_FogColor);
#elif _CFXR_ADDITIVE
#define applyFog(i, color, alpha) UNITY_APPLY_FOG_COLOR(i.fogCoord, color, half4(0, 0, 0, 0));
#elif _ALPHAMODULATE_ON
#define applyFog(i, color, alpha) UNITY_APPLY_FOG_COLOR(i.fogCoord, color, half4(1, 1, 1, 1));
#else
#define applyFog(i, color, alpha) UNITY_APPLY_FOG_COLOR(i.fogCoord, color, unity_FogColor);
#endif
// Vertex program
#if defined(PASS_SHADOW_CASTER)
void vert(appdata v, v2f_shadowCaster o, out float4 opos)
#else
v2f vert(appdata v, v2f o)
#endif
{
UNITY_TRANSFER_FOG(o, o.pos);
vertProjPos(o, o.pos);
vertEdgeFade(v, o.color.a);
#if defined(PASS_SHADOW_CASTER)
TRANSFER_SHADOW_CASTER_NOPOS(o, opos);
#else
return o;
#endif
}
// Fragment program
#if defined(PASS_SHADOW_CASTER)
float4 frag(v2f_shadowCaster i, UNITY_VPOS_TYPE vpos, half3 particleColor, half particleAlpha, half dissolve, half dissolveTime, half doubleDissolveWidth) : SV_Target
#else
half4 frag(v2f i, half3 particleColor, half particleAlpha, half dissolve, half dissolveTime, half doubleDissolveWidth) : SV_Target
#endif
{
#if _CFXR_DISSOLVE
// Dissolve
half time = lerp(-_DissolveSmooth, 1+_DissolveSmooth, dissolveTime);
particleAlpha *= smoothstep(dissolve - _DissolveSmooth, dissolve + _DissolveSmooth, time);
if (doubleDissolveWidth > 0)
{
half dissolveSubtract = smoothstep(dissolve - _DissolveSmooth, dissolve + _DissolveSmooth, time - doubleDissolveWidth);
particleAlpha = saturate(particleAlpha - dissolveSubtract);
}
#endif
//Blending
#if _ALPHAPREMULTIPLY_ON
particleColor *= particleAlpha;
#endif
#if _ALPHAMODULATE_ON
particleColor.rgb = lerp(float3(1,1,1), particleColor.rgb, particleAlpha);
#endif
#if _ALPHATEST_ON
clip(particleAlpha - _Cutoff);
#endif
#if !defined(PASS_SHADOW_CASTER)
// Fog & Soft Particles
applyFog(i, particleColor, particleAlpha);
fragSoftParticlesFade(i, particleAlpha);
#endif
// Prevent alpha from exceeding 1
particleAlpha = min(particleAlpha, 1.0);
#if !defined(PASS_SHADOW_CASTER)
return float4(particleColor, particleAlpha);
#else
//--------------------------------------------------------------------------------------------------------------------------------
// Shadow Caster Pass
#if _CFXR_ADDITIVE
half alpha = max(particleColor.r, max(particleColor.g, particleColor.b)) * particleAlpha;
#else
half alpha = particleAlpha;
#endif
#if (_CFXR_DITHERED_SHADOWS_ON || _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE) && !defined(SHADER_API_GLES)
alpha = min(alpha, _ShadowStrength);
// Use dither mask for alpha blended shadows, based on pixel position xy
// and alpha level. Our dither texture is 4x4x16.
#if _CFXR_DITHERED_SHADOWS_CUSTOMTEXTURE
half texSize = _DitherCustom_TexelSize.z;
alpha = tex3D(_DitherCustom, float3(vpos.xy*(1 / texSize), alpha*(1 - (1 / (texSize*texSize))))).a;
#else
alpha = tex3D(_DitherMaskLOD, float3(vpos.xy*0.25, alpha*0.9375)).a;
#endif
#endif
clip(alpha - 0.01);
SHADOW_CASTER_FRAGMENT(i)
#endif
}
// ================================================================================================================================
// ParticlesInstancing.hlsl
// ================================================================================================================================
#if defined(CFXR_URP)
#if defined(UNITY_PROCEDURAL_INSTANCING_ENABLED) && !defined(SHADER_TARGET_SURFACE_ANALYSIS)
#define UNITY_PARTICLE_INSTANCING_ENABLED
#endif
#if defined(UNITY_PARTICLE_INSTANCING_ENABLED)
#ifndef UNITY_PARTICLE_INSTANCE_DATA
#define UNITY_PARTICLE_INSTANCE_DATA DefaultParticleInstanceData
#endif
struct DefaultParticleInstanceData
{
float3x4 transform;
uint color;
float animFrame;
};
StructuredBuffer<UNITY_PARTICLE_INSTANCE_DATA> unity_ParticleInstanceData;
float4 unity_ParticleUVShiftData;
float unity_ParticleUseMeshColors;
void ParticleInstancingMatrices(out float4x4 objectToWorld, out float4x4 worldToObject)
{
UNITY_PARTICLE_INSTANCE_DATA data = unity_ParticleInstanceData[unity_InstanceID];
// transform matrix
objectToWorld._11_21_31_41 = float4(data.transform._11_21_31, 0.0f);
objectToWorld._12_22_32_42 = float4(data.transform._12_22_32, 0.0f);
objectToWorld._13_23_33_43 = float4(data.transform._13_23_33, 0.0f);
objectToWorld._14_24_34_44 = float4(data.transform._14_24_34, 1.0f);
// inverse transform matrix (TODO: replace with a library implementation if/when available)
float3x3 worldToObject3x3;
worldToObject3x3[0] = objectToWorld[1].yzx * objectToWorld[2].zxy - objectToWorld[1].zxy * objectToWorld[2].yzx;
worldToObject3x3[1] = objectToWorld[0].zxy * objectToWorld[2].yzx - objectToWorld[0].yzx * objectToWorld[2].zxy;
worldToObject3x3[2] = objectToWorld[0].yzx * objectToWorld[1].zxy - objectToWorld[0].zxy * objectToWorld[1].yzx;
float det = dot(objectToWorld[0].xyz, worldToObject3x3[0]);
worldToObject3x3 = transpose(worldToObject3x3);
worldToObject3x3 *= rcp(det);
float3 worldToObjectPosition = mul(worldToObject3x3, -objectToWorld._14_24_34);
worldToObject._11_21_31_41 = float4(worldToObject3x3._11_21_31, 0.0f);
worldToObject._12_22_32_42 = float4(worldToObject3x3._12_22_32, 0.0f);
worldToObject._13_23_33_43 = float4(worldToObject3x3._13_23_33, 0.0f);
worldToObject._14_24_34_44 = float4(worldToObjectPosition, 1.0f);
}
void ParticleInstancingSetup()
{
ParticleInstancingMatrices(unity_ObjectToWorld, unity_WorldToObject);
}
#else
void ParticleInstancingSetup() {}
#endif
#endif
// ================================================================================================================================
// Instancing functions
// ================================================================================================================================
float4 UnpackFromR8G8B8A8(uint rgba)
{
return float4(rgba & 255, (rgba >> 8) & 255, (rgba >> 16) & 255, (rgba >> 24) & 255) * (1.0 / 255);
}
half4 GetParticleColor(half4 color)
{
#if defined(UNITY_PARTICLE_INSTANCING_ENABLED)
#if !defined(UNITY_PARTICLE_INSTANCE_DATA_NO_COLOR)
UNITY_PARTICLE_INSTANCE_DATA data = unity_ParticleInstanceData[unity_InstanceID];
color = lerp(half4(1.0, 1.0, 1.0, 1.0), color, unity_ParticleUseMeshColors);
color *= UnpackFromR8G8B8A8(data.color);
#endif
#endif
return color;
}
void GetParticleTexcoords(out float2 outputTexcoord, out float2 outputTexcoord2, out float outputBlend, in float4 inputTexcoords, in float inputBlend)
{
#if defined(UNITY_PARTICLE_INSTANCING_ENABLED)
if (unity_ParticleUVShiftData.x != 0.0)
{
UNITY_PARTICLE_INSTANCE_DATA data = unity_ParticleInstanceData[unity_InstanceID];
float numTilesX = unity_ParticleUVShiftData.y;
float2 animScale = unity_ParticleUVShiftData.zw;
#ifdef UNITY_PARTICLE_INSTANCE_DATA_NO_ANIM_FRAME
float sheetIndex = 0.0;
#else
float sheetIndex = data.animFrame;
#endif
float index0 = floor(sheetIndex);
float vIdx0 = floor(index0 / numTilesX);
float uIdx0 = floor(index0 - vIdx0 * numTilesX);
float2 offset0 = float2(uIdx0 * animScale.x, (1.0 - animScale.y) - vIdx0 * animScale.y); // Copied from built-in as is and it looks like upside-down flip
outputTexcoord = inputTexcoords.xy * animScale.xy + offset0.xy;
#ifdef _FLIPBOOKBLENDING_ON
float index1 = floor(sheetIndex + 1.0);
float vIdx1 = floor(index1 / numTilesX);
float uIdx1 = floor(index1 - vIdx1 * numTilesX);
float2 offset1 = float2(uIdx1 * animScale.x, (1.0 - animScale.y) - vIdx1 * animScale.y);
outputTexcoord2.xy = inputTexcoords.xy * animScale.xy + offset1.xy;
outputBlend = frac(sheetIndex);
#endif
}
else
#endif
{
outputTexcoord = inputTexcoords.xy;
#ifdef _FLIPBOOKBLENDING_ON
outputTexcoord2.xy = inputTexcoords.zw;
outputBlend = inputBlend;
#endif
}
#ifndef _FLIPBOOKBLENDING_ON
outputTexcoord2.xy = inputTexcoords.xy;
outputBlend = 0.5;
#endif
}
void GetParticleTexcoords(out float2 outputTexcoord, in float2 inputTexcoord)
{
float2 dummyTexcoord2 = 0.0;
float dummyBlend = 0.0;
GetParticleTexcoords(outputTexcoord, dummyTexcoord2, dummyBlend, inputTexcoord.xyxy, 0.0);
}

View File

@ -1,24 +1,24 @@
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
// Global settings for the Cartoon FX Remaster shaders
//--------------------------------------------------------------------------------------------------------------------------------
/* Uncomment this line if you want to globally disable soft particles */
// #define GLOBAL_DISABLE_SOFT_PARTICLES
/* Uncomment this line to do Soft Particles depth calculation in Orthographic mode */
// #define SOFT_PARTICLES_ORTHOGRAPHIC
/* Change this value if you want to globally scale the HDR effects */
#define GLOBAL_HDR_MULTIPLIER 1
/* Comment this line if you want to disable point lights for lit particles */
#define ENABLE_POINT_LIGHTS
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
// Global settings for the Cartoon FX Remaster shaders
//--------------------------------------------------------------------------------------------------------------------------------
/* Uncomment this line if you want to globally disable soft particles */
// #define GLOBAL_DISABLE_SOFT_PARTICLES
/* Uncomment this line to do Soft Particles depth calculation in Orthographic mode */
// #define SOFT_PARTICLES_ORTHOGRAPHIC
/* Change this value if you want to globally scale the HDR effects */
#define GLOBAL_HDR_MULTIPLIER 1
/* Comment this line if you want to disable point lights for lit particles */
#define ENABLE_POINT_LIGHTS
//--------------------------------------------------------------------------------------------------------------------------------

View File

@ -1,232 +1,232 @@
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
// Copy of URP specific variables needed for lighting
// ================================================================================================================================
// Input.hlsl:
// ================================================================================================================================
#if defined(SHADER_API_MOBILE) || (defined(SHADER_API_GLCORE) && !defined(SHADER_API_SWITCH)) || defined(SHADER_API_GLES) || defined(SHADER_API_GLES3) // Workaround for bug on Nintendo Switch where SHADER_API_GLCORE is mistakenly defined
#define MAX_VISIBLE_LIGHTS 32
#else
#define MAX_VISIBLE_LIGHTS 256
#endif
// --------------------------------
float4 _MainLightPosition;
half4 _MainLightColor;
// --------------------------------
half4 _AdditionalLightsCount;
#if USE_STRUCTURED_BUFFER_FOR_LIGHT_DATA
StructuredBuffer<LightData> _AdditionalLightsBuffer;
StructuredBuffer<int> _AdditionalLightsIndices;
#else
// GLES3 causes a performance regression in some devices when using CBUFFER.
#ifndef SHADER_API_GLES3
CBUFFER_START(AdditionalLights)
#endif
float4 _AdditionalLightsPosition[MAX_VISIBLE_LIGHTS];
half4 _AdditionalLightsColor[MAX_VISIBLE_LIGHTS];
half4 _AdditionalLightsAttenuation[MAX_VISIBLE_LIGHTS];
half4 _AdditionalLightsSpotDir[MAX_VISIBLE_LIGHTS];
half4 _AdditionalLightsOcclusionProbes[MAX_VISIBLE_LIGHTS];
#ifndef SHADER_API_GLES3
CBUFFER_END
#endif
#endif
// ================================================================================================================================
// UnityInput.hlsl:
// ================================================================================================================================
half4 unity_LightData;
half4 unity_LightIndices[2];
// --------------------------------
// ================================================================================================================================
// Macros.hlsl
// ================================================================================================================================
#define HALF_MIN 6.103515625e-5 // 2^-14, the same value for 10, 11 and 16-bit: https://www.khronos.org/opengl/wiki/Small_Float_Formats
// ================================================================================================================================
// Lighting.hlsl
// ================================================================================================================================
// Abstraction over Light shading data.
struct Light
{
half3 direction;
half3 color;
half distanceAttenuation;
half shadowAttenuation;
};
// Matches Unity Vanila attenuation
// Attenuation smoothly decreases to light range.
float DistanceAttenuation(float distanceSqr, half2 distanceAttenuation)
{
// We use a shared distance attenuation for additional directional and puctual lights
// for directional lights attenuation will be 1
float lightAtten = rcp(distanceSqr);
#if SHADER_HINT_NICE_QUALITY
// Use the smoothing factor also used in the Unity lightmapper.
half factor = distanceSqr * distanceAttenuation.x;
half smoothFactor = saturate(1.0h - factor * factor);
smoothFactor = smoothFactor * smoothFactor;
#else
// We need to smoothly fade attenuation to light range. We start fading linearly at 80% of light range
// Therefore:
// fadeDistance = (0.8 * 0.8 * lightRangeSq)
// smoothFactor = (lightRangeSqr - distanceSqr) / (lightRangeSqr - fadeDistance)
// We can rewrite that to fit a MAD by doing
// distanceSqr * (1.0 / (fadeDistanceSqr - lightRangeSqr)) + (-lightRangeSqr / (fadeDistanceSqr - lightRangeSqr)
// distanceSqr * distanceAttenuation.y + distanceAttenuation.z
half smoothFactor = saturate(distanceSqr * distanceAttenuation.x + distanceAttenuation.y);
#endif
return lightAtten * smoothFactor;
}
half AngleAttenuation(half3 spotDirection, half3 lightDirection, half2 spotAttenuation)
{
// Spot Attenuation with a linear falloff can be defined as
// (SdotL - cosOuterAngle) / (cosInnerAngle - cosOuterAngle)
// This can be rewritten as
// invAngleRange = 1.0 / (cosInnerAngle - cosOuterAngle)
// SdotL * invAngleRange + (-cosOuterAngle * invAngleRange)
// SdotL * spotAttenuation.x + spotAttenuation.y
// If we precompute the terms in a MAD instruction
half SdotL = dot(spotDirection, lightDirection);
half atten = saturate(SdotL * spotAttenuation.x + spotAttenuation.y);
return atten * atten;
}
// Fills a light struct given a perObjectLightIndex
Light GetAdditionalPerObjectLight(int perObjectLightIndex, float3 positionWS)
{
// Abstraction over Light input constants
#if USE_STRUCTURED_BUFFER_FOR_LIGHT_DATA
float4 lightPositionWS = _AdditionalLightsBuffer[perObjectLightIndex].position;
half3 color = _AdditionalLightsBuffer[perObjectLightIndex].color.rgb;
half4 distanceAndSpotAttenuation = _AdditionalLightsBuffer[perObjectLightIndex].attenuation;
half4 spotDirection = _AdditionalLightsBuffer[perObjectLightIndex].spotDirection;
half4 lightOcclusionProbeInfo = _AdditionalLightsBuffer[perObjectLightIndex].occlusionProbeChannels;
#else
float4 lightPositionWS = _AdditionalLightsPosition[perObjectLightIndex];
half3 color = _AdditionalLightsColor[perObjectLightIndex].rgb;
half4 distanceAndSpotAttenuation = _AdditionalLightsAttenuation[perObjectLightIndex];
half4 spotDirection = _AdditionalLightsSpotDir[perObjectLightIndex];
half4 lightOcclusionProbeInfo = _AdditionalLightsOcclusionProbes[perObjectLightIndex];
#endif
// Directional lights store direction in lightPosition.xyz and have .w set to 0.0.
// This way the following code will work for both directional and punctual lights.
float3 lightVector = lightPositionWS.xyz - positionWS * lightPositionWS.w;
float distanceSqr = max(dot(lightVector, lightVector), HALF_MIN);
half3 lightDirection = half3(lightVector * rsqrt(distanceSqr));
half attenuation = DistanceAttenuation(distanceSqr, distanceAndSpotAttenuation.xy) * AngleAttenuation(spotDirection.xyz, lightDirection, distanceAndSpotAttenuation.zw);
Light light;
light.direction = lightDirection;
light.distanceAttenuation = attenuation;
/// light.shadowAttenuation = AdditionalLightRealtimeShadow(perObjectLightIndex, positionWS);
light.shadowAttenuation = 1;
light.color = color;
// In case we're using light probes, we can sample the attenuation from the `unity_ProbesOcclusion`
#if defined(LIGHTMAP_ON) || defined(_MIXED_LIGHTING_SUBTRACTIVE)
// First find the probe channel from the light.
// Then sample `unity_ProbesOcclusion` for the baked occlusion.
// If the light is not baked, the channel is -1, and we need to apply no occlusion.
// probeChannel is the index in 'unity_ProbesOcclusion' that holds the proper occlusion value.
int probeChannel = lightOcclusionProbeInfo.x;
// lightProbeContribution is set to 0 if we are indeed using a probe, otherwise set to 1.
half lightProbeContribution = lightOcclusionProbeInfo.y;
half probeOcclusionValue = unity_ProbesOcclusion[probeChannel];
light.distanceAttenuation *= max(probeOcclusionValue, lightProbeContribution);
#endif
return light;
}
uint GetPerObjectLightIndexOffset()
{
#if USE_STRUCTURED_BUFFER_FOR_LIGHT_DATA
return unity_LightData.x;
#else
return 0;
#endif
}
// Returns a per-object index given a loop index.
// This abstract the underlying data implementation for storing lights/light indices
int GetPerObjectLightIndex(uint index)
{
/////////////////////////////////////////////////////////////////////////////////////////////
// Structured Buffer Path /
// /
// Lights and light indices are stored in StructuredBuffer. We can just index them. /
// Currently all non-mobile platforms take this path :( /
// There are limitation in mobile GPUs to use SSBO (performance / no vertex shader support) /
/////////////////////////////////////////////////////////////////////////////////////////////
#if USE_STRUCTURED_BUFFER_FOR_LIGHT_DATA
uint offset = unity_LightData.x;
return _AdditionalLightsIndices[offset + index];
/////////////////////////////////////////////////////////////////////////////////////////////
// UBO path /
// /
// We store 8 light indices in float4 unity_LightIndices[2]; /
// Due to memory alignment unity doesn't support int[] or float[] /
// Even trying to reinterpret cast the unity_LightIndices to float[] won't work /
// it will cast to float4[] and create extra register pressure. :( /
/////////////////////////////////////////////////////////////////////////////////////////////
#elif !defined(SHADER_API_GLES)
// since index is uint shader compiler will implement
// div & mod as bitfield ops (shift and mask).
// TODO: Can we index a float4? Currently compiler is
// replacing unity_LightIndicesX[i] with a dp4 with identity matrix.
// u_xlat16_40 = dot(unity_LightIndices[int(u_xlatu13)], ImmCB_0_0_0[u_xlati1]);
// This increases both arithmetic and register pressure.
return unity_LightIndices[index / 4][index % 4];
#else
// Fallback to GLES2. No bitfield magic here :(.
// We limit to 4 indices per object and only sample unity_4LightIndices0.
// Conditional moves are branch free even on mali-400
// small arithmetic cost but no extra register pressure from ImmCB_0_0_0 matrix.
half2 lightIndex2 = (index < 2.0h) ? unity_LightIndices[0].xy : unity_LightIndices[0].zw;
half i_rem = (index < 2.0h) ? index : index - 2.0h;
return (i_rem < 1.0h) ? lightIndex2.x : lightIndex2.y;
#endif
}
// Fills a light struct given a loop i index. This will convert the i
// index to a perObjectLightIndex
Light GetAdditionalLight(uint i, float3 positionWS)
{
int perObjectLightIndex = GetPerObjectLightIndex(i);
return GetAdditionalPerObjectLight(perObjectLightIndex, positionWS);
}
int GetAdditionalLightsCount()
{
// TODO: we need to expose in SRP api an ability for the pipeline cap the amount of lights
// in the culling. This way we could do the loop branch with an uniform
// This would be helpful to support baking exceeding lights in SH as well
return min(_AdditionalLightsCount.x, unity_LightData.y);
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
// Copy of URP specific variables needed for lighting
// ================================================================================================================================
// Input.hlsl:
// ================================================================================================================================
#if defined(SHADER_API_MOBILE) || (defined(SHADER_API_GLCORE) && !defined(SHADER_API_SWITCH)) || defined(SHADER_API_GLES) || defined(SHADER_API_GLES3) // Workaround for bug on Nintendo Switch where SHADER_API_GLCORE is mistakenly defined
#define MAX_VISIBLE_LIGHTS 32
#else
#define MAX_VISIBLE_LIGHTS 256
#endif
// --------------------------------
float4 _MainLightPosition;
half4 _MainLightColor;
// --------------------------------
half4 _AdditionalLightsCount;
#if USE_STRUCTURED_BUFFER_FOR_LIGHT_DATA
StructuredBuffer<LightData> _AdditionalLightsBuffer;
StructuredBuffer<int> _AdditionalLightsIndices;
#else
// GLES3 causes a performance regression in some devices when using CBUFFER.
#ifndef SHADER_API_GLES3
CBUFFER_START(AdditionalLights)
#endif
float4 _AdditionalLightsPosition[MAX_VISIBLE_LIGHTS];
half4 _AdditionalLightsColor[MAX_VISIBLE_LIGHTS];
half4 _AdditionalLightsAttenuation[MAX_VISIBLE_LIGHTS];
half4 _AdditionalLightsSpotDir[MAX_VISIBLE_LIGHTS];
half4 _AdditionalLightsOcclusionProbes[MAX_VISIBLE_LIGHTS];
#ifndef SHADER_API_GLES3
CBUFFER_END
#endif
#endif
// ================================================================================================================================
// UnityInput.hlsl:
// ================================================================================================================================
half4 unity_LightData;
half4 unity_LightIndices[2];
// --------------------------------
// ================================================================================================================================
// Macros.hlsl
// ================================================================================================================================
#define HALF_MIN 6.103515625e-5 // 2^-14, the same value for 10, 11 and 16-bit: https://www.khronos.org/opengl/wiki/Small_Float_Formats
// ================================================================================================================================
// Lighting.hlsl
// ================================================================================================================================
// Abstraction over Light shading data.
struct Light
{
half3 direction;
half3 color;
half distanceAttenuation;
half shadowAttenuation;
};
// Matches Unity Vanila attenuation
// Attenuation smoothly decreases to light range.
float DistanceAttenuation(float distanceSqr, half2 distanceAttenuation)
{
// We use a shared distance attenuation for additional directional and puctual lights
// for directional lights attenuation will be 1
float lightAtten = rcp(distanceSqr);
#if SHADER_HINT_NICE_QUALITY
// Use the smoothing factor also used in the Unity lightmapper.
half factor = distanceSqr * distanceAttenuation.x;
half smoothFactor = saturate(1.0h - factor * factor);
smoothFactor = smoothFactor * smoothFactor;
#else
// We need to smoothly fade attenuation to light range. We start fading linearly at 80% of light range
// Therefore:
// fadeDistance = (0.8 * 0.8 * lightRangeSq)
// smoothFactor = (lightRangeSqr - distanceSqr) / (lightRangeSqr - fadeDistance)
// We can rewrite that to fit a MAD by doing
// distanceSqr * (1.0 / (fadeDistanceSqr - lightRangeSqr)) + (-lightRangeSqr / (fadeDistanceSqr - lightRangeSqr)
// distanceSqr * distanceAttenuation.y + distanceAttenuation.z
half smoothFactor = saturate(distanceSqr * distanceAttenuation.x + distanceAttenuation.y);
#endif
return lightAtten * smoothFactor;
}
half AngleAttenuation(half3 spotDirection, half3 lightDirection, half2 spotAttenuation)
{
// Spot Attenuation with a linear falloff can be defined as
// (SdotL - cosOuterAngle) / (cosInnerAngle - cosOuterAngle)
// This can be rewritten as
// invAngleRange = 1.0 / (cosInnerAngle - cosOuterAngle)
// SdotL * invAngleRange + (-cosOuterAngle * invAngleRange)
// SdotL * spotAttenuation.x + spotAttenuation.y
// If we precompute the terms in a MAD instruction
half SdotL = dot(spotDirection, lightDirection);
half atten = saturate(SdotL * spotAttenuation.x + spotAttenuation.y);
return atten * atten;
}
// Fills a light struct given a perObjectLightIndex
Light GetAdditionalPerObjectLight(int perObjectLightIndex, float3 positionWS)
{
// Abstraction over Light input constants
#if USE_STRUCTURED_BUFFER_FOR_LIGHT_DATA
float4 lightPositionWS = _AdditionalLightsBuffer[perObjectLightIndex].position;
half3 color = _AdditionalLightsBuffer[perObjectLightIndex].color.rgb;
half4 distanceAndSpotAttenuation = _AdditionalLightsBuffer[perObjectLightIndex].attenuation;
half4 spotDirection = _AdditionalLightsBuffer[perObjectLightIndex].spotDirection;
half4 lightOcclusionProbeInfo = _AdditionalLightsBuffer[perObjectLightIndex].occlusionProbeChannels;
#else
float4 lightPositionWS = _AdditionalLightsPosition[perObjectLightIndex];
half3 color = _AdditionalLightsColor[perObjectLightIndex].rgb;
half4 distanceAndSpotAttenuation = _AdditionalLightsAttenuation[perObjectLightIndex];
half4 spotDirection = _AdditionalLightsSpotDir[perObjectLightIndex];
half4 lightOcclusionProbeInfo = _AdditionalLightsOcclusionProbes[perObjectLightIndex];
#endif
// Directional lights store direction in lightPosition.xyz and have .w set to 0.0.
// This way the following code will work for both directional and punctual lights.
float3 lightVector = lightPositionWS.xyz - positionWS * lightPositionWS.w;
float distanceSqr = max(dot(lightVector, lightVector), HALF_MIN);
half3 lightDirection = half3(lightVector * rsqrt(distanceSqr));
half attenuation = DistanceAttenuation(distanceSqr, distanceAndSpotAttenuation.xy) * AngleAttenuation(spotDirection.xyz, lightDirection, distanceAndSpotAttenuation.zw);
Light light;
light.direction = lightDirection;
light.distanceAttenuation = attenuation;
/// light.shadowAttenuation = AdditionalLightRealtimeShadow(perObjectLightIndex, positionWS);
light.shadowAttenuation = 1;
light.color = color;
// In case we're using light probes, we can sample the attenuation from the `unity_ProbesOcclusion`
#if defined(LIGHTMAP_ON) || defined(_MIXED_LIGHTING_SUBTRACTIVE)
// First find the probe channel from the light.
// Then sample `unity_ProbesOcclusion` for the baked occlusion.
// If the light is not baked, the channel is -1, and we need to apply no occlusion.
// probeChannel is the index in 'unity_ProbesOcclusion' that holds the proper occlusion value.
int probeChannel = lightOcclusionProbeInfo.x;
// lightProbeContribution is set to 0 if we are indeed using a probe, otherwise set to 1.
half lightProbeContribution = lightOcclusionProbeInfo.y;
half probeOcclusionValue = unity_ProbesOcclusion[probeChannel];
light.distanceAttenuation *= max(probeOcclusionValue, lightProbeContribution);
#endif
return light;
}
uint GetPerObjectLightIndexOffset()
{
#if USE_STRUCTURED_BUFFER_FOR_LIGHT_DATA
return unity_LightData.x;
#else
return 0;
#endif
}
// Returns a per-object index given a loop index.
// This abstract the underlying data implementation for storing lights/light indices
int GetPerObjectLightIndex(uint index)
{
/////////////////////////////////////////////////////////////////////////////////////////////
// Structured Buffer Path /
// /
// Lights and light indices are stored in StructuredBuffer. We can just index them. /
// Currently all non-mobile platforms take this path :( /
// There are limitation in mobile GPUs to use SSBO (performance / no vertex shader support) /
/////////////////////////////////////////////////////////////////////////////////////////////
#if USE_STRUCTURED_BUFFER_FOR_LIGHT_DATA
uint offset = unity_LightData.x;
return _AdditionalLightsIndices[offset + index];
/////////////////////////////////////////////////////////////////////////////////////////////
// UBO path /
// /
// We store 8 light indices in float4 unity_LightIndices[2]; /
// Due to memory alignment unity doesn't support int[] or float[] /
// Even trying to reinterpret cast the unity_LightIndices to float[] won't work /
// it will cast to float4[] and create extra register pressure. :( /
/////////////////////////////////////////////////////////////////////////////////////////////
#elif !defined(SHADER_API_GLES)
// since index is uint shader compiler will implement
// div & mod as bitfield ops (shift and mask).
// TODO: Can we index a float4? Currently compiler is
// replacing unity_LightIndicesX[i] with a dp4 with identity matrix.
// u_xlat16_40 = dot(unity_LightIndices[int(u_xlatu13)], ImmCB_0_0_0[u_xlati1]);
// This increases both arithmetic and register pressure.
return unity_LightIndices[index / 4][index % 4];
#else
// Fallback to GLES2. No bitfield magic here :(.
// We limit to 4 indices per object and only sample unity_4LightIndices0.
// Conditional moves are branch free even on mali-400
// small arithmetic cost but no extra register pressure from ImmCB_0_0_0 matrix.
half2 lightIndex2 = (index < 2.0h) ? unity_LightIndices[0].xy : unity_LightIndices[0].zw;
half i_rem = (index < 2.0h) ? index : index - 2.0h;
return (i_rem < 1.0h) ? lightIndex2.x : lightIndex2.y;
#endif
}
// Fills a light struct given a loop i index. This will convert the i
// index to a perObjectLightIndex
Light GetAdditionalLight(uint i, float3 positionWS)
{
int perObjectLightIndex = GetPerObjectLightIndex(i);
return GetAdditionalPerObjectLight(perObjectLightIndex, positionWS);
}
int GetAdditionalLightsCount()
{
// TODO: we need to expose in SRP api an ability for the pipeline cap the amount of lights
// in the culling. This way we could do the loop branch with an uniform
// This would be helpful to support baking exceeding lights in SH as well
return min(_AdditionalLightsCount.x, unity_LightData.y);
}

View File

@ -1,12 +1,12 @@
Cartoon FX Remaster
(c) 2020, Jean Moreno
---------------------
You can make your own text effect like the prefabs in this folder.
Just duplicate a prefab, and edit it.
If editing the Prefab in a Scene directly, you will have to unpack it first (or go into edit Prefab mode from there).
The root GameObject contains the "CFXR_ParticleText" script, which allows you to change the text and other parameters.
The ParticleSystem on the root GameObject will define the behavior of each created letter: change parameters, and refresh the text to see the result.
Cartoon FX Remaster
(c) 2020, Jean Moreno
---------------------
You can make your own text effect like the prefabs in this folder.
Just duplicate a prefab, and edit it.
If editing the Prefab in a Scene directly, you will have to unpack it first (or go into edit Prefab mode from there).
The root GameObject contains the "CFXR_ParticleText" script, which allows you to change the text and other parameters.
The ParticleSystem on the root GameObject will define the behavior of each created letter: change parameters, and refresh the text to see the result.

View File

@ -1,263 +1,263 @@
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace CartoonFX
{
public class CFXR_Demo : MonoBehaviour
{
//----------------------------------------------------------------------------------------------------------------------------
// UI
public void NextEffect()
{
index++;
WrapIndex();
PlayAtIndex();
}
public void PreviousEffect()
{
index--;
WrapIndex();
PlayAtIndex();
}
public void ToggleSlowMo()
{
slowMotion = !slowMotion;
Time.timeScale = slowMotion ? 0.33f : 1.0f;
var color = Color.white;
color.a = slowMotion ? 1f : 0.33f;
btnSlowMotion.color = color;
lblSlowMotion.color = color;
}
public void ToggleCamera()
{
rotateCamera = !rotateCamera;
var color = Color.white;
color.a = rotateCamera ? 1f : 0.33f;
btnCameraRotation.color = color;
lblCameraRotation.color = color;
}
public void ToggleGround()
{
showGround = !showGround;
ground.SetActive(showGround);
var color = Color.white;
color.a = showGround ? 1f : 0.33f;
btnShowGround.color = color;
lblShowGround.color = color;
}
public void ToggleCameraShake()
{
CFXR_Effect.GlobalDisableCameraShake = !CFXR_Effect.GlobalDisableCameraShake;
var color = Color.white;
color.a = CFXR_Effect.GlobalDisableCameraShake ? 0.33f : 1.0f;
btnCamShake.color = color;
lblCamShake.color = color;
}
public void ToggleEffectsLights()
{
CFXR_Effect.GlobalDisableLights = !CFXR_Effect.GlobalDisableLights;
var color = Color.white;
color.a = CFXR_Effect.GlobalDisableLights ? 0.33f : 1.0f;
btnLights.color = color;
lblLights.color = color;
}
public void ToggleBloom()
{
bloom.enabled = !bloom.enabled;
var color = Color.white;
color.a = !bloom.enabled ? 0.33f : 1.0f;
btnBloom.color = color;
lblBloom.color = color;
}
public void ResetCam()
{
Camera.main.transform.position = camInitialPosition;
Camera.main.transform.rotation = camInitialRotation;
}
//----------------------------------------------------------------------------------------------------------------------------
public Image btnSlowMotion;
public Text lblSlowMotion;
public Image btnCameraRotation;
public Text lblCameraRotation;
public Image btnShowGround;
public Text lblShowGround;
public Image btnCamShake;
public Text lblCamShake;
public Image btnLights;
public Text lblLights;
public Image btnBloom;
public Text lblBloom;
[Space]
public Text labelEffect;
public Text labelIndex;
[Space]
public GameObject ground;
public Collider groundCollider;
public Transform demoCamera;
public MonoBehaviour bloom;
public float rotationSpeed = 10f;
public float zoomFactor = 1f;
bool slowMotion = false;
bool rotateCamera = false;
bool showGround = true;
//----------------------------------------------------------------------------------------------------------------------------
[System.NonSerialized] public GameObject currentEffect;
GameObject[] effectsList;
int index = 0;
Vector3 camInitialPosition;
Quaternion camInitialRotation;
void Awake()
{
camInitialPosition = Camera.main.transform.position;
camInitialRotation = Camera.main.transform.rotation;
var list = new List<GameObject>();
for (int i = 0; i < this.transform.childCount; i++)
{
var effect = this.transform.GetChild(i).gameObject;
list.Add(effect);
var cfxrEffect= effect.GetComponent<CFXR_Effect>();
if (cfxrEffect != null) cfxrEffect.clearBehavior = CFXR_Effect.ClearBehavior.Disable;
}
effectsList = list.ToArray();
PlayAtIndex();
UpdateLabels();
}
void Update()
{
if (rotateCamera)
{
demoCamera.RotateAround(Vector3.zero, Vector3.up, rotationSpeed * Time.deltaTime);
}
if (Input.GetKeyDown(KeyCode.Space))
{
if (currentEffect != null)
{
var ps = currentEffect.GetComponent<ParticleSystem>();
if (ps.isEmitting)
{
ps.Stop(true);
}
else
{
if (!currentEffect.gameObject.activeSelf)
{
currentEffect.SetActive(true);
}
else
{
ps.Play(true);
var cfxrEffects = currentEffect.GetComponentsInChildren<CFXR_Effect>();
foreach (var cfxr in cfxrEffects)
{
cfxr.ResetState();
}
}
}
}
}
if (Input.GetKeyDown(KeyCode.Delete) || Input.GetKeyDown(KeyCode.Backspace))
{
if (currentEffect != null)
{
currentEffect.SetActive(false);
currentEffect.SetActive(true);
}
}
if (Input.GetKeyDown(KeyCode.LeftArrow))
{
PreviousEffect();
}
if (Input.GetKeyDown(KeyCode.RightArrow))
{
NextEffect();
}
if (Input.GetMouseButtonDown(0))
{
var ray = demoCamera.GetComponent<Camera>().ScreenPointToRay(Input.mousePosition);
if (Physics.Raycast(ray))
{
if (currentEffect != null)
{
currentEffect.SetActive(false);
currentEffect.SetActive(true);
}
}
}
if (Input.GetMouseButtonDown(1) || Input.GetMouseButtonDown(2))
{
ResetCam();
}
float scroll = Input.GetAxis("Mouse ScrollWheel");
if (scroll != 0f)
{
Camera.main.transform.Translate(Vector3.forward * (scroll < 0f ? -1f : 1f) * zoomFactor, Space.Self);
}
}
public void PlayAtIndex()
{
if (currentEffect != null)
{
currentEffect.SetActive(false);
}
currentEffect = effectsList[index];
currentEffect.SetActive(true);
UpdateLabels();
}
void WrapIndex()
{
if (index < 0) index = effectsList.Length - 1;
if (index >= effectsList.Length) index = 0;
}
void UpdateLabels()
{
labelEffect.text = currentEffect.name;
labelIndex.text = string.Format("{0}/{1}", (index+1), effectsList.Length);
}
}
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace CartoonFX
{
public class CFXR_Demo : MonoBehaviour
{
//----------------------------------------------------------------------------------------------------------------------------
// UI
public void NextEffect()
{
index++;
WrapIndex();
PlayAtIndex();
}
public void PreviousEffect()
{
index--;
WrapIndex();
PlayAtIndex();
}
public void ToggleSlowMo()
{
slowMotion = !slowMotion;
Time.timeScale = slowMotion ? 0.33f : 1.0f;
var color = Color.white;
color.a = slowMotion ? 1f : 0.33f;
btnSlowMotion.color = color;
lblSlowMotion.color = color;
}
public void ToggleCamera()
{
rotateCamera = !rotateCamera;
var color = Color.white;
color.a = rotateCamera ? 1f : 0.33f;
btnCameraRotation.color = color;
lblCameraRotation.color = color;
}
public void ToggleGround()
{
showGround = !showGround;
ground.SetActive(showGround);
var color = Color.white;
color.a = showGround ? 1f : 0.33f;
btnShowGround.color = color;
lblShowGround.color = color;
}
public void ToggleCameraShake()
{
CFXR_Effect.GlobalDisableCameraShake = !CFXR_Effect.GlobalDisableCameraShake;
var color = Color.white;
color.a = CFXR_Effect.GlobalDisableCameraShake ? 0.33f : 1.0f;
btnCamShake.color = color;
lblCamShake.color = color;
}
public void ToggleEffectsLights()
{
CFXR_Effect.GlobalDisableLights = !CFXR_Effect.GlobalDisableLights;
var color = Color.white;
color.a = CFXR_Effect.GlobalDisableLights ? 0.33f : 1.0f;
btnLights.color = color;
lblLights.color = color;
}
public void ToggleBloom()
{
bloom.enabled = !bloom.enabled;
var color = Color.white;
color.a = !bloom.enabled ? 0.33f : 1.0f;
btnBloom.color = color;
lblBloom.color = color;
}
public void ResetCam()
{
Camera.main.transform.position = camInitialPosition;
Camera.main.transform.rotation = camInitialRotation;
}
//----------------------------------------------------------------------------------------------------------------------------
public Image btnSlowMotion;
public Text lblSlowMotion;
public Image btnCameraRotation;
public Text lblCameraRotation;
public Image btnShowGround;
public Text lblShowGround;
public Image btnCamShake;
public Text lblCamShake;
public Image btnLights;
public Text lblLights;
public Image btnBloom;
public Text lblBloom;
[Space]
public Text labelEffect;
public Text labelIndex;
[Space]
public GameObject ground;
public Collider groundCollider;
public Transform demoCamera;
public MonoBehaviour bloom;
public float rotationSpeed = 10f;
public float zoomFactor = 1f;
bool slowMotion = false;
bool rotateCamera = false;
bool showGround = true;
//----------------------------------------------------------------------------------------------------------------------------
[System.NonSerialized] public GameObject currentEffect;
GameObject[] effectsList;
int index = 0;
Vector3 camInitialPosition;
Quaternion camInitialRotation;
void Awake()
{
camInitialPosition = Camera.main.transform.position;
camInitialRotation = Camera.main.transform.rotation;
var list = new List<GameObject>();
for (int i = 0; i < this.transform.childCount; i++)
{
var effect = this.transform.GetChild(i).gameObject;
list.Add(effect);
var cfxrEffect= effect.GetComponent<CFXR_Effect>();
if (cfxrEffect != null) cfxrEffect.clearBehavior = CFXR_Effect.ClearBehavior.Disable;
}
effectsList = list.ToArray();
PlayAtIndex();
UpdateLabels();
}
void Update()
{
if (rotateCamera)
{
demoCamera.RotateAround(Vector3.zero, Vector3.up, rotationSpeed * Time.deltaTime);
}
if (Input.GetKeyDown(KeyCode.Space))
{
if (currentEffect != null)
{
var ps = currentEffect.GetComponent<ParticleSystem>();
if (ps.isEmitting)
{
ps.Stop(true);
}
else
{
if (!currentEffect.gameObject.activeSelf)
{
currentEffect.SetActive(true);
}
else
{
ps.Play(true);
var cfxrEffects = currentEffect.GetComponentsInChildren<CFXR_Effect>();
foreach (var cfxr in cfxrEffects)
{
cfxr.ResetState();
}
}
}
}
}
if (Input.GetKeyDown(KeyCode.Delete) || Input.GetKeyDown(KeyCode.Backspace))
{
if (currentEffect != null)
{
currentEffect.SetActive(false);
currentEffect.SetActive(true);
}
}
if (Input.GetKeyDown(KeyCode.LeftArrow))
{
PreviousEffect();
}
if (Input.GetKeyDown(KeyCode.RightArrow))
{
NextEffect();
}
if (Input.GetMouseButtonDown(0))
{
var ray = demoCamera.GetComponent<Camera>().ScreenPointToRay(Input.mousePosition);
if (Physics.Raycast(ray))
{
if (currentEffect != null)
{
currentEffect.SetActive(false);
currentEffect.SetActive(true);
}
}
}
if (Input.GetMouseButtonDown(1) || Input.GetMouseButtonDown(2))
{
ResetCam();
}
float scroll = Input.GetAxis("Mouse ScrollWheel");
if (scroll != 0f)
{
Camera.main.transform.Translate(Vector3.forward * (scroll < 0f ? -1f : 1f) * zoomFactor, Space.Self);
}
}
public void PlayAtIndex()
{
if (currentEffect != null)
{
currentEffect.SetActive(false);
}
currentEffect = effectsList[index];
currentEffect.SetActive(true);
UpdateLabels();
}
void WrapIndex()
{
if (index < 0) index = effectsList.Length - 1;
if (index >= effectsList.Length) index = 0;
}
void UpdateLabels()
{
labelEffect.text = currentEffect.name;
labelIndex.text = string.Format("{0}/{1}", (index+1), effectsList.Length);
}
}
}

View File

@ -1,21 +1,21 @@
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
using UnityEngine;
namespace CartoonFX
{
public class CFXR_Demo_Rotate : MonoBehaviour
{
public Vector3 axis = new Vector3(0,1,0);
public Vector3 center;
public float speed = 1.0f;
void Update()
{
this.transform.RotateAround(center, axis, speed * Time.deltaTime);
}
}
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
using UnityEngine;
namespace CartoonFX
{
public class CFXR_Demo_Rotate : MonoBehaviour
{
public Vector3 axis = new Vector3(0,1,0);
public Vector3 center;
public float speed = 1.0f;
void Update()
{
this.transform.RotateAround(center, axis, speed * Time.deltaTime);
}
}
}

View File

@ -1,42 +1,42 @@
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
using UnityEngine;
namespace CartoonFX
{
public class CFXR_Demo_Translate : MonoBehaviour
{
public Vector3 direction = new Vector3(0,1,0);
public bool randomRotation;
bool initialized;
Vector3 initialPosition;
void Awake()
{
if (!initialized)
{
initialized = true;
initialPosition = this.transform.position;
}
}
void OnEnable()
{
this.transform.position = initialPosition;
if (randomRotation)
{
this.transform.eulerAngles = Vector3.Lerp(Vector3.zero, Vector3.up * 360, Random.value);
}
}
void Update()
{
this.transform.Translate(direction * Time.deltaTime);
}
}
//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
using UnityEngine;
namespace CartoonFX
{
public class CFXR_Demo_Translate : MonoBehaviour
{
public Vector3 direction = new Vector3(0,1,0);
public bool randomRotation;
bool initialized;
Vector3 initialPosition;
void Awake()
{
if (!initialized)
{
initialized = true;
initialPosition = this.transform.position;
}
}
void OnEnable()
{
this.transform.position = initialPosition;
if (randomRotation)
{
this.transform.eulerAngles = Vector3.Lerp(Vector3.zero, Vector3.up * 360, Random.value);
}
}
void Update()
{
this.transform.Translate(direction * Time.deltaTime);
}
}
}

View File

@ -1,272 +1,272 @@
//
// Kino/Bloom v2 - Bloom filter for Unity
//
// Copyright (C) 2015, 2016 Keijiro Takahashi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
// Modified by Jean Moreno for Cartoon FX Remaster Demo
// - effect previews in SceneView
// - disabled a code warning
using UnityEngine;
namespace Kino
{
[ExecuteInEditMode]
[RequireComponent(typeof(Camera))]
[ImageEffectAllowedInSceneView]
public class Bloom : MonoBehaviour
{
#region Public Properties
/// Prefilter threshold (gamma-encoded)
/// Filters out pixels under this level of brightness.
public float thresholdGamma
{
get { return Mathf.Max(_threshold, 0); }
set { _threshold = value; }
}
/// Prefilter threshold (linearly-encoded)
/// Filters out pixels under this level of brightness.
public float thresholdLinear
{
get { return GammaToLinear(thresholdGamma); }
set { _threshold = LinearToGamma(value); }
}
[SerializeField]
[Tooltip("Filters out pixels under this level of brightness.")]
float _threshold = 0.8f;
/// Soft-knee coefficient
/// Makes transition between under/over-threshold gradual.
public float softKnee
{
get { return _softKnee; }
set { _softKnee = value; }
}
[SerializeField, Range(0, 1)]
[Tooltip("Makes transition between under/over-threshold gradual.")]
float _softKnee = 0.5f;
/// Bloom radius
/// Changes extent of veiling effects in a screen
/// resolution-independent fashion.
public float radius
{
get { return _radius; }
set { _radius = value; }
}
[SerializeField, Range(1, 7)]
[Tooltip("Changes extent of veiling effects\n" +
"in a screen resolution-independent fashion.")]
float _radius = 2.5f;
/// Bloom intensity
/// Blend factor of the result image.
public float intensity
{
get { return Mathf.Max(_intensity, 0); }
set { _intensity = value; }
}
[SerializeField]
[Tooltip("Blend factor of the result image.")]
float _intensity = 0.8f;
/// High quality mode
/// Controls filter quality and buffer resolution.
public bool highQuality
{
get { return _highQuality; }
set { _highQuality = value; }
}
[SerializeField]
[Tooltip("Controls filter quality and buffer resolution.")]
bool _highQuality = true;
/// Anti-flicker filter
/// Reduces flashing noise with an additional filter.
[SerializeField]
[Tooltip("Reduces flashing noise with an additional filter.")]
bool _antiFlicker = true;
public bool antiFlicker
{
get { return _antiFlicker; }
set { _antiFlicker = value; }
}
#endregion
#region Private Members
#pragma warning disable 0649
[SerializeField, HideInInspector]
Shader _shader;
#pragma warning restore 0649
Material _material;
const int kMaxIterations = 16;
RenderTexture[] _blurBuffer1 = new RenderTexture[kMaxIterations];
RenderTexture[] _blurBuffer2 = new RenderTexture[kMaxIterations];
float LinearToGamma(float x)
{
#if UNITY_5_3_OR_NEWER
return Mathf.LinearToGammaSpace(x);
#else
if (x <= 0.0031308f)
return 12.92f * x;
else
return 1.055f * Mathf.Pow(x, 1 / 2.4f) - 0.055f;
#endif
}
float GammaToLinear(float x)
{
#if UNITY_5_3_OR_NEWER
return Mathf.GammaToLinearSpace(x);
#else
if (x <= 0.04045f)
return x / 12.92f;
else
return Mathf.Pow((x + 0.055f) / 1.055f, 2.4f);
#endif
}
#endregion
#region MonoBehaviour Functions
void OnEnable()
{
var shader = _shader ? _shader : Shader.Find("Hidden/Kino/Bloom");
_material = new Material(shader);
_material.hideFlags = HideFlags.DontSave;
}
void OnDisable()
{
DestroyImmediate(_material);
}
void OnRenderImage(RenderTexture source, RenderTexture destination)
{
var useRGBM = Application.isMobilePlatform;
// source texture size
var tw = source.width;
var th = source.height;
// halve the texture size for the low quality mode
if (!_highQuality)
{
tw /= 2;
th /= 2;
}
// blur buffer format
var rtFormat = useRGBM ?
RenderTextureFormat.Default : RenderTextureFormat.DefaultHDR;
// determine the iteration count
var logh = Mathf.Log(th, 2) + _radius - 8;
var logh_i = (int)logh;
var iterations = Mathf.Clamp(logh_i, 1, kMaxIterations);
// update the shader properties
var lthresh = thresholdLinear;
_material.SetFloat("_Threshold", lthresh);
var knee = lthresh * _softKnee + 1e-5f;
var curve = new Vector3(lthresh - knee, knee * 2, 0.25f / knee);
_material.SetVector("_Curve", curve);
var pfo = !_highQuality && _antiFlicker;
_material.SetFloat("_PrefilterOffs", pfo ? -0.5f : 0.0f);
_material.SetFloat("_SampleScale", 0.5f + logh - logh_i);
_material.SetFloat("_Intensity", intensity);
// prefilter pass
var prefiltered = RenderTexture.GetTemporary(tw, th, 0, rtFormat);
var pass = _antiFlicker ? 1 : 0;
Graphics.Blit(source, prefiltered, _material, pass);
// construct a mip pyramid
var last = prefiltered;
for (var level = 0; level < iterations; level++)
{
_blurBuffer1[level] = RenderTexture.GetTemporary(
last.width / 2, last.height / 2, 0, rtFormat
);
pass = (level == 0) ? (_antiFlicker ? 3 : 2) : 4;
Graphics.Blit(last, _blurBuffer1[level], _material, pass);
last = _blurBuffer1[level];
}
// upsample and combine loop
for (var level = iterations - 2; level >= 0; level--)
{
var basetex = _blurBuffer1[level];
_material.SetTexture("_BaseTex", basetex);
_blurBuffer2[level] = RenderTexture.GetTemporary(
basetex.width, basetex.height, 0, rtFormat
);
pass = _highQuality ? 6 : 5;
Graphics.Blit(last, _blurBuffer2[level], _material, pass);
last = _blurBuffer2[level];
}
// finish process
_material.SetTexture("_BaseTex", source);
pass = _highQuality ? 8 : 7;
Graphics.Blit(last, destination, _material, pass);
// release the temporary buffers
for (var i = 0; i < kMaxIterations; i++)
{
if (_blurBuffer1[i] != null)
RenderTexture.ReleaseTemporary(_blurBuffer1[i]);
if (_blurBuffer2[i] != null)
RenderTexture.ReleaseTemporary(_blurBuffer2[i]);
_blurBuffer1[i] = null;
_blurBuffer2[i] = null;
}
RenderTexture.ReleaseTemporary(prefiltered);
}
#endregion
}
}
//
// Kino/Bloom v2 - Bloom filter for Unity
//
// Copyright (C) 2015, 2016 Keijiro Takahashi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
// Modified by Jean Moreno for Cartoon FX Remaster Demo
// - effect previews in SceneView
// - disabled a code warning
using UnityEngine;
namespace Kino
{
[ExecuteInEditMode]
[RequireComponent(typeof(Camera))]
[ImageEffectAllowedInSceneView]
public class Bloom : MonoBehaviour
{
#region Public Properties
/// Prefilter threshold (gamma-encoded)
/// Filters out pixels under this level of brightness.
public float thresholdGamma
{
get { return Mathf.Max(_threshold, 0); }
set { _threshold = value; }
}
/// Prefilter threshold (linearly-encoded)
/// Filters out pixels under this level of brightness.
public float thresholdLinear
{
get { return GammaToLinear(thresholdGamma); }
set { _threshold = LinearToGamma(value); }
}
[SerializeField]
[Tooltip("Filters out pixels under this level of brightness.")]
float _threshold = 0.8f;
/// Soft-knee coefficient
/// Makes transition between under/over-threshold gradual.
public float softKnee
{
get { return _softKnee; }
set { _softKnee = value; }
}
[SerializeField, Range(0, 1)]
[Tooltip("Makes transition between under/over-threshold gradual.")]
float _softKnee = 0.5f;
/// Bloom radius
/// Changes extent of veiling effects in a screen
/// resolution-independent fashion.
public float radius
{
get { return _radius; }
set { _radius = value; }
}
[SerializeField, Range(1, 7)]
[Tooltip("Changes extent of veiling effects\n" +
"in a screen resolution-independent fashion.")]
float _radius = 2.5f;
/// Bloom intensity
/// Blend factor of the result image.
public float intensity
{
get { return Mathf.Max(_intensity, 0); }
set { _intensity = value; }
}
[SerializeField]
[Tooltip("Blend factor of the result image.")]
float _intensity = 0.8f;
/// High quality mode
/// Controls filter quality and buffer resolution.
public bool highQuality
{
get { return _highQuality; }
set { _highQuality = value; }
}
[SerializeField]
[Tooltip("Controls filter quality and buffer resolution.")]
bool _highQuality = true;
/// Anti-flicker filter
/// Reduces flashing noise with an additional filter.
[SerializeField]
[Tooltip("Reduces flashing noise with an additional filter.")]
bool _antiFlicker = true;
public bool antiFlicker
{
get { return _antiFlicker; }
set { _antiFlicker = value; }
}
#endregion
#region Private Members
#pragma warning disable 0649
[SerializeField, HideInInspector]
Shader _shader;
#pragma warning restore 0649
Material _material;
const int kMaxIterations = 16;
RenderTexture[] _blurBuffer1 = new RenderTexture[kMaxIterations];
RenderTexture[] _blurBuffer2 = new RenderTexture[kMaxIterations];
float LinearToGamma(float x)
{
#if UNITY_5_3_OR_NEWER
return Mathf.LinearToGammaSpace(x);
#else
if (x <= 0.0031308f)
return 12.92f * x;
else
return 1.055f * Mathf.Pow(x, 1 / 2.4f) - 0.055f;
#endif
}
float GammaToLinear(float x)
{
#if UNITY_5_3_OR_NEWER
return Mathf.GammaToLinearSpace(x);
#else
if (x <= 0.04045f)
return x / 12.92f;
else
return Mathf.Pow((x + 0.055f) / 1.055f, 2.4f);
#endif
}
#endregion
#region MonoBehaviour Functions
void OnEnable()
{
var shader = _shader ? _shader : Shader.Find("Hidden/Kino/Bloom");
_material = new Material(shader);
_material.hideFlags = HideFlags.DontSave;
}
void OnDisable()
{
DestroyImmediate(_material);
}
void OnRenderImage(RenderTexture source, RenderTexture destination)
{
var useRGBM = Application.isMobilePlatform;
// source texture size
var tw = source.width;
var th = source.height;
// halve the texture size for the low quality mode
if (!_highQuality)
{
tw /= 2;
th /= 2;
}
// blur buffer format
var rtFormat = useRGBM ?
RenderTextureFormat.Default : RenderTextureFormat.DefaultHDR;
// determine the iteration count
var logh = Mathf.Log(th, 2) + _radius - 8;
var logh_i = (int)logh;
var iterations = Mathf.Clamp(logh_i, 1, kMaxIterations);
// update the shader properties
var lthresh = thresholdLinear;
_material.SetFloat("_Threshold", lthresh);
var knee = lthresh * _softKnee + 1e-5f;
var curve = new Vector3(lthresh - knee, knee * 2, 0.25f / knee);
_material.SetVector("_Curve", curve);
var pfo = !_highQuality && _antiFlicker;
_material.SetFloat("_PrefilterOffs", pfo ? -0.5f : 0.0f);
_material.SetFloat("_SampleScale", 0.5f + logh - logh_i);
_material.SetFloat("_Intensity", intensity);
// prefilter pass
var prefiltered = RenderTexture.GetTemporary(tw, th, 0, rtFormat);
var pass = _antiFlicker ? 1 : 0;
Graphics.Blit(source, prefiltered, _material, pass);
// construct a mip pyramid
var last = prefiltered;
for (var level = 0; level < iterations; level++)
{
_blurBuffer1[level] = RenderTexture.GetTemporary(
last.width / 2, last.height / 2, 0, rtFormat
);
pass = (level == 0) ? (_antiFlicker ? 3 : 2) : 4;
Graphics.Blit(last, _blurBuffer1[level], _material, pass);
last = _blurBuffer1[level];
}
// upsample and combine loop
for (var level = iterations - 2; level >= 0; level--)
{
var basetex = _blurBuffer1[level];
_material.SetTexture("_BaseTex", basetex);
_blurBuffer2[level] = RenderTexture.GetTemporary(
basetex.width, basetex.height, 0, rtFormat
);
pass = _highQuality ? 6 : 5;
Graphics.Blit(last, _blurBuffer2[level], _material, pass);
last = _blurBuffer2[level];
}
// finish process
_material.SetTexture("_BaseTex", source);
pass = _highQuality ? 8 : 7;
Graphics.Blit(last, destination, _material, pass);
// release the temporary buffers
for (var i = 0; i < kMaxIterations; i++)
{
if (_blurBuffer1[i] != null)
RenderTexture.ReleaseTemporary(_blurBuffer1[i]);
if (_blurBuffer2[i] != null)
RenderTexture.ReleaseTemporary(_blurBuffer2[i]);
_blurBuffer1[i] = null;
_blurBuffer2[i] = null;
}
RenderTexture.ReleaseTemporary(prefiltered);
}
#endregion
}
}

View File

@ -1,13 +1,13 @@
fileFormatVersion: 2
guid: 6363bba448bf64e60a763433f9ddf81b
timeCreated: 1445671165
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences:
- _shader: {fileID: 4800000, guid: 5a711a01011934ebcb58ef5ad52159d6, type: 3}
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 6363bba448bf64e60a763433f9ddf81b
timeCreated: 1445671165
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences:
- _shader: {fileID: 4800000, guid: 5a711a01011934ebcb58ef5ad52159d6, type: 3}
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,9 +1,9 @@
fileFormatVersion: 2
guid: 0e7e3e77db40c4cba83bb3a6ab440084
folderAsset: yes
timeCreated: 1445666764
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 0e7e3e77db40c4cba83bb3a6ab440084
folderAsset: yes
timeCreated: 1445666764
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,76 +1,76 @@
//
// Kino/Bloom v2 - Bloom filter for Unity
//
// Copyright (C) 2015, 2016 Keijiro Takahashi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
using UnityEngine;
using UnityEditor;
namespace Kino
{
[CanEditMultipleObjects]
[CustomEditor(typeof(Bloom))]
public class BloomEditor : Editor
{
BloomGraphDrawer _graph;
SerializedProperty _threshold;
SerializedProperty _softKnee;
SerializedProperty _radius;
SerializedProperty _intensity;
SerializedProperty _highQuality;
SerializedProperty _antiFlicker;
static GUIContent _textThreshold = new GUIContent("Threshold (gamma)");
void OnEnable()
{
_graph = new BloomGraphDrawer();
_threshold = serializedObject.FindProperty("_threshold");
_softKnee = serializedObject.FindProperty("_softKnee");
_radius = serializedObject.FindProperty("_radius");
_intensity = serializedObject.FindProperty("_intensity");
_highQuality = serializedObject.FindProperty("_highQuality");
_antiFlicker = serializedObject.FindProperty("_antiFlicker");
}
public override void OnInspectorGUI()
{
serializedObject.Update();
if (!serializedObject.isEditingMultipleObjects) {
EditorGUILayout.Space();
_graph.Prepare((Bloom)target);
_graph.DrawGraph();
EditorGUILayout.Space();
}
EditorGUILayout.PropertyField(_threshold, _textThreshold);
EditorGUILayout.PropertyField(_softKnee);
EditorGUILayout.PropertyField(_intensity);
EditorGUILayout.PropertyField(_radius);
EditorGUILayout.PropertyField(_highQuality);
EditorGUILayout.PropertyField(_antiFlicker);
serializedObject.ApplyModifiedProperties();
}
}
}
//
// Kino/Bloom v2 - Bloom filter for Unity
//
// Copyright (C) 2015, 2016 Keijiro Takahashi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
using UnityEngine;
using UnityEditor;
namespace Kino
{
[CanEditMultipleObjects]
[CustomEditor(typeof(Bloom))]
public class BloomEditor : Editor
{
BloomGraphDrawer _graph;
SerializedProperty _threshold;
SerializedProperty _softKnee;
SerializedProperty _radius;
SerializedProperty _intensity;
SerializedProperty _highQuality;
SerializedProperty _antiFlicker;
static GUIContent _textThreshold = new GUIContent("Threshold (gamma)");
void OnEnable()
{
_graph = new BloomGraphDrawer();
_threshold = serializedObject.FindProperty("_threshold");
_softKnee = serializedObject.FindProperty("_softKnee");
_radius = serializedObject.FindProperty("_radius");
_intensity = serializedObject.FindProperty("_intensity");
_highQuality = serializedObject.FindProperty("_highQuality");
_antiFlicker = serializedObject.FindProperty("_antiFlicker");
}
public override void OnInspectorGUI()
{
serializedObject.Update();
if (!serializedObject.isEditingMultipleObjects) {
EditorGUILayout.Space();
_graph.Prepare((Bloom)target);
_graph.DrawGraph();
EditorGUILayout.Space();
}
EditorGUILayout.PropertyField(_threshold, _textThreshold);
EditorGUILayout.PropertyField(_softKnee);
EditorGUILayout.PropertyField(_intensity);
EditorGUILayout.PropertyField(_radius);
EditorGUILayout.PropertyField(_highQuality);
EditorGUILayout.PropertyField(_antiFlicker);
serializedObject.ApplyModifiedProperties();
}
}
}

View File

@ -1,12 +1,12 @@
fileFormatVersion: 2
guid: 036bc30d96c3349ce86bfc8d95667da7
timeCreated: 1435816745
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 036bc30d96c3349ce86bfc8d95667da7
timeCreated: 1435816745
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,183 +1,183 @@
//
// Kino/Bloom v2 - Bloom filter for Unity
//
// Copyright (C) 2015, 2016 Keijiro Takahashi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
using UnityEngine;
using UnityEditor;
namespace Kino
{
// Class used for drawing the brightness response curve
public class BloomGraphDrawer
{
#region Public Methods
// Update internal state with a given bloom instance.
public void Prepare(Bloom bloom)
{
#if UNITY_5_6_OR_NEWER
if (bloom.GetComponent<Camera>().allowHDR)
#else
if (bloom.GetComponent<Camera>().hdr)
#endif
{
_rangeX = 6;
_rangeY = 1.5f;
}
else
{
_rangeX = 1;
_rangeY = 1;
}
_threshold = bloom.thresholdLinear;
_knee = bloom.softKnee * _threshold + 1e-5f;
// Intensity is capped to prevent sampling errors.
_intensity = Mathf.Min(bloom.intensity, 10);
}
// Draw the graph at the current position.
public void DrawGraph()
{
_rectGraph = GUILayoutUtility.GetRect(128, 80);
// Background
DrawRect(0, 0, _rangeX, _rangeY, 0.1f, 0.4f);
// Soft-knee range
DrawRect(_threshold - _knee, 0, _threshold + _knee, _rangeY, 0.25f, -1);
// Horizontal lines
for (var i = 1; i < _rangeY; i++)
DrawLine(0, i, _rangeX, i, 0.4f);
// Vertical lines
for (var i = 1; i < _rangeX; i++)
DrawLine(i, 0, i, _rangeY, 0.4f);
// Label
Handles.Label(
PointInRect(0, _rangeY) + Vector3.right,
"Brightness Response (linear)", EditorStyles.miniLabel
);
// Threshold line
DrawLine(_threshold, 0, _threshold, _rangeY, 0.6f);
// Response curve
var vcount = 0;
while (vcount < _curveResolution)
{
var x = _rangeX * vcount / (_curveResolution - 1);
var y = ResponseFunction(x);
if (y < _rangeY)
{
_curveVertices[vcount++] = PointInRect(x, y);
}
else
{
if (vcount > 1)
{
// Extend the last segment to the top edge of the rect.
var v1 = _curveVertices[vcount - 2];
var v2 = _curveVertices[vcount - 1];
var clip = (_rectGraph.y - v1.y) / (v2.y - v1.y);
_curveVertices[vcount - 1] = v1 + (v2 - v1) * clip;
}
break;
}
}
if (vcount > 1)
{
Handles.color = Color.white * 0.9f;
Handles.DrawAAPolyLine(2.0f, vcount, _curveVertices);
}
}
#endregion
#region Response Function
float _threshold;
float _knee;
float _intensity;
float ResponseFunction(float x)
{
var rq = Mathf.Clamp(x - _threshold + _knee, 0, _knee * 2);
rq = rq * rq * 0.25f / _knee;
return Mathf.Max(rq, x - _threshold) * _intensity;
}
#endregion
#region Graph Functions
// Number of vertices in curve
const int _curveResolution = 96;
// Vertex buffers
Vector3[] _rectVertices = new Vector3[4];
Vector3[] _lineVertices = new Vector3[2];
Vector3[] _curveVertices = new Vector3[_curveResolution];
Rect _rectGraph;
float _rangeX;
float _rangeY;
// Transform a point into the graph rect.
Vector3 PointInRect(float x, float y)
{
x = Mathf.Lerp(_rectGraph.x, _rectGraph.xMax, x / _rangeX);
y = Mathf.Lerp(_rectGraph.yMax, _rectGraph.y, y / _rangeY);
return new Vector3(x, y, 0);
}
// Draw a line in the graph rect.
void DrawLine(float x1, float y1, float x2, float y2, float grayscale)
{
_lineVertices[0] = PointInRect(x1, y1);
_lineVertices[1] = PointInRect(x2, y2);
Handles.color = Color.white * grayscale;
Handles.DrawAAPolyLine(2.0f, _lineVertices);
}
// Draw a rect in the graph rect.
void DrawRect(float x1, float y1, float x2, float y2, float fill, float line)
{
_rectVertices[0] = PointInRect(x1, y1);
_rectVertices[1] = PointInRect(x2, y1);
_rectVertices[2] = PointInRect(x2, y2);
_rectVertices[3] = PointInRect(x1, y2);
Handles.DrawSolidRectangleWithOutline(
_rectVertices,
fill < 0 ? Color.clear : Color.white * fill,
line < 0 ? Color.clear : Color.white * line
);
}
#endregion
}
}
//
// Kino/Bloom v2 - Bloom filter for Unity
//
// Copyright (C) 2015, 2016 Keijiro Takahashi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
using UnityEngine;
using UnityEditor;
namespace Kino
{
// Class used for drawing the brightness response curve
public class BloomGraphDrawer
{
#region Public Methods
// Update internal state with a given bloom instance.
public void Prepare(Bloom bloom)
{
#if UNITY_5_6_OR_NEWER
if (bloom.GetComponent<Camera>().allowHDR)
#else
if (bloom.GetComponent<Camera>().hdr)
#endif
{
_rangeX = 6;
_rangeY = 1.5f;
}
else
{
_rangeX = 1;
_rangeY = 1;
}
_threshold = bloom.thresholdLinear;
_knee = bloom.softKnee * _threshold + 1e-5f;
// Intensity is capped to prevent sampling errors.
_intensity = Mathf.Min(bloom.intensity, 10);
}
// Draw the graph at the current position.
public void DrawGraph()
{
_rectGraph = GUILayoutUtility.GetRect(128, 80);
// Background
DrawRect(0, 0, _rangeX, _rangeY, 0.1f, 0.4f);
// Soft-knee range
DrawRect(_threshold - _knee, 0, _threshold + _knee, _rangeY, 0.25f, -1);
// Horizontal lines
for (var i = 1; i < _rangeY; i++)
DrawLine(0, i, _rangeX, i, 0.4f);
// Vertical lines
for (var i = 1; i < _rangeX; i++)
DrawLine(i, 0, i, _rangeY, 0.4f);
// Label
Handles.Label(
PointInRect(0, _rangeY) + Vector3.right,
"Brightness Response (linear)", EditorStyles.miniLabel
);
// Threshold line
DrawLine(_threshold, 0, _threshold, _rangeY, 0.6f);
// Response curve
var vcount = 0;
while (vcount < _curveResolution)
{
var x = _rangeX * vcount / (_curveResolution - 1);
var y = ResponseFunction(x);
if (y < _rangeY)
{
_curveVertices[vcount++] = PointInRect(x, y);
}
else
{
if (vcount > 1)
{
// Extend the last segment to the top edge of the rect.
var v1 = _curveVertices[vcount - 2];
var v2 = _curveVertices[vcount - 1];
var clip = (_rectGraph.y - v1.y) / (v2.y - v1.y);
_curveVertices[vcount - 1] = v1 + (v2 - v1) * clip;
}
break;
}
}
if (vcount > 1)
{
Handles.color = Color.white * 0.9f;
Handles.DrawAAPolyLine(2.0f, vcount, _curveVertices);
}
}
#endregion
#region Response Function
float _threshold;
float _knee;
float _intensity;
float ResponseFunction(float x)
{
var rq = Mathf.Clamp(x - _threshold + _knee, 0, _knee * 2);
rq = rq * rq * 0.25f / _knee;
return Mathf.Max(rq, x - _threshold) * _intensity;
}
#endregion
#region Graph Functions
// Number of vertices in curve
const int _curveResolution = 96;
// Vertex buffers
Vector3[] _rectVertices = new Vector3[4];
Vector3[] _lineVertices = new Vector3[2];
Vector3[] _curveVertices = new Vector3[_curveResolution];
Rect _rectGraph;
float _rangeX;
float _rangeY;
// Transform a point into the graph rect.
Vector3 PointInRect(float x, float y)
{
x = Mathf.Lerp(_rectGraph.x, _rectGraph.xMax, x / _rangeX);
y = Mathf.Lerp(_rectGraph.yMax, _rectGraph.y, y / _rangeY);
return new Vector3(x, y, 0);
}
// Draw a line in the graph rect.
void DrawLine(float x1, float y1, float x2, float y2, float grayscale)
{
_lineVertices[0] = PointInRect(x1, y1);
_lineVertices[1] = PointInRect(x2, y2);
Handles.color = Color.white * grayscale;
Handles.DrawAAPolyLine(2.0f, _lineVertices);
}
// Draw a rect in the graph rect.
void DrawRect(float x1, float y1, float x2, float y2, float fill, float line)
{
_rectVertices[0] = PointInRect(x1, y1);
_rectVertices[1] = PointInRect(x2, y1);
_rectVertices[2] = PointInRect(x2, y2);
_rectVertices[3] = PointInRect(x1, y2);
Handles.DrawSolidRectangleWithOutline(
_rectVertices,
fill < 0 ? Color.clear : Color.white * fill,
line < 0 ? Color.clear : Color.white * line
);
}
#endregion
}
}

View File

@ -1,12 +1,12 @@
fileFormatVersion: 2
guid: 4afcb2949e7fb42679b587b8848b7e02
timeCreated: 1457674915
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 4afcb2949e7fb42679b587b8848b7e02
timeCreated: 1457674915
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,13 +1,13 @@
Bloom Post Effect by Keijiro Takahashi
https://github.com/keijiro/KinoBloom
---------------------------------------
MIT License
Copyright (c) 2015-2017 Keijiro Takahashi
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Bloom Post Effect by Keijiro Takahashi
https://github.com/keijiro/KinoBloom
---------------------------------------
MIT License
Copyright (c) 2015-2017 Keijiro Takahashi
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,9 +1,9 @@
fileFormatVersion: 2
guid: f44dd1607e93a4131a4003b39c363e93
folderAsset: yes
timeCreated: 1445666764
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: f44dd1607e93a4131a4003b39c363e93
folderAsset: yes
timeCreated: 1445666764
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,251 +1,251 @@
//
// Kino/Bloom v2 - Bloom filter for Unity
//
// Copyright (C) 2015, 2016 Keijiro Takahashi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#include "UnityCG.cginc"
// Mobile: use RGBM instead of float/half RGB
#define USE_RGBM defined(SHADER_API_MOBILE)
sampler2D _MainTex;
sampler2D _BaseTex;
float2 _MainTex_TexelSize;
float2 _BaseTex_TexelSize;
half4 _MainTex_ST;
half4 _BaseTex_ST;
float _PrefilterOffs;
half _Threshold;
half3 _Curve;
float _SampleScale;
half _Intensity;
// Brightness function
half Brightness(half3 c)
{
return max(max(c.r, c.g), c.b);
}
// 3-tap median filter
half3 Median(half3 a, half3 b, half3 c)
{
return a + b + c - min(min(a, b), c) - max(max(a, b), c);
}
// Clamp HDR value within a safe range
half3 SafeHDR(half3 c) { return min(c, 65000); }
half4 SafeHDR(half4 c) { return min(c, 65000); }
// RGBM encoding/decoding
half4 EncodeHDR(float3 rgb)
{
#if USE_RGBM
rgb *= 1.0 / 8;
float m = max(max(rgb.r, rgb.g), max(rgb.b, 1e-6));
m = ceil(m * 255) / 255;
return half4(rgb / m, m);
#else
return half4(rgb, 0);
#endif
}
float3 DecodeHDR(half4 rgba)
{
#if USE_RGBM
return rgba.rgb * rgba.a * 8;
#else
return rgba.rgb;
#endif
}
// Downsample with a 4x4 box filter
half3 DownsampleFilter(float2 uv)
{
float4 d = _MainTex_TexelSize.xyxy * float4(-1, -1, +1, +1);
half3 s;
s = DecodeHDR(tex2D(_MainTex, uv + d.xy));
s += DecodeHDR(tex2D(_MainTex, uv + d.zy));
s += DecodeHDR(tex2D(_MainTex, uv + d.xw));
s += DecodeHDR(tex2D(_MainTex, uv + d.zw));
return s * (1.0 / 4);
}
// Downsample with a 4x4 box filter + anti-flicker filter
half3 DownsampleAntiFlickerFilter(float2 uv)
{
float4 d = _MainTex_TexelSize.xyxy * float4(-1, -1, +1, +1);
half3 s1 = DecodeHDR(tex2D(_MainTex, uv + d.xy));
half3 s2 = DecodeHDR(tex2D(_MainTex, uv + d.zy));
half3 s3 = DecodeHDR(tex2D(_MainTex, uv + d.xw));
half3 s4 = DecodeHDR(tex2D(_MainTex, uv + d.zw));
// Karis's luma weighted average (using brightness instead of luma)
half s1w = 1 / (Brightness(s1) + 1);
half s2w = 1 / (Brightness(s2) + 1);
half s3w = 1 / (Brightness(s3) + 1);
half s4w = 1 / (Brightness(s4) + 1);
half one_div_wsum = 1 / (s1w + s2w + s3w + s4w);
return (s1 * s1w + s2 * s2w + s3 * s3w + s4 * s4w) * one_div_wsum;
}
half3 UpsampleFilter(float2 uv)
{
#if HIGH_QUALITY
// 9-tap bilinear upsampler (tent filter)
float4 d = _MainTex_TexelSize.xyxy * float4(1, 1, -1, 0) * _SampleScale;
half3 s;
s = DecodeHDR(tex2D(_MainTex, uv - d.xy));
s += DecodeHDR(tex2D(_MainTex, uv - d.wy)) * 2;
s += DecodeHDR(tex2D(_MainTex, uv - d.zy));
s += DecodeHDR(tex2D(_MainTex, uv + d.zw)) * 2;
s += DecodeHDR(tex2D(_MainTex, uv )) * 4;
s += DecodeHDR(tex2D(_MainTex, uv + d.xw)) * 2;
s += DecodeHDR(tex2D(_MainTex, uv + d.zy));
s += DecodeHDR(tex2D(_MainTex, uv + d.wy)) * 2;
s += DecodeHDR(tex2D(_MainTex, uv + d.xy));
return s * (1.0 / 16);
#else
// 4-tap bilinear upsampler
float4 d = _MainTex_TexelSize.xyxy * float4(-1, -1, +1, +1) * (_SampleScale * 0.5);
half3 s;
s = DecodeHDR(tex2D(_MainTex, uv + d.xy));
s += DecodeHDR(tex2D(_MainTex, uv + d.zy));
s += DecodeHDR(tex2D(_MainTex, uv + d.xw));
s += DecodeHDR(tex2D(_MainTex, uv + d.zw));
return s * (1.0 / 4);
#endif
}
//
// Vertex shader
//
v2f_img vert(appdata_img v)
{
v2f_img o;
o.pos = UnityObjectToClipPos(v.vertex);
o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST);
return o;
}
struct v2f_multitex
{
float4 pos : SV_POSITION;
float2 uvMain : TEXCOORD0;
float2 uvBase : TEXCOORD1;
};
v2f_multitex vert_multitex(appdata_img v)
{
v2f_multitex o;
o.pos = UnityObjectToClipPos(v.vertex);
o.uvMain = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST);
o.uvBase = UnityStereoScreenSpaceUVAdjust(v.texcoord, _BaseTex_ST);
#if UNITY_UV_STARTS_AT_TOP
if (_BaseTex_TexelSize.y < 0.0)
o.uvBase.y = 1.0 - v.texcoord.y;
#endif
return o;
}
//
// fragment shader
//
half4 frag_prefilter(v2f_img i) : SV_Target
{
float2 uv = i.uv + _MainTex_TexelSize.xy * _PrefilterOffs;
#if ANTI_FLICKER
float3 d = _MainTex_TexelSize.xyx * float3(1, 1, 0);
half4 s0 = SafeHDR(tex2D(_MainTex, uv));
half3 s1 = SafeHDR(tex2D(_MainTex, uv - d.xz).rgb);
half3 s2 = SafeHDR(tex2D(_MainTex, uv + d.xz).rgb);
half3 s3 = SafeHDR(tex2D(_MainTex, uv - d.zy).rgb);
half3 s4 = SafeHDR(tex2D(_MainTex, uv + d.zy).rgb);
half3 m = Median(Median(s0.rgb, s1, s2), s3, s4);
#else
half4 s0 = SafeHDR(tex2D(_MainTex, uv));
half3 m = s0.rgb;
#endif
#if UNITY_COLORSPACE_GAMMA
m = GammaToLinearSpace(m);
#endif
// Pixel brightness
half br = Brightness(m);
// Under-threshold part: quadratic curve
half rq = clamp(br - _Curve.x, 0, _Curve.y);
rq = _Curve.z * rq * rq;
// Combine and apply the brightness response curve.
m *= max(rq, br - _Threshold) / max(br, 1e-5);
return EncodeHDR(m);
}
half4 frag_downsample1(v2f_img i) : SV_Target
{
#if ANTI_FLICKER
return EncodeHDR(DownsampleAntiFlickerFilter(i.uv));
#else
return EncodeHDR(DownsampleFilter(i.uv));
#endif
}
half4 frag_downsample2(v2f_img i) : SV_Target
{
return EncodeHDR(DownsampleFilter(i.uv));
}
half4 frag_upsample(v2f_multitex i) : SV_Target
{
half3 base = DecodeHDR(tex2D(_BaseTex, i.uvBase));
half3 blur = UpsampleFilter(i.uvMain);
return EncodeHDR(base + blur);
}
half4 frag_upsample_final(v2f_multitex i) : SV_Target
{
half4 base = tex2D(_BaseTex, i.uvBase);
half3 blur = UpsampleFilter(i.uvMain);
#if UNITY_COLORSPACE_GAMMA
base.rgb = GammaToLinearSpace(base.rgb);
#endif
half3 cout = base.rgb + blur * _Intensity;
#if UNITY_COLORSPACE_GAMMA
cout = LinearToGammaSpace(cout);
#endif
return half4(cout, base.a);
}
//
// Kino/Bloom v2 - Bloom filter for Unity
//
// Copyright (C) 2015, 2016 Keijiro Takahashi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#include "UnityCG.cginc"
// Mobile: use RGBM instead of float/half RGB
#define USE_RGBM defined(SHADER_API_MOBILE)
sampler2D _MainTex;
sampler2D _BaseTex;
float2 _MainTex_TexelSize;
float2 _BaseTex_TexelSize;
half4 _MainTex_ST;
half4 _BaseTex_ST;
float _PrefilterOffs;
half _Threshold;
half3 _Curve;
float _SampleScale;
half _Intensity;
// Brightness function
half Brightness(half3 c)
{
return max(max(c.r, c.g), c.b);
}
// 3-tap median filter
half3 Median(half3 a, half3 b, half3 c)
{
return a + b + c - min(min(a, b), c) - max(max(a, b), c);
}
// Clamp HDR value within a safe range
half3 SafeHDR(half3 c) { return min(c, 65000); }
half4 SafeHDR(half4 c) { return min(c, 65000); }
// RGBM encoding/decoding
half4 EncodeHDR(float3 rgb)
{
#if USE_RGBM
rgb *= 1.0 / 8;
float m = max(max(rgb.r, rgb.g), max(rgb.b, 1e-6));
m = ceil(m * 255) / 255;
return half4(rgb / m, m);
#else
return half4(rgb, 0);
#endif
}
float3 DecodeHDR(half4 rgba)
{
#if USE_RGBM
return rgba.rgb * rgba.a * 8;
#else
return rgba.rgb;
#endif
}
// Downsample with a 4x4 box filter
half3 DownsampleFilter(float2 uv)
{
float4 d = _MainTex_TexelSize.xyxy * float4(-1, -1, +1, +1);
half3 s;
s = DecodeHDR(tex2D(_MainTex, uv + d.xy));
s += DecodeHDR(tex2D(_MainTex, uv + d.zy));
s += DecodeHDR(tex2D(_MainTex, uv + d.xw));
s += DecodeHDR(tex2D(_MainTex, uv + d.zw));
return s * (1.0 / 4);
}
// Downsample with a 4x4 box filter + anti-flicker filter
half3 DownsampleAntiFlickerFilter(float2 uv)
{
float4 d = _MainTex_TexelSize.xyxy * float4(-1, -1, +1, +1);
half3 s1 = DecodeHDR(tex2D(_MainTex, uv + d.xy));
half3 s2 = DecodeHDR(tex2D(_MainTex, uv + d.zy));
half3 s3 = DecodeHDR(tex2D(_MainTex, uv + d.xw));
half3 s4 = DecodeHDR(tex2D(_MainTex, uv + d.zw));
// Karis's luma weighted average (using brightness instead of luma)
half s1w = 1 / (Brightness(s1) + 1);
half s2w = 1 / (Brightness(s2) + 1);
half s3w = 1 / (Brightness(s3) + 1);
half s4w = 1 / (Brightness(s4) + 1);
half one_div_wsum = 1 / (s1w + s2w + s3w + s4w);
return (s1 * s1w + s2 * s2w + s3 * s3w + s4 * s4w) * one_div_wsum;
}
half3 UpsampleFilter(float2 uv)
{
#if HIGH_QUALITY
// 9-tap bilinear upsampler (tent filter)
float4 d = _MainTex_TexelSize.xyxy * float4(1, 1, -1, 0) * _SampleScale;
half3 s;
s = DecodeHDR(tex2D(_MainTex, uv - d.xy));
s += DecodeHDR(tex2D(_MainTex, uv - d.wy)) * 2;
s += DecodeHDR(tex2D(_MainTex, uv - d.zy));
s += DecodeHDR(tex2D(_MainTex, uv + d.zw)) * 2;
s += DecodeHDR(tex2D(_MainTex, uv )) * 4;
s += DecodeHDR(tex2D(_MainTex, uv + d.xw)) * 2;
s += DecodeHDR(tex2D(_MainTex, uv + d.zy));
s += DecodeHDR(tex2D(_MainTex, uv + d.wy)) * 2;
s += DecodeHDR(tex2D(_MainTex, uv + d.xy));
return s * (1.0 / 16);
#else
// 4-tap bilinear upsampler
float4 d = _MainTex_TexelSize.xyxy * float4(-1, -1, +1, +1) * (_SampleScale * 0.5);
half3 s;
s = DecodeHDR(tex2D(_MainTex, uv + d.xy));
s += DecodeHDR(tex2D(_MainTex, uv + d.zy));
s += DecodeHDR(tex2D(_MainTex, uv + d.xw));
s += DecodeHDR(tex2D(_MainTex, uv + d.zw));
return s * (1.0 / 4);
#endif
}
//
// Vertex shader
//
v2f_img vert(appdata_img v)
{
v2f_img o;
o.pos = UnityObjectToClipPos(v.vertex);
o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST);
return o;
}
struct v2f_multitex
{
float4 pos : SV_POSITION;
float2 uvMain : TEXCOORD0;
float2 uvBase : TEXCOORD1;
};
v2f_multitex vert_multitex(appdata_img v)
{
v2f_multitex o;
o.pos = UnityObjectToClipPos(v.vertex);
o.uvMain = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST);
o.uvBase = UnityStereoScreenSpaceUVAdjust(v.texcoord, _BaseTex_ST);
#if UNITY_UV_STARTS_AT_TOP
if (_BaseTex_TexelSize.y < 0.0)
o.uvBase.y = 1.0 - v.texcoord.y;
#endif
return o;
}
//
// fragment shader
//
half4 frag_prefilter(v2f_img i) : SV_Target
{
float2 uv = i.uv + _MainTex_TexelSize.xy * _PrefilterOffs;
#if ANTI_FLICKER
float3 d = _MainTex_TexelSize.xyx * float3(1, 1, 0);
half4 s0 = SafeHDR(tex2D(_MainTex, uv));
half3 s1 = SafeHDR(tex2D(_MainTex, uv - d.xz).rgb);
half3 s2 = SafeHDR(tex2D(_MainTex, uv + d.xz).rgb);
half3 s3 = SafeHDR(tex2D(_MainTex, uv - d.zy).rgb);
half3 s4 = SafeHDR(tex2D(_MainTex, uv + d.zy).rgb);
half3 m = Median(Median(s0.rgb, s1, s2), s3, s4);
#else
half4 s0 = SafeHDR(tex2D(_MainTex, uv));
half3 m = s0.rgb;
#endif
#if UNITY_COLORSPACE_GAMMA
m = GammaToLinearSpace(m);
#endif
// Pixel brightness
half br = Brightness(m);
// Under-threshold part: quadratic curve
half rq = clamp(br - _Curve.x, 0, _Curve.y);
rq = _Curve.z * rq * rq;
// Combine and apply the brightness response curve.
m *= max(rq, br - _Threshold) / max(br, 1e-5);
return EncodeHDR(m);
}
half4 frag_downsample1(v2f_img i) : SV_Target
{
#if ANTI_FLICKER
return EncodeHDR(DownsampleAntiFlickerFilter(i.uv));
#else
return EncodeHDR(DownsampleFilter(i.uv));
#endif
}
half4 frag_downsample2(v2f_img i) : SV_Target
{
return EncodeHDR(DownsampleFilter(i.uv));
}
half4 frag_upsample(v2f_multitex i) : SV_Target
{
half3 base = DecodeHDR(tex2D(_BaseTex, i.uvBase));
half3 blur = UpsampleFilter(i.uvMain);
return EncodeHDR(base + blur);
}
half4 frag_upsample_final(v2f_multitex i) : SV_Target
{
half4 base = tex2D(_BaseTex, i.uvBase);
half3 blur = UpsampleFilter(i.uvMain);
#if UNITY_COLORSPACE_GAMMA
base.rgb = GammaToLinearSpace(base.rgb);
#endif
half3 cout = base.rgb + blur * _Intensity;
#if UNITY_COLORSPACE_GAMMA
cout = LinearToGammaSpace(cout);
#endif
return half4(cout, base.a);
}

View File

@ -1,9 +1,9 @@
fileFormatVersion: 2
guid: 1b8325918052c4c5492831d116e3ed27
timeCreated: 1463470294
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1b8325918052c4c5492831d116e3ed27
timeCreated: 1463470294
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,141 +1,141 @@
//
// Kino/Bloom v2 - Bloom filter for Unity
//
// Copyright (C) 2015, 2016 Keijiro Takahashi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
Shader "Hidden/Kino/Bloom"
{
Properties
{
_MainTex("", 2D) = "" {}
_BaseTex("", 2D) = "" {}
}
SubShader
{
// 0: Prefilter
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#pragma multi_compile _ UNITY_COLORSPACE_GAMMA
#include "Bloom.cginc"
#pragma vertex vert
#pragma fragment frag_prefilter
#pragma target 3.0
ENDCG
}
// 1: Prefilter with anti-flicker
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#define ANTI_FLICKER 1
#pragma multi_compile _ UNITY_COLORSPACE_GAMMA
#include "Bloom.cginc"
#pragma vertex vert
#pragma fragment frag_prefilter
#pragma target 3.0
ENDCG
}
// 2: First level downsampler
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#include "Bloom.cginc"
#pragma vertex vert
#pragma fragment frag_downsample1
#pragma target 3.0
ENDCG
}
// 3: First level downsampler with anti-flicker
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#define ANTI_FLICKER 1
#include "Bloom.cginc"
#pragma vertex vert
#pragma fragment frag_downsample1
#pragma target 3.0
ENDCG
}
// 4: Second level downsampler
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#include "Bloom.cginc"
#pragma vertex vert
#pragma fragment frag_downsample2
#pragma target 3.0
ENDCG
}
// 5: Upsampler
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#include "Bloom.cginc"
#pragma vertex vert_multitex
#pragma fragment frag_upsample
#pragma target 3.0
ENDCG
}
// 6: High quality upsampler
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#define HIGH_QUALITY 1
#include "Bloom.cginc"
#pragma vertex vert_multitex
#pragma fragment frag_upsample
#pragma target 3.0
ENDCG
}
// 7: Combiner
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#pragma multi_compile _ UNITY_COLORSPACE_GAMMA
#include "Bloom.cginc"
#pragma vertex vert_multitex
#pragma fragment frag_upsample_final
#pragma target 3.0
ENDCG
}
// 8: High quality combiner
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#define HIGH_QUALITY 1
#pragma multi_compile _ UNITY_COLORSPACE_GAMMA
#include "Bloom.cginc"
#pragma vertex vert_multitex
#pragma fragment frag_upsample_final
#pragma target 3.0
ENDCG
}
}
}
//
// Kino/Bloom v2 - Bloom filter for Unity
//
// Copyright (C) 2015, 2016 Keijiro Takahashi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
Shader "Hidden/Kino/Bloom"
{
Properties
{
_MainTex("", 2D) = "" {}
_BaseTex("", 2D) = "" {}
}
SubShader
{
// 0: Prefilter
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#pragma multi_compile _ UNITY_COLORSPACE_GAMMA
#include "Bloom.cginc"
#pragma vertex vert
#pragma fragment frag_prefilter
#pragma target 3.0
ENDCG
}
// 1: Prefilter with anti-flicker
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#define ANTI_FLICKER 1
#pragma multi_compile _ UNITY_COLORSPACE_GAMMA
#include "Bloom.cginc"
#pragma vertex vert
#pragma fragment frag_prefilter
#pragma target 3.0
ENDCG
}
// 2: First level downsampler
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#include "Bloom.cginc"
#pragma vertex vert
#pragma fragment frag_downsample1
#pragma target 3.0
ENDCG
}
// 3: First level downsampler with anti-flicker
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#define ANTI_FLICKER 1
#include "Bloom.cginc"
#pragma vertex vert
#pragma fragment frag_downsample1
#pragma target 3.0
ENDCG
}
// 4: Second level downsampler
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#include "Bloom.cginc"
#pragma vertex vert
#pragma fragment frag_downsample2
#pragma target 3.0
ENDCG
}
// 5: Upsampler
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#include "Bloom.cginc"
#pragma vertex vert_multitex
#pragma fragment frag_upsample
#pragma target 3.0
ENDCG
}
// 6: High quality upsampler
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#define HIGH_QUALITY 1
#include "Bloom.cginc"
#pragma vertex vert_multitex
#pragma fragment frag_upsample
#pragma target 3.0
ENDCG
}
// 7: Combiner
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#pragma multi_compile _ UNITY_COLORSPACE_GAMMA
#include "Bloom.cginc"
#pragma vertex vert_multitex
#pragma fragment frag_upsample_final
#pragma target 3.0
ENDCG
}
// 8: High quality combiner
Pass
{
ZTest Always Cull Off ZWrite Off
CGPROGRAM
#define HIGH_QUALITY 1
#pragma multi_compile _ UNITY_COLORSPACE_GAMMA
#include "Bloom.cginc"
#pragma vertex vert_multitex
#pragma fragment frag_upsample_final
#pragma target 3.0
ENDCG
}
}
}

View File

@ -1,9 +1,9 @@
fileFormatVersion: 2
guid: 5a711a01011934ebcb58ef5ad52159d6
timeCreated: 1435809878
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 5a711a01011934ebcb58ef5ad52159d6
timeCreated: 1435809878
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,101 +1,101 @@
Cartoon FX Remaster FREE, version R 1.0
2023/05/08
© 2012-2023 - Jean Moreno
=======================================
! NOTE ABOUT URP !
------------------
If almost all effects don't show in URP, it probably is because the Depth Texture is disabled.
This texture is needed for soft particles to work, and they are enabled by default.
You can either:
- enable the Depth Texture in the URP asset
- disable soft particles globally by uncommenting the relevant line in the CFXR_Settings.cginc file
ABOUT
-----
"Cartoon FX Remaster" is an update to the old "Cartoon FX Pack" assets.
All effects have been remade from scratch using:
- new shaders with special effects such as dissolve animation, UV distortion, edge fading, HDR colors, single channel textures for reduced memory usage, shadow casting and dithering
- optimized meshes where relevant to reduce overdraw/fill-rate issues
- high-resolution hand-drawn textures
- specialized shader to draw perfect circles and rings while reducing overdraw (using a ring mesh instead of a quad)
This is the free version containing a sample of effects taken from the four commercial packs.
The license is the same as the commercial packs, including commercial use of the effects in games and apps.
The full license can be found here: https://unity.com/legal/as-terms (Appendix 1, EULA)
"Cartoon FX Remaster" supports the built-in render pipeline and URP.
PREFABS
-------
Particle Systems prefabs are located in "Cartoon FX Remaster/CFXR Prefabs" folder.
All prefabs and their assets have a CFXR_ prefix to easily recognize them.
LEGACY EFFECTS
--------------
All the old effects from "Cartoon FX Free" are still available in the "Cartoon FX (legacy)" folder.
MOBILE OPTIMIZED PREFABS?
-------------------------
Unlike the Legacy effects, "Cartoon FX Remaster" doesn't include mobile-specific prefabs.
This is because:
- mobile devices are much more powerful compared to Cartoon FX Pack 1's initial release in 2012
- prefabs are all already optimized and use a relatively small number of particles each
TROUBLESHOOTING
---------------
* Almost all prefabs have the CFXR_Effect script attached: it handles auto-destruction or deactivation of the GameObject once an effect has finished playing, as well as camera shake and light animation where relevant
* If you don't want the camera shake and/or the lights, you can globally disable them in the CFXR_Effect.cs script: look for the global defines at the top of the file and uncomment them.
* Effects were authored using Linear Color Space; use that for the best results (in Player settings).
* If you have problems with z-sorting (transparent objects appearing in front of other when their position is actually behind), try changing the values in the Particle System -> Renderer -> Sorting Fudge; as long as the relative order is respected between the different particle systems of a same prefab, it should work ok.
* You can change the global HDR scale in the "CFXR_SETTINGS.cginc" file, if you need to adjust the effects for your bloom parameters for example.
* You can entirely disable Soft Particles in "CFXR_SETTINGS.cginc" too by uncommenting the '#define GLOBAL_DISABLE_SOFT_PARTICLES' line at the top.
* URP: If your particles don't render in the Game View or in a build, it could be because "Depth Texture" is disabled: either enable it in the URP asset for Soft Particles to work, or disable Soft Particles entirely (see above).
PLEASE LEAVE A REVIEW OR RATE THE PACKAGE IF YOU FIND IT USEFUL!
It helps a lot! :)
Enjoy! :)
CONTACT
-------
Questions, suggestions, help needed?
Contact me at:
jean.moreno.public+unity@gmail.com
I'd be happy to see any effects used in your project, so feel free to drop me a line about that! :)
RELEASE NOTES
-------------
R 1.0.5
- Removed mentions of the "Cartoon FX Easy Editor" in the readme files as it is not included with the free version of Cartoon FX Remaster
R 1.0.4
- Reorganized the shader code in a separate file to avoid a 'multi_compile' hack, which will hopefully fix issues with Asset Bundles/Addressables
R 1.0.3
- Improved CFXR_ParticleText usability when toggling the "is Dynamic" flag on an existing text effect
- Disabled mesh GPU instancing in the shaders because it was causing too many issues (even when using Unity's default particle shader)
R 1.0.2
- Removed GPU instancing support on the "CFXR Procedural Ring" shader, because it visually breaks it
- Fixed compilation error related to 'projPos' in the "CFXR Particle Glow" shader
R 1.0.1
- Added support for GPU instancing in the shaders
- Fixed possible build error when adding a text effect in a prefab due to HideFlags
R 1.0.0
- First release of "Cartoon FX Remaster FREE" with new free effects taken from all four Remaster packs
Cartoon FX Remaster FREE, version R 1.0
2023/05/08
© 2012-2023 - Jean Moreno
=======================================
! NOTE ABOUT URP !
------------------
If almost all effects don't show in URP, it probably is because the Depth Texture is disabled.
This texture is needed for soft particles to work, and they are enabled by default.
You can either:
- enable the Depth Texture in the URP asset
- disable soft particles globally by uncommenting the relevant line in the CFXR_Settings.cginc file
ABOUT
-----
"Cartoon FX Remaster" is an update to the old "Cartoon FX Pack" assets.
All effects have been remade from scratch using:
- new shaders with special effects such as dissolve animation, UV distortion, edge fading, HDR colors, single channel textures for reduced memory usage, shadow casting and dithering
- optimized meshes where relevant to reduce overdraw/fill-rate issues
- high-resolution hand-drawn textures
- specialized shader to draw perfect circles and rings while reducing overdraw (using a ring mesh instead of a quad)
This is the free version containing a sample of effects taken from the four commercial packs.
The license is the same as the commercial packs, including commercial use of the effects in games and apps.
The full license can be found here: https://unity.com/legal/as-terms (Appendix 1, EULA)
"Cartoon FX Remaster" supports the built-in render pipeline and URP.
PREFABS
-------
Particle Systems prefabs are located in "Cartoon FX Remaster/CFXR Prefabs" folder.
All prefabs and their assets have a CFXR_ prefix to easily recognize them.
LEGACY EFFECTS
--------------
All the old effects from "Cartoon FX Free" are still available in the "Cartoon FX (legacy)" folder.
MOBILE OPTIMIZED PREFABS?
-------------------------
Unlike the Legacy effects, "Cartoon FX Remaster" doesn't include mobile-specific prefabs.
This is because:
- mobile devices are much more powerful compared to Cartoon FX Pack 1's initial release in 2012
- prefabs are all already optimized and use a relatively small number of particles each
TROUBLESHOOTING
---------------
* Almost all prefabs have the CFXR_Effect script attached: it handles auto-destruction or deactivation of the GameObject once an effect has finished playing, as well as camera shake and light animation where relevant
* If you don't want the camera shake and/or the lights, you can globally disable them in the CFXR_Effect.cs script: look for the global defines at the top of the file and uncomment them.
* Effects were authored using Linear Color Space; use that for the best results (in Player settings).
* If you have problems with z-sorting (transparent objects appearing in front of other when their position is actually behind), try changing the values in the Particle System -> Renderer -> Sorting Fudge; as long as the relative order is respected between the different particle systems of a same prefab, it should work ok.
* You can change the global HDR scale in the "CFXR_SETTINGS.cginc" file, if you need to adjust the effects for your bloom parameters for example.
* You can entirely disable Soft Particles in "CFXR_SETTINGS.cginc" too by uncommenting the '#define GLOBAL_DISABLE_SOFT_PARTICLES' line at the top.
* URP: If your particles don't render in the Game View or in a build, it could be because "Depth Texture" is disabled: either enable it in the URP asset for Soft Particles to work, or disable Soft Particles entirely (see above).
PLEASE LEAVE A REVIEW OR RATE THE PACKAGE IF YOU FIND IT USEFUL!
It helps a lot! :)
Enjoy! :)
CONTACT
-------
Questions, suggestions, help needed?
Contact me at:
jean.moreno.public+unity@gmail.com
I'd be happy to see any effects used in your project, so feel free to drop me a line about that! :)
RELEASE NOTES
-------------
R 1.0.5
- Removed mentions of the "Cartoon FX Easy Editor" in the readme files as it is not included with the free version of Cartoon FX Remaster
R 1.0.4
- Reorganized the shader code in a separate file to avoid a 'multi_compile' hack, which will hopefully fix issues with Asset Bundles/Addressables
R 1.0.3
- Improved CFXR_ParticleText usability when toggling the "is Dynamic" flag on an existing text effect
- Disabled mesh GPU instancing in the shaders because it was causing too many issues (even when using Unity's default particle shader)
R 1.0.2
- Removed GPU instancing support on the "CFXR Procedural Ring" shader, because it visually breaks it
- Fixed compilation error related to 'projPos' in the "CFXR Particle Glow" shader
R 1.0.1
- Added support for GPU instancing in the shaders
- Fixed possible build error when adding a text effect in a prefab due to HideFlags
R 1.0.0
- First release of "Cartoon FX Remaster FREE" with new free effects taken from all four Remaster packs

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<linker>
<assembly fullname="System">
<type fullname="System.ComponentModel.TypeConverter" preserve="all" />
<!-- <namespace fullname="System.ComponentModel" preserve="all" /> -->
</assembly>
<?xml version="1.0" encoding="utf-8" ?>
<linker>
<assembly fullname="System">
<type fullname="System.ComponentModel.TypeConverter" preserve="all" />
<!-- <namespace fullname="System.ComponentModel" preserve="all" /> -->
</assembly>
</linker>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.unity.ads" android:versionName="1.0" android:versionCode="1">
<application>
<uses-library android:required="false" android:name="org.apache.http.legacy" />
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-3966734202864173~3172778738" />
</application>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.unity.ads" android:versionName="1.0" android:versionCode="1">
<application>
<uses-library android:required="false" android:name="org.apache.http.legacy" />
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-3966734202864173~3172778738" />
</application>
</manifest>

BIN
Assets/SFX/powerdown.mp3 Normal file

Binary file not shown.

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 8321a6bdcaf12834ea7402197bccb4a5
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/SFX/powerup.mp3 Normal file

Binary file not shown.

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 3b37246743fcfb44da109241bbc1f16d
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -3999,6 +3999,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
explosionSFX: {fileID: 8300000, guid: 396008ada1d7b7b499d3e85cdbd66542, type: 3}
powerupSFX: {fileID: 8300000, guid: 3b37246743fcfb44da109241bbc1f16d, type: 3}
powerdownSFX: {fileID: 8300000, guid: 8321a6bdcaf12834ea7402197bccb4a5, type: 3}
whooshSFX: {fileID: 8300000, guid: 9ff1952e5fa85cb4c8540e8f409ee0df, type: 3}
SourceSFX: {fileID: 1319665561}
SourceMusic: {fileID: 804316955}
levels:

View File

@ -1,158 +1,158 @@
using System;
using System.Collections;
using System.Collections.Generic;
using GoogleMobileAds.Api;
using UnityEngine;
public class AdsManager : MonoBehaviour
{
// Start is called before the first frame update
public static AdsManager instance;
void Awake(){
if(instance!= null){Destroy(gameObject);}
instance = this;
}
const string intAdId = "ca-app-pub-3966734202864173/9071918772";
const string rewardedAdId = "ca-app-pub-3966734202864173/7802288880";
void Start()
{
DontDestroyOnLoad(gameObject);
// Initialize the Google Mobile Ads SDK.
MobileAds.Initialize(initStatus => { Debug.Log("admob Init status : " + initStatus.ToString());});
StartCoroutine(ReloadAds(true));
}
private InterstitialAd interstitialAd;
/// <summary>
/// Loads the interstitial ad.
/// </summary>
public void LoadInterstitialAd()
{
// Clean up the old ad before loading a new one.
if (interstitialAd != null)
{
interstitialAd.Destroy();
interstitialAd = null;
}
Debug.Log("Loading the interstitial ad.");
// create our request used to load the ad.
var adRequest = new AdRequest.Builder()
.AddKeyword("unity-admob-sample")
.Build();
// send the request to load the ad.
InterstitialAd.Load(intAdId, adRequest,
(InterstitialAd ad, LoadAdError error) =>
{
// if error is not null, the load request failed.
if (error != null || ad == null)
{
Debug.LogError("interstitial ad failed to load an ad " +
"with error : " + error);
return;
}
Debug.Log("Interstitial ad loaded with response : "
+ ad.GetResponseInfo());
interstitialAd = ad;
});
}
public void ShowIntAd()
{
if (interstitialAd != null && interstitialAd.CanShowAd())
{
Debug.Log("Showing interstitial ad.");
interstitialAd.Show();
}
else
{
Debug.LogError("Interstitial ad is not ready yet.");
}
StartCoroutine(ReloadAds(false));
}
private RewardedAd rewardedAd;
/// <summary>
/// Loads the rewarded ad.
/// </summary>
public void LoadRewardedAd()
{
// Clean up the old ad before loading a new one.
if (rewardedAd != null)
{
rewardedAd.Destroy();
rewardedAd = null;
}
Debug.Log("Loading the rewarded ad.");
// create our request used to load the ad.
var adRequest = new AdRequest.Builder().Build();
// send the request to load the ad.
RewardedAd.Load(rewardedAdId, adRequest,
(RewardedAd ad, LoadAdError error) =>
{
// if error is not null, the load request failed.
if (error != null || ad == null)
{
Debug.LogError("Rewarded ad failed to load an ad " +
"with error : " + error);
return;
}
Debug.Log("Rewarded ad loaded with response : "
+ ad.GetResponseInfo());
rewardedAd = ad;
rewardedAd.OnAdPaid += OnRewardSuccess;
});
}
private void OnRewardSuccess(AdValue obj)
{
// GameManager.AdWatched();
}
public void ShowRewardedAd()
{
const string rewardMsg =
"Rewarded ad rewarded the user. Type: {0}, amount: {1}.";
if (rewardedAd != null && rewardedAd.CanShowAd())
{
rewardedAd.Show((Reward reward) =>
{
// TODO: Reward the user.
Debug.Log(String.Format(rewardMsg, reward.Type, reward.Amount));
});
}
StartCoroutine(ReloadAds(true));
}
IEnumerator ReloadAds(bool rewarded){
yield return new WaitForSeconds(2);
LoadInterstitialAd();
if(rewarded){
LoadRewardedAd();
}
}
}
using System;
using System.Collections;
using System.Collections.Generic;
using GoogleMobileAds.Api;
using UnityEngine;
public class AdsManager : MonoBehaviour
{
// Start is called before the first frame update
public static AdsManager instance;
void Awake(){
if(instance!= null){Destroy(gameObject);}
instance = this;
}
const string intAdId = "ca-app-pub-3966734202864173/9071918772";
const string rewardedAdId = "ca-app-pub-3966734202864173/7802288880";
void Start()
{
DontDestroyOnLoad(gameObject);
// Initialize the Google Mobile Ads SDK.
MobileAds.Initialize(initStatus => { Debug.Log("admob Init status : " + initStatus.ToString());});
StartCoroutine(ReloadAds(true));
}
private InterstitialAd interstitialAd;
/// <summary>
/// Loads the interstitial ad.
/// </summary>
public void LoadInterstitialAd()
{
// Clean up the old ad before loading a new one.
if (interstitialAd != null)
{
interstitialAd.Destroy();
interstitialAd = null;
}
Debug.Log("Loading the interstitial ad.");
// create our request used to load the ad.
var adRequest = new AdRequest.Builder()
.AddKeyword("unity-admob-sample")
.Build();
// send the request to load the ad.
InterstitialAd.Load(intAdId, adRequest,
(InterstitialAd ad, LoadAdError error) =>
{
// if error is not null, the load request failed.
if (error != null || ad == null)
{
Debug.LogError("interstitial ad failed to load an ad " +
"with error : " + error);
return;
}
Debug.Log("Interstitial ad loaded with response : "
+ ad.GetResponseInfo());
interstitialAd = ad;
});
}
public void ShowIntAd()
{
if (interstitialAd != null && interstitialAd.CanShowAd())
{
Debug.Log("Showing interstitial ad.");
interstitialAd.Show();
}
else
{
Debug.LogError("Interstitial ad is not ready yet.");
}
StartCoroutine(ReloadAds(false));
}
private RewardedAd rewardedAd;
/// <summary>
/// Loads the rewarded ad.
/// </summary>
public void LoadRewardedAd()
{
// Clean up the old ad before loading a new one.
if (rewardedAd != null)
{
rewardedAd.Destroy();
rewardedAd = null;
}
Debug.Log("Loading the rewarded ad.");
// create our request used to load the ad.
var adRequest = new AdRequest.Builder().Build();
// send the request to load the ad.
RewardedAd.Load(rewardedAdId, adRequest,
(RewardedAd ad, LoadAdError error) =>
{
// if error is not null, the load request failed.
if (error != null || ad == null)
{
Debug.LogError("Rewarded ad failed to load an ad " +
"with error : " + error);
return;
}
Debug.Log("Rewarded ad loaded with response : "
+ ad.GetResponseInfo());
rewardedAd = ad;
rewardedAd.OnAdPaid += OnRewardSuccess;
});
}
private void OnRewardSuccess(AdValue obj)
{
// GameManager.AdWatched();
}
public void ShowRewardedAd()
{
const string rewardMsg =
"Rewarded ad rewarded the user. Type: {0}, amount: {1}.";
if (rewardedAd != null && rewardedAd.CanShowAd())
{
rewardedAd.Show((Reward reward) =>
{
// TODO: Reward the user.
Debug.Log(String.Format(rewardMsg, reward.Type, reward.Amount));
});
}
StartCoroutine(ReloadAds(true));
}
IEnumerator ReloadAds(bool rewarded){
yield return new WaitForSeconds(2);
LoadInterstitialAd();
if(rewarded){
LoadRewardedAd();
}
}
}

View File

@ -0,0 +1,92 @@
using System.Collections;
using System.Collections.Generic;
using System.Text;
using AppleAuth;
using AppleAuth.Enums;
using AppleAuth.Interfaces;
using AppleAuth.Native;
using UnityEngine;
public class AppleLogin : MonoBehaviour
{
public GoogleLoginManager googleLogin;
IAppleAuthManager m_AppleAuthManager;
public string Token { get; private set; }
public string Error { get; private set; }
public void Initialize()
{
var deserializer = new PayloadDeserializer();
m_AppleAuthManager = new AppleAuthManager(deserializer);
}
public void Update()
{
if (m_AppleAuthManager != null)
{
m_AppleAuthManager.Update();
}
}
public void LoginToApple()
{
// Initialize the Apple Auth Manager
if (m_AppleAuthManager == null)
{
Initialize();
}
// Set the login arguments
var loginArgs = new AppleAuthLoginArgs(LoginOptions.IncludeEmail | LoginOptions.IncludeFullName);
// Perform the login
m_AppleAuthManager.LoginWithAppleId(
loginArgs,
credential =>
{
var appleIDCredential = credential as IAppleIDCredential;
if (appleIDCredential != null)
{
var idToken = Encoding.UTF8.GetString(
appleIDCredential.IdentityToken,
0,
appleIDCredential.IdentityToken.Length);
Debug.Log("Sign-in with Apple successfully done. IDToken: " + idToken);
Token = idToken;
if (appleIDCredential == null)
{
MessageDialog.instance.ShowMessage("Error", "Failed to login using Apple ID.\nError Code: A-00");
}else if(appleIDCredential.Email == null)
{
MessageDialog.instance.ShowMessage("Error", "Failed to login using Apple ID.\nError Code: A-0E");
}
else if (appleIDCredential.FullName == null)
{
MessageDialog.instance.ShowMessage("Error", "Failed to login using Apple ID.\nError Code: A-0U");
}
var fullname = appleIDCredential.Email;
Debug.Log("Email : " + appleIDCredential.Email);
Debug.Log("User :" + fullname);
googleLogin.OnAppleSigninDone(fullname, appleIDCredential.Email);
}
else
{
Debug.Log("Sign-in with Apple error. Message: appleIDCredential is null");
Error = "Retrieving Apple Id Token failed.";
}
},
error =>
{
Debug.Log("Sign-in with Apple error. Message: " + error);
Error = "Retrieving Apple Id Token failed.";
}
);
}
}

View File

@ -1,84 +1,102 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AudioManager : MonoBehaviour
{
public static AudioManager instance;
public AudioClip explosionSFX;
[SerializeField]public AudioSource SourceSFX;
[SerializeField]public AudioSource SourceMusic;
[SerializeField]public LevelAudioCombo[] levels;
public static bool isMuteMusic {get{
if(PlayerPrefs.HasKey("music")){
return PlayerPrefs.GetInt("music") == 0;
}else{
return false;
}
}}
public static bool isMuteSFX {get{
if(PlayerPrefs.HasKey("sfx")){
return PlayerPrefs.GetInt("sfx") == 0;
}else{
return false;
}
}}
public static void ToggleMusic(){
if(isMuteMusic){
PlayerPrefs.SetInt("music",1);
instance.SourceMusic.volume = instance.defVol;
}else{
PlayerPrefs.SetInt("music",0);
instance.SourceMusic.volume = 0;
}
PlayerPrefs.Save();
}
float defVol;
public static void ToggleSFX(){
if(isMuteSFX){
PlayerPrefs.SetInt("sfx",1);
}else{
PlayerPrefs.SetInt("sfx",0);
}
PlayerPrefs.Save();
}
void Awake(){
instance= this;
DontDestroyOnLoad(this);
defVol = SourceMusic.volume;
}
public static void ChangeMusicToScene(string scene){
AudioClip chosen = instance.levels[0].clip;
foreach(LevelAudioCombo level in instance.levels){
if(level.name == scene){
chosen = level.clip;
break;
}
}
ChangeBGMusic(chosen);
}
public static void ChangeBGMusic(AudioClip clip){
instance.SourceMusic.Stop();
instance.SourceMusic.clip = clip;
instance.SourceMusic.Play();
}
public static void PlayExplosion(){
if(isMuteSFX){return;}
instance.SourceSFX.PlayOneShot(instance.explosionSFX);
}
}
[System.Serializable]
public class LevelAudioCombo{
public string name;
public AudioClip clip;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AudioManager : MonoBehaviour
{
public static AudioManager instance;
public AudioClip explosionSFX;
public AudioClip powerupSFX;
public AudioClip powerdownSFX;
public AudioClip whooshSFX;
[SerializeField]public AudioSource SourceSFX;
[SerializeField]public AudioSource SourceMusic;
[SerializeField]public LevelAudioCombo[] levels;
public static bool isMuteMusic {get{
if(PlayerPrefs.HasKey("music")){
return PlayerPrefs.GetInt("music") == 0;
}else{
return false;
}
}}
public static bool isMuteSFX {get{
if(PlayerPrefs.HasKey("sfx")){
return PlayerPrefs.GetInt("sfx") == 0;
}else{
return false;
}
}}
public static void ToggleMusic(){
if(isMuteMusic){
PlayerPrefs.SetInt("music",1);
instance.SourceMusic.volume = instance.defVol;
}else{
PlayerPrefs.SetInt("music",0);
instance.SourceMusic.volume = 0;
}
PlayerPrefs.Save();
}
float defVol;
public static void ToggleSFX(){
if(isMuteSFX){
PlayerPrefs.SetInt("sfx",1);
}else{
PlayerPrefs.SetInt("sfx",0);
}
PlayerPrefs.Save();
}
void Awake(){
instance= this;
DontDestroyOnLoad(this);
defVol = SourceMusic.volume;
}
public static void ChangeMusicToScene(string scene){
AudioClip chosen = instance.levels[0].clip;
foreach(LevelAudioCombo level in instance.levels){
if(level.name == scene){
chosen = level.clip;
break;
}
}
ChangeBGMusic(chosen);
}
public static void ChangeBGMusic(AudioClip clip){
instance.SourceMusic.Stop();
instance.SourceMusic.clip = clip;
instance.SourceMusic.Play();
}
public static void PlayExplosion(){
if(isMuteSFX){return;}
instance.SourceSFX.PlayOneShot(instance.explosionSFX);
}
public static void PlayPowerup(){
if(isMuteSFX){return;}
instance.SourceSFX.PlayOneShot(instance.powerupSFX);
}
public static void PlayPowerdown(){
if(isMuteSFX){return;}
instance.SourceSFX.PlayOneShot(instance.powerdownSFX);
}
public static void PlayWhoosh(){
if(isMuteSFX){return;}
instance.SourceSFX.PlayOneShot(instance.whooshSFX);
}
}
[System.Serializable]
public class LevelAudioCombo{
public string name;
public AudioClip clip;
}

View File

@ -1,58 +1,58 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class MessageBox : MonoBehaviour
{
public static MessageBox instance { get; private set;}
void Awake(){
if(instance != null){Destroy(gameObject);}
instance = this;
canvasGroup = GetComponent<CanvasGroup>();
closeButton.onClick.AddListener(()=>{SetActive(false);});
}
private CanvasGroup canvasGroup;
[SerializeField]private Text messageTxt;
[SerializeField]private Text titleTxt;
[SerializeField]private Button closeButton;
void Start()
{
DontDestroyOnLoad(gameObject);
SetActive(false);
}
void SetActive(bool value){
// StartCoroutine(setActive(value));
canvasGroup.alpha= value ? 1 : 0;
canvasGroup.blocksRaycasts = value;
canvasGroup.interactable = value;
}
private static string message;
public static void ShowMessage(string message,string title = "Notice"){
if(instance == null){Debug.LogError("Message was shown before message box was init");return;}
instance.showMessage(message,title);
}
public void showMessage(string _message, string title){
message = _message;
titleTxt.text = title;
StartCoroutine(_showMessage());
SetActive(true);
}
IEnumerator _showMessage(){
messageTxt.text = "";
closeButton.gameObject.SetActive(false);
for(int i=0; i < message.Length; i++){
messageTxt.text += message[i];
yield return new WaitForSeconds(0.01f);
}
closeButton.gameObject.SetActive(true);
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class MessageBox : MonoBehaviour
{
public static MessageBox instance { get; private set;}
void Awake(){
if(instance != null){Destroy(gameObject);}
instance = this;
canvasGroup = GetComponent<CanvasGroup>();
closeButton.onClick.AddListener(()=>{SetActive(false);});
}
private CanvasGroup canvasGroup;
[SerializeField]private Text messageTxt;
[SerializeField]private Text titleTxt;
[SerializeField]private Button closeButton;
void Start()
{
DontDestroyOnLoad(gameObject);
SetActive(false);
}
void SetActive(bool value){
// StartCoroutine(setActive(value));
canvasGroup.alpha= value ? 1 : 0;
canvasGroup.blocksRaycasts = value;
canvasGroup.interactable = value;
}
private static string message;
public static void ShowMessage(string message,string title = "Notice"){
if(instance == null){Debug.LogError("Message was shown before message box was init");return;}
instance.showMessage(message,title);
}
public void showMessage(string _message, string title){
message = _message;
titleTxt.text = title;
StartCoroutine(_showMessage());
SetActive(true);
}
IEnumerator _showMessage(){
messageTxt.text = "";
closeButton.gameObject.SetActive(false);
for(int i=0; i < message.Length; i++){
messageTxt.text += message[i];
yield return new WaitForSeconds(0.01f);
}
closeButton.gameObject.SetActive(true);
}
}

View File

@ -1,14 +1,14 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NearMiss : MonoBehaviour
{
void OnTriggerExit2D(Collider2D other){
if(PlayerController.instance.PowerupActive){return;}
if(other.tag == "asteroid"){
DataManager.AddItem("add_near_miss.php");
PlayerController.NearMissFX();
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NearMiss : MonoBehaviour
{
void OnTriggerExit2D(Collider2D other){
if(PlayerController.instance.PowerupActive){return;}
if(other.tag == "asteroid"){
DataManager.AddItem("add_near_miss.php");
PlayerController.NearMissFX();
}
}
}

View File

@ -63,6 +63,9 @@ public class PlayerController : MonoBehaviour
if(powerupTimer > 0){
powerupTimer-=Time.deltaTime;
if(powerupTimer <= 0){
OnPowerdown();
}
}
}
@ -102,6 +105,7 @@ public class PlayerController : MonoBehaviour
public static void NearMissFX(){
instance.nearMissAnim.gameObject.SetActive(true);
instance.nearMissAnim.CrossFade("txt_intro",0.01f);
AudioManager.PlayWhoosh();
}
public float PowerupLife = 30;
public float PowerupSpeedMult = 1.3f;
@ -109,6 +113,7 @@ public class PlayerController : MonoBehaviour
public float powerupTimer = 0;
public void ActivatePowerup(){
powerupTimer = PowerupLife;
AudioManager.PlayPowerup();
}
public static int AdCounter=0;
public async void GameOver(){
@ -132,6 +137,10 @@ public class PlayerController : MonoBehaviour
}
}
void OnPowerdown(){
AudioManager.PlayPowerdown();
}
public void SpawnExplosionFX(Vector3 pos){
Instantiate(ExplosionFX,pos, Quaternion.identity);
AudioManager.PlayExplosion();

View File

@ -1,81 +1,81 @@
<dependencies>
<packages>
<package>com.google.android.gms:play-services-ads:22.2.0</package>
<package>com.google.android.gms:play-services-auth:16+</package>
<package>com.google.android.ump:user-messaging-platform:2.0.0</package>
<package>com.google.signin:google-signin-support:1.0.4</package>
</packages>
<files>
<file>Assets/Plugins/Android/androidx.annotation.annotation-1.2.0.jar</file>
<file>Assets/Plugins/Android/androidx.annotation.annotation-experimental-1.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.arch.core.core-common-2.1.0.jar</file>
<file>Assets/Plugins/Android/androidx.arch.core.core-runtime-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.asynclayoutinflater.asynclayoutinflater-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.browser.browser-1.4.0.aar</file>
<file>Assets/Plugins/Android/androidx.collection.collection-1.1.0.jar</file>
<file>Assets/Plugins/Android/androidx.concurrent.concurrent-futures-1.0.0.jar</file>
<file>Assets/Plugins/Android/androidx.coordinatorlayout.coordinatorlayout-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.core.core-1.6.0.aar</file>
<file>Assets/Plugins/Android/androidx.cursoradapter.cursoradapter-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.customview.customview-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.documentfile.documentfile-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.drawerlayout.drawerlayout-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.fragment.fragment-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.interpolator.interpolator-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.legacy.legacy-support-core-ui-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.legacy.legacy-support-core-utils-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-common-2.1.0.jar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-core-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-service-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-2.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.loader.loader-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.localbroadcastmanager.localbroadcastmanager-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.print.print-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.room.room-common-2.2.5.jar</file>
<file>Assets/Plugins/Android/androidx.room.room-runtime-2.2.5.aar</file>
<file>Assets/Plugins/Android/androidx.slidingpanelayout.slidingpanelayout-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.sqlite.sqlite-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.sqlite.sqlite-framework-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.startup.startup-runtime-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.swiperefreshlayout.swiperefreshlayout-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.tracing.tracing-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.versionedparcelable.versionedparcelable-1.1.1.aar</file>
<file>Assets/Plugins/Android/androidx.viewpager.viewpager-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.work.work-runtime-2.7.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-22.2.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-base-22.2.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-identifier-18.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-lite-22.2.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-appset-16.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-auth-16.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-auth-api-phone-16.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-auth-base-16.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-base-18.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-basement-18.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-base-20.1.2.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-sdk-api-20.1.2.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-tasks-18.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.ump.user-messaging-platform-2.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.guava.listenablefuture-1.0.jar</file>
<file>Assets/Plugins/Android/com.google.signin.google-signin-support-1.0.4.aar</file>
</files>
<settings>
<setting name="androidAbis" value="arm64-v8a,armeabi-v7a" />
<setting name="bundleId" value="com.Xperience.UfoRun" />
<setting name="explodeAars" value="True" />
<setting name="gradleBuildEnabled" value="True" />
<setting name="gradlePropertiesTemplateEnabled" value="False" />
<setting name="gradleTemplateEnabled" value="False" />
<setting name="installAndroidPackages" value="True" />
<setting name="localMavenRepoDir" value="Assets/GeneratedLocalRepo" />
<setting name="packageDir" value="Assets/Plugins/Android" />
<setting name="patchAndroidManifest" value="True" />
<setting name="patchMainTemplateGradle" value="True" />
<setting name="projectExportEnabled" value="False" />
<setting name="useFullCustomMavenRepoPathWhenExport" value="True" />
<setting name="useFullCustomMavenRepoPathWhenNotExport" value="False" />
<setting name="useJetifier" value="True" />
</settings>
<dependencies>
<packages>
<package>com.google.android.gms:play-services-ads:22.2.0</package>
<package>com.google.android.gms:play-services-auth:16+</package>
<package>com.google.android.ump:user-messaging-platform:2.0.0</package>
<package>com.google.signin:google-signin-support:1.0.4</package>
</packages>
<files>
<file>Assets/Plugins/Android/androidx.annotation.annotation-1.2.0.jar</file>
<file>Assets/Plugins/Android/androidx.annotation.annotation-experimental-1.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.arch.core.core-common-2.1.0.jar</file>
<file>Assets/Plugins/Android/androidx.arch.core.core-runtime-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.asynclayoutinflater.asynclayoutinflater-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.browser.browser-1.4.0.aar</file>
<file>Assets/Plugins/Android/androidx.collection.collection-1.1.0.jar</file>
<file>Assets/Plugins/Android/androidx.concurrent.concurrent-futures-1.0.0.jar</file>
<file>Assets/Plugins/Android/androidx.coordinatorlayout.coordinatorlayout-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.core.core-1.6.0.aar</file>
<file>Assets/Plugins/Android/androidx.cursoradapter.cursoradapter-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.customview.customview-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.documentfile.documentfile-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.drawerlayout.drawerlayout-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.fragment.fragment-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.interpolator.interpolator-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.legacy.legacy-support-core-ui-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.legacy.legacy-support-core-utils-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-common-2.1.0.jar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-core-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-service-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-2.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.loader.loader-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.localbroadcastmanager.localbroadcastmanager-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.print.print-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.room.room-common-2.2.5.jar</file>
<file>Assets/Plugins/Android/androidx.room.room-runtime-2.2.5.aar</file>
<file>Assets/Plugins/Android/androidx.slidingpanelayout.slidingpanelayout-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.sqlite.sqlite-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.sqlite.sqlite-framework-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.startup.startup-runtime-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.swiperefreshlayout.swiperefreshlayout-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.tracing.tracing-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.versionedparcelable.versionedparcelable-1.1.1.aar</file>
<file>Assets/Plugins/Android/androidx.viewpager.viewpager-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.work.work-runtime-2.7.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-22.2.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-base-22.2.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-identifier-18.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-lite-22.2.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-appset-16.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-auth-16.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-auth-api-phone-16.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-auth-base-16.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-base-18.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-basement-18.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-base-20.1.2.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-sdk-api-20.1.2.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-tasks-18.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.ump.user-messaging-platform-2.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.guava.listenablefuture-1.0.jar</file>
<file>Assets/Plugins/Android/com.google.signin.google-signin-support-1.0.4.aar</file>
</files>
<settings>
<setting name="androidAbis" value="arm64-v8a,armeabi-v7a" />
<setting name="bundleId" value="com.Xperience.UfoRun" />
<setting name="explodeAars" value="True" />
<setting name="gradleBuildEnabled" value="True" />
<setting name="gradlePropertiesTemplateEnabled" value="False" />
<setting name="gradleTemplateEnabled" value="False" />
<setting name="installAndroidPackages" value="True" />
<setting name="localMavenRepoDir" value="Assets/GeneratedLocalRepo" />
<setting name="packageDir" value="Assets/Plugins/Android" />
<setting name="patchAndroidManifest" value="True" />
<setting name="patchMainTemplateGradle" value="True" />
<setting name="projectExportEnabled" value="False" />
<setting name="useFullCustomMavenRepoPathWhenExport" value="True" />
<setting name="useFullCustomMavenRepoPathWhenNotExport" value="False" />
<setting name="useJetifier" value="True" />
</settings>
</dependencies>

View File

@ -1,2 +1,2 @@
lastUpgrade=01101
proj.pluginVersion=0.11.01
lastUpgrade=01101
proj.pluginVersion=0.11.01