net.dreditor.camerapostprocess 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/.attestation.p7m +0 -0
  2. package/BlurCameraRenderManager.cs +213 -213
  3. package/BlurCameraRenderManager.cs.meta +11 -11
  4. package/BlurRenderQueueSettings.cs +28 -28
  5. package/BlurRenderQueueSettings.cs.meta +11 -11
  6. package/BlurSettingsHandler.cs +58 -58
  7. package/BlurSettingsHandler.cs.meta +11 -11
  8. package/BlurVisionEvent.cs +208 -208
  9. package/BlurVisionEvent.cs.meta +11 -11
  10. package/CameraPostProcessingExtentions.cs +44 -44
  11. package/CameraPostProcessingExtentions.cs.meta +11 -11
  12. package/DREditor.CameraPostProcess.asmdef +19 -19
  13. package/DREditor.CameraPostProcess.asmdef.meta +7 -7
  14. package/PostProcessChanger.cs +223 -223
  15. package/PostProcessChanger.cs.meta +11 -11
  16. package/PostProcessState.cs +66 -66
  17. package/PostProcessState.cs.meta +11 -11
  18. package/PostProcessingColorEventHandler.cs +172 -172
  19. package/PostProcessingColorEventHandler.cs.meta +11 -11
  20. package/{Samples → Samples~}/BlurRenderQueueSettings.asset +15 -15
  21. package/{Samples → Samples~}/BlurRenderQueueSettings.asset.meta +8 -8
  22. package/{Samples → Samples~}/Blur_Camera_Render_Manager.prefab +73 -73
  23. package/{Samples → Samples~}/Blur_Camera_Render_Manager.prefab.meta +7 -7
  24. package/{Samples → Samples~}/PostProcessState Blur Camera.asset +19 -19
  25. package/{Samples → Samples~}/PostProcessState Blur Camera.asset.meta +8 -8
  26. package/{Samples → Samples~}/PostProcessState Dialogue Camera.asset +19 -19
  27. package/{Samples → Samples~}/PostProcessState Dialogue Camera.asset.meta +8 -8
  28. package/{Samples → Samples~}/PostProcessState Main Camera.asset +19 -19
  29. package/{Samples → Samples~}/PostProcessState Main Camera.asset.meta +8 -8
  30. package/{Samples → Samples~}/PostProcessState Protag Camera.asset +19 -19
  31. package/{Samples → Samples~}/PostProcessState Protag Camera.asset.meta +8 -8
  32. package/package.json +42 -37
  33. package/package.json.meta +7 -7
  34. package/readme.txt +22 -22
  35. package/readme.txt.meta +7 -7
  36. package/Samples.meta +0 -8
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: cf2dbc0c1f04233419616491c4f44eef
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: cf2dbc0c1f04233419616491c4f44eef
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,209 +1,209 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- #if DOTWEEN
3
- using DG.Tweening;
4
- #endif
5
- using DREditor.Dialogues.Events;
6
- using UnityEngine;
7
- using UnityEngine.Rendering;
8
- using UnityEngine.Rendering.Universal;
9
-
10
- namespace DREditor.CamerasPostProcess
11
- {
12
- /// <summary>
13
- ///
14
- /// </summary>
15
- [ClassHeader("")]
16
- public class BlurVisionEvent : MonoBehaviour
17
- {
18
- /// <summary>
19
- ///
20
- /// </summary>
21
- [Header("")]
22
- [Divider]
23
- [Tooltip("")]
24
- [SerializeField] protected string blurVisionEventString = "BlurVision";
25
-
26
- /// <summary>
27
- ///
28
- /// </summary>
29
- [Tooltip("")]
30
- [SerializeField] protected string stopBlurVisionEventString = "StopBlur";
31
-
32
-
33
- /// <summary>
34
- ///
35
- /// </summary>
36
- [Header("")]
37
- [Divider]
38
- [Tooltip("")]
39
- [SerializeField] protected Volume blurProfile = null;
40
-
41
- /// <summary>
42
- ///
43
- /// </summary>
44
- [Tooltip("")]
45
- [SerializeField] protected UniversalAdditionalCameraData universalData = null;
46
-
47
-
48
- /// <summary>
49
- ///
50
- /// </summary>
51
- [Header("")]
52
- [Divider]
53
- [Tooltip("")]
54
- [SerializeField] protected float focalSubtraction = 50;
55
-
56
- /// <summary>
57
- ///
58
- /// </summary>
59
- [Tooltip("")]
60
- [SerializeField] protected float focalEndValue = 300;
61
-
62
- /// <summary>
63
- ///
64
- /// </summary>
65
- [Tooltip("")]
66
- [SerializeField] protected float blurAnimationDuration = 1.75f;
67
-
68
- /// <summary>
69
- ///
70
- /// </summary>
71
- [Tooltip("")]
72
- [SerializeField] protected int blurAnimationLoopAmount = -1;
73
- #if DOTWEEN
74
- /// <summary>
75
- ///
76
- /// </summary>
77
- [Tooltip("")]
78
- [SerializeField] protected LoopType blurAnimationLoopType = LoopType.Yoyo;
79
-
80
- /// <summary>
81
- ///
82
- /// </summary>
83
- [Tooltip("")]
84
- [SerializeField] protected Ease blurAnimationEaseCurve = Ease.InFlash;
85
- #endif
86
-
87
- /// <summary>
88
- ///
89
- /// </summary>
90
- [Header("")]
91
- [Divider]
92
- [Tooltip("")]
93
- [SerializeField] protected float stopBlurFocalLength = 150;
94
-
95
- /// <summary>
96
- ///
97
- /// </summary>
98
- [Tooltip("")]
99
- [SerializeField] protected float stopBlurDuration = 1;
100
-
101
- #if DOTWEEN
102
- /// <summary>
103
- ///
104
- /// </summary>
105
- protected Tweener blurTween = null;
106
- #endif
107
- /// <summary>
108
- ///
109
- /// </summary>
110
- protected VolumeProfile prof;
111
-
112
- /// <summary>
113
- ///
114
- /// </summary>
115
- protected float dofValue;
116
-
117
-
118
- /// <summary>
119
- ///
120
- /// </summary>
121
- protected virtual void OnEnable()
122
- {
123
- DialogueEventSystem.StartListening(blurVisionEventString, BlurVision);
124
-
125
- DialogueEventSystem.StartListening(stopBlurVisionEventString, StopBlur);
126
- }
127
-
128
- /// <summary>
129
- ///
130
- /// </summary>
131
- protected virtual void OnDisable()
132
- {
133
- DialogueEventSystem.StopListening(blurVisionEventString, BlurVision);
134
-
135
- DialogueEventSystem.StopListening(stopBlurVisionEventString, StopBlur);
136
- }
137
-
138
-
139
- /// <summary>
140
- ///
141
- /// </summary>
142
- /// <param name="o"></param>
143
- protected virtual void BlurVision(object o = null)
144
- {
145
- prof = blurProfile.profile;
146
-
147
- UniversalAdditionalCameraData data = universalData;
148
-
149
- data.renderPostProcessing = true;
150
-
151
- DepthOfField dof = GetDepthOfField();
152
-
153
- if (dof != null)
154
- {
155
- dofValue = dof.focalLength.value;
156
-
157
- dof.focalLength.value -= focalSubtraction;
158
- #if DOTWEEN
159
- blurTween = DOTween.To(() => dof.focalLength.value, x => dof.focalLength.value = x, focalEndValue, blurAnimationDuration)
160
- .SetLoops(blurAnimationLoopAmount, blurAnimationLoopType)
161
- .SetEase(blurAnimationEaseCurve);
162
- #endif
163
- }
164
- }
165
-
166
- /// <summary>
167
- ///
168
- /// </summary>
169
- /// <param name="o"></param>
170
- protected virtual void StopBlur(object o = null)
171
- {
172
- #if DOTWEEN
173
- if (blurTween == null)
174
- return;
175
-
176
- blurTween.Kill();
177
-
178
- DepthOfField dof = GetDepthOfField();
179
-
180
- if (dof != null)
181
- {
182
- DOTween.To(() => dof.focalLength.value, x => dof.focalLength.value = x, stopBlurFocalLength, stopBlurDuration);
183
-
184
- dof.focalLength.value = dofValue;
185
-
186
- UniversalAdditionalCameraData data = universalData;
187
-
188
- data.renderPostProcessing = false;
189
-
190
- blurTween = null;
191
-
192
- blurProfile.profile = prof;
193
- }
194
- #endif
195
- }
196
-
197
- /// <summary>
198
- ///
199
- /// </summary>
200
- /// <returns></returns>
201
- protected virtual DepthOfField GetDepthOfField()
202
- {
203
- if (blurProfile.profile.TryGet(out DepthOfField depthOfFieldComponent))
204
- return depthOfFieldComponent;
205
- else
206
- return null;
207
- }
208
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ #if DOTWEEN
3
+ using DG.Tweening;
4
+ #endif
5
+ using DREditor.Dialogues.Events;
6
+ using UnityEngine;
7
+ using UnityEngine.Rendering;
8
+ using UnityEngine.Rendering.Universal;
9
+
10
+ namespace DREditor.CamerasPostProcess
11
+ {
12
+ /// <summary>
13
+ ///
14
+ /// </summary>
15
+ [ClassHeader("")]
16
+ public class BlurVisionEvent : MonoBehaviour
17
+ {
18
+ /// <summary>
19
+ ///
20
+ /// </summary>
21
+ [Header("")]
22
+ [Divider]
23
+ [Tooltip("")]
24
+ [SerializeField] protected string blurVisionEventString = "BlurVision";
25
+
26
+ /// <summary>
27
+ ///
28
+ /// </summary>
29
+ [Tooltip("")]
30
+ [SerializeField] protected string stopBlurVisionEventString = "StopBlur";
31
+
32
+
33
+ /// <summary>
34
+ ///
35
+ /// </summary>
36
+ [Header("")]
37
+ [Divider]
38
+ [Tooltip("")]
39
+ [SerializeField] protected Volume blurProfile = null;
40
+
41
+ /// <summary>
42
+ ///
43
+ /// </summary>
44
+ [Tooltip("")]
45
+ [SerializeField] protected UniversalAdditionalCameraData universalData = null;
46
+
47
+
48
+ /// <summary>
49
+ ///
50
+ /// </summary>
51
+ [Header("")]
52
+ [Divider]
53
+ [Tooltip("")]
54
+ [SerializeField] protected float focalSubtraction = 50;
55
+
56
+ /// <summary>
57
+ ///
58
+ /// </summary>
59
+ [Tooltip("")]
60
+ [SerializeField] protected float focalEndValue = 300;
61
+
62
+ /// <summary>
63
+ ///
64
+ /// </summary>
65
+ [Tooltip("")]
66
+ [SerializeField] protected float blurAnimationDuration = 1.75f;
67
+
68
+ /// <summary>
69
+ ///
70
+ /// </summary>
71
+ [Tooltip("")]
72
+ [SerializeField] protected int blurAnimationLoopAmount = -1;
73
+ #if DOTWEEN
74
+ /// <summary>
75
+ ///
76
+ /// </summary>
77
+ [Tooltip("")]
78
+ [SerializeField] protected LoopType blurAnimationLoopType = LoopType.Yoyo;
79
+
80
+ /// <summary>
81
+ ///
82
+ /// </summary>
83
+ [Tooltip("")]
84
+ [SerializeField] protected Ease blurAnimationEaseCurve = Ease.InFlash;
85
+ #endif
86
+
87
+ /// <summary>
88
+ ///
89
+ /// </summary>
90
+ [Header("")]
91
+ [Divider]
92
+ [Tooltip("")]
93
+ [SerializeField] protected float stopBlurFocalLength = 150;
94
+
95
+ /// <summary>
96
+ ///
97
+ /// </summary>
98
+ [Tooltip("")]
99
+ [SerializeField] protected float stopBlurDuration = 1;
100
+
101
+ #if DOTWEEN
102
+ /// <summary>
103
+ ///
104
+ /// </summary>
105
+ protected Tweener blurTween = null;
106
+ #endif
107
+ /// <summary>
108
+ ///
109
+ /// </summary>
110
+ protected VolumeProfile prof;
111
+
112
+ /// <summary>
113
+ ///
114
+ /// </summary>
115
+ protected float dofValue;
116
+
117
+
118
+ /// <summary>
119
+ ///
120
+ /// </summary>
121
+ protected virtual void OnEnable()
122
+ {
123
+ DialogueEventSystem.StartListening(blurVisionEventString, BlurVision);
124
+
125
+ DialogueEventSystem.StartListening(stopBlurVisionEventString, StopBlur);
126
+ }
127
+
128
+ /// <summary>
129
+ ///
130
+ /// </summary>
131
+ protected virtual void OnDisable()
132
+ {
133
+ DialogueEventSystem.StopListening(blurVisionEventString, BlurVision);
134
+
135
+ DialogueEventSystem.StopListening(stopBlurVisionEventString, StopBlur);
136
+ }
137
+
138
+
139
+ /// <summary>
140
+ ///
141
+ /// </summary>
142
+ /// <param name="o"></param>
143
+ protected virtual void BlurVision(object o = null)
144
+ {
145
+ prof = blurProfile.profile;
146
+
147
+ UniversalAdditionalCameraData data = universalData;
148
+
149
+ data.renderPostProcessing = true;
150
+
151
+ DepthOfField dof = GetDepthOfField();
152
+
153
+ if (dof != null)
154
+ {
155
+ dofValue = dof.focalLength.value;
156
+
157
+ dof.focalLength.value -= focalSubtraction;
158
+ #if DOTWEEN
159
+ blurTween = DOTween.To(() => dof.focalLength.value, x => dof.focalLength.value = x, focalEndValue, blurAnimationDuration)
160
+ .SetLoops(blurAnimationLoopAmount, blurAnimationLoopType)
161
+ .SetEase(blurAnimationEaseCurve);
162
+ #endif
163
+ }
164
+ }
165
+
166
+ /// <summary>
167
+ ///
168
+ /// </summary>
169
+ /// <param name="o"></param>
170
+ protected virtual void StopBlur(object o = null)
171
+ {
172
+ #if DOTWEEN
173
+ if (blurTween == null)
174
+ return;
175
+
176
+ blurTween.Kill();
177
+
178
+ DepthOfField dof = GetDepthOfField();
179
+
180
+ if (dof != null)
181
+ {
182
+ DOTween.To(() => dof.focalLength.value, x => dof.focalLength.value = x, stopBlurFocalLength, stopBlurDuration);
183
+
184
+ dof.focalLength.value = dofValue;
185
+
186
+ UniversalAdditionalCameraData data = universalData;
187
+
188
+ data.renderPostProcessing = false;
189
+
190
+ blurTween = null;
191
+
192
+ blurProfile.profile = prof;
193
+ }
194
+ #endif
195
+ }
196
+
197
+ /// <summary>
198
+ ///
199
+ /// </summary>
200
+ /// <returns></returns>
201
+ protected virtual DepthOfField GetDepthOfField()
202
+ {
203
+ if (blurProfile.profile.TryGet(out DepthOfField depthOfFieldComponent))
204
+ return depthOfFieldComponent;
205
+ else
206
+ return null;
207
+ }
208
+ }
209
209
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 2f0aa5623f8ac70468fc099fee2d9550
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 2f0aa5623f8ac70468fc099fee2d9550
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,45 +1,45 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using UnityEngine.Rendering.Universal;
3
- using UnityEngine.UI;
4
- using UnityEngine;
5
-
6
- namespace DREditor.CamerasPostProcess
7
- {
8
- /// <summary>
9
- ///
10
- /// </summary>
11
- public static class CameraPostProcessingExtentions
12
- {
13
- /// <summary>
14
- ///
15
- /// </summary>
16
- /// <param name="graphic"></param>
17
- /// <param name="color"></param>
18
- public static void ApplyColorNoAlpha(this Graphic graphic, Color color)
19
- => graphic.color = new Color(color.r, color.g, color.b);
20
-
21
- /// <summary>
22
- ///
23
- /// </summary>
24
- /// <param name="camera"></param>
25
- /// <param name="to"></param>
26
- public static void SetPostProcessingTo(this UnityEngine.Camera camera, bool to)
27
- => camera.GetUniversalAdditionalCameraData().renderPostProcessing = to;
28
-
29
- /// <summary>
30
- ///
31
- /// </summary>
32
- /// <param name="camera"></param>
33
- /// <returns></returns>
34
- public static bool IsPostProcessingEnabled(this UnityEngine.Camera camera)
35
- => camera.GetUniversalAdditionalCameraData().renderPostProcessing;
36
-
37
- /// <summary>
38
- ///
39
- /// </summary>
40
- /// <param name="camera"></param>
41
- /// <returns></returns>
42
- public static LayerMask GetVolumeMask(this UnityEngine.Camera camera)
43
- => camera.GetUniversalAdditionalCameraData().volumeLayerMask;
44
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using UnityEngine.Rendering.Universal;
3
+ using UnityEngine.UI;
4
+ using UnityEngine;
5
+
6
+ namespace DREditor.CamerasPostProcess
7
+ {
8
+ /// <summary>
9
+ ///
10
+ /// </summary>
11
+ public static class CameraPostProcessingExtentions
12
+ {
13
+ /// <summary>
14
+ ///
15
+ /// </summary>
16
+ /// <param name="graphic"></param>
17
+ /// <param name="color"></param>
18
+ public static void ApplyColorNoAlpha(this Graphic graphic, Color color)
19
+ => graphic.color = new Color(color.r, color.g, color.b);
20
+
21
+ /// <summary>
22
+ ///
23
+ /// </summary>
24
+ /// <param name="camera"></param>
25
+ /// <param name="to"></param>
26
+ public static void SetPostProcessingTo(this UnityEngine.Camera camera, bool to)
27
+ => camera.GetUniversalAdditionalCameraData().renderPostProcessing = to;
28
+
29
+ /// <summary>
30
+ ///
31
+ /// </summary>
32
+ /// <param name="camera"></param>
33
+ /// <returns></returns>
34
+ public static bool IsPostProcessingEnabled(this UnityEngine.Camera camera)
35
+ => camera.GetUniversalAdditionalCameraData().renderPostProcessing;
36
+
37
+ /// <summary>
38
+ ///
39
+ /// </summary>
40
+ /// <param name="camera"></param>
41
+ /// <returns></returns>
42
+ public static LayerMask GetVolumeMask(this UnityEngine.Camera camera)
43
+ => camera.GetUniversalAdditionalCameraData().volumeLayerMask;
44
+ }
45
45
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 5d7bab008d4c26443bedce2c2eb097a7
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 5d7bab008d4c26443bedce2c2eb097a7
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,20 +1,20 @@
1
- {
2
- "name": "DREditor.CamerasPostProcess",
3
- "rootNamespace": "",
4
- "references": [
5
- "Unity.RenderPipelines.Universal.Runtime",
6
- "Unity.RenderPipelines.Core.Runtime",
7
- "DREditor",
8
- "DREditor.Editor",
9
- "DREditor.CustomSettings"
10
- ],
11
- "includePlatforms": [],
12
- "excludePlatforms": [],
13
- "allowUnsafeCode": false,
14
- "overrideReferences": false,
15
- "precompiledReferences": [],
16
- "autoReferenced": true,
17
- "defineConstraints": [],
18
- "versionDefines": [],
19
- "noEngineReferences": false
1
+ {
2
+ "name": "DREditor.CamerasPostProcess",
3
+ "rootNamespace": "",
4
+ "references": [
5
+ "Unity.RenderPipelines.Universal.Runtime",
6
+ "Unity.RenderPipelines.Core.Runtime",
7
+ "DREditor",
8
+ "DREditor.Editor",
9
+ "DREditor.CustomSettings"
10
+ ],
11
+ "includePlatforms": [],
12
+ "excludePlatforms": [],
13
+ "allowUnsafeCode": false,
14
+ "overrideReferences": false,
15
+ "precompiledReferences": [],
16
+ "autoReferenced": true,
17
+ "defineConstraints": [],
18
+ "versionDefines": [],
19
+ "noEngineReferences": false
20
20
  }
@@ -1,7 +1,7 @@
1
- fileFormatVersion: 2
2
- guid: 377dbe525e64d6240aa3231b2d9b7d7a
3
- AssemblyDefinitionImporter:
4
- externalObjects: {}
5
- userData:
6
- assetBundleName:
7
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 377dbe525e64d6240aa3231b2d9b7d7a
3
+ AssemblyDefinitionImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant: