浏览代码

Demo project added

/main
Ashley Alicea 3 年前
当前提交
65066bed
共有 319 个文件被更改,包括 8207 次插入0 次删除
  1. 6
      .vsconfig
  2. 8
      Assets/PhotoMode.meta
  3. 8
      Assets/PhotoMode/InputSystem.meta
  4. 887
      Assets/PhotoMode/InputSystem/PhotoModeInputs.inputactions
  5. 14
      Assets/PhotoMode/InputSystem/PhotoModeInputs.inputactions.meta
  6. 8
      Assets/PhotoMode/Materials.meta
  7. 148
      Assets/PhotoMode/Materials/BlitMaterial.mat
  8. 8
      Assets/PhotoMode/Materials/BlitMaterial.mat.meta
  9. 8
      Assets/PhotoMode/PM-Scripts.meta
  10. 32
      Assets/PhotoMode/PM-Scripts/Blit.cs
  11. 11
      Assets/PhotoMode/PM-Scripts/Blit.cs.meta
  12. 65
      Assets/PhotoMode/PM-Scripts/BlitRenderPass.cs
  13. 11
      Assets/PhotoMode/PM-Scripts/BlitRenderPass.cs.meta
  14. 47
      Assets/PhotoMode/PM-Scripts/CustomInputProvider.cs
  15. 11
      Assets/PhotoMode/PM-Scripts/CustomInputProvider.cs.meta
  16. 8
      Assets/PhotoMode/PM-Scripts/Editor Scripts.meta
  17. 47
      Assets/PhotoMode/PM-Scripts/Editor Scripts/MinMaxDrawer.cs
  18. 11
      Assets/PhotoMode/PM-Scripts/Editor Scripts/MinMaxDrawer.cs.meta
  19. 63
      Assets/PhotoMode/PM-Scripts/InfoBarController.cs
  20. 11
      Assets/PhotoMode/PM-Scripts/InfoBarController.cs.meta
  21. 19
      Assets/PhotoMode/PM-Scripts/MinMax.cs
  22. 11
      Assets/PhotoMode/PM-Scripts/MinMax.cs.meta
  23. 369
      Assets/PhotoMode/PM-Scripts/PhotoMode.cs
  24. 11
      Assets/PhotoMode/PM-Scripts/PhotoMode.cs.meta
  25. 66
      Assets/PhotoMode/PM-Scripts/PhotoModeDebugger.cs
  26. 11
      Assets/PhotoMode/PM-Scripts/PhotoModeDebugger.cs.meta
  27. 188
      Assets/PhotoMode/PM-Scripts/PhotoModeInputs.cs
  28. 11
      Assets/PhotoMode/PM-Scripts/PhotoModeInputs.cs.meta
  29. 62
      Assets/PhotoMode/PM-Scripts/PhotoModePauser.cs
  30. 11
      Assets/PhotoMode/PM-Scripts/PhotoModePauser.cs.meta
  31. 186
      Assets/PhotoMode/PM-Scripts/PhotoModeStickerController.cs
  32. 11
      Assets/PhotoMode/PM-Scripts/PhotoModeStickerController.cs.meta
  33. 72
      Assets/PhotoMode/PM-Scripts/TextSlider.cs
  34. 11
      Assets/PhotoMode/PM-Scripts/TextSlider.cs.meta
  35. 15
      Assets/PhotoMode/PM-Scripts/TextSliderOptions.cs
  36. 11
      Assets/PhotoMode/PM-Scripts/TextSliderOptions.cs.meta
  37. 8
      Assets/PhotoMode/PM-Settings.meta
  38. 109
      Assets/PhotoMode/PM-Settings/ForwardRenderer.asset
  39. 8
      Assets/PhotoMode/PM-Settings/ForwardRenderer.asset.meta
  40. 118
      Assets/PhotoMode/PM-Settings/SampleSceneProfile.asset
  41. 8
      Assets/PhotoMode/PM-Settings/SampleSceneProfile.asset.meta
  42. 53
      Assets/PhotoMode/PM-Settings/UniversalRP-HighQuality.asset
  43. 8
      Assets/PhotoMode/PM-Settings/UniversalRP-HighQuality.asset.meta
  44. 53
      Assets/PhotoMode/PM-Settings/UniversalRP-LowQuality.asset
  45. 8
      Assets/PhotoMode/PM-Settings/UniversalRP-LowQuality.asset.meta
  46. 53
      Assets/PhotoMode/PM-Settings/UniversalRP-MediumQuality.asset
  47. 8
      Assets/PhotoMode/PM-Settings/UniversalRP-MediumQuality.asset.meta
  48. 8
      Assets/PhotoMode/PM-TextMeshPro.meta
  49. 9
      Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials.meta
  50. 106
      Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat
  51. 8
      Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat.meta
  52. 343
      Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF - Fallback.asset
  53. 8
      Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF - Fallback.asset.meta
  54. 104
      Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF - Outline.mat
  55. 8
      Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF - Outline.mat.meta
  56. 1001
      Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF.asset
  57. 8
      Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF.asset.meta
  58. 8
      Assets/PhotoMode/PM-TextMeshPro/Fonts.meta
  59. 46
      Assets/PhotoMode/PM-TextMeshPro/Fonts/LiberationSans - OFL.txt
  60. 8
      Assets/PhotoMode/PM-TextMeshPro/Fonts/LiberationSans - OFL.txt.meta
  61. 1001
      Assets/PhotoMode/PM-TextMeshPro/Fonts/LiberationSans.ttf
  62. 19
      Assets/PhotoMode/PM-TextMeshPro/Fonts/LiberationSans.ttf.meta
  63. 8
      Assets/PhotoMode/PM-TextMeshPro/Shaders.meta
  64. 143
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_Bitmap-Custom-Atlas.shader
  65. 9
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_Bitmap-Custom-Atlas.shader.meta
  66. 145
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_Bitmap-Mobile.shader
  67. 9
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_Bitmap-Mobile.shader.meta
  68. 143
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_Bitmap.shader
  69. 9
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_Bitmap.shader.meta
  70. 317
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF Overlay.shader
  71. 9
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF Overlay.shader.meta
  72. 310
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF SSD.shader
  73. 9
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF SSD.shader.meta
  74. 247
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile Masking.shader
  75. 9
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile Masking.shader.meta
  76. 240
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile Overlay.shader
  77. 9
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile Overlay.shader.meta
  78. 106
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile SSD.shader
  79. 9
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile SSD.shader.meta
  80. 240
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile.shader
  81. 9
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile.shader.meta
  82. 138
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Surface-Mobile.shader
  83. 9
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Surface-Mobile.shader.meta
  84. 158
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Surface.shader
  85. 9
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Surface.shader.meta
  86. 317
      Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF.shader

6
.vsconfig


{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.ManagedGame"
]
}

8
Assets/PhotoMode.meta


fileFormatVersion: 2
guid: d973a01693fc808459619b9c9eccc429
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/PhotoMode/InputSystem.meta


fileFormatVersion: 2
guid: f1534f3de9bbb9840a71c7985f311978
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

887
Assets/PhotoMode/InputSystem/PhotoModeInputs.inputactions


{
"name": "PhotoModeInputs",
"maps": [
{
"name": "UI",
"id": "272f6d14-89ba-496f-b7ff-215263d3219f",
"actions": [
{
"name": "Navigate",
"type": "PassThrough",
"id": "c95b2375-e6d9-4b88-9c4c-c5e76515df4b",
"expectedControlType": "Vector2",
"processors": "",
"interactions": ""
},
{
"name": "Submit",
"type": "Button",
"id": "7607c7b6-cd76-4816-beef-bd0341cfe950",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "Cancel",
"type": "Button",
"id": "15cef263-9014-4fd5-94d9-4e4a6234a6ef",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "Point",
"type": "PassThrough",
"id": "32b35790-4ed0-4e9a-aa41-69ac6d629449",
"expectedControlType": "Vector2",
"processors": "",
"interactions": ""
},
{
"name": "Click",
"type": "PassThrough",
"id": "3c7022bf-7922-4f7c-a998-c437916075ad",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "ScrollWheel",
"type": "PassThrough",
"id": "0489e84a-4833-4c40-bfae-cea84b696689",
"expectedControlType": "Vector2",
"processors": "",
"interactions": ""
},
{
"name": "MiddleClick",
"type": "PassThrough",
"id": "dad70c86-b58c-4b17-88ad-f5e53adf419e",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "RightClick",
"type": "PassThrough",
"id": "44b200b1-1557-4083-816c-b22cbdf77ddf",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
}
],
"bindings": [
{
"name": "Gamepad",
"id": "809f371f-c5e2-4e7a-83a1-d867598f40dd",
"path": "2DVector",
"interactions": "",
"processors": "",
"groups": "",
"action": "Navigate",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "14a5d6e8-4aaf-4119-a9ef-34b8c2c548bf",
"path": "<Gamepad>/leftStick/up",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "2db08d65-c5fb-421b-983f-c71163608d67",
"path": "<Gamepad>/leftStick/down",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "8ba04515-75aa-45de-966d-393d9bbd1c14",
"path": "<Gamepad>/leftStick/left",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "fcd248ae-a788-4676-a12e-f4d81205600b",
"path": "<Gamepad>/leftStick/right",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "fb8277d4-c5cd-4663-9dc7-ee3f0b506d90",
"path": "<Gamepad>/dpad",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "Joystick",
"id": "e25d9774-381c-4a61-b47c-7b6b299ad9f9",
"path": "2DVector",
"interactions": "",
"processors": "",
"groups": "",
"action": "Navigate",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "3db53b26-6601-41be-9887-63ac74e79d19",
"path": "<Joystick>/stick/up",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "0cb3e13e-3d90-4178-8ae6-d9c5501d653f",
"path": "<Joystick>/stick/down",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "0392d399-f6dd-4c82-8062-c1e9c0d34835",
"path": "<Joystick>/stick/left",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "942a66d9-d42f-43d6-8d70-ecb4ba5363bc",
"path": "<Joystick>/stick/right",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "Keyboard",
"id": "ff527021-f211-4c02-933e-5976594c46ed",
"path": "2DVector",
"interactions": "",
"processors": "",
"groups": "",
"action": "Navigate",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "563fbfdd-0f09-408d-aa75-8642c4f08ef0",
"path": "<Keyboard>/w",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "up",
"id": "eb480147-c587-4a33-85ed-eb0ab9942c43",
"path": "<Keyboard>/upArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "2bf42165-60bc-42ca-8072-8c13ab40239b",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "85d264ad-e0a0-4565-b7ff-1a37edde51ac",
"path": "<Keyboard>/downArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "74214943-c580-44e4-98eb-ad7eebe17902",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "cea9b045-a000-445b-95b8-0c171af70a3b",
"path": "<Keyboard>/leftArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "8607c725-d935-4808-84b1-8354e29bab63",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "4cda81dc-9edd-4e03-9d7c-a71a14345d0b",
"path": "<Keyboard>/rightArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "9e92bb26-7e3b-4ec4-b06b-3c8f8e498ddc",
"path": "*/{Submit}",
"interactions": "",
"processors": "",
"groups": "",
"action": "Submit",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "82627dcc-3b13-4ba9-841d-e4b746d6553e",
"path": "*/{Cancel}",
"interactions": "",
"processors": "",
"groups": "",
"action": "Cancel",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "c52c8e0b-8179-41d3-b8a1-d149033bbe86",
"path": "<Mouse>/position",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Point",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "e1394cbc-336e-44ce-9ea8-6007ed6193f7",
"path": "<Pen>/position",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Point",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "5693e57a-238a-46ed-b5ae-e64e6e574302",
"path": "<Touchscreen>/touch*/position",
"interactions": "",
"processors": "",
"groups": "Touch",
"action": "Point",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "4faf7dc9-b979-4210-aa8c-e808e1ef89f5",
"path": "<Mouse>/leftButton",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Click",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "8d66d5ba-88d7-48e6-b1cd-198bbfef7ace",
"path": "<Pen>/tip",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Click",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "47c2a644-3ebc-4dae-a106-589b7ca75b59",
"path": "<Touchscreen>/touch*/press",
"interactions": "",
"processors": "",
"groups": "Touch",
"action": "Click",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "bb9e6b34-44bf-4381-ac63-5aa15d19f677",
"path": "<XRController>/trigger",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "Click",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "38c99815-14ea-4617-8627-164d27641299",
"path": "<Mouse>/scroll",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "ScrollWheel",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "24066f69-da47-44f3-a07e-0015fb02eb2e",
"path": "<Mouse>/middleButton",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "MiddleClick",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "4c191405-5738-4d4b-a523-c6a301dbf754",
"path": "<Mouse>/rightButton",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "RightClick",
"isComposite": false,
"isPartOfComposite": false
}
]
},
{
"name": "PhotoMode",
"id": "166d8c9e-6d32-4eb4-b054-3314388363a5",
"actions": [
{
"name": "Look",
"type": "PassThrough",
"id": "65edaf20-3e62-4982-9e9a-5b47c13eae81",
"expectedControlType": "Vector2",
"processors": "",
"interactions": ""
},
{
"name": "Pause",
"type": "Button",
"id": "5255e9eb-c390-4319-9bde-39a57a2ab0ee",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "ResetPhotoMode",
"type": "Button",
"id": "f5075c38-9b50-4915-8419-1d1972317308",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "ToggleGrid",
"type": "Button",
"id": "2c388bfb-8531-465a-8128-aa6dfe052e0f",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "ToggleUI",
"type": "Button",
"id": "a5341e5f-5a25-4276-b32a-aeefad084883",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "DeleteSticker",
"type": "Button",
"id": "dcc3dd2b-b3f4-473d-98c9-7bf77eaf7ea3",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "SwapSticker",
"type": "Button",
"id": "7d7d140e-f9c1-471d-8979-c524ad16c6e2",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "FlipSticker",
"type": "Button",
"id": "58fe028d-3eb0-4cd2-8cbb-4e419f9abe36",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "Modifier1 (Axis)",
"type": "PassThrough",
"id": "c7bc4c6b-a1ab-477e-bbaa-7bdfa0a277b1",
"expectedControlType": "Axis",
"processors": "",
"interactions": ""
},
{
"name": "Modifier2 (Axis)",
"type": "PassThrough",
"id": "f3298d72-0de0-493e-bf5f-69820c710d09",
"expectedControlType": "Axis",
"processors": "",
"interactions": ""
}
],
"bindings": [
{
"name": "",
"id": "1d0c432f-6b2b-45f9-b963-00e02bf90d56",
"path": "<Gamepad>/select",
"interactions": "",
"processors": "",
"groups": "",
"action": "Pause",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "4f77894c-4321-41a0-808c-fc5d0738d71b",
"path": "<Keyboard>/p",
"interactions": "",
"processors": "",
"groups": "",
"action": "Pause",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "2f2575df-4536-49a6-a78d-36f9be9437c0",
"path": "<Gamepad>/buttonEast",
"interactions": "",
"processors": "",
"groups": "",
"action": "ToggleGrid",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "3255ca31-7b2d-49b5-a6eb-846dde994456",
"path": "<Keyboard>/1",
"interactions": "",
"processors": "",
"groups": "",
"action": "ToggleGrid",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "1f66fe5a-cc2f-4aa0-8f72-4a1f7bd85afd",
"path": "<Gamepad>/buttonNorth",
"interactions": "",
"processors": "",
"groups": "",
"action": "ToggleUI",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "d1a323b1-fd09-4332-8e09-b5554ee8f0a9",
"path": "<Keyboard>/2",
"interactions": "",
"processors": "",
"groups": "",
"action": "ToggleUI",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "0b697df3-661c-4ab7-80dc-50c6581a8829",
"path": "<Keyboard>/3",
"interactions": "",
"processors": "",
"groups": "",
"action": "DeleteSticker",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "cfe9004d-0052-465d-b9a6-2e8f4ff0f239",
"path": "<Gamepad>/buttonWest",
"interactions": "",
"processors": "",
"groups": "",
"action": "DeleteSticker",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "c16d7cdb-6bc1-4098-bee6-d54001a8e9bb",
"path": "<Keyboard>/4",
"interactions": "",
"processors": "",
"groups": "",
"action": "SwapSticker",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "46d996c1-4a52-4c93-bac8-3e2782fc1972",
"path": "<Gamepad>/buttonNorth",
"interactions": "",
"processors": "",
"groups": "",
"action": "SwapSticker",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "e2b24152-3ae8-41ad-9807-17fad0815f4c",
"path": "<Keyboard>/3",
"interactions": "",
"processors": "",
"groups": "",
"action": "ResetPhotoMode",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "c434bab6-3127-4b8f-ad94-b384ad1c24c4",
"path": "<Gamepad>/buttonWest",
"interactions": "",
"processors": "",
"groups": "",
"action": "ResetPhotoMode",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "77d5a6a3-8b4b-41e9-90f9-476b69c46c32",
"path": "<Pointer>/delta",
"interactions": "",
"processors": "InvertVector2(invertX=false),StickDeadzone,ScaleVector2(x=20,y=20)",
"groups": "KeyboardMouse;Keyboard&Mouse",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "8a9b4570-28e1-445b-bf30-231508071ebe",
"path": "<Gamepad>/rightStick",
"interactions": "",
"processors": "InvertVector2(invertX=false),StickDeadzone,ScaleVector2(x=20,y=20)",
"groups": "Gamepad",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "1D Axis",
"id": "e6290fc0-bbbf-4000-9d4f-14db7616d003",
"path": "1DAxis",
"interactions": "",
"processors": "",
"groups": "",
"action": "Modifier2 (Axis)",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "negative",
"id": "c04c0e30-3f0b-453a-91af-0f7f431fb29c",
"path": "<Keyboard>/leftBracket",
"interactions": "",
"processors": "",
"groups": "",
"action": "Modifier2 (Axis)",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "positive",
"id": "b55a9e6c-5462-4fd6-b150-d25d40cc394e",
"path": "<Keyboard>/rightBracket",
"interactions": "",
"processors": "",
"groups": "",
"action": "Modifier2 (Axis)",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "1D Axis",
"id": "24d25e67-3d3f-434b-9028-b2e531933dfa",
"path": "1DAxis",
"interactions": "",
"processors": "",
"groups": "",
"action": "Modifier2 (Axis)",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "negative",
"id": "ecd07324-bd50-4dab-8b10-f6856f3b320f",
"path": "<Gamepad>/leftShoulder",
"interactions": "",
"processors": "",
"groups": "",
"action": "Modifier2 (Axis)",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "positive",
"id": "53b7744a-7c4b-45d3-992f-51176f3ea7d1",
"path": "<Gamepad>/rightShoulder",
"interactions": "",
"processors": "",
"groups": "",
"action": "Modifier2 (Axis)",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "1D Axis",
"id": "113059e1-ab2c-425c-a9d4-5d66293e64b4",
"path": "1DAxis",
"interactions": "",
"processors": "",
"groups": "",
"action": "Modifier1 (Axis)",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "negative",
"id": "e84f7697-93df-4561-bf0b-4b0ae26773d5",
"path": "<Keyboard>/1",
"interactions": "",
"processors": "",
"groups": "",
"action": "Modifier1 (Axis)",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "positive",
"id": "fc966a00-b524-4d69-8980-eb0704742165",
"path": "<Keyboard>/2",
"interactions": "",
"processors": "",
"groups": "",
"action": "Modifier1 (Axis)",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "1D Axis",
"id": "2ee9804a-b012-4b18-bbbc-8722d7fdbac8",
"path": "1DAxis",
"interactions": "",
"processors": "",
"groups": "",
"action": "Modifier1 (Axis)",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "negative",
"id": "300ebe78-dcc8-47d7-87be-82f672104eba",
"path": "<Gamepad>/leftTrigger",
"interactions": "",
"processors": "",
"groups": "",
"action": "Modifier1 (Axis)",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "positive",
"id": "d79b6fb8-f3b5-478f-a266-fc2dd24aa2bf",
"path": "<Gamepad>/rightTrigger",
"interactions": "",
"processors": "",
"groups": "",
"action": "Modifier1 (Axis)",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "39ed130d-dba8-481e-b76d-b195ab0391f5",
"path": "<Gamepad>/rightStickPress",
"interactions": "",
"processors": "",
"groups": "",
"action": "FlipSticker",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "3113c489-183a-4447-9993-abb8cefc40eb",
"path": "<Keyboard>/tab",
"interactions": "",
"processors": "",
"groups": "",
"action": "FlipSticker",
"isComposite": false,
"isPartOfComposite": false
}
]
}
],
"controlSchemes": [
{
"name": "Keyboard&Mouse",
"bindingGroup": "Keyboard&Mouse",
"devices": [
{
"devicePath": "<Keyboard>",
"isOptional": false,
"isOR": false
},
{
"devicePath": "<Mouse>",
"isOptional": false,
"isOR": false
}
]
},
{
"name": "Gamepad",
"bindingGroup": "Gamepad",
"devices": [
{
"devicePath": "<Gamepad>",
"isOptional": false,
"isOR": false
}
]
},
{
"name": "Touch",
"bindingGroup": "Touch",
"devices": [
{
"devicePath": "<Touchscreen>",
"isOptional": false,
"isOR": false
}
]
},
{
"name": "Joystick",
"bindingGroup": "Joystick",
"devices": [
{
"devicePath": "<Joystick>",
"isOptional": false,
"isOR": false
}
]
},
{
"name": "XR",
"bindingGroup": "XR",
"devices": [
{
"devicePath": "<XRController>",
"isOptional": false,
"isOR": false
}
]
}
]
}

14
Assets/PhotoMode/InputSystem/PhotoModeInputs.inputactions.meta


fileFormatVersion: 2
guid: 5be2e4cb589b1e644bcf83818850bc09
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
generateWrapperCode: 0
wrapperCodePath:
wrapperClassName:
wrapperCodeNamespace: UnityEngine.InputSystem

8
Assets/PhotoMode/Materials.meta


fileFormatVersion: 2
guid: 211c80f9115951142bcf86600bafa63f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

148
Assets/PhotoMode/Materials/BlitMaterial.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2839318586473836896
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 4
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: BlitMaterial
m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- Texture2D_161c849bdb4141658733cdba0b844395:
m_Texture: {fileID: 2800000, guid: f4d121e33c50ce34e9119f08ed24e43c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture2D_97440d0558684806aaf88c8c91ff5501:
m_Texture: {fileID: 2800000, guid: 67c47adb4b4aa2542b7d16ec7ed43ce3, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture2D_9c2741116da7485f952b4241bf8d2d54:
m_Texture: {fileID: 2800000, guid: b1b863677da12414798233afc8907c18, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture2D_abb0b427952e4e78b5b5e6ee38da7067:
m_Texture: {fileID: 2800000, guid: f4d121e33c50ce34e9119f08ed24e43c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainText:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- Vector1_10e113db14c447c6bb8398214fd009dd: 1.5
- Vector1_5a1ccf14bc6a4d4a9905841457378980: 40
- Vector1_5ffedd4963f94cd09a695aac1999584e: 100
- Vector1_6a05970039844d7bb9260e29357e1968: 0.006
- Vector1_d97e88d67de147bbacedd13c9c8f621e: 1.5
- _AlphaClip: 0
- _Blend: 0
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

8
Assets/PhotoMode/Materials/BlitMaterial.mat.meta


fileFormatVersion: 2
guid: 15695081898bbdb4294e8aa3502a2997
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

8
Assets/PhotoMode/PM-Scripts.meta


fileFormatVersion: 2
guid: 02a3527b6b33a924e8ec66aa805ea717
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

32
Assets/PhotoMode/PM-Scripts/Blit.cs


using UnityEngine;
using UnityEngine.Rendering.Universal;
using PhotoMode;
namespace PhotoMode
{
public class Blit : ScriptableRendererFeature
{
public Material blitMaterial = null;
private BlitRenderPass blitRenderPass;
public override void Create()
{
blitRenderPass = new BlitRenderPass(RenderPassEvent.AfterRendering, blitMaterial, name);
blitRenderPass.source = "_AfterPostProcessTexture";
}
public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
{
//Check to make sure the blit has a material and exit gracefully if it doesn't
if (blitMaterial == null)
{
Debug.LogError("Blit is missing it's Material. Make sure you have assigned a material in the renderer");
return;
}
//Add a the blit render pass to the que of render passes to execute
renderer.EnqueuePass(blitRenderPass);
}
}
}

11
Assets/PhotoMode/PM-Scripts/Blit.cs.meta


fileFormatVersion: 2
guid: e82b1d9513fe4d54aba2605231454443
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

65
Assets/PhotoMode/PM-Scripts/BlitRenderPass.cs


using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using PhotoMode;
namespace PhotoMode
{
public class BlitRenderPass : ScriptableRenderPass
{
public Material blitMaterial = null;
public RenderTargetIdentifier source;
RenderTargetHandle temporaryColorTexture;
RenderTargetHandle destinationTexture;
string profilerTag;
//Default constructor for the Blit Render Pass
public BlitRenderPass(RenderPassEvent renderPassEvent, Material blitMat, string tag)
{
this.renderPassEvent = renderPassEvent;
blitMaterial = blitMat;
profilerTag = tag;
temporaryColorTexture.Init("_TemporaryColorTexture");
destinationTexture.Init("_AfterPostProcessTexture");
}
//Override the Execute function decalared in the scriptable render pass class.
//Any code in here will execute as part of the rendering process.
public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
{
//Create a command buffer, a list of graphical instructions to execute
CommandBuffer cmd = CommandBufferPool.Get(profilerTag);
RenderTextureDescriptor opaqueDesc = renderingData.cameraData.cameraTargetDescriptor;
opaqueDesc.depthBufferBits = 0;
cmd.GetTemporaryRT(destinationTexture.id, opaqueDesc, FilterMode.Point);
//Get a temporary render texture
cmd.GetTemporaryRT(temporaryColorTexture.id, opaqueDesc);
//Copy what the camera is rendering to the render texture and apply the blit material
Blit(cmd, source, temporaryColorTexture.Identifier(), blitMaterial);
//Copy what the temporary render texture is rendering back to the camera
Blit(cmd, temporaryColorTexture.Identifier(), source);
//Execute the graphic commands
context.ExecuteCommandBuffer(cmd);
//Release the command buffer
CommandBufferPool.Release(cmd);
}
public override void FrameCleanup(CommandBuffer cmd)
{
//Release temporary Render Textures
cmd.ReleaseTemporaryRT(destinationTexture.id);
cmd.ReleaseTemporaryRT(temporaryColorTexture.id);
}
}
}

11
Assets/PhotoMode/PM-Scripts/BlitRenderPass.cs.meta


fileFormatVersion: 2
guid: 27f1cefb51fe6ee49a399ec3405e5a78
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

47
Assets/PhotoMode/PM-Scripts/CustomInputProvider.cs


using UnityEngine;
using UnityEngine.InputSystem;
using static Cinemachine.AxisState;
using PhotoMode;
namespace PhotoMode
{
public class CustomInputProvider : MonoBehaviour, IInputAxisProvider
{
[SerializeField] private InputActionReference XYAxisAction;
private Vector2 XYAxis;
public bool active = true;
private void Awake()
{
XYAxisAction.action.performed += Action_performed;
}
private void Action_performed(InputAction.CallbackContext callback)
{
XYAxis = callback.ReadValue<Vector2>();
if (active)
{
GetAxisValue(0);
GetAxisValue(1);
}
}
public float GetAxisValue(int axis)
{
if (!active)
return 0;
switch (axis)
{
default: return 0;
case 0: return XYAxis.x;
case 1: return XYAxis.y;
}
}
}
}

11
Assets/PhotoMode/PM-Scripts/CustomInputProvider.cs.meta


fileFormatVersion: 2
guid: 09e6ade554b18b245949285a8127ac6e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/PhotoMode/PM-Scripts/Editor Scripts.meta


fileFormatVersion: 2
guid: fddb2db277e4d564598ec33a20b80628
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

47
Assets/PhotoMode/PM-Scripts/Editor Scripts/MinMaxDrawer.cs


using UnityEditor;
using UnityEngine;
using PhotoMode;
namespace PhotoMode
{
// IngredientDrawer
[CustomPropertyDrawer(typeof(MinMax))]
public class MinMaxDrawer : PropertyDrawer
{
// Draw the property inside the given rect
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
// Using BeginProperty / EndProperty on the parent property means that
// prefab override logic works on the entire property.
EditorGUI.BeginProperty(position, label, property);
// Draw label
position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
// Don't make child fields be indented
var indent = EditorGUI.indentLevel;
EditorGUI.indentLevel = 0;
// Calculate rects
float quaterWidth = position.width * 0.25f;
float halfWidth = position.width * 0.5f;
Rect minRect = new Rect(position.x, position.y, 30, position.height);
Rect minValueRect = new Rect(position.x + 30, position.y, halfWidth - 35, position.height);
Rect maxRect = new Rect(position.xMax - halfWidth + 5, position.y, 30, position.height);
Rect maxValueRect = new Rect(position.x + halfWidth + 35, position.y, halfWidth - 35, position.height);
// Draw fields - passs GUIContent.none to each so they are drawn without labels
EditorGUI.LabelField(minRect, "Min");
EditorGUI.PropertyField(minValueRect, property.FindPropertyRelative("min"), GUIContent.none);
EditorGUI.LabelField(maxRect, "Max");
EditorGUI.PropertyField(maxValueRect, property.FindPropertyRelative("max"), GUIContent.none);
// Set indent back to what it was
EditorGUI.indentLevel = indent;
EditorGUI.EndProperty();
}
}
}

11
Assets/PhotoMode/PM-Scripts/Editor Scripts/MinMaxDrawer.cs.meta


fileFormatVersion: 2
guid: 70e6ef9eaaab5ad46a8053e29938cebb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

63
Assets/PhotoMode/PM-Scripts/InfoBarController.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using PhotoMode;
namespace PhotoMode
{
public class InfoBarController : MonoBehaviour
{
[SerializeField] private GameObject photoModeMenus;
[SerializeField] private CanvasGroup photoModeMenusCanvas;
[SerializeField] private GameObject defaultInfoBarKeyboard;
[SerializeField] private GameObject stickerInfoBarKeyboard;
[SerializeField] private GameObject defaultInfoBarGamepad;
[SerializeField] private GameObject stickerInfoBarGamepad;
[SerializeField] private CustomInputProvider photoModeCameraInputProvider;
private bool stickerModeActive = false;
private bool keyboardModeActive = true;
private void Awake()
{
photoModeMenusCanvas = photoModeMenus.GetComponent<CanvasGroup>();
}
public void StickerModeActivation(bool active)
{
stickerModeActive = active;
//Infobar change
photoModeMenusCanvas.interactable = !active;
photoModeCameraInputProvider.active = !active;
if (keyboardModeActive)
{
defaultInfoBarKeyboard.SetActive(!active);
stickerInfoBarKeyboard.SetActive(active);
//Deactive the unused items
defaultInfoBarGamepad.SetActive(false);
stickerInfoBarGamepad.SetActive(false);
}
else
{
defaultInfoBarGamepad.SetActive(!active);
stickerInfoBarGamepad.SetActive(active);
//Deactive the unused items
defaultInfoBarKeyboard.SetActive(false);
stickerInfoBarKeyboard.SetActive(false);
}
}
public void SetKeyboardModeActive(bool active)
{
keyboardModeActive = active;
//Update the UI incase anything has changed
StickerModeActivation(stickerModeActive);
}
}
}

11
Assets/PhotoMode/PM-Scripts/InfoBarController.cs.meta


fileFormatVersion: 2
guid: 846353b2d59fb6b4c88a43a66f988592
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

19
Assets/PhotoMode/PM-Scripts/MinMax.cs


using System;
using PhotoMode;
namespace PhotoMode
{
// Custom serializable class
[Serializable]
public class MinMax
{
public float min = 0.0f;
public float max = 1.0f;
public MinMax(float minValue, float maxValue)
{
min = minValue;
max = maxValue;
}
}
}

11
Assets/PhotoMode/PM-Scripts/MinMax.cs.meta


fileFormatVersion: 2
guid: 9b1bdc2ae73b4574eb3f5e81f54ba463
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

369
Assets/PhotoMode/PM-Scripts/PhotoMode.cs


using System.Collections;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Rendering.Universal;
using UnityEngine.Rendering;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using Cinemachine;
using PhotoMode;
namespace PhotoMode
{
[System.Serializable] public class PhotoModeEvent : UnityEvent<bool> { }
public class PhotoMode : MonoBehaviour
{
private static PhotoMode instance;
private EventSystem projectEventSystem;
private CinemachineBrain projectCinemachineBrain;
CinemachineBrain.UpdateMethod project_cm_update;
CinemachineBlendDefinition.Style project_cm_blend;
[Header("Character Reference")]
[SerializeField] private GameObject playerObject;
[SerializeField] private GameObject photoModeCameraOrbit;
private EventSystem photoModeEventSystem;
private PhotoModeInputs photoModeInputs;
private CinemachineFreeLook photoModeCamera;
private CinemachineCameraOffset photoModeCameraOffset;
private Transform photoModeUI;
private GameObject photoModeFrame;
private Volume photoModeVolume;
private VolumeProfile photoModeVolumeProfile;
private CanvasGroup photoModeMenusCanvas;
private float photoModeCameraXAxis;
private float photoModeCameraYAxis;
[Header("UI References")]
[SerializeField] private GameObject photoModeMenus;
[SerializeField] private GameObject photoModeGrid;
[SerializeField] private PhotoModeStickerController stickerController;
[SerializeField] private Image photoModeVignette;
[Header("Photo Mode Settings")]
[SerializeField] private MinMax viewRoll = new MinMax(-90f, 90f);
[SerializeField] private MinMax camDist = new MinMax(3f, -3f);
[SerializeField] private MinMax focusDistance = new MinMax(0.1f, 20f);
[SerializeField] private MinMax aperture = new MinMax(1f, 32f);
[SerializeField] private MinMax exposure = new MinMax(-3f, 3f);
[SerializeField] private MinMax contrast = new MinMax(-50f, 50f);
[SerializeField] private MinMax saturation = new MinMax(-100f, 100f);
[SerializeField] private MinMax vignette = new MinMax(-1f, 1f);
[SerializeField] private MinMax verticalArm = new MinMax(-1f, 1f);
[Range(.5f, 2)] [SerializeField] private float verticalArmSpeed = 0.01f;
[Header("Filter Material")]
[SerializeField] private Material postProcessingMaterial;
[SerializeField] private Blit blit;
[Header("Debug Behavior")]
[SerializeField] private PhotoModeDebugger photoModeDebugger;
private Shader unlitShader;
private bool photoModeOn;
private Color vignetteColor;
private ColorAdjustments colorAdj;
private DepthOfField dof;
[Space]
public PhotoModeEvent OnPhotoModeActivation;
private void Awake()
{
instance = this;
//Check if projectCinemachineBrain is set
if (FindObjectOfType<CinemachineBrain>() != null)
{
projectCinemachineBrain = FindObjectOfType<CinemachineBrain>();
project_cm_blend = projectCinemachineBrain.m_DefaultBlend.m_Style;
project_cm_update = projectCinemachineBrain.m_UpdateMethod;
}
//Store the project's Event System
projectEventSystem = EventSystem.current;
// Photo Mode declarations
photoModeEventSystem = GetComponentInChildren<EventSystem>();
photoModeInputs = GetComponent<PhotoModeInputs>();
photoModeCamera = GetComponentInChildren<CinemachineFreeLook>();
photoModeCameraOffset = photoModeCamera.GetComponent<CinemachineCameraOffset>();
photoModeUI = transform.Find("PhotoMode_UI");
photoModeVolume = GetComponentInChildren<Volume>();
photoModeVolumeProfile = photoModeVolume.profile;
photoModeVolumeProfile.TryGet<DepthOfField>(out dof);
photoModeVolumeProfile.TryGet<ColorAdjustments>(out colorAdj);
photoModeMenusCanvas = photoModeMenus.GetComponent<CanvasGroup>();
//Disable Photo Mode Event System if project has an exisiting Event System
if (projectEventSystem != photoModeEventSystem)
photoModeEventSystem.enabled = false;
//Add Input Listeners
photoModeInputs.ResetEvent.AddListener(ResetValues);
photoModeInputs.ToggleGridEvent.AddListener(ToggleGrid);
photoModeInputs.ToggleInterfaceEvent.AddListener(ToggleUI);
photoModeInputs.SubmitEvent.AddListener(stickerController.StampSticker);
photoModeInputs.SwapStickerEvent.AddListener(() => stickerController.ChangeStickerSprite(1));
photoModeInputs.DeleteStickerEvent.AddListener(stickerController.DeleteSticker);
photoModeInputs.FlipStickerEvent.AddListener(() => stickerController.FlipSticker(false));
//Get the unlit texture shader for use later
unlitShader = Shader.Find("Unlit/Texture");
//Try to force finding a player
if (playerObject == null && FindObjectOfType<UnityEngine.InputSystem.PlayerInput>() != null)
playerObject = FindObjectOfType<UnityEngine.InputSystem.PlayerInput>().gameObject;
if (playerObject != null)
photoModeCameraOrbit.transform.position = playerObject.transform.position;
//Debug messages
DebugBehavior();
//Deactivate the UI if it's enabled
if (photoModeUI.gameObject.activeSelf)
photoModeUI.gameObject.SetActive(false);
}
private void Update()
{
if (stickerController.IsActive())
{
stickerController.MoveStickers(photoModeInputs.moveAxis);
stickerController.RotateStickers(photoModeInputs.modifier1_value);
stickerController.ScaleStickers(photoModeInputs.modifier2_value);
}
else if (photoModeOn)
{
CraneCamera(photoModeInputs.modifier2_value);
}
}
// Toggles applicable Photo Mode values based on game's pause status
public void Activate(bool active)
{
OnPhotoModeActivation.Invoke(active);
if (photoModeCameraOrbit != null && playerObject != null)
photoModeCameraOrbit.transform.position = playerObject.transform.position;
//General Canvas Group
photoModeUI.gameObject.SetActive(active);
//Project EventSystem configuration
if (active)
projectEventSystem = EventSystem.current;
if (projectEventSystem != null)
{
if (projectEventSystem != photoModeEventSystem)
projectEventSystem.enabled = !active;
}
photoModeEventSystem.enabled = active;
//Project CinemachineBrain configuration
ProjectCinemachineConfig(active);
//Remember the starting position of the photo mode camera for use in the reset function
photoModeCameraXAxis = photoModeCamera.m_XAxis.Value;
photoModeCameraYAxis = photoModeCamera.m_YAxis.Value;
//Reset default Photo Mode Values
ResetValues();
//Transition Cameras
photoModeOn = active;
photoModeCamera.Priority = active ? 99 : 1;
if (blit != null)
blit.SetActive(active);
if (active == true)
SetEventSystemSelectedObj(GetComponentInChildren<Slider>().gameObject);
}
// Camera Offset functionality
public void CraneCamera(float value)
{
if (value < 0 && photoModeCameraOffset.m_Offset.y > verticalArm.min)
photoModeCameraOffset.m_Offset.y -= (verticalArmSpeed * Mathf.Abs(value)) * Time.unscaledDeltaTime;
if (value > 0 && photoModeCameraOffset.m_Offset.y < verticalArm.max)
photoModeCameraOffset.m_Offset.y += (verticalArmSpeed * Mathf.Abs(value)) * Time.unscaledDeltaTime;
}
// Invoked by applicable UI sliders when their value changes
public void ViewRoll(Slider slider)
{
photoModeCamera.m_Lens.Dutch = (slider.value - slider.minValue) / (slider.maxValue - slider.minValue) * (viewRoll.max - viewRoll.min) + viewRoll.min;
}
public void CameraDistance(Slider slider)
{
photoModeCameraOffset.m_Offset.z = (slider.value - slider.minValue) / (slider.maxValue - slider.minValue) * (camDist.max - camDist.min) + camDist.min;
}
public void FocusDistance(Slider slider)
{
dof.focusDistance.Override((slider.value - slider.minValue) / (slider.maxValue - slider.minValue) * (focusDistance.max - focusDistance.min) + focusDistance.min);
}
public void Aperture(Slider slider)
{
dof.aperture.Override((slider.value - slider.minValue) / (slider.maxValue - slider.minValue) * (aperture.max - aperture.min) + aperture.min);
}
public void Exposure(Slider slider)
{
colorAdj.postExposure.Override((slider.value - slider.minValue) / (slider.maxValue - slider.minValue) * (exposure.max - exposure.min) + exposure.min);
}
public void Contrast(Slider slider)
{
colorAdj.contrast.Override((slider.value - slider.minValue) / (slider.maxValue - slider.minValue) * (contrast.max - contrast.min) + contrast.min);
}
public void Saturation(Slider slider)
{
colorAdj.saturation.Override((slider.value - slider.minValue) / (slider.maxValue - slider.minValue) * (saturation.max - saturation.min) + saturation.min);
}
public void Vignette(Slider slider)
{
vignetteColor = slider.value > 0 ? Color.white : Color.black;
vignetteColor.a = Mathf.Abs((slider.value - slider.minValue) / (slider.maxValue - slider.minValue) * (vignette.max - vignette.min) + vignette.min);
photoModeVignette.color = vignetteColor;
}
public void ChangeFilter(Shader shader)
{
postProcessingMaterial.shader = shader;
}
public void ChangeFrame(GameObject frame)
{
ResetFrame();
photoModeFrame = frame;
frame.gameObject.SetActive(true);
}
public void ResetFrame()
{
if (photoModeFrame != null)
photoModeFrame.SetActive(false);
}
// Toggles photo mode UI visiblity so user can take an unobstructed screenshot
public void ToggleUI()
{
if (!photoModeOn)
return;
if (!stickerController.IsActive())
photoModeMenusCanvas.alpha = photoModeMenusCanvas.alpha == 0 ? 1 : 0;
}
// Toggles rule-of-thirds photoModeGrid visiblity within the photo mode UI
public void ToggleGrid()
{
if (!photoModeOn)
return;
if (!stickerController.IsActive())
photoModeGrid.SetActive(!photoModeGrid.activeSelf);
}
// Resets all photo mode values to their defaults
public void ResetValues()
{
if (stickerController.IsActive())
return;
//Reset camera Crane & Zoom
photoModeCameraOffset.m_Offset = Vector3.zero;
//Reset the photo mode camera position
photoModeCamera.m_XAxis.Value = photoModeCameraXAxis;
photoModeCamera.m_YAxis.Value = photoModeCameraYAxis;
//Reset every slider value
foreach (Slider slider in photoModeMenus.GetComponentsInChildren<Slider>())
slider.value = 0;
//Toggle UI if it was disabled
if (photoModeMenusCanvas.alpha == 0)
ToggleUI();
//Reset the filter shader to the built in unlit texture shader
ChangeFilter(unlitShader);
stickerController.ResetStickers();
stickerController.ToggleStickerMode(false);
if (EventSystem.current != null)
SetEventSystemSelectedObj(EventSystem.current.currentSelectedGameObject);
}
private void SetEventSystemSelectedObj(GameObject obj)
{
GameObject currentSelected = obj;
EventSystem.current.SetSelectedGameObject(null);
EventSystem.current.SetSelectedGameObject(currentSelected);
}
private void OnApplicationQuit()
{
ResetValues();
}
private void DebugBehavior()
{
if (playerObject == null)
photoModeDebugger.PlayerAvailability(false);
if (blit == null)
photoModeDebugger.BlitAvailability(false);
if (photoModeVolume == null)
photoModeDebugger.VolumeAvailability(false);
if (photoModeCameraOffset == null)
photoModeDebugger.CameraOffsetAvailability(false);
}
private void ProjectCinemachineConfig(bool active)
{
if (projectCinemachineBrain != null)
{
projectCinemachineBrain.m_IgnoreTimeScale = active;
projectCinemachineBrain.m_UpdateMethod = active ? CinemachineBrain.UpdateMethod.SmartUpdate : project_cm_update;
StartCoroutine(BlendTimeReset());
IEnumerator BlendTimeReset()
{
float blendTime = projectCinemachineBrain.m_DefaultBlend.m_Time;
projectCinemachineBrain.m_DefaultBlend.m_Time = 0;
projectCinemachineBrain.m_DefaultBlend.m_Style = active ? CinemachineBlendDefinition.Style.Cut : project_cm_blend;
yield return new WaitForEndOfFrame();
projectCinemachineBrain.m_DefaultBlend.m_Time = blendTime;
}
}
}
/// <summary>
/// Utilize this function to determine the object that the Photo Mode Camera will orbit around.
/// </summary>
/// <param name="player">GameObject that Photo Mode will orbit around</param>
public static void SetPlayerObject(GameObject player)
{
instance.playerObject = player;
instance.photoModeCameraOrbit.transform.position = player.transform.position;
}
}
}

11
Assets/PhotoMode/PM-Scripts/PhotoMode.cs.meta


fileFormatVersion: 2
guid: 22b0371237d6bf54881a09ea3e33473e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

66
Assets/PhotoMode/PM-Scripts/PhotoModeDebugger.cs


using UnityEngine;
using PhotoMode;
namespace PhotoMode
{
public class PhotoModeDebugger : MonoBehaviour
{
[SerializeField] private CanvasGroup[] cameraOffsetCanvases;
[SerializeField] private CanvasGroup[] postProcessingCanvases;
[SerializeField] private CanvasGroup[] filterCanvases;
internal void PlayerAvailability(bool available)
{
if (!available)
DebugMessage("Player Object", null);
}
internal void VolumeAvailability(bool available)
{
SetBlock(postProcessingCanvases, available);
if (!available)
DebugMessage("Volume Component", postProcessingCanvases);
}
internal void BlitAvailability(bool available)
{
SetBlock(filterCanvases, available);
if (!available)
DebugMessage("Blit Asset", filterCanvases);
}
internal void CameraOffsetAvailability(bool available)
{
SetBlock(cameraOffsetCanvases, available);
if (!available)
DebugMessage("Camera Offset", cameraOffsetCanvases);
}
private void SetBlock(CanvasGroup[] allCanvas, bool state)
{
foreach (CanvasGroup canvas in allCanvas)
{
canvas.interactable = state;
canvas.alpha = state ? 1f : .2f;
}
}
private void DebugMessage(string identifier, CanvasGroup[] allCanvas)
{
string baseMessage = "<b>Photo Mode Debug:</b> \n <b>" + identifier + "</b> is not set.";
string additionalMessage = string.Empty;
if (allCanvas != null)
{
additionalMessage = " UI block" + ((allCanvas.Length > 1) ? "s" : string.Empty) + " " + "disabled: ";
for (int i = 0; i < allCanvas.Length; i++)
additionalMessage += (i > 0 ? ", " : string.Empty) + "<b><i>" + allCanvas[i].name + "</i></b>";
}
Debug.LogWarning(baseMessage + additionalMessage);
}
}
}

11
Assets/PhotoMode/PM-Scripts/PhotoModeDebugger.cs.meta


fileFormatVersion: 2
guid: f4eefef634f1bd84291bc3d86ab2eb6d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

188
Assets/PhotoMode/PM-Scripts/PhotoModeInputs.cs


using System.Collections;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.InputSystem;
using PhotoMode;
namespace PhotoMode
{
[System.Serializable] public class PhotoModeDeviceEvent : UnityEvent<InputDevice> { }
[System.Serializable] public class PhotoModeButtonEvent : UnityEvent { }
[System.Serializable] public class PhotoModeAxisEvent : UnityEvent<Vector2> { }
[System.Serializable] public class PhotoModeIntEvent : UnityEvent<int> { }
public class PhotoModeInputs : MonoBehaviour
{
private InputDevice currentInputDevice;
//References for dynamically changing the UI input icons
[Header("Device Configuration")]
[SerializeField] private InfoBarController infoBarController;
//Reference for the Action Asset and all of needed actions
[Space]
[Header("Input System Actions - Photo Mode")]
[SerializeField] private InputActionAsset photoModeActionAsset;
public InputActionReference submitAction;
public InputActionReference navigationAction;
public InputActionReference lookAction;
public InputActionReference pauseAction;
public InputActionReference resetAction;
public InputActionReference toggleInterfaceAction;
public InputActionReference toggleGridAction;
[Space]
[Header("Input System Actions - Sticker Mode")]
public InputActionReference swapStickerAction;
public InputActionReference deleteStickerAction;
public InputActionReference flipStickerAction;
[Space]
[Header("Input System Actions - Modifiers")]
public InputActionReference modifier1Action;
public InputActionReference modifier2Action;
//Events
[HideInInspector] public PhotoModeDeviceEvent DeviceChangeEvent;
[HideInInspector] public PhotoModeButtonEvent SubmitEvent;
[HideInInspector] public PhotoModeButtonEvent PauseEvent;
[HideInInspector] public PhotoModeButtonEvent ResetEvent;
[HideInInspector] public PhotoModeButtonEvent ToggleInterfaceEvent;
[HideInInspector] public PhotoModeButtonEvent ToggleGridEvent;
[HideInInspector] public PhotoModeButtonEvent SwapStickerEvent;
[HideInInspector] public PhotoModeButtonEvent DeleteStickerEvent;
[HideInInspector] public PhotoModeButtonEvent FlipStickerEvent;
//Input results
[Header("Input Values")]
public Vector2 moveAxis;
public Vector2 lookAxis;
public float modifier1_value;
public float modifier2_value;
private void Start()
{
//Enable Action Asset
photoModeActionAsset.Enable();
//Submit Input
submitAction.action.performed += SubmitAction_performed;
//Navigation Input
navigationAction.action.performed += NavigateAction_performed;
//Look Input
lookAction.action.performed += LookAction_performed;
//Reset Input
resetAction.action.performed += ResetAction_performed;
//Pause Input
pauseAction.action.performed += PauseAction_performed;
//Grid Input
toggleGridAction.action.performed += GridAction_performed;
//Interface Toggle Input
toggleInterfaceAction.action.performed += InterfaceAction_performed;
//Swap Sticker Input
swapStickerAction.action.performed += SwapStickerAction_performed;
//Delete Sticker Input
deleteStickerAction.action.performed += DeleteStickerAction_performed;
//Flip Sticker Input
flipStickerAction.action.performed += ExtraAction_performed;
//Modifier Inputs
modifier1Action.action.performed += Modifier1Action_performed;
modifier2Action.action.performed += Modifier2Action_performed;
//Any input
photoModeActionAsset.actionMaps[0].actionTriggered += PhotoModeInputs_actionTriggered;
photoModeActionAsset.actionMaps[1].actionTriggered += PhotoModeInputs_actionTriggered;
}
private void ResetAction_performed(InputAction.CallbackContext callback)
{
ResetEvent.Invoke();
}
private void DeleteStickerAction_performed(InputAction.CallbackContext callback)
{
DeleteStickerEvent.Invoke();
}
private void SwapStickerAction_performed(InputAction.CallbackContext callback)
{
SwapStickerEvent.Invoke();
}
private void InterfaceAction_performed(InputAction.CallbackContext callback)
{
ToggleInterfaceEvent.Invoke();
}
private void GridAction_performed(InputAction.CallbackContext callback)
{
ToggleGridEvent.Invoke();
}
private void SubmitAction_performed(InputAction.CallbackContext callback)
{
SubmitEvent.Invoke();
}
private void NavigateAction_performed(InputAction.CallbackContext callback)
{
moveAxis = callback.ReadValue<Vector2>();
}
private void LookAction_performed(InputAction.CallbackContext callback)
{
lookAxis = callback.ReadValue<Vector2>();
}
private void PauseAction_performed(InputAction.CallbackContext callback)
{
PauseEvent.Invoke();
}
private void Modifier1Action_performed(InputAction.CallbackContext callback)
{
modifier1_value = callback.ReadValue<float>();
}
private void Modifier2Action_performed(InputAction.CallbackContext callback)
{
modifier2_value = callback.ReadValue<float>();
}
private void ExtraAction_performed(InputAction.CallbackContext callback)
{
FlipStickerEvent.Invoke();
}
private void PhotoModeInputs_actionTriggered(InputAction.CallbackContext obj)
{
//Set current device and switch instructions
if (currentInputDevice != obj.control.device)
{
currentInputDevice = obj.control.device;
string deviceName = obj.control.device.ToString();
bool isDeviceKeyboard = deviceName == "Keyboard:/Keyboard";
bool isDeviceMouse = deviceName == "Mouse:/Mouse";
infoBarController.SetKeyboardModeActive(isDeviceKeyboard || isDeviceMouse);
}
}
}
}

11
Assets/PhotoMode/PM-Scripts/PhotoModeInputs.cs.meta


fileFormatVersion: 2
guid: 3110481c6558ceb479bdf326db751c14
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

62
Assets/PhotoMode/PM-Scripts/PhotoModePauser.cs


using UnityEngine;
using PhotoMode;
namespace PhotoMode
{
public class PhotoModePauser : MonoBehaviour
{
[SerializeField] private bool pauseActionActivation = false;
private UnityEngine.InputSystem.PlayerInput playerInput;
private PhotoModeInputs photoModeInputs;
private PhotoMode photoModeBehaviors;
private PhotoModeStickerController stickerController;
private bool gamePaused;
private void Awake()
{
//Check if there's a PlayerInput component in the scene
if (FindObjectOfType<UnityEngine.InputSystem.PlayerInput>() != null)
playerInput = FindObjectOfType<UnityEngine.InputSystem.PlayerInput>();
photoModeInputs = GetComponent<PhotoModeInputs>();
photoModeBehaviors = GetComponent<PhotoMode>();
stickerController = GetComponentInChildren<PhotoModeStickerController>();
if (pauseActionActivation)
{
photoModeInputs.PauseEvent.AddListener(PauseAction);
}
}
public void PauseAction()
{
PauseGame(!gamePaused);
}
private void PauseGame(bool pause)
{
//StickerMode check
if (stickerController.IsActive())
{
stickerController.ToggleStickerMode(false);
return;
}
//Storing original timeScale
float originalTimeScale = 1;
if (pause)
originalTimeScale = Time.deltaTime;
gamePaused = pause;
Time.timeScale = gamePaused ? 0 : originalTimeScale;
photoModeBehaviors.Activate(pause);
//Disable/enable player's input on pause
if (playerInput)
playerInput.enabled = !pause;
}
}
}

11
Assets/PhotoMode/PM-Scripts/PhotoModePauser.cs.meta


fileFormatVersion: 2
guid: 698857ae6b331a341a0e0604520a08b3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

186
Assets/PhotoMode/PM-Scripts/PhotoModeStickerController.cs


using UnityEngine;
using UnityEngine.UI;
using PhotoMode;
namespace PhotoMode
{
public class PhotoModeStickerController : MonoBehaviour
{
private bool stickerModeOn;
[Header("Info Bar References")]
[SerializeField] private InfoBarController infoBarController;
[Header("Sticker References")]
[SerializeField] private Transform stickerOverlay;
[SerializeField] private CanvasGroup stickerCanvas;
[SerializeField] private CanvasGroup stickerCursor;
[SerializeField] private Transform stickerPreview;
[SerializeField] private Image prevSticker, currentSticker, nextSticker;
[SerializeField] private Button stickerActivateButton;
[Header("Sticker Settings")]
[SerializeField] private float stickerCursorSpeed;
[SerializeField] private float stickerRotateSpeed;
[SerializeField] private float stickerScaleSpeed;
[SerializeField] private Sprite[] stickerSprites;
private RectTransform stickerCursorRect;
private RectTransform stickerPreviewRect;
private int stickerAmountCount;
private int stickerSpriteCount;
private RectTransform[] stickerPool;
private Vector3 originalStickerScale;
private Vector2 originalCursorSize, originalPreviewSize;
private void Awake()
{
//Sticker Mode declarations
stickerActivateButton.onClick.AddListener(() => ToggleStickerMode(true));
stickerCursorRect = stickerCursor.GetComponent<RectTransform>();
stickerPreviewRect = stickerPreview.GetComponent<RectTransform>();
stickerPool = stickerOverlay.GetComponentsInChildren<RectTransform>();
originalStickerScale = stickerPreview.localScale;
originalCursorSize = stickerCursorRect.sizeDelta;
originalPreviewSize = stickerPreviewRect.sizeDelta;
}
public bool IsActive()
{
return stickerModeOn;
}
public void ToggleStickerMode(bool status)
{
stickerModeOn = status;
infoBarController.StickerModeActivation(status);
//Update Gallery
UpdateStickerGallery();
stickerCanvas.alpha = status ? 1 : 0;
}
public void StampSticker()
{
if (!stickerModeOn)
return;
stickerPool[stickerAmountCount].position = stickerPreviewRect.position;
stickerPool[stickerAmountCount].rotation = stickerPreviewRect.rotation;
stickerPool[stickerAmountCount].sizeDelta = stickerPreviewRect.sizeDelta;
stickerPool[stickerAmountCount].localScale = stickerPreviewRect.localScale;
stickerPool[stickerAmountCount].GetComponent<Image>().sprite = stickerPreview.GetComponent<Image>().sprite;
stickerPool[stickerAmountCount].GetComponent<Image>().color = Color.white;
stickerAmountCount++;
if (stickerAmountCount > stickerPool.Length - 1) stickerAmountCount = 0;
}
public void MoveStickers(Vector2 axis)
{
if (!stickerModeOn)
return;
stickerCursor.transform.position += (Vector3)axis * Time.unscaledDeltaTime * stickerCursorSpeed;
}
public void RotateStickers(float dir)
{
if (!stickerModeOn)
return;
stickerCursor.transform.eulerAngles += new Vector3(0, 0, -dir) * Time.unscaledDeltaTime * stickerRotateSpeed;
}
public void ScaleStickers(float dir)
{
if (!stickerModeOn)
return;
//Clamp Size
if (dir == 1 && stickerPreviewRect.sizeDelta.x >= 250 || dir == -1 && stickerPreviewRect.sizeDelta.x <= 50)
return;
stickerCursorRect.sizeDelta += new Vector2(dir, dir) * Time.unscaledDeltaTime * stickerScaleSpeed;
stickerPreviewRect.sizeDelta += new Vector2(dir, dir) * Time.unscaledDeltaTime * stickerScaleSpeed;
}
public void ChangeStickerSprite(int input)
{
if (!stickerModeOn)
return;
if (input == 1)
{
stickerSpriteCount++;
if (stickerSpriteCount > stickerSprites.Length - 1)
stickerSpriteCount = 0;
}
if (input == -1)
{
stickerSpriteCount--;
if (stickerSpriteCount < 0)
stickerSpriteCount = stickerSprites.Length - 1;
}
stickerPreview.GetComponent<Image>().sprite = stickerSprites[stickerSpriteCount];
UpdateStickerGallery();
}
public void UpdateStickerGallery()
{
stickerPreview.GetComponent<Image>().sprite = stickerSprites[(int)Mathf.Repeat(stickerSpriteCount, stickerSprites.Length)];
prevSticker.sprite = stickerSprites[(int)Mathf.Repeat(stickerSpriteCount - 1, stickerSprites.Length)];
currentSticker.sprite = stickerSprites[(int)Mathf.Repeat(stickerSpriteCount, stickerSprites.Length)];
nextSticker.sprite = stickerSprites[(int)Mathf.Repeat(stickerSpriteCount + 1, stickerSprites.Length)];
}
public void DeleteSticker()
{
if (!stickerModeOn)
return;
int index;
index = stickerAmountCount - 1;
if (index < 0)
index = stickerPool.Length - 1;
if (stickerPool[index].GetComponent<Image>().color == Color.clear)
return;
stickerAmountCount--;
if (stickerAmountCount < 0) stickerAmountCount = stickerPool.Length - 1;
stickerPool[stickerAmountCount].GetComponent<Image>().color = Color.clear;
}
public void FlipSticker(bool reset)
{
if (!stickerModeOn)
return;
if (!reset)
stickerPreviewRect.localScale = new Vector3(stickerPreviewRect.localScale.x * -1, originalStickerScale.y, originalStickerScale.z);
else
stickerPreview.localScale = originalStickerScale;
}
public void ResetStickers()
{
FlipSticker(true);
foreach (RectTransform rect in stickerPool)
rect.GetComponent<Image>().color = Color.clear;
stickerSpriteCount = 0;
stickerCursorRect.anchoredPosition = Vector3.zero;
stickerCursor.transform.eulerAngles = Vector3.zero;
stickerCursorRect.sizeDelta = originalCursorSize;
stickerPreviewRect.sizeDelta = originalPreviewSize;
}
}
}

11
Assets/PhotoMode/PM-Scripts/PhotoModeStickerController.cs.meta


fileFormatVersion: 2
guid: 35486330484c3314793f4deb179ac93b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

72
Assets/PhotoMode/PM-Scripts/TextSlider.cs


using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
using TMPro;
using PhotoMode;
namespace PhotoMode
{
[RequireComponent(typeof(Slider))]
public class TextSlider : MonoBehaviour
{
private Slider slider;
[Header("Visual Components")]
public TextMeshProUGUI sliderText;
public Image leftArrow;
public Image rightArrow;
[Header("Indicator Colors")]
public Color inactiveColor = new Color(0.427451f, 0.427451f, 0.427451f, 1f);
public Color activeColor = new Color(1f, 1f, 1f, 1f);
[Header("Slider Custom Options")]
public Option[] options;
[System.Serializable]
public class Option
{
public string optionTitle = "Option Title";
public UnityEvent optionEvent = new UnityEvent();
}
private void Awake()
{
slider = GetComponent<Slider>();
slider.minValue = 0;
slider.maxValue = options.Length - 1;
UpdateTextSlider(slider.value);
}
public void UpdateTextSlider(float index)
{
if (options != null)
{
sliderText.text = options[(int)index].optionTitle;
options[(int)index].optionEvent.Invoke();
if (slider.value == slider.minValue || slider.value == slider.maxValue)
{
if (slider.value == slider.minValue)
{
leftArrow.color = inactiveColor;
rightArrow.color = activeColor;
}
if (slider.value == slider.maxValue)
{
leftArrow.color = activeColor;
rightArrow.color = inactiveColor;
}
}
else
{
leftArrow.color = activeColor;
rightArrow.color = activeColor;
}
}
}
}
}

11
Assets/PhotoMode/PM-Scripts/TextSlider.cs.meta


fileFormatVersion: 2
guid: a938f50eb91ab6744b9746f02515d8c1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

15
Assets/PhotoMode/PM-Scripts/TextSliderOptions.cs


using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
using PhotoMode;
namespace PhotoMode
{
[CreateAssetMenu(fileName = "TextSliderOption", menuName = "ScriptableObjects/Text Slider Options", order = 1)]
public class TextSliderOptions : ScriptableObject
{
public string optionName;
public string optionEvent;
}
}

11
Assets/PhotoMode/PM-Scripts/TextSliderOptions.cs.meta


fileFormatVersion: 2
guid: 9b02c84fde1cca7488ea9e9da0f7fe53
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/PhotoMode/PM-Settings.meta


fileFormatVersion: 2
guid: 0735c275001a2c84dafdb30deced5d8d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

109
Assets/PhotoMode/PM-Settings/ForwardRenderer.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-3918113605281272308
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7c1e0c7801ae8ad45a5ca443fdeedc14, type: 3}
m_Name: NewCyanBlit
m_EditorClassIdentifier:
m_Active: 1
settings:
Event: 1000
blitMaterial: {fileID: 2100000, guid: 15695081898bbdb4294e8aa3502a2997, type: 2}
blitMaterialPassIndex: 0
srcType: 1
srcTextureId: _AfterPostProcessTexture
srcTextureObject: {fileID: 0}
dstType: 1
dstTextureId: _AfterPostProcessTexture
dstTextureObject: {fileID: 0}
overrideGraphicsFormat: 0
graphicsFormat: 4
--- !u!114 &-89615800120471542
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e82b1d9513fe4d54aba2605231454443, type: 3}
m_Name: NewBlit
m_EditorClassIdentifier:
m_Active: 0
blitMaterial: {fileID: 2100000, guid: 15695081898bbdb4294e8aa3502a2997, type: 2}
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
m_Name: ForwardRenderer
m_EditorClassIdentifier:
m_RendererFeatures:
- {fileID: -89615800120471542}
m_RendererFeatureMap: 0a908e93e79ec1fe
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2}
shaders:
blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd, type: 3}
samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
tileDepthInfoPS: {fileID: 0}
tileDeferredPS: {fileID: 0}
stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3}
fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3}
materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3}
m_OpaqueLayerMask:
serializedVersion: 2
m_Bits: 4294967295
m_TransparentLayerMask:
serializedVersion: 2
m_Bits: 4294967295
m_DefaultStencilState:
overrideStencilState: 0
stencilReference: 0
stencilCompareFunction: 8
passOperation: 0
failOperation: 0
zFailOperation: 0
m_ShadowTransparentReceive: 1
m_RenderingMode: 0
m_AccurateGbufferNormals: 0
--- !u!114 &1911814412663461782
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7c1e0c7801ae8ad45a5ca443fdeedc14, type: 3}
m_Name: NewCyanBlit
m_EditorClassIdentifier:
m_Active: 1
settings:
Event: 1000
blitMaterial: {fileID: 2100000, guid: 15695081898bbdb4294e8aa3502a2997, type: 2}
blitMaterialPassIndex: 0
srcType: 1
srcTextureId: _AfterPostProcessTexture
srcTextureObject: {fileID: 0}
dstType: 1
dstTextureId: _AfterPostProcessTexture
dstTextureObject: {fileID: 0}
overrideGraphicsFormat: 0
graphicsFormat: 4

8
Assets/PhotoMode/PM-Settings/ForwardRenderer.asset.meta


fileFormatVersion: 2
guid: 4a8e21d5c33334b11b34a596161b9360
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

118
Assets/PhotoMode/PM-Settings/SampleSceneProfile.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-7893295128165547882
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3}
m_Name: Bloom
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
threshold:
m_OverrideState: 1
m_Value: 1
min: 0
intensity:
m_OverrideState: 1
m_Value: 1
min: 0
scatter:
m_OverrideState: 0
m_Value: 0.7
min: 0
max: 1
clamp:
m_OverrideState: 0
m_Value: 65472
min: 0
tint:
m_OverrideState: 0
m_Value: {r: 1, g: 1, b: 1, a: 1}
hdr: 0
showAlpha: 0
showEyeDropper: 1
highQualityFiltering:
m_OverrideState: 0
m_Value: 0
dirtTexture:
m_OverrideState: 0
m_Value: {fileID: 0}
dirtIntensity:
m_OverrideState: 0
m_Value: 0
min: 0
--- !u!114 &-7011558710299706105
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 899c54efeace73346a0a16faa3afe726, type: 3}
m_Name: Vignette
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
color:
m_OverrideState: 0
m_Value: {r: 0, g: 0, b: 0, a: 1}
hdr: 0
showAlpha: 0
showEyeDropper: 1
center:
m_OverrideState: 0
m_Value: {x: 0.5, y: 0.5}
intensity:
m_OverrideState: 1
m_Value: 0.25
min: 0
max: 1
smoothness:
m_OverrideState: 1
m_Value: 0.4
min: 0.01
max: 1
rounded:
m_OverrideState: 0
m_Value: 0
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
m_Name: SampleSceneProfile
m_EditorClassIdentifier:
components:
- {fileID: 849379129802519247}
- {fileID: -7893295128165547882}
- {fileID: -7011558710299706105}
--- !u!114 &849379129802519247
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 97c23e3b12dc18c42a140437e53d3951, type: 3}
m_Name: Tonemapping
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
mode:
m_OverrideState: 1
m_Value: 2

8
Assets/PhotoMode/PM-Settings/SampleSceneProfile.asset.meta


fileFormatVersion: 2
guid: 10fc4df2da32a41aaa32d77bc913491c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

53
Assets/PhotoMode/PM-Settings/UniversalRP-HighQuality.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
m_Name: UniversalRP-HighQuality
m_EditorClassIdentifier:
k_AssetVersion: 5
k_AssetPreviousVersion: 5
m_RendererType: 1
m_RendererData: {fileID: 0}
m_RendererDataList:
- {fileID: 11400000, guid: 4a8e21d5c33334b11b34a596161b9360, type: 2}
m_DefaultRendererIndex: 0
m_RequireDepthTexture: 0
m_RequireOpaqueTexture: 0
m_OpaqueDownsampling: 1
m_SupportsHDR: 1
m_MSAA: 2
m_RenderScale: 1
m_MainLightRenderingMode: 1
m_MainLightShadowsSupported: 1
m_MainLightShadowmapResolution: 2048
m_AdditionalLightsRenderingMode: 1
m_AdditionalLightsPerObjectLimit: 4
m_AdditionalLightShadowsSupported: 1
m_AdditionalLightsShadowmapResolution: 512
m_ShadowDistance: 50
m_ShadowCascades: 1
m_Cascade2Split: 0.25
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
m_ShadowDepthBias: 1
m_ShadowNormalBias: 1
m_SoftShadowsSupported: 1
m_UseSRPBatcher: 1
m_SupportsDynamicBatching: 0
m_MixedLightingSupported: 1
m_DebugLevel: 0
m_ColorGradingMode: 0
m_ColorGradingLutSize: 32
m_ShadowType: 1
m_LocalShadowsSupported: 0
m_LocalShadowsAtlasResolution: 256
m_MaxPixelLights: 0
m_ShadowAtlasResolution: 256
m_ShaderVariantLogLevel: 0

8
Assets/PhotoMode/PM-Settings/UniversalRP-HighQuality.asset.meta


fileFormatVersion: 2
guid: 19ba41d7c0026c3459d37c2fe90c55a0
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

53
Assets/PhotoMode/PM-Settings/UniversalRP-LowQuality.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
m_Name: UniversalRP-LowQuality
m_EditorClassIdentifier:
k_AssetVersion: 5
k_AssetPreviousVersion: 5
m_RendererType: 1
m_RendererData: {fileID: 0}
m_RendererDataList:
- {fileID: 11400000, guid: 4a8e21d5c33334b11b34a596161b9360, type: 2}
m_DefaultRendererIndex: 0
m_RequireDepthTexture: 0
m_RequireOpaqueTexture: 0
m_OpaqueDownsampling: 1
m_SupportsHDR: 0
m_MSAA: 1
m_RenderScale: 1
m_MainLightRenderingMode: 1
m_MainLightShadowsSupported: 0
m_MainLightShadowmapResolution: 2048
m_AdditionalLightsRenderingMode: 0
m_AdditionalLightsPerObjectLimit: 4
m_AdditionalLightShadowsSupported: 0
m_AdditionalLightsShadowmapResolution: 512
m_ShadowDistance: 50
m_ShadowCascades: 0
m_Cascade2Split: 0.25
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
m_ShadowDepthBias: 1
m_ShadowNormalBias: 1
m_SoftShadowsSupported: 0
m_UseSRPBatcher: 1
m_SupportsDynamicBatching: 0
m_MixedLightingSupported: 1
m_DebugLevel: 0
m_ColorGradingMode: 0
m_ColorGradingLutSize: 16
m_ShadowType: 1
m_LocalShadowsSupported: 0
m_LocalShadowsAtlasResolution: 256
m_MaxPixelLights: 0
m_ShadowAtlasResolution: 256
m_ShaderVariantLogLevel: 0

8
Assets/PhotoMode/PM-Settings/UniversalRP-LowQuality.asset.meta


fileFormatVersion: 2
guid: a31e9f9f9c9d4b9429ed0d1234e22103
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

53
Assets/PhotoMode/PM-Settings/UniversalRP-MediumQuality.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
m_Name: UniversalRP-MediumQuality
m_EditorClassIdentifier:
k_AssetVersion: 5
k_AssetPreviousVersion: 5
m_RendererType: 1
m_RendererData: {fileID: 0}
m_RendererDataList:
- {fileID: 11400000, guid: 4a8e21d5c33334b11b34a596161b9360, type: 2}
m_DefaultRendererIndex: 0
m_RequireDepthTexture: 0
m_RequireOpaqueTexture: 0
m_OpaqueDownsampling: 1
m_SupportsHDR: 0
m_MSAA: 1
m_RenderScale: 1
m_MainLightRenderingMode: 1
m_MainLightShadowsSupported: 1
m_MainLightShadowmapResolution: 2048
m_AdditionalLightsRenderingMode: 1
m_AdditionalLightsPerObjectLimit: 4
m_AdditionalLightShadowsSupported: 0
m_AdditionalLightsShadowmapResolution: 512
m_ShadowDistance: 50
m_ShadowCascades: 0
m_Cascade2Split: 0.25
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
m_ShadowDepthBias: 1
m_ShadowNormalBias: 1
m_SoftShadowsSupported: 0
m_UseSRPBatcher: 1
m_SupportsDynamicBatching: 0
m_MixedLightingSupported: 1
m_DebugLevel: 0
m_ColorGradingMode: 0
m_ColorGradingLutSize: 32
m_ShadowType: 1
m_LocalShadowsSupported: 0
m_LocalShadowsAtlasResolution: 256
m_MaxPixelLights: 0
m_ShadowAtlasResolution: 256
m_ShaderVariantLogLevel: 0

8
Assets/PhotoMode/PM-Settings/UniversalRP-MediumQuality.asset.meta


fileFormatVersion: 2
guid: d847b876476d3d6468f5dfcd34266f96
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

8
Assets/PhotoMode/PM-TextMeshPro.meta


fileFormatVersion: 2
guid: 0edd5b0c5bd01e641b12cc18e8b9f847
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

9
Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials.meta


fileFormatVersion: 2
guid: 731f1baa9d144a9897cb1d341c2092b8
folderAsset: yes
timeCreated: 1442040525
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

106
Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LiberationSans SDF - Drop Shadow
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
m_ShaderKeywords: OUTLINE_ON UNDERLAY_ON
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Cube:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FaceTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OutlineTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
- _BevelClamp: 0
- _BevelOffset: 0
- _BevelRoundness: 0
- _BevelWidth: 0
- _BumpFace: 0
- _BumpOutline: 0
- _ColorMask: 15
- _Diffuse: 0.5
- _DiffusePower: 1
- _FaceDilate: 0.1
- _FaceUVSpeedX: 0
- _FaceUVSpeedY: 0
- _GlowInner: 0.05
- _GlowOffset: 0
- _GlowOuter: 0.05
- _GlowPower: 0.75
- _GradientScale: 10
- _LightAngle: 3.1416
- _MaskSoftnessX: 0
- _MaskSoftnessY: 0
- _OutlineSoftness: 0
- _OutlineUVSpeedX: 0
- _OutlineUVSpeedY: 0
- _OutlineWidth: 0.1
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 0.9
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.64125
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0
- _Sharpness: 0
- _SpecularPower: 2
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _TextureHeight: 1024
- _TextureWidth: 1024
- _UnderlayDilate: 0
- _UnderlayOffsetX: 0.5
- _UnderlayOffsetY: -0.5
- _UnderlaySoftness: 0.05
- _VertexOffsetX: 0
- _VertexOffsetY: 0
- _WeightBold: 0.75
- _WeightNormal: 0
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}

8
Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat.meta


fileFormatVersion: 2
guid: e73a58f6e2794ae7b1b7e50b7fb811b0
timeCreated: 1484172806
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

343
Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF - Fallback.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2180264
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LiberationSans SDF Material
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Cube:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FaceTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 28268798066460806}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OutlineTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
- _BevelClamp: 0
- _BevelOffset: 0
- _BevelRoundness: 0
- _BevelWidth: 0
- _BumpFace: 0
- _BumpOutline: 0
- _BumpScale: 1
- _ColorMask: 15
- _CullMode: 0
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _Diffuse: 0.5
- _DstBlend: 0
- _FaceDilate: 0
- _FaceUVSpeedX: 0
- _FaceUVSpeedY: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _GlowInner: 0.05
- _GlowOffset: 0
- _GlowOuter: 0.05
- _GlowPower: 0.75
- _GradientScale: 10
- _LightAngle: 3.1416
- _MaskSoftnessX: 0
- _MaskSoftnessY: 0
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _OutlineSoftness: 0
- _OutlineUVSpeedX: 0
- _OutlineUVSpeedY: 0
- _OutlineWidth: 0
- _Parallax: 0.02
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 0.90909094
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.7386364
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0
- _Sharpness: 0
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SpecularPower: 2
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _TextureHeight: 512
- _TextureWidth: 512
- _UVSec: 0
- _UnderlayDilate: 0
- _UnderlayOffsetX: 0
- _UnderlayOffsetY: 0
- _UnderlaySoftness: 0
- _VertexOffsetX: 0
- _VertexOffsetY: 0
- _WeightBold: 0.75
- _WeightNormal: 0
- _ZWrite: 1
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 71c1514a6bd24e1e882cebbe1904ce04, type: 3}
m_Name: LiberationSans SDF - Fallback
m_EditorClassIdentifier:
hashCode: -1699145518
material: {fileID: 2180264}
materialHashCode: 462855346
m_Version: 1.1.0
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75,
type: 3}
m_SourceFontFile: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
m_AtlasPopulationMode: 1
m_FaceInfo:
m_FamilyName: Liberation Sans
m_StyleName: Regular
m_PointSize: 86
m_Scale: 1
m_LineHeight: 98.8916
m_AscentLine: 77.853516
m_CapLine: 59
m_MeanLine: 45
m_Baseline: 0
m_DescentLine: -18.22461
m_SuperscriptOffset: 77.853516
m_SuperscriptSize: 0.5
m_SubscriptOffset: -18.22461
m_SubscriptSize: 0.5
m_UnderlineOffset: -12.261719
m_UnderlineThickness: 6.298828
m_StrikethroughOffset: 18
m_StrikethroughThickness: 6.298828
m_TabWidth: 24
m_GlyphTable: []
m_CharacterTable: []
m_AtlasTextures:
- {fileID: 28268798066460806}
m_AtlasTextureIndex: 0
m_IsMultiAtlasTexturesEnabled: 0
m_ClearDynamicDataOnBuild: 1
m_UsedGlyphRects: []
m_FreeGlyphRects:
- m_X: 0
m_Y: 0
m_Width: 511
m_Height: 511
m_fontInfo:
Name: Liberation Sans
PointSize: 86
Scale: 1
CharacterCount: 250
LineHeight: 98.90625
Baseline: 0
Ascender: 77.84375
CapHeight: 59.1875
Descender: -18.21875
CenterLine: 0
SuperscriptOffset: 77.84375
SubscriptOffset: -12.261719
SubSize: 0.5
Underline: -12.261719
UnderlineThickness: 6.298828
strikethrough: 23.675
strikethroughThickness: 0
TabWidth: 239.0625
Padding: 9
AtlasWidth: 1024
AtlasHeight: 1024
atlas: {fileID: 0}
m_AtlasWidth: 512
m_AtlasHeight: 512
m_AtlasPadding: 9
m_AtlasRenderMode: 4169
m_glyphInfoList: []
m_KerningTable:
kerningPairs: []
m_FontFeatureTable:
m_GlyphPairAdjustmentRecords: []
fallbackFontAssets: []
m_FallbackFontAssetTable: []
m_CreationSettings:
sourceFontFileName:
sourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
pointSizeSamplingMode: 0
pointSize: 86
padding: 9
packingMode: 4
atlasWidth: 512
atlasHeight: 512
characterSetSelectionMode: 1
characterSequence: 32 - 126, 160 - 255, 8192 - 8303, 8364, 8482, 9633
referencedFontAssetGUID: 8f586378b4e144a9851e7b34d9b748ee
referencedTextAssetGUID:
fontStyle: 0
fontStyleModifier: 0
renderMode: 4169
includeFontFeatures: 1
m_FontWeightTable:
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
fontWeights:
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
normalStyle: 0
normalSpacingOffset: 0
boldStyle: 0.75
boldSpacing: 7
italicStyle: 35
tabSize: 10
--- !u!28 &28268798066460806
Texture2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LiberationSans SDF Atlas
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 2
m_Width: 0
m_Height: 0
m_CompleteImageSize: 0
m_TextureFormat: 1
m_MipCount: 1
m_IsReadable: 1
m_StreamingMipmaps: 0
m_StreamingMipmapsPriority: 0
m_AlphaIsTransparency: 0
m_ImageCount: 1
m_TextureDimension: 2
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 0
m_WrapV: 0
m_WrapW: 0
m_LightmapFormat: 0
m_ColorSpace: 0
image data: 0
_typelessdata:
m_StreamData:
offset: 0
size: 0
path:

8
Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF - Fallback.asset.meta


fileFormatVersion: 2
guid: 2e498d1c8094910479dc3e1b768306a4
timeCreated: 1484171803
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

104
Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF - Outline.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LiberationSans SDF - Outline
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
m_ShaderKeywords: OUTLINE_ON
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Cube:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FaceTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OutlineTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
- _BevelClamp: 0
- _BevelOffset: 0
- _BevelRoundness: 0
- _BevelWidth: 0
- _BumpFace: 0
- _BumpOutline: 0
- _ColorMask: 15
- _Diffuse: 0.5
- _FaceDilate: 0.1
- _FaceUVSpeedX: 0
- _FaceUVSpeedY: 0
- _GlowInner: 0.05
- _GlowOffset: 0
- _GlowOuter: 0.05
- _GlowPower: 0.75
- _GradientScale: 10
- _LightAngle: 3.1416
- _MaskSoftnessX: 0
- _MaskSoftnessY: 0
- _OutlineSoftness: 0
- _OutlineUVSpeedX: 0
- _OutlineUVSpeedY: 0
- _OutlineWidth: 0.1
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 0.9
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.64125
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0
- _Sharpness: 0
- _SpecularPower: 2
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _TextureHeight: 1024
- _TextureWidth: 1024
- _UnderlayDilate: 0
- _UnderlayOffsetX: 0
- _UnderlayOffsetY: 0
- _UnderlaySoftness: 0
- _VertexOffsetX: 0
- _VertexOffsetY: 0
- _WeightBold: 0.75
- _WeightNormal: 0
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}

8
Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF - Outline.mat.meta


fileFormatVersion: 2
guid: 79459efec17a4d00a321bdcc27bbc385
timeCreated: 1484172856
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

1001
Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF.asset
文件差异内容过多而无法显示
查看文件

8
Assets/PhotoMode/PM-TextMeshPro/Fonts & Materials/LiberationSans SDF.asset.meta


fileFormatVersion: 2
guid: 8f586378b4e144a9851e7b34d9b748ee
timeCreated: 1484171803
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

8
Assets/PhotoMode/PM-TextMeshPro/Fonts.meta


fileFormatVersion: 2
guid: 6ab70aee4d56447429c680537fbf93ed
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

46
Assets/PhotoMode/PM-TextMeshPro/Fonts/LiberationSans - OFL.txt


Digitized data copyright (c) 2010 Google Corporation
with Reserved Font Arimo, Tinos and Cousine.
Copyright (c) 2012 Red Hat, Inc.
with Reserved Font Name Liberation.
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.

8
Assets/PhotoMode/PM-TextMeshPro/Fonts/LiberationSans - OFL.txt.meta


fileFormatVersion: 2
guid: 6e59c59b81ab47f9b6ec5781fa725d2c
timeCreated: 1484171296
licenseType: Pro
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

1001
Assets/PhotoMode/PM-TextMeshPro/Fonts/LiberationSans.ttf
文件差异内容过多而无法显示
查看文件

19
Assets/PhotoMode/PM-TextMeshPro/Fonts/LiberationSans.ttf.meta


fileFormatVersion: 2
guid: e3265ab4bf004d28a9537516768c1c75
timeCreated: 1484171297
licenseType: Pro
TrueTypeFontImporter:
serializedVersion: 2
fontSize: 16
forceTextureCase: -2
characterSpacing: 1
characterPadding: 0
includeFontData: 1
use2xBehaviour: 0
fontNames: []
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
userData:
assetBundleName:
assetBundleVariant:

8
Assets/PhotoMode/PM-TextMeshPro/Shaders.meta


fileFormatVersion: 2
guid: e9f693669af91aa45ad615fc681ed29f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

143
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_Bitmap-Custom-Atlas.shader


Shader "TextMeshPro/Bitmap Custom Atlas" {
Properties {
_MainTex ("Font Atlas", 2D) = "white" {}
_FaceTex ("Font Texture", 2D) = "white" {}
[HDR]_FaceColor ("Text Color", Color) = (1,1,1,1)
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_Padding ("Padding", float) = 0
_StencilComp("Stencil Comparison", Float) = 8
_Stencil("Stencil ID", Float) = 0
_StencilOp("Stencil Operation", Float) = 0
_StencilWriteMask("Stencil Write Mask", Float) = 255
_StencilReadMask("Stencil Read Mask", Float) = 255
_CullMode("Cull Mode", Float) = 0
_ColorMask("Color Mask", Float) = 15
}
SubShader{
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
Stencil
{
Ref[_Stencil]
Comp[_StencilComp]
Pass[_StencilOp]
ReadMask[_StencilReadMask]
WriteMask[_StencilWriteMask]
}
Lighting Off
Cull [_CullMode]
ZTest [unity_GUIZTestMode]
ZWrite Off
Fog { Mode Off }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask[_ColorMask]
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
struct appdata_t {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct v2f {
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
float4 mask : TEXCOORD2;
};
uniform sampler2D _MainTex;
uniform sampler2D _FaceTex;
uniform float4 _FaceTex_ST;
uniform fixed4 _FaceColor;
uniform float _VertexOffsetX;
uniform float _VertexOffsetY;
uniform float4 _ClipRect;
uniform float _MaskSoftnessX;
uniform float _MaskSoftnessY;
float2 UnpackUV(float uv)
{
float2 output;
output.x = floor(uv / 4096);
output.y = uv - 4096 * output.x;
return output * 0.001953125;
}
v2f vert (appdata_t v)
{
float4 vert = v.vertex;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert));
fixed4 faceColor = v.color;
faceColor *= _FaceColor;
v2f OUT;
OUT.vertex = vPosition;
OUT.color = faceColor;
OUT.texcoord0 = v.texcoord0;
OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex);
float2 pixelSize = vPosition.w;
pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
// Clamp _ClipRect to 16bit.
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
return OUT;
}
fixed4 frag (v2f IN) : SV_Target
{
fixed4 color = tex2D(_MainTex, IN.texcoord0) * tex2D(_FaceTex, IN.texcoord1) * IN.color;
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
color *= m.x * m.y;
#endif
#if UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
return color;
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI"
}

9
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_Bitmap-Custom-Atlas.shader.meta


fileFormatVersion: 2
guid: 48bb5f55d8670e349b6e614913f9d910
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

145
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_Bitmap-Mobile.shader


Shader "TextMeshPro/Mobile/Bitmap" {
Properties {
_MainTex ("Font Atlas", 2D) = "white" {}
[HDR]_Color ("Text Color", Color) = (1,1,1,1)
_DiffusePower ("Diffuse Power", Range(1.0,4.0)) = 1.0
_VertexOffsetX("Vertex OffsetX", float) = 0
_VertexOffsetY("Vertex OffsetY", float) = 0
_MaskSoftnessX("Mask SoftnessX", float) = 0
_MaskSoftnessY("Mask SoftnessY", float) = 0
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_StencilComp("Stencil Comparison", Float) = 8
_Stencil("Stencil ID", Float) = 0
_StencilOp("Stencil Operation", Float) = 0
_StencilWriteMask("Stencil Write Mask", Float) = 255
_StencilReadMask("Stencil Read Mask", Float) = 255
_CullMode("Cull Mode", Float) = 0
_ColorMask("Color Mask", Float) = 15
}
SubShader {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Stencil
{
Ref[_Stencil]
Comp[_StencilComp]
Pass[_StencilOp]
ReadMask[_StencilReadMask]
WriteMask[_StencilWriteMask]
}
Lighting Off
Cull [_CullMode]
ZTest [unity_GUIZTestMode]
ZWrite Off
Fog { Mode Off }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask[_ColorMask]
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
struct appdata_t {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct v2f {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float4 mask : TEXCOORD2;
};
sampler2D _MainTex;
fixed4 _Color;
float _DiffusePower;
uniform float _VertexOffsetX;
uniform float _VertexOffsetY;
uniform float4 _ClipRect;
uniform float _MaskSoftnessX;
uniform float _MaskSoftnessY;
v2f vert (appdata_t v)
{
v2f OUT;
float4 vert = v.vertex;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
OUT.vertex = UnityPixelSnap(UnityObjectToClipPos(vert));
OUT.color = v.color;
OUT.color *= _Color;
OUT.color.rgb *= _DiffusePower;
OUT.texcoord0 = v.texcoord0;
float2 pixelSize = OUT.vertex.w;
//pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
// Clamp _ClipRect to 16bit.
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
return OUT;
}
fixed4 frag (v2f IN) : COLOR
{
fixed4 color = fixed4(IN.color.rgb, IN.color.a * tex2D(_MainTex, IN.texcoord0).a);
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
color *= m.x * m.y;
#endif
#if UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
return color;
}
ENDCG
}
}
SubShader {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Lighting Off Cull Off ZTest Always ZWrite Off Fog { Mode Off }
Blend SrcAlpha OneMinusSrcAlpha
BindChannels {
Bind "Color", color
Bind "Vertex", vertex
Bind "TexCoord", texcoord0
}
Pass {
SetTexture [_MainTex] {
constantColor [_Color] combine constant * primary, constant * texture
}
}
}
CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI"
}

9
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_Bitmap-Mobile.shader.meta


fileFormatVersion: 2
guid: 1e3b057af24249748ff873be7fafee47
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

143
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_Bitmap.shader


Shader "TextMeshPro/Bitmap" {
Properties {
_MainTex ("Font Atlas", 2D) = "white" {}
_FaceTex ("Font Texture", 2D) = "white" {}
[HDR]_FaceColor ("Text Color", Color) = (1,1,1,1)
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_StencilComp("Stencil Comparison", Float) = 8
_Stencil("Stencil ID", Float) = 0
_StencilOp("Stencil Operation", Float) = 0
_StencilWriteMask("Stencil Write Mask", Float) = 255
_StencilReadMask("Stencil Read Mask", Float) = 255
_CullMode("Cull Mode", Float) = 0
_ColorMask("Color Mask", Float) = 15
}
SubShader{
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
Stencil
{
Ref[_Stencil]
Comp[_StencilComp]
Pass[_StencilOp]
ReadMask[_StencilReadMask]
WriteMask[_StencilWriteMask]
}
Lighting Off
Cull [_CullMode]
ZTest [unity_GUIZTestMode]
ZWrite Off
Fog { Mode Off }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask[_ColorMask]
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
struct appdata_t {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct v2f {
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
float4 mask : TEXCOORD2;
};
uniform sampler2D _MainTex;
uniform sampler2D _FaceTex;
uniform float4 _FaceTex_ST;
uniform fixed4 _FaceColor;
uniform float _VertexOffsetX;
uniform float _VertexOffsetY;
uniform float4 _ClipRect;
uniform float _MaskSoftnessX;
uniform float _MaskSoftnessY;
float2 UnpackUV(float uv)
{
float2 output;
output.x = floor(uv / 4096);
output.y = uv - 4096 * output.x;
return output * 0.001953125;
}
v2f vert (appdata_t v)
{
float4 vert = v.vertex;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert));
fixed4 faceColor = v.color;
faceColor *= _FaceColor;
v2f OUT;
OUT.vertex = vPosition;
OUT.color = faceColor;
OUT.texcoord0 = v.texcoord0;
OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex);
float2 pixelSize = vPosition.w;
pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
// Clamp _ClipRect to 16bit.
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
return OUT;
}
fixed4 frag (v2f IN) : SV_Target
{
fixed4 color = tex2D(_MainTex, IN.texcoord0);
color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, IN.color.a * color.a);
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
color *= m.x * m.y;
#endif
#if UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
return color;
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI"
}

9
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_Bitmap.shader.meta


fileFormatVersion: 2
guid: 128e987d567d4e2c824d754223b3f3b0
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

317
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF Overlay.shader


Shader "TextMeshPro/Distance Field Overlay" {
Properties {
_FaceTex ("Face Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
_Bevel ("Bevel", Range(0,1)) = 0.5
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
[HDR]_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularPower ("Specular", Range(0,4)) = 2.0
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
_Diffuse ("Diffuse", Range(0,1)) = 0.5
_Ambient ("Ambient", Range(1,0)) = 0.5
_BumpMap ("Normal map", 2D) = "bump" {}
_BumpOutline ("Bump Outline", Range(0,1)) = 0
_BumpFace ("Bump Face", Range(0,1)) = 0
_ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1)
_ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1)
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
_GlowPower ("Falloff", Range(1, 0)) = 0.75
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = 0.5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5.0
_ScaleX ("Scale X", float) = 1.0
_ScaleY ("Scale Y", float) = 1.0
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767)
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags
{
"Queue"="Overlay"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest Always
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma target 3.0
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ BEVEL_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma shader_feature __ GLOW_ON
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
#include "TMPro.cginc"
struct vertex_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 position : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 position : SV_POSITION;
fixed4 color : COLOR;
float2 atlas : TEXCOORD0; // Atlas
float4 param : TEXCOORD1; // alphaClip, scale, bias, weight
float4 mask : TEXCOORD2; // Position in object space(xy), pixel Size(zw)
float3 viewDir : TEXCOORD3;
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 texcoord2 : TEXCOORD4; // u,v, scale, bias
fixed4 underlayColor : COLOR1;
#endif
float4 textures : TEXCOORD5;
};
// Used by Unity internally to handle Texture Tiling and Offset.
float4 _FaceTex_ST;
float4 _OutlineTex_ST;
pixel_t VertShader(vertex_t input)
{
pixel_t output;
UNITY_INITIALIZE_OUTPUT(pixel_t, output);
UNITY_SETUP_INSTANCE_ID(input);
UNITY_TRANSFER_INSTANCE_ID(input,output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float4 vert = input.position;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
if (UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
float bias =(.5 - weight) + (.5 / scale);
float alphaClip = (1.0 - _OutlineWidth*_ScaleRatioA - _OutlineSoftness*_ScaleRatioA);
#if GLOW_ON
alphaClip = min(alphaClip, 1.0 - _GlowOffset * _ScaleRatioB - _GlowOuter * _ScaleRatioB);
#endif
alphaClip = alphaClip / 2.0 - ( .5 / scale) - weight;
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 underlayColor = _UnderlayColor;
underlayColor.rgb *= underlayColor.a;
float bScale = scale;
bScale /= 1 + ((_UnderlaySoftness*_ScaleRatioC) * bScale);
float bBias = (0.5 - weight) * bScale - 0.5 - ((_UnderlayDilate * _ScaleRatioC) * 0.5 * bScale);
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 bOffset = float2(x, y);
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Support for texture tiling and offset
float2 textureUV = UnpackUV(input.texcoord1.x);
float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex);
float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex);
output.position = vPosition;
output.color = input.color;
output.atlas = input.texcoord0;
output.param = float4(alphaClip, scale, bias, weight);
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
output.viewDir = mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz);
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord2 = float4(input.texcoord0 + bOffset, bScale, bBias);
output.underlayColor = underlayColor;
#endif
output.textures = float4(faceUV, outlineUV);
return output;
}
fixed4 PixShader(pixel_t input) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(input);
float c = tex2D(_MainTex, input.atlas).a;
#ifndef UNDERLAY_ON
clip(c - input.param.x);
#endif
float scale = input.param.y;
float bias = input.param.z;
float weight = input.param.w;
float sd = (bias - c) * scale;
float outline = (_OutlineWidth * _ScaleRatioA) * scale;
float softness = (_OutlineSoftness * _ScaleRatioA) * scale;
half4 faceColor = _FaceColor;
half4 outlineColor = _OutlineColor;
faceColor.rgb *= input.color.rgb;
faceColor *= tex2D(_FaceTex, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y);
outlineColor *= tex2D(_OutlineTex, input.textures.zw + float2(_OutlineUVSpeedX, _OutlineUVSpeedY) * _Time.y);
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
#if BEVEL_ON
float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0);
float3 n = GetSurfaceNormal(input.atlas, weight, dxy);
float3 bump = UnpackNormal(tex2D(_BumpMap, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y)).xyz;
bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5));
n = normalize(n- bump);
float3 light = normalize(float3(sin(_LightAngle), cos(_LightAngle), -1.0));
float3 col = GetSpecular(n, light);
faceColor.rgb += col*faceColor.a;
faceColor.rgb *= 1-(dot(n, light)*_Diffuse);
faceColor.rgb *= lerp(_Ambient, 1, n.z*n.z);
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));
faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
#endif
#if UNDERLAY_ON
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
faceColor += input.underlayColor * saturate(d - input.texcoord2.w) * (1 - faceColor.a);
#endif
#if UNDERLAY_INNER
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
faceColor += input.underlayColor * (1 - saturate(d - input.texcoord2.w)) * saturate(1 - sd) * (1 - faceColor.a);
#endif
#if GLOW_ON
float4 glowColor = GetGlowColor(sd, scale);
faceColor.rgb += glowColor.rgb * glowColor.a;
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
faceColor *= m.x * m.y;
#endif
#if UNITY_UI_ALPHACLIP
clip(faceColor.a - 0.001);
#endif
return faceColor * input.color.a;
}
ENDCG
}
}
Fallback "TextMeshPro/Mobile/Distance Field"
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

9
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF Overlay.shader.meta


fileFormatVersion: 2
guid: dd89cf5b9246416f84610a006f916af7
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

310
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF SSD.shader


Shader "TextMeshPro/Distance Field SSD" {
Properties {
_FaceTex ("Face Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
_Bevel ("Bevel", Range(0,1)) = 0.5
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
[HDR]_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularPower ("Specular", Range(0,4)) = 2.0
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
_Diffuse ("Diffuse", Range(0,1)) = 0.5
_Ambient ("Ambient", Range(1,0)) = 0.5
_BumpMap ("Normal map", 2D) = "bump" {}
_BumpOutline ("Bump Outline", Range(0,1)) = 0
_BumpFace ("Bump Face", Range(0,1)) = 0
_ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1)
_ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1)
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
_GlowPower ("Falloff", Range(1, 0)) = 0.75
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = 0.5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5.0
_ScaleX ("Scale X", float) = 1.0
_ScaleY ("Scale Y", float) = 1.0
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767)
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Stencil
{
Ref[_Stencil]
Comp[_StencilComp]
Pass[_StencilOp]
ReadMask[_StencilReadMask]
WriteMask[_StencilWriteMask]
}
Cull[_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest[unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask[_ColorMask]
Pass {
CGPROGRAM
#pragma target 3.0
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ BEVEL_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma shader_feature __ GLOW_ON
#pragma shader_feature __ FORCE_LINEAR
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
#include "TMPro.cginc"
struct vertex_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 position : POSITION;
float3 normal : NORMAL;
float4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 position : SV_POSITION;
float4 color : COLOR;
float2 atlas : TEXCOORD0;
float weight : TEXCOORD1;
float2 mask : TEXCOORD2; // Position in object space(xy)
float3 viewDir : TEXCOORD3;
#if (UNDERLAY_ON || UNDERLAY_INNER)
float2 texcoord2 : TEXCOORD4;
float4 underlayColor : COLOR1;
#endif
float4 textures : TEXCOORD5;
};
// Used by Unity internally to handle Texture Tiling and Offset.
float4 _FaceTex_ST;
float4 _OutlineTex_ST;
float4 SRGBToLinear(float4 rgba) {
return float4(lerp(rgba.rgb / 12.92f, pow((rgba.rgb + 0.055f) / 1.055f, 2.4f), step(0.04045f, rgba.rgb)), rgba.a);
}
pixel_t VertShader(vertex_t input)
{
pixel_t output;
UNITY_INITIALIZE_OUTPUT(pixel_t, output);
UNITY_SETUP_INSTANCE_ID(input);
UNITY_TRANSFER_INSTANCE_ID(input,output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float4 vert = input.position;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 underlayColor = _UnderlayColor;
underlayColor.rgb *= underlayColor.a;
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 bOffset = float2(x, y);
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
// Support for texture tiling and offset
float2 textureUV = UnpackUV(input.texcoord1.x);
float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex);
float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex);
float4 color = input.color;
#if (FORCE_LINEAR && !UNITY_COLORSPACE_GAMMA)
color = SRGBToLinear(input.color);
#endif
output.position = vPosition;
output.color = color;
output.atlas = input.texcoord0;
output.weight = weight;
output.mask = half2(vert.xy * 2 - clampedRect.xy - clampedRect.zw);
output.viewDir = mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz);
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord2 = input.texcoord0 + bOffset;
output.underlayColor = underlayColor;
#endif
output.textures = float4(faceUV, outlineUV);
return output;
}
fixed4 PixShader(pixel_t input) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(input);
float c = tex2D(_MainTex, input.atlas).a;
float2 pixelSize = float2(ddx(input.atlas.y), ddy(input.atlas.y));
pixelSize *= _TextureWidth * .75;
float scale = rsqrt(dot(pixelSize, pixelSize)) * _GradientScale * (_Sharpness + 1);
float weight = input.weight;
float bias = (.5 - weight) + (.5 / scale);
float sd = (bias - c) * scale;
float outline = (_OutlineWidth * _ScaleRatioA) * scale;
float softness = (_OutlineSoftness * _ScaleRatioA) * scale;
half4 faceColor = _FaceColor;
half4 outlineColor = _OutlineColor;
faceColor.rgb *= input.color.rgb;
faceColor *= tex2D(_FaceTex, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y);
outlineColor *= tex2D(_OutlineTex, input.textures.zw + float2(_OutlineUVSpeedX, _OutlineUVSpeedY) * _Time.y);
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
#if BEVEL_ON
float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0);
float3 n = GetSurfaceNormal(input.atlas, weight, dxy);
float3 bump = UnpackNormal(tex2D(_BumpMap, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y)).xyz;
bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5));
n = normalize(n - bump);
float3 light = normalize(float3(sin(_LightAngle), cos(_LightAngle), -1.0));
float3 col = GetSpecular(n, light);
faceColor.rgb += col * faceColor.a;
faceColor.rgb *= 1 - (dot(n, light) * _Diffuse);
faceColor.rgb *= lerp(_Ambient, 1, n.z * n.z);
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));
faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
#endif
#if (UNDERLAY_ON || UNDERLAY_INNER)
float bScale = scale;
bScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * bScale);
float bBias = (0.5 - weight) * bScale - 0.5 - ((_UnderlayDilate * _ScaleRatioC) * 0.5 * bScale);
#endif
#if UNDERLAY_ON
float d = tex2D(_MainTex, input.texcoord2.xy).a * bScale;
faceColor += input.underlayColor * saturate(d - bBias) * (1 - faceColor.a);
#endif
#if UNDERLAY_INNER
float d = tex2D(_MainTex, input.texcoord2.xy).a * bScale;
faceColor += input.underlayColor * (1 - saturate(d - bBias)) * saturate(1 - sd) * (1 - faceColor.a);
#endif
#if GLOW_ON
float4 glowColor = GetGlowColor(sd, scale);
faceColor.rgb += glowColor.rgb * glowColor.a;
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
float2 maskZW = 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + (1 / scale));
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * maskZW);
faceColor *= m.x * m.y;
#endif
#if UNITY_UI_ALPHACLIP
clip(faceColor.a - 0.001);
#endif
return faceColor * input.color.a;
}
ENDCG
}
}
Fallback "TextMeshPro/Mobile/Distance Field"
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

9
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF SSD.shader.meta


fileFormatVersion: 2
guid: 14eb328de4b8eb245bb7cea29e4ac00b
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

247
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile Masking.shader


// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field - Masking" {
Properties {
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = .5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5
_ScaleX ("Scale X", float) = 1
_ScaleY ("Scale Y", float) = 1
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_MaskTex ("Mask Texture", 2D) = "white" {}
_MaskInverse ("Inverse", float) = 0
_MaskEdgeColor ("Edge Color", Color) = (1,1,1,1)
_MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01
_MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ OUTLINE_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
struct vertex_t {
float4 vertex : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
float4 vertex : SV_POSITION;
fixed4 faceColor : COLOR;
fixed4 outlineColor : COLOR1;
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
#if (UNDERLAY_ON | UNDERLAY_INNER)
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
#endif
};
float _MaskWipeControl;
float _MaskEdgeSoftness;
fixed4 _MaskEdgeColor;
bool _MaskInverse;
pixel_t VertShader(vertex_t input)
{
float bold = step(input.texcoord1.y, 0);
float4 vert = input.vertex;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
float layerScale = scale;
scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
float bias = (0.5 - weight) * scale - 0.5;
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
float opacity = input.color.a;
#if (UNDERLAY_ON | UNDERLAY_INNER)
opacity = 1.0;
#endif
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
faceColor.rgb *= faceColor.a;
fixed4 outlineColor = _OutlineColor;
outlineColor.a *= opacity;
outlineColor.rgb *= outlineColor.a;
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
#if (UNDERLAY_ON | UNDERLAY_INNER)
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 layerOffset = float2(x, y);
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Structure for pixel shader
pixel_t output = {
vPosition,
faceColor,
outlineColor,
float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y),
half4(scale, bias - outline, bias + outline, bias),
half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)),
#if (UNDERLAY_ON | UNDERLAY_INNER)
float4(input.texcoord0 + layerOffset, input.color.a, 0),
half2(layerScale, layerBias),
#endif
};
return output;
}
// PIXEL SHADER
fixed4 PixShader(pixel_t input) : SV_Target
{
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
half4 c = input.faceColor * saturate(d - input.param.w);
#ifdef OUTLINE_ON
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
c *= saturate(d - input.param.y);
#endif
#if UNDERLAY_ON
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
#endif
#if UNDERLAY_INNER
half sd = saturate(d - input.param.z);
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
//#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
c *= m.x * m.y;
//#endif
float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a);
float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl;
a = saturate(t / _MaskEdgeSoftness);
c.rgb = lerp(_MaskEdgeColor.rgb*c.a, c.rgb, a);
c *= a;
#if (UNDERLAY_ON | UNDERLAY_INNER)
c *= input.texcoord1.z;
#endif
#if UNITY_UI_ALPHACLIP
clip(c.a - 0.001);
#endif
return c;
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

9
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile Masking.shader.meta


fileFormatVersion: 2
guid: bc1ede39bf3643ee8e493720e4259791
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

240
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile Overlay.shader


// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field Overlay" {
Properties {
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = .5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5
_ScaleX ("Scale X", float) = 1
_ScaleY ("Scale Y", float) = 1
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags
{
"Queue"="Overlay"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest Always
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ OUTLINE_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
struct vertex_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 vertex : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 vertex : SV_POSITION;
fixed4 faceColor : COLOR;
fixed4 outlineColor : COLOR1;
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
#if (UNDERLAY_ON | UNDERLAY_INNER)
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
#endif
};
pixel_t VertShader(vertex_t input)
{
pixel_t output;
UNITY_INITIALIZE_OUTPUT(pixel_t, output);
UNITY_SETUP_INSTANCE_ID(input);
UNITY_TRANSFER_INSTANCE_ID(input, output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float4 vert = input.vertex;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
float layerScale = scale;
scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
float bias = (0.5 - weight) * scale - 0.5;
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
float opacity = input.color.a;
#if (UNDERLAY_ON | UNDERLAY_INNER)
opacity = 1.0;
#endif
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
faceColor.rgb *= faceColor.a;
fixed4 outlineColor = _OutlineColor;
outlineColor.a *= opacity;
outlineColor.rgb *= outlineColor.a;
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
#if (UNDERLAY_ON | UNDERLAY_INNER)
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 layerOffset = float2(x, y);
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Populate structure for pixel shader
output.vertex = vPosition;
output.faceColor = faceColor;
output.outlineColor = outlineColor;
output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
output.param = half4(scale, bias - outline, bias + outline, bias);
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
output.underlayParam = half2(layerScale, layerBias);
#endif
return output;
}
// PIXEL SHADER
fixed4 PixShader(pixel_t input) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(input);
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
half4 c = input.faceColor * saturate(d - input.param.w);
#ifdef OUTLINE_ON
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
c *= saturate(d - input.param.y);
#endif
#if UNDERLAY_ON
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
#endif
#if UNDERLAY_INNER
half sd = saturate(d - input.param.z);
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
c *= m.x * m.y;
#endif
#if (UNDERLAY_ON | UNDERLAY_INNER)
c *= input.texcoord1.z;
#endif
#if UNITY_UI_ALPHACLIP
clip(c.a - 0.001);
#endif
return c;
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

9
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile Overlay.shader.meta


fileFormatVersion: 2
guid: a02a7d8c237544f1962732b55a9aebf1
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

106
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile SSD.shader


// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field SSD" {
Properties {
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = .5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5
_ScaleX ("Scale X", float) = 1
_ScaleY ("Scale Y", float) = 1
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_MaskTex ("Mask Texture", 2D) = "white" {}
_MaskInverse ("Inverse", float) = 0
_MaskEdgeColor ("Edge Color", Color) = (1,1,1,1)
_MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01
_MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags {
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ OUTLINE_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
#include "TMPro_Mobile.cginc"
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

9
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile SSD.shader.meta


fileFormatVersion: 2
guid: c8d12adcee749c344b8117cf7c7eb912
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

240
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile.shader


// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field" {
Properties {
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = .5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5
_ScaleX ("Scale X", float) = 1
_ScaleY ("Scale Y", float) = 1
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ OUTLINE_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
struct vertex_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 vertex : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 vertex : SV_POSITION;
fixed4 faceColor : COLOR;
fixed4 outlineColor : COLOR1;
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
#if (UNDERLAY_ON | UNDERLAY_INNER)
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
#endif
};
pixel_t VertShader(vertex_t input)
{
pixel_t output;
UNITY_INITIALIZE_OUTPUT(pixel_t, output);
UNITY_SETUP_INSTANCE_ID(input);
UNITY_TRANSFER_INSTANCE_ID(input, output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float4 vert = input.vertex;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
float layerScale = scale;
scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
float bias = (0.5 - weight) * scale - 0.5;
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
float opacity = input.color.a;
#if (UNDERLAY_ON | UNDERLAY_INNER)
opacity = 1.0;
#endif
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
faceColor.rgb *= faceColor.a;
fixed4 outlineColor = _OutlineColor;
outlineColor.a *= opacity;
outlineColor.rgb *= outlineColor.a;
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
#if (UNDERLAY_ON | UNDERLAY_INNER)
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 layerOffset = float2(x, y);
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Populate structure for pixel shader
output.vertex = vPosition;
output.faceColor = faceColor;
output.outlineColor = outlineColor;
output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
output.param = half4(scale, bias - outline, bias + outline, bias);
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
output.underlayParam = half2(layerScale, layerBias);
#endif
return output;
}
// PIXEL SHADER
fixed4 PixShader(pixel_t input) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(input);
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
half4 c = input.faceColor * saturate(d - input.param.w);
#ifdef OUTLINE_ON
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
c *= saturate(d - input.param.y);
#endif
#if UNDERLAY_ON
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
#endif
#if UNDERLAY_INNER
half sd = saturate(d - input.param.z);
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
c *= m.x * m.y;
#endif
#if (UNDERLAY_ON | UNDERLAY_INNER)
c *= input.texcoord1.z;
#endif
#if UNITY_UI_ALPHACLIP
clip(c.a - 0.001);
#endif
return c;
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

9
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Mobile.shader.meta


fileFormatVersion: 2
guid: fe393ace9b354375a9cb14cdbbc28be4
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

138
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Surface-Mobile.shader


// Simplified version of the SDF Surface shader :
// - No support for Bevel, Bump or envmap
// - Diffuse only lighting
// - Fully supports only 1 directional light. Other lights can affect it, but it will be per-vertex/SH.
Shader "TextMeshPro/Mobile/Distance Field (Surface)" {
Properties {
_FaceTex ("Fill Texture", 2D) = "white" {}
[HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
_GlowPower ("Falloff", Range(1, 0)) = 0.75
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = 0.5
// Should not be directly exposed to the user
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5.0
_ScaleX ("Scale X", float) = 1.0
_ScaleY ("Scale Y", float) = 1.0
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_CullMode ("Cull Mode", Float) = 0
//_MaskCoord ("Mask Coords", vector) = (0,0,0,0)
//_MaskSoftness ("Mask Softness", float) = 0
}
SubShader {
Tags {
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
LOD 300
Cull [_CullMode]
CGPROGRAM
#pragma surface PixShader Lambert alpha:blend vertex:VertShader noforwardadd nolightmap nodirlightmap
#pragma target 3.0
#pragma shader_feature __ GLOW_ON
#include "TMPro_Properties.cginc"
#include "TMPro.cginc"
half _FaceShininess;
half _OutlineShininess;
struct Input
{
fixed4 color : COLOR;
float2 uv_MainTex;
float2 uv2_FaceTex;
float2 uv2_OutlineTex;
float2 param; // Weight, Scale
float3 viewDirEnv;
};
#include "TMPro_Surface.cginc"
ENDCG
// Pass to render object as a shadow caster
Pass
{
Name "Caster"
Tags { "LightMode" = "ShadowCaster" }
Offset 1, 1
Fog {Mode Off}
ZWrite On ZTest LEqual Cull Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_shadowcaster
#include "UnityCG.cginc"
struct v2f {
V2F_SHADOW_CASTER;
float2 uv : TEXCOORD1;
float2 uv2 : TEXCOORD3;
float alphaClip : TEXCOORD2;
};
uniform float4 _MainTex_ST;
uniform float4 _OutlineTex_ST;
float _OutlineWidth;
float _FaceDilate;
float _ScaleRatioA;
v2f vert( appdata_base v )
{
v2f o;
TRANSFER_SHADOW_CASTER(o)
o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex);
o.alphaClip = o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2;
return o;
}
uniform sampler2D _MainTex;
float4 frag(v2f i) : COLOR
{
fixed4 texcol = tex2D(_MainTex, i.uv).a;
clip(texcol.a - i.alphaClip);
SHADOW_CASTER_FRAGMENT(i)
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

9
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Surface-Mobile.shader.meta


fileFormatVersion: 2
guid: 85187c2149c549c5b33f0cdb02836b17
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

158
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Surface.shader


Shader "TextMeshPro/Distance Field (Surface)" {
Properties {
_FaceTex ("Fill Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
[HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
_Bevel ("Bevel", Range(0,1)) = 0.5
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_BumpMap ("Normalmap", 2D) = "bump" {}
_BumpOutline ("Bump Outline", Range(0,1)) = 0.5
_BumpFace ("Bump Face", Range(0,1)) = 0.5
_ReflectFaceColor ("Face Color", Color) = (0,0,0,1)
_ReflectOutlineColor ("Outline Color", Color) = (0,0,0,1)
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
[HDR]_SpecColor ("Specular Color", Color) = (0,0,0,1)
_FaceShininess ("Face Shininess", Range(0,1)) = 0
_OutlineShininess ("Outline Shininess", Range(0,1)) = 0
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
_GlowPower ("Falloff", Range(1, 0)) = 0.75
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = 0.5
// Should not be directly exposed to the user
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5.0
_ScaleX ("Scale X", float) = 1.0
_ScaleY ("Scale Y", float) = 1.0
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_CullMode ("Cull Mode", Float) = 0
//_MaskCoord ("Mask Coords", vector) = (0,0,0,0)
//_MaskSoftness ("Mask Softness", float) = 0
}
SubShader {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
LOD 300
Cull [_CullMode]
CGPROGRAM
#pragma surface PixShader BlinnPhong alpha:blend vertex:VertShader nolightmap nodirlightmap
#pragma target 3.0
#pragma shader_feature __ GLOW_ON
#pragma glsl
#include "TMPro_Properties.cginc"
#include "TMPro.cginc"
half _FaceShininess;
half _OutlineShininess;
struct Input
{
fixed4 color : COLOR;
float2 uv_MainTex;
float2 uv2_FaceTex;
float2 uv2_OutlineTex;
float2 param; // Weight, Scale
float3 viewDirEnv;
};
#define BEVEL_ON 1
#include "TMPro_Surface.cginc"
ENDCG
// Pass to render object as a shadow caster
Pass
{
Name "Caster"
Tags { "LightMode" = "ShadowCaster" }
Offset 1, 1
Fog {Mode Off}
ZWrite On
ZTest LEqual
Cull Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_shadowcaster
#include "UnityCG.cginc"
struct v2f {
V2F_SHADOW_CASTER;
float2 uv : TEXCOORD1;
float2 uv2 : TEXCOORD3;
float alphaClip : TEXCOORD2;
};
uniform float4 _MainTex_ST;
uniform float4 _OutlineTex_ST;
float _OutlineWidth;
float _FaceDilate;
float _ScaleRatioA;
v2f vert( appdata_base v )
{
v2f o;
TRANSFER_SHADOW_CASTER(o)
o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex);
o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2;
return o;
}
uniform sampler2D _MainTex;
float4 frag(v2f i) : COLOR
{
fixed4 texcol = tex2D(_MainTex, i.uv).a;
clip(texcol.a - i.alphaClip);
SHADOW_CASTER_FRAGMENT(i)
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

9
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF-Surface.shader.meta


fileFormatVersion: 2
guid: f7ada0af4f174f0694ca6a487b8f543d
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

317
Assets/PhotoMode/PM-TextMeshPro/Shaders/TMP_SDF.shader


Shader "TextMeshPro/Distance Field" {
Properties {
_FaceTex ("Face Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
_Bevel ("Bevel", Range(0,1)) = 0.5
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
[HDR]_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularPower ("Specular", Range(0,4)) = 2.0
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
_Diffuse ("Diffuse", Range(0,1)) = 0.5
_Ambient ("Ambient", Range(1,0)) = 0.5
_BumpMap ("Normal map", 2D) = "bump" {}
_BumpOutline ("Bump Outline", Range(0,1)) = 0
_BumpFace ("Bump Face", Range(0,1)) = 0
_ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1)
_ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1)
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
_GlowPower ("Falloff", Range(1, 0)) = 0.75
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = 0.5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5.0
_ScaleX ("Scale X", float) = 1.0
_ScaleY ("Scale Y", float) = 1.0
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767)
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma target 3.0
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ BEVEL_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma shader_feature __ GLOW_ON
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
#include "TMPro.cginc"
struct vertex_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 position : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 position : SV_POSITION;
fixed4 color : COLOR;
float2 atlas : TEXCOORD0; // Atlas
float4 param : TEXCOORD1; // alphaClip, scale, bias, weight
float4 mask : TEXCOORD2; // Position in object space(xy), pixel Size(zw)
float3 viewDir : TEXCOORD3;
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 texcoord2 : TEXCOORD4; // u,v, scale, bias
fixed4 underlayColor : COLOR1;
#endif
float4 textures : TEXCOORD5;
};
// Used by Unity internally to handle Texture Tiling and Offset.
float4 _FaceTex_ST;
float4 _OutlineTex_ST;
pixel_t VertShader(vertex_t input)
{
pixel_t output;
UNITY_INITIALIZE_OUTPUT(pixel_t, output);
UNITY_SETUP_INSTANCE_ID(input);
UNITY_TRANSFER_INSTANCE_ID(input,output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float4 vert = input.position;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
if (UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
float bias =(.5 - weight) + (.5 / scale);
float alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _OutlineSoftness * _ScaleRatioA);
#if GLOW_ON
alphaClip = min(alphaClip, 1.0 - _GlowOffset * _ScaleRatioB - _GlowOuter * _ScaleRatioB);
#endif
alphaClip = alphaClip / 2.0 - ( .5 / scale) - weight;
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 underlayColor = _UnderlayColor;
underlayColor.rgb *= underlayColor.a;
float bScale = scale;
bScale /= 1 + ((_UnderlaySoftness*_ScaleRatioC) * bScale);
float bBias = (0.5 - weight) * bScale - 0.5 - ((_UnderlayDilate * _ScaleRatioC) * 0.5 * bScale);
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 bOffset = float2(x, y);
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Support for texture tiling and offset
float2 textureUV = UnpackUV(input.texcoord1.x);
float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex);
float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex);
output.position = vPosition;
output.color = input.color;
output.atlas = input.texcoord0;
output.param = float4(alphaClip, scale, bias, weight);
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
output.viewDir = mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz);
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord2 = float4(input.texcoord0 + bOffset, bScale, bBias);
output.underlayColor = underlayColor;
#endif
output.textures = float4(faceUV, outlineUV);
return output;
}
fixed4 PixShader(pixel_t input) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(input);
float c = tex2D(_MainTex, input.atlas).a;
#ifndef UNDERLAY_ON
clip(c - input.param.x);
#endif
float scale = input.param.y;
float bias = input.param.z;
float weight = input.param.w;
float sd = (bias - c) * scale;
float outline = (_OutlineWidth * _ScaleRatioA) * scale;
float softness = (_OutlineSoftness * _ScaleRatioA) * scale;
half4 faceColor = _FaceColor;
half4 outlineColor = _OutlineColor;
faceColor.rgb *= input.color.rgb;
faceColor *= tex2D(_FaceTex, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y);
outlineColor *= tex2D(_OutlineTex, input.textures.zw + float2(_OutlineUVSpeedX, _OutlineUVSpeedY) * _Time.y);
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
#if BEVEL_ON
float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0);
float3 n = GetSurfaceNormal(input.atlas, weight, dxy);
float3 bump = UnpackNormal(tex2D(_BumpMap, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y)).xyz;
bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5));
n = normalize(n- bump);
float3 light = normalize(float3(sin(_LightAngle), cos(_LightAngle), -1.0));
float3 col = GetSpecular(n, light);
faceColor.rgb += col*faceColor.a;
faceColor.rgb *= 1-(dot(n, light)*_Diffuse);
faceColor.rgb *= lerp(_Ambient, 1, n.z*n.z);
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));
faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
#endif
#if UNDERLAY_ON
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
faceColor += input.underlayColor * saturate(d - input.texcoord2.w) * (1 - faceColor.a);
#endif
#if UNDERLAY_INNER
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
faceColor += input.underlayColor * (1 - saturate(d - input.texcoord2.w)) * saturate(1 - sd) * (1 - faceColor.a);
#endif
#if GLOW_ON
float4 glowColor = GetGlowColor(sd, scale);
faceColor.rgb += glowColor.rgb * glowColor.a;
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
faceColor *= m.x * m.y;
#endif
#if UNITY_UI_ALPHACLIP
clip(faceColor.a - 0.001);
#endif
return faceColor * input.color.a;
}
ENDCG
}
}
Fallback "TextMeshPro/Mobile/Distance Field"
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存