Elin Decompiled Documentation EA 23.153 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 public MonoBehaviour water;
44
45 [Range(0.1f, 2f)]
46 public float Zoom = 1f;
47
49 {
50 cam.orthographicSize = GetOrthoSize() / Zoom;
51 }
52
53 public void OnChangeResolution()
54 {
55 }
56
57 public float GetOrthoSize()
58 {
59 float result = 0f;
60 switch (divier)
61 {
62 case Divider.None:
63 result = (float)Screen.height * 0.5f * 0.01f;
64 break;
65 case Divider.Floor:
66 result = (float)Mathf.FloorToInt((float)Screen.height * 0.5f) * 0.01f;
67 break;
68 case Divider.Round:
69 result = (float)Mathf.RoundToInt((float)Screen.height * 0.5f) * 0.01f;
70 break;
71 case Divider.Ceil:
72 result = (float)Mathf.CeilToInt((float)Screen.height * 0.5f) * 0.01f;
73 break;
74 case Divider.Odd:
75 result = (float)Screen.height * 0.5f * 0.01f + 0.005f;
76 break;
77 }
78 return result;
79 }
80}
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
MonoBehaviour water
Beautify beautify