Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
CameraSupport.cs
Go to the documentation of this file.
1using BeautifyEffect;
2using Colorful;
3using UnityEngine;
4using UnityStandardAssets.ImageEffects;
5
6public class CameraSupport : MonoBehaviour
7{
8 public enum Divider
9 {
10 None,
11 Floor,
12 Round,
13 Ceil,
14 Odd
15 }
16
17 public Camera cam;
18
19 public Vector3 renderPos;
20
22
23 public ScreenGrading grading;
24
25 public Upscaler upscaler;
26
28
29 public bool snap;
30
31 public float PixelsPerUnit = 100f;
32
33 public TiltShift tiltShift;
34
35 public BloomOptimized bloom;
36
37 public Beautify beautify;
38
39 public Kuwahara kuwahara;
40
41 public GaussianBlur blur;
42
43 [Range(0.1f, 2f)]
44 public float Zoom = 1f;
45
47 {
48 cam.orthographicSize = GetOrthoSize() / Zoom;
49 }
50
51 public void OnChangeResolution()
52 {
53 }
54
55 public float GetOrthoSize()
56 {
57 float result = 0f;
58 switch (divier)
59 {
60 case Divider.None:
61 result = (float)Screen.height * 0.5f * 0.01f;
62 break;
63 case Divider.Floor:
64 result = (float)Mathf.FloorToInt((float)Screen.height * 0.5f) * 0.01f;
65 break;
66 case Divider.Round:
67 result = (float)Mathf.RoundToInt((float)Screen.height * 0.5f) * 0.01f;
68 break;
69 case Divider.Ceil:
70 result = (float)Mathf.CeilToInt((float)Screen.height * 0.5f) * 0.01f;
71 break;
72 case Divider.Odd:
73 result = (float)Screen.height * 0.5f * 0.01f + 0.005f;
74 break;
75 }
76 return result;
77 }
78}
float PixelsPerUnit
void OnChangeResolution()
ScreenGrading grading
TiltShift tiltShift
GaussianBlur blur
Divider divier
Vector3 renderPos
Upscaler upscaler
float GetOrthoSize()
GameScreen screen
Kuwahara kuwahara
void ResizeCameraToPixelPerfect()
BloomOptimized bloom
Beautify beautify