浏览代码

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)
{