summaryrefslogtreecommitdiff
path: root/Assets/LensFlare
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/LensFlare')
-rw-r--r--Assets/LensFlare/Editor/MinMaxSliderDrawer.cs124
-rw-r--r--Assets/LensFlare/Editor/MinMaxSliderDrawer.cs.meta (renamed from Assets/LensFlare/LensFlare.cs.meta)2
-rw-r--r--Assets/LensFlare/FlareBatch.cs2
-rw-r--r--Assets/LensFlare/FlareSource.cs4
-rw-r--r--Assets/LensFlare/LensFlare.cs242
-rw-r--r--Assets/LensFlare/LensFlare.mat2
-rw-r--r--Assets/LensFlare/LensFlare.unity114
-rw-r--r--Assets/LensFlare/LensFlareCommon.hlsl161
-rw-r--r--Assets/LensFlare/LensFlareCommon.hlsl.meta9
-rw-r--r--Assets/LensFlare/MinMaxAttribute.cs15
-rw-r--r--Assets/LensFlare/MinMaxAttribute.cs.meta11
-rw-r--r--Assets/LensFlare/New Scene.unity612
-rw-r--r--Assets/LensFlare/New Scene.unity.meta7
13 files changed, 193 insertions, 1112 deletions
diff --git a/Assets/LensFlare/Editor/MinMaxSliderDrawer.cs b/Assets/LensFlare/Editor/MinMaxSliderDrawer.cs
new file mode 100644
index 0000000..fe7ca18
--- /dev/null
+++ b/Assets/LensFlare/Editor/MinMaxSliderDrawer.cs
@@ -0,0 +1,124 @@
+using UnityEngine;
+using UnityEditor;
+
+[CustomPropertyDrawer(typeof(MinMaxSliderAttribute))]
+public class MinMaxSliderDrawer : PropertyDrawer
+{
+ public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
+ {
+ var minMaxAttribute = (MinMaxSliderAttribute)attribute;
+ var propertyType = property.propertyType;
+
+ label.tooltip = minMaxAttribute.min.ToString("F2") + " to " + minMaxAttribute.max.ToString("F2");
+
+ //PrefixLabel returns the rect of the right part of the control. It leaves out the label section. We don't have to worry about it. Nice!
+ Rect controlRect = EditorGUI.PrefixLabel(position, label);
+
+ Rect[] splittedRect = SplitRect(controlRect, 3);
+
+ if (propertyType == SerializedPropertyType.Vector2)
+ {
+
+ EditorGUI.BeginChangeCheck();
+
+ Vector2 vector = property.vector2Value;
+ float minVal = vector.x;
+ float maxVal = vector.y;
+
+ //F2 limits the float to two decimal places (0.00).
+ //minVal = EditorGUI.FloatField(splittedRect[0], float.Parse(minVal.ToString("F2")));
+ //maxVal = EditorGUI.FloatField(splittedRect[2], float.Parse(maxVal.ToString("F2")));
+
+ minVal = float.Parse(GUI.TextField(splittedRect[0], minVal.ToString("F2")));
+ maxVal = float.Parse(GUI.TextField(splittedRect[2], maxVal.ToString("F2")));
+
+ // 不同版本的Unity这里不一样
+ Rect sliderRect = new Rect(splittedRect[0].x + 10, splittedRect[0].y, splittedRect[2].x - splittedRect[0].x - 15, splittedRect[0].height);
+
+ EditorGUI.MinMaxSlider(sliderRect, ref minVal, ref maxVal,
+ minMaxAttribute.min, minMaxAttribute.max);
+
+ if (minVal < minMaxAttribute.min)
+ {
+ minVal = minMaxAttribute.min;
+ }
+
+ if (maxVal > minMaxAttribute.max)
+ {
+ maxVal = minMaxAttribute.max;
+ }
+
+ vector = new Vector2(minVal > maxVal ? maxVal : minVal, maxVal);
+
+ if (EditorGUI.EndChangeCheck())
+ {
+ property.vector2Value = vector;
+ }
+
+ }
+ else if (propertyType == SerializedPropertyType.Vector2Int)
+ {
+
+ EditorGUI.BeginChangeCheck();
+
+ Vector2Int vector = property.vector2IntValue;
+ float minVal = vector.x;
+ float maxVal = vector.y;
+
+ minVal = EditorGUI.FloatField(splittedRect[0], minVal);
+ maxVal = EditorGUI.FloatField(splittedRect[2], maxVal);
+
+ EditorGUI.MinMaxSlider(splittedRect[1], ref minVal, ref maxVal,
+ minMaxAttribute.min, minMaxAttribute.max);
+
+ if (minVal < minMaxAttribute.min)
+ {
+ maxVal = minMaxAttribute.min;
+ }
+
+ if (minVal > minMaxAttribute.max)
+ {
+ maxVal = minMaxAttribute.max;
+ }
+
+ vector = new Vector2Int(Mathf.FloorToInt(minVal > maxVal ? maxVal : minVal), Mathf.FloorToInt(maxVal));
+
+ if (EditorGUI.EndChangeCheck())
+ {
+ property.vector2IntValue = vector;
+ }
+
+ }
+
+ }
+
+ Rect[] SplitRect(Rect rectToSplit, int n)
+ {
+
+
+ Rect[] rects = new Rect[n];
+
+ for (int i = 0; i < n; i++)
+ {
+
+ rects[i] = new Rect(rectToSplit.position.x + (i * rectToSplit.width / n), rectToSplit.position.y, rectToSplit.width / n, rectToSplit.height);
+
+ }
+
+ int padding = (int)rects[0].width - 40;
+ int space = 5;
+
+ rects[0].width -= padding + space;
+ rects[2].width -= padding + space;
+
+ rects[1].x -= padding;
+ rects[1].width += padding * 2;
+
+ rects[2].x += padding + space;
+
+
+ return rects;
+
+ }
+
+} \ No newline at end of file
diff --git a/Assets/LensFlare/LensFlare.cs.meta b/Assets/LensFlare/Editor/MinMaxSliderDrawer.cs.meta
index bca22a9..34c0218 100644
--- a/Assets/LensFlare/LensFlare.cs.meta
+++ b/Assets/LensFlare/Editor/MinMaxSliderDrawer.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 3cf420f1fcf2c7745b6f448d60827c0d
+guid: 8bc9b50b36a865d4ca8c79aa6263ac43
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Assets/LensFlare/FlareBatch.cs b/Assets/LensFlare/FlareBatch.cs
index 889c033..7e65cb0 100644
--- a/Assets/LensFlare/FlareBatch.cs
+++ b/Assets/LensFlare/FlareBatch.cs
@@ -113,7 +113,7 @@ public class FlareBatch : MonoBehaviour
if (!flare.IsActive)
continue;
Vector2 size = source.GetFlareSize(flare);
- float sclae = Mathf.Lerp(flare.MinScale, flare.MaxScale, source.GetScaleCurveValue(fac));
+ float sclae = Mathf.Lerp(flare.ScaleRange.x, flare.ScaleRange.y, source.GetScaleCurveValue(fac));
float alpha = Mathf.Lerp(1, 0, source.GetAlphaCurveValue(fac));
Vector2 halfSize = size / 2;
Vertexhelper vh = new Vertexhelper();
diff --git a/Assets/LensFlare/FlareSource.cs b/Assets/LensFlare/FlareSource.cs
index 3e7ebf9..00933ba 100644
--- a/Assets/LensFlare/FlareSource.cs
+++ b/Assets/LensFlare/FlareSource.cs
@@ -10,8 +10,8 @@ public class Flare
public bool IsActive = true;
public FlareAtlas Atlas; // flare atlas
public int Index; // flare texture
- public float MaxScale = 1f; // 最大,单位unit
- public float MinScale = 1f; // 最小,单位unit
+ [MinMaxSlider(0.0f, 15f)]
+ public Vector2 ScaleRange;
public Color Color; // 颜色
[Range(0, 360)]
public float Rotation; // 初始的旋转值,即正对着阳光时的姿势
diff --git a/Assets/LensFlare/LensFlare.cs b/Assets/LensFlare/LensFlare.cs
deleted file mode 100644
index 768c1ec..0000000
--- a/Assets/LensFlare/LensFlare.cs
+++ /dev/null
@@ -1,242 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-[ExecuteInEditMode]
-[RequireComponent(typeof(MeshRenderer))]
-[RequireComponent(typeof(MeshFilter))]
-public class LensFlare : MonoBehaviour
-{
- [SerializeField, HideInInspector]
- MeshRenderer m_MeshRenderer;
- [SerializeField, HideInInspector]
- MeshFilter m_MeshFilter;
- [SerializeField]
- Light m_Light;
-
- [Header("Global Settings")]
- public float OcclusionRadius = 1.0f;
- public float NearFadeStartDistance = 1.0f;
- public float NearFadeEndDistance = 3.0f;
- public float FarFadeStartDistance = 10.0f;
- public float FarFadeEndDistance = 50.0f;
-
- [Header("Flare Element Settings")]
- [SerializeField]
- public List<FlareSettings> Flares;
-
- void Awake()
- {
- if (m_MeshFilter == null)
- m_MeshFilter = GetComponent<MeshFilter>();
- if (m_MeshRenderer == null)
- m_MeshRenderer = GetComponent<MeshRenderer>();
-
- m_Light = GetComponent<Light>();
-
- m_MeshFilter.hideFlags = HideFlags.None;
- m_MeshRenderer.hideFlags = HideFlags.None;
-
- if (Flares == null)
- Flares = new List<FlareSettings>();
-
- m_MeshFilter.mesh = InitMesh();
- }
-
- void OnEnable()
- {
- UpdateGeometry();
- }
-
-
- // Use this for initialization
- void Start()
- {
- m_Light = GetComponent<Light>();
- }
-
- void OnValidate()
- {
- UpdateGeometry();
- UpdateMaterials();
- }
-
- // Update is called once per frame
- void Update()
- {
- // Lazy!
- UpdateVaryingAttributes();
- }
-
- Mesh InitMesh()
- {
- Mesh m = new Mesh();
- m.MarkDynamic();
- return m;
- }
-
- void UpdateMaterials()
- {
- Material[] mats = new Material[Flares.Count];
-
- int i = 0;
- foreach (FlareSettings f in Flares)
- {
- mats[i] = f.Material;
- i++;
- }
- m_MeshRenderer.sharedMaterials = mats;
- }
-
- void UpdateGeometry()
- {
- Mesh m = m_MeshFilter.sharedMesh;
-
- // Positions
- List<Vector3> vertices = new List<Vector3>();
- foreach (FlareSettings s in Flares)
- {
- vertices.Add(new Vector3(-1, -1, 0));
- vertices.Add(new Vector3(1, -1, 0));
- vertices.Add(new Vector3(1, 1, 0));
- vertices.Add(new Vector3(-1, 1, 0));
- }
- m.SetVertices(vertices);
-
- // UVs
- List<Vector2> uvs = new List<Vector2>();
- foreach (FlareSettings s in Flares)
- {
- uvs.Add(new Vector2(0, 1));
- uvs.Add(new Vector2(1, 1));
- uvs.Add(new Vector2(1, 0));
- uvs.Add(new Vector2(0, 0));
- }
- m.SetUVs(0, uvs);
-
- // Variable Data
- m.SetColors(GetLensFlareColor());
- m.SetUVs(1, GetLensFlareData());
- m.SetUVs(2, GetWorldPositionAndRadius());
- m.SetUVs(3, GetDistanceFadeData());
-
- m.subMeshCount = Flares.Count;
-
- // Tris
- for (int i = 0; i < Flares.Count; i++)
- {
- int[] tris = new int[6];
- tris[0] = (i * 4) + 0;
- tris[1] = (i * 4) + 1;
- tris[2] = (i * 4) + 2;
- tris[3] = (i * 4) + 2;
- tris[4] = (i * 4) + 3;
- tris[5] = (i * 4) + 0;
- m.SetTriangles(tris, i);
- }
-
- Bounds b = m.bounds;
- b.extents = new Vector3(OcclusionRadius, OcclusionRadius, OcclusionRadius);
- m.bounds = b;
- m.UploadMeshData(false);
- }
-
- void UpdateVaryingAttributes()
- {
- Mesh m = m_MeshFilter.sharedMesh;
-
- m.SetColors(GetLensFlareColor());
- m.SetUVs(1, GetLensFlareData());
- m.SetUVs(2, GetWorldPositionAndRadius());
- m.SetUVs(3, GetDistanceFadeData());
-
- Bounds b = m.bounds;
- b.extents = new Vector3(OcclusionRadius, OcclusionRadius, OcclusionRadius);
- m.bounds = b;
- m.name = "LensFlare (" + gameObject.name + ")";
- }
-
- List<Color> GetLensFlareColor()
- {
- List<Color> colors = new List<Color>();
- foreach (FlareSettings s in Flares)
- {
- Color c = (s.MultiplyByLightColor && m_Light != null) ? s.Color * m_Light.color * m_Light.intensity : s.Color;
-
- colors.Add(c);
- colors.Add(c);
- colors.Add(c);
- colors.Add(c);
- }
- return colors;
- }
-
- List<Vector4> GetLensFlareData()
- {
- List<Vector4> lfData = new List<Vector4>();
-
- foreach (FlareSettings s in Flares)
- {
- Vector4 data = new Vector4(s.RayPosition, s.AutoRotate ? -1 : Mathf.Abs(s.Rotation), s.Size.x, s.Size.y);
- lfData.Add(data); lfData.Add(data); lfData.Add(data); lfData.Add(data);
- }
- return lfData;
- }
- List<Vector4> GetDistanceFadeData()
- {
- List<Vector4> fadeData = new List<Vector4>();
-
- foreach (FlareSettings s in Flares)
- {
- Vector4 data = new Vector4(NearFadeStartDistance, NearFadeEndDistance, FarFadeStartDistance, FarFadeEndDistance);
- fadeData.Add(data); fadeData.Add(data); fadeData.Add(data); fadeData.Add(data);
- }
- return fadeData;
- }
-
-
- List<Vector4> GetWorldPositionAndRadius()
- {
- List<Vector4> worldPos = new List<Vector4>();
- Vector3 pos = transform.position;
- Vector4 value = new Vector4(pos.x, pos.y, pos.z, OcclusionRadius);
- foreach (FlareSettings s in Flares)
- {
- worldPos.Add(value); worldPos.Add(value); worldPos.Add(value); worldPos.Add(value);
- }
-
- return worldPos;
- }
-
- void OnDrawGizmosSelected()
- {
- return;
- Gizmos.color = new Color(1, 0, 0, 0.3f);
- Gizmos.DrawSphere(transform.position, OcclusionRadius);
- Gizmos.color = Color.red;
- Gizmos.DrawWireSphere(transform.position, OcclusionRadius);
- }
-
- [System.Serializable]
- public class FlareSettings
- {
- public float RayPosition;
- public Material Material;
- [ColorUsage(true, true)]
- public Color Color;
- public bool MultiplyByLightColor;
- public Vector2 Size;
- public float Rotation;
- public bool AutoRotate;
-
- public FlareSettings()
- {
- RayPosition = 0.0f;
- Color = Color.white;
- MultiplyByLightColor = true;
- Size = new Vector2(0.3f, 0.3f);
- Rotation = 0.0f;
- AutoRotate = false;
- }
- }
-}
diff --git a/Assets/LensFlare/LensFlare.mat b/Assets/LensFlare/LensFlare.mat
index bb57f4e..8af32df 100644
--- a/Assets/LensFlare/LensFlare.mat
+++ b/Assets/LensFlare/LensFlare.mat
@@ -32,7 +32,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
- m_Texture: {fileID: 2800000, guid: b96ae14a5fa164cbda52e52ab1694f94, type: 3}
+ m_Texture: {fileID: 2800000, guid: 539933a8761e97d41b8c1544e599872f, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
diff --git a/Assets/LensFlare/LensFlare.unity b/Assets/LensFlare/LensFlare.unity
index 26fdbfb..7a1de1d 100644
--- a/Assets/LensFlare/LensFlare.unity
+++ b/Assets/LensFlare/LensFlare.unity
@@ -525,8 +525,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 22
- MaxScale: 1.71
- MinScale: 0.74
+ ScaleRange: {x: 0.74, y: 1.71}
Color: {r: 1, g: 1, b: 1, a: 0.6666667}
Rotation: 352
RotateWith: 1
@@ -537,8 +536,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 11
- MaxScale: 10
- MinScale: 4
+ ScaleRange: {x: 4, y: 10}
Color: {r: 1, g: 1, b: 1, a: 1}
Rotation: 360
RotateWith: 0
@@ -549,8 +547,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 12
- MaxScale: 10
- MinScale: 4
+ ScaleRange: {x: 4, y: 10}
Color: {r: 1, g: 1, b: 1, a: 1}
Rotation: 333
RotateWith: 0
@@ -561,8 +558,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 13
- MaxScale: 10
- MinScale: 4
+ ScaleRange: {x: 4, y: 10}
Color: {r: 1, g: 1, b: 1, a: 1}
Rotation: 333
RotateWith: 0
@@ -573,8 +569,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 6
- MaxScale: 5
- MinScale: 4
+ ScaleRange: {x: 4, y: 5}
Color: {r: 1, g: 1, b: 1, a: 1}
Rotation: 333
RotateWith: 0
@@ -585,8 +580,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 8
- MaxScale: 4
- MinScale: 4
+ ScaleRange: {x: 4, y: 4}
Color: {r: 0.9622642, g: 0.8801094, b: 0.077162705, a: 1}
Rotation: 333
RotateWith: 0
@@ -597,8 +591,7 @@ MonoBehaviour:
IsActive: 0
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 7
- MaxScale: 4
- MinScale: 4
+ ScaleRange: {x: 0, y: 0}
Color: {r: 0.9622642, g: 0.8801094, b: 0.077162705, a: 1}
Rotation: 333
RotateWith: 0
@@ -609,8 +602,7 @@ MonoBehaviour:
IsActive: 0
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 7
- MaxScale: 4
- MinScale: 4
+ ScaleRange: {x: 0, y: 0}
Color: {r: 0.9622642, g: 0.8801094, b: 0.077162705, a: 1}
Rotation: 333
RotateWith: 0
@@ -621,8 +613,7 @@ MonoBehaviour:
IsActive: 0
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 7
- MaxScale: 4
- MinScale: 4
+ ScaleRange: {x: 0, y: 0}
Color: {r: 0.9622642, g: 0.8801094, b: 0.077162705, a: 1}
Rotation: 333
RotateWith: 0
@@ -633,8 +624,7 @@ MonoBehaviour:
IsActive: 0
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 7
- MaxScale: 4
- MinScale: 4
+ ScaleRange: {x: 0, y: 0}
Color: {r: 0.9622642, g: 0.8801094, b: 0.077162705, a: 1}
Rotation: 333
RotateWith: 0
@@ -645,8 +635,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.1
- MinScale: 0.05
+ ScaleRange: {x: 0.05, y: 0.1}
Color: {r: 1, g: 1, b: 1, a: 0.30588236}
Rotation: 333
RotateWith: 0
@@ -657,8 +646,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.2
- MinScale: 0.1
+ ScaleRange: {x: 0.1, y: 0.2}
Color: {r: 1, g: 1, b: 1, a: 1}
Rotation: 333
RotateWith: 0
@@ -669,8 +657,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.18
- MinScale: 0.03
+ ScaleRange: {x: 0.03, y: 0.18}
Color: {r: 1, g: 1, b: 1, a: 0.30588236}
Rotation: 333
RotateWith: 0
@@ -681,8 +668,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.4
- MinScale: 0.01
+ ScaleRange: {x: 0.01, y: 0.4}
Color: {r: 1, g: 1, b: 1, a: 1}
Rotation: 333
RotateWith: 0
@@ -693,8 +679,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.2
- MinScale: 0.04
+ ScaleRange: {x: 0.04, y: 0.2}
Color: {r: 1, g: 1, b: 1, a: 1}
Rotation: 333
RotateWith: 0
@@ -705,8 +690,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.1
- MinScale: 0.05
+ ScaleRange: {x: 0.05, y: 0.1}
Color: {r: 1, g: 1, b: 1, a: 0.078431375}
Rotation: 333
RotateWith: 0
@@ -717,8 +701,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.3
- MinScale: 0.05
+ ScaleRange: {x: 0.05, y: 0.3}
Color: {r: 1, g: 1, b: 1, a: 1}
Rotation: 333
RotateWith: 0
@@ -729,8 +712,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.2
- MinScale: 0.05
+ ScaleRange: {x: 0.05, y: 0.2}
Color: {r: 1, g: 1, b: 1, a: 1}
Rotation: 333
RotateWith: 0
@@ -741,8 +723,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.05
- MinScale: 0.05
+ ScaleRange: {x: 0.05, y: 0.05}
Color: {r: 1, g: 1, b: 1, a: 0.35686275}
Rotation: 333
RotateWith: 0
@@ -753,8 +734,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.6
- MinScale: 0.1
+ ScaleRange: {x: 0.1, y: 0.6}
Color: {r: 1, g: 1, b: 1, a: 0.078431375}
Rotation: 333
RotateWith: 0
@@ -765,8 +745,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.3
- MinScale: 0.05
+ ScaleRange: {x: 0.05, y: 0.3}
Color: {r: 1, g: 1, b: 1, a: 0.34901962}
Rotation: 333
RotateWith: 0
@@ -777,8 +756,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.1
- MinScale: 0.05
+ ScaleRange: {x: 0.05, y: 0.1}
Color: {r: 1, g: 1, b: 1, a: 0.2}
Rotation: 333
RotateWith: 0
@@ -789,8 +767,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.05
- MinScale: 0.05
+ ScaleRange: {x: 0.05, y: 0.05}
Color: {r: 1, g: 1, b: 1, a: 0.30588236}
Rotation: 333
RotateWith: 0
@@ -801,8 +778,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.3
- MinScale: 0.05
+ ScaleRange: {x: 0.05, y: 0.3}
Color: {r: 1, g: 1, b: 1, a: 0.38431373}
Rotation: 333
RotateWith: 0
@@ -813,8 +789,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.2
- MinScale: 0.05
+ ScaleRange: {x: 0.05, y: 0.2}
Color: {r: 1, g: 0.53044486, b: 0.2235294, a: 0.050980393}
Rotation: 333
RotateWith: 0
@@ -825,8 +800,7 @@ MonoBehaviour:
IsActive: 0
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.3
- MinScale: 0.05
+ ScaleRange: {x: 0, y: 0}
Color: {r: 0.4479395, g: 1, b: 0.2216981, a: 0.050980393}
Rotation: 333
RotateWith: 0
@@ -837,8 +811,7 @@ MonoBehaviour:
IsActive: 0
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.3
- MinScale: 0.05
+ ScaleRange: {x: 0, y: 0}
Color: {r: 0.4479395, g: 1, b: 0.2216981, a: 0.050980393}
Rotation: 333
RotateWith: 0
@@ -849,8 +822,7 @@ MonoBehaviour:
IsActive: 0
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.3
- MinScale: 0.05
+ ScaleRange: {x: 0, y: 0}
Color: {r: 0.4479395, g: 1, b: 0.2216981, a: 0.050980393}
Rotation: 333
RotateWith: 0
@@ -861,8 +833,7 @@ MonoBehaviour:
IsActive: 0
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.3
- MinScale: 0.05
+ ScaleRange: {x: 0, y: 0}
Color: {r: 0.4479395, g: 1, b: 0.2216981, a: 0.050980393}
Rotation: 333
RotateWith: 0
@@ -873,8 +844,7 @@ MonoBehaviour:
IsActive: 0
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.3
- MinScale: 0.05
+ ScaleRange: {x: 0, y: 0}
Color: {r: 0.4479395, g: 1, b: 0.2216981, a: 0.050980393}
Rotation: 333
RotateWith: 0
@@ -885,8 +855,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 4
- MinScale: 0.05
+ ScaleRange: {x: 0.05, y: 4}
Color: {r: 0.96301407, g: 1, b: 0.06132078, a: 0.09019608}
Rotation: 0
RotateWith: 0
@@ -897,8 +866,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 3.5
- MinScale: 0.02
+ ScaleRange: {x: 0.02, y: 3.5}
Color: {r: 1, g: 1, b: 1, a: 0.050980393}
Rotation: 0
RotateWith: 0
@@ -909,8 +877,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 5
- MinScale: 0.005
+ ScaleRange: {x: 0.005, y: 5}
Color: {r: 0.96819425, g: 1, b: 0.2235294, a: 0.105882354}
Rotation: 0
RotateWith: 0
@@ -921,8 +888,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 3
- MinScale: 0.05
+ ScaleRange: {x: 0.05, y: 3}
Color: {r: 0.9961863, g: 1, b: 0.2235294, a: 0.078431375}
Rotation: 0
RotateWith: 0
@@ -933,8 +899,7 @@ MonoBehaviour:
IsActive: 0
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.3
- MinScale: 0.05
+ ScaleRange: {x: 0, y: 0}
Color: {r: 0.4479395, g: 1, b: 0.2216981, a: 0.050980393}
Rotation: 333
RotateWith: 0
@@ -945,8 +910,7 @@ MonoBehaviour:
IsActive: 0
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 2
- MaxScale: 0.3
- MinScale: 0.05
+ ScaleRange: {x: 0, y: 0}
Color: {r: 0.4479395, g: 1, b: 0.2216981, a: 0.050980393}
Rotation: 333
RotateWith: 0
@@ -957,8 +921,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 22
- MaxScale: 8
- MinScale: 1
+ ScaleRange: {x: 1, y: 8}
Color: {r: 1, g: 1, b: 1, a: 0.23921569}
Rotation: 182
RotateWith: 1
@@ -969,8 +932,7 @@ MonoBehaviour:
IsActive: 1
Atlas: {fileID: 11400000, guid: 317e5903581b97148afb8a08854d474d, type: 2}
Index: 19
- MaxScale: 8.47
- MinScale: 1.05
+ ScaleRange: {x: 1.05, y: 8.47}
Color: {r: 1, g: 1, b: 1, a: 0.44705883}
Rotation: 182
RotateWith: 1
diff --git a/Assets/LensFlare/LensFlareCommon.hlsl b/Assets/LensFlare/LensFlareCommon.hlsl
deleted file mode 100644
index d5fd11f..0000000
--- a/Assets/LensFlare/LensFlareCommon.hlsl
+++ /dev/null
@@ -1,161 +0,0 @@
-struct appdata
-{
- float4 vertex : POSITION;
- float2 uv : TEXCOORD0;
- float4 color : COLOR;
-
- // LensFlare Data :
- // * X = RayPos
- // * Y = Rotation (< 0 = Auto)
- // * ZW = Size (Width, Height) in Screen Height Ratio
- nointerpolation float4 lensflare_data : TEXCOORD1;
- // World Position (XYZ) and Radius(W) :
- nointerpolation float4 worldPosRadius : TEXCOORD2;
- // LensFlare FadeData :
- // * X = Near Start Distance
- // * Y = Near End Distance
- // * Z = Far Start Distance
- // * W = Far End Distance
- nointerpolation float4 lensflare_fadeData : TEXCOORD3;
-};
-
-struct v2f
-{
- float2 uv : TEXCOORD0;
- float4 vertex : SV_POSITION;
- float4 color : COLOR;
-};
-
-TEXTURE2D(_MainTex);
-SAMPLER(sampler_MainTex);
-TEXTURE2D(_CameraDepthTexture);
-SAMPLER(sampler_CameraDepthTexture);
-float _OccludedSizeScale;
-
-// thanks, internets
-static const uint DEPTH_SAMPLE_COUNT = 32;
-static float2 samples[DEPTH_SAMPLE_COUNT] = {
- float2(0.658752441406,-0.0977704077959),
- float2(0.505380451679,-0.862896621227),
- float2(-0.678673446178,0.120453640819),
- float2(-0.429447203875,-0.501827657223),
- float2(-0.239791020751,0.577527523041),
- float2(-0.666824519634,-0.745214760303),
- float2(0.147858589888,-0.304675519466),
- float2(0.0334240831435,0.263438135386),
- float2(-0.164710089564,-0.17076793313),
- float2(0.289210408926,0.0226817727089),
- float2(0.109557107091,-0.993980526924),
- float2(-0.999996423721,-0.00266989553347),
- float2(0.804284930229,0.594243884087),
- float2(0.240315377712,-0.653567194939),
- float2(-0.313934922218,0.94944447279),
- float2(0.386928111315,0.480902403593),
- float2(0.979771316051,-0.200120285153),
- float2(0.505873680115,-0.407543361187),
- float2(0.617167234421,0.247610524297),
- float2(-0.672138273716,0.740425646305),
- float2(-0.305256098509,-0.952270269394),
- float2(0.493631094694,0.869671344757),
- float2(0.0982239097357,0.995164275169),
- float2(0.976404249668,0.21595069766),
- float2(-0.308868765831,0.150203511119),
- float2(-0.586166858673,-0.19671548903),
- float2(-0.912466347218,-0.409151613712),
- float2(0.0959918648005,0.666364192963),
- float2(0.813257217407,-0.581904232502),
- float2(-0.914829492569,0.403840065002),
- float2(-0.542099535465,0.432246923447),
- float2(-0.106764614582,-0.618209302425)
-};
-
-float GetOcclusion(float2 screenPos, float depth, float radius, float ratio)
-{
- float contrib = 0.0f;
- float sample_Contrib = 1.0 / DEPTH_SAMPLE_COUNT;
- float2 ratioScale = float2(1 / ratio, 1.0);
- for (uint i = 0; i < DEPTH_SAMPLE_COUNT; i++)
- {
- float2 pos = screenPos + (samples[i] * radius * ratioScale);
- pos = pos * 0.5 + 0.5;
- pos.y = 1 - pos.y;
- if (pos.x >= 0 && pos.x <= 1 && pos.y >= 0 && pos.y <= 1)
- {
- float sampledDepth = LinearEyeDepth(SAMPLE_TEXTURE2D_LOD(_CameraDepthTexture, sampler_CameraDepthTexture, pos, 0).r, _ZBufferParams);
- //float sampledDepth = LinearEyeDepth(SampleCameraDepth(pos), _ZBufferParams);
-
- if (sampledDepth >= depth)
- contrib += sample_Contrib;
- }
- }
- return contrib;
-}
-
-v2f vert(appdata v)
-{
- v2f o;
-
-
- float4 clip = TransformWorldToHClip(GetCameraRelativePositionWS(v.worldPosRadius.xyz));
- float depth = clip.w; // wʵϵռµzֵҲռ¾ľ롣Ϊռ䵽ռľûŲľȼռ¾ľ롣
-
- float3 cameraUp = normalize(mul(UNITY_MATRIX_V, float4(0, 1, 0, 0))).xyz;
-
- float4 extent = TransformWorldToHClip(GetCameraRelativePositionWS(v.worldPosRadius.xyz + cameraUp * v.worldPosRadius.w));
-
- // ǵõ̫Ļlensflareĵ
- float2 screenPos = clip.xy / clip.w; // γõ[-1,1]
- // lensflareϱԵĵ
- float2 extentPos = extent.xy / extent.w; // γõ[-1,1]
-
- float radius = distance(screenPos, extentPos);
-
- // Ļ w/h
- float ratio = _ScreenParams.x / _ScreenParams.y; // screenWidth/screenHeight
- // ֱ
- float occlusion = GetOcclusion(screenPos, depth - v.worldPosRadius.w, radius, ratio);
-
- // õľ룬뵭ͷ
- float4 d = v.lensflare_fadeData;
- float distanceFade = saturate((depth - d.x) / (d.y - d.x));
- distanceFade *= 1.0f - saturate((depth - d.z) / (d.w - d.z));
-
- // position and rotate
- float angle = v.lensflare_data.y;
- if (angle < 0) // Automatic
- {
- float2 dir = normalize(screenPos);
- angle = atan2(dir.y, dir.x) + 1.57079632675; // arbitrary, we need V to face the source, not U;
- }
-
- // ֱõƬСյƬС
- float2 quad_size = lerp(_OccludedSizeScale, 1.0f, occlusion) * v.lensflare_data.zw;
- if (distanceFade * occlusion == 0.0f) // if either one or other is zeroed
- quad_size = float2(0, 0); // clip
-
- float2 local = v.vertex.xy * quad_size;
-
-// תƬ
-// ʵfloat2x2 תR
-// {
-// cos(),-sin()
-// sin(),cos()
-// }
-// ϶Ļռ
- local = float2(
- local.x * cos(angle) + local.y * (-sin(angle)),
- local.x * sin(angle) + local.y * cos(angle));
-
- // adjust to correct ratio
- local.x /= ratio; // ӦöӦĻţᱻ
-
- float2 rayOffset = -screenPos * v.lensflare_data.x;
- o.vertex.w = v.vertex.w;
- o.vertex.xy = screenPos + local + rayOffset;
-
- o.vertex.z = 1;
- o.uv = v.uv;
-
- o.color = v.color * occlusion * distanceFade * saturate(length(screenPos * 2));
- return o;
-}
diff --git a/Assets/LensFlare/LensFlareCommon.hlsl.meta b/Assets/LensFlare/LensFlareCommon.hlsl.meta
deleted file mode 100644
index 32d1110..0000000
--- a/Assets/LensFlare/LensFlareCommon.hlsl.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: d7717cafce4ea67418b9d06f74de457a
-ShaderImporter:
- externalObjects: {}
- defaultTextures: []
- nonModifiableTextures: []
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/LensFlare/MinMaxAttribute.cs b/Assets/LensFlare/MinMaxAttribute.cs
new file mode 100644
index 0000000..fde9f2d
--- /dev/null
+++ b/Assets/LensFlare/MinMaxAttribute.cs
@@ -0,0 +1,15 @@
+using UnityEngine;
+using UnityEditor;
+
+public class MinMaxSliderAttribute : PropertyAttribute
+{
+
+ public float min;
+ public float max;
+
+ public MinMaxSliderAttribute(float min, float max)
+ {
+ this.min = min;
+ this.max = max;
+ }
+}
diff --git a/Assets/LensFlare/MinMaxAttribute.cs.meta b/Assets/LensFlare/MinMaxAttribute.cs.meta
new file mode 100644
index 0000000..b13ce47
--- /dev/null
+++ b/Assets/LensFlare/MinMaxAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b7122acb14c449b4cbe673687684892a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/LensFlare/New Scene.unity b/Assets/LensFlare/New Scene.unity
deleted file mode 100644
index d82a634..0000000
--- a/Assets/LensFlare/New Scene.unity
+++ /dev/null
@@ -1,612 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!29 &1
-OcclusionCullingSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_OcclusionBakeSettings:
- smallestOccluder: 5
- smallestHole: 0.25
- backfaceThreshold: 100
- m_SceneGUID: 00000000000000000000000000000000
- m_OcclusionCullingData: {fileID: 0}
---- !u!104 &2
-RenderSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 9
- m_Fog: 0
- m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
- m_FogMode: 3
- m_FogDensity: 0.01
- m_LinearFogStart: 0
- m_LinearFogEnd: 300
- m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
- m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
- m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
- m_AmbientIntensity: 1
- m_AmbientMode: 0
- m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
- m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
- m_HaloStrength: 0.5
- m_FlareStrength: 1
- m_FlareFadeSpeed: 3
- m_HaloTexture: {fileID: 0}
- m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
- m_DefaultReflectionMode: 0
- m_DefaultReflectionResolution: 128
- m_ReflectionBounces: 1
- m_ReflectionIntensity: 1
- m_CustomReflection: {fileID: 0}
- m_Sun: {fileID: 0}
- m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
- m_UseRadianceAmbientProbe: 0
---- !u!157 &3
-LightmapSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 12
- m_GIWorkflowMode: 1
- m_GISettings:
- serializedVersion: 2
- m_BounceScale: 1
- m_IndirectOutputScale: 1
- m_AlbedoBoost: 1
- m_EnvironmentLightingMode: 0
- m_EnableBakedLightmaps: 1
- m_EnableRealtimeLightmaps: 0
- m_LightmapEditorSettings:
- serializedVersion: 12
- m_Resolution: 2
- m_BakeResolution: 40
- m_AtlasSize: 1024
- m_AO: 0
- m_AOMaxDistance: 1
- m_CompAOExponent: 1
- m_CompAOExponentDirect: 0
- m_ExtractAmbientOcclusion: 0
- m_Padding: 2
- m_LightmapParameters: {fileID: 0}
- m_LightmapsBakeMode: 1
- m_TextureCompression: 1
- m_FinalGather: 0
- m_FinalGatherFiltering: 1
- m_FinalGatherRayCount: 256
- m_ReflectionCompression: 2
- m_MixedBakeMode: 2
- m_BakeBackend: 1
- m_PVRSampling: 1
- m_PVRDirectSampleCount: 32
- m_PVRSampleCount: 512
- m_PVRBounces: 2
- m_PVREnvironmentSampleCount: 256
- m_PVREnvironmentReferencePointCount: 2048
- m_PVRFilteringMode: 1
- m_PVRDenoiserTypeDirect: 1
- m_PVRDenoiserTypeIndirect: 1
- m_PVRDenoiserTypeAO: 1
- m_PVRFilterTypeDirect: 0
- m_PVRFilterTypeIndirect: 0
- m_PVRFilterTypeAO: 0
- m_PVREnvironmentMIS: 1
- m_PVRCulling: 1
- m_PVRFilteringGaussRadiusDirect: 1
- m_PVRFilteringGaussRadiusIndirect: 5
- m_PVRFilteringGaussRadiusAO: 2
- m_PVRFilteringAtrousPositionSigmaDirect: 0.5
- m_PVRFilteringAtrousPositionSigmaIndirect: 2
- m_PVRFilteringAtrousPositionSigmaAO: 1
- m_ExportTrainingData: 0
- m_TrainingDataDestination: TrainingData
- m_LightProbeSampleCountMultiplier: 4
- m_LightingDataAsset: {fileID: 0}
- m_LightingSettings: {fileID: 0}
---- !u!196 &4
-NavMeshSettings:
- serializedVersion: 2
- m_ObjectHideFlags: 0
- m_BuildSettings:
- serializedVersion: 2
- agentTypeID: 0
- agentRadius: 0.5
- agentHeight: 2
- agentSlope: 45
- agentClimb: 0.4
- ledgeDropHeight: 0
- maxJumpAcrossDistance: 0
- minRegionArea: 2
- manualCellSize: 0
- cellSize: 0.16666667
- manualTileSize: 0
- tileSize: 256
- accuratePlacement: 0
- maxJobWorkers: 0
- preserveTilesOutsideBounds: 0
- debug:
- m_Flags: 0
- m_NavMeshData: {fileID: 0}
---- !u!43 &349238463
-Mesh:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_Name: LensFlare (Directional Light)
- serializedVersion: 10
- m_SubMeshes:
- - serializedVersion: 2
- firstByte: 0
- indexCount: 6
- topology: 0
- baseVertex: 0
- firstVertex: 0
- vertexCount: 4
- localAABB:
- m_Center: {x: 0, y: 0, z: 0}
- m_Extent: {x: 1, y: 1, z: 0}
- - serializedVersion: 2
- firstByte: 12
- indexCount: 6
- topology: 0
- baseVertex: 0
- firstVertex: 4
- vertexCount: 4
- localAABB:
- m_Center: {x: 0, y: 0, z: 0}
- m_Extent: {x: 1, y: 1, z: 0}
- - serializedVersion: 2
- firstByte: 24
- indexCount: 6
- topology: 0
- baseVertex: 0
- firstVertex: 8
- vertexCount: 4
- localAABB:
- m_Center: {x: 0, y: 0, z: 0}
- m_Extent: {x: 1, y: 1, z: 0}
- m_Shapes:
- vertices: []
- shapes: []
- channels: []
- fullWeights: []
- m_BindPose: []
- m_BoneNameHashes:
- m_RootBoneNameHash: 0
- m_BonesAABB: []
- m_VariableBoneCountWeights:
- m_Data:
- m_MeshCompression: 0
- m_IsReadable: 1
- m_KeepVertices: 1
- m_KeepIndices: 1
- m_IndexFormat: 0
- m_IndexBuffer: 000001000200020003000000040005000600060007000400080009000a000a000b000800
- m_VertexData:
- serializedVersion: 3
- m_VertexCount: 12
- m_Channels:
- - stream: 0
- offset: 0
- format: 0
- dimension: 3
- - stream: 0
- offset: 0
- format: 0
- dimension: 0
- - stream: 0
- offset: 0
- format: 0
- dimension: 0
- - stream: 0
- offset: 12
- format: 0
- dimension: 4
- - stream: 0
- offset: 28
- format: 0
- dimension: 2
- - stream: 0
- offset: 36
- format: 0
- dimension: 4
- - stream: 0
- offset: 52
- format: 0
- dimension: 4
- - stream: 0
- offset: 68
- format: 0
- dimension: 4
- - stream: 0
- offset: 0
- format: 0
- dimension: 0
- - stream: 0
- offset: 0
- format: 0
- dimension: 0
- - stream: 0
- offset: 0
- format: 0
- dimension: 0
- - stream: 0
- offset: 0
- format: 0
- dimension: 0
- - stream: 0
- offset: 0
- format: 0
- dimension: 0
- - stream: 0
- offset: 0
- format: 0
- dimension: 0
- m_DataSize: 1008
- _typelessdata: 000080bf000080bf000000000000803f0000803f0000803f00000000000000000000803f00000000000000000000803f0000803f0000000000004040000000000000803f0000803f0000404000002041000048420000803f000080bf000000000000803f0000803f0000803f000000000000803f0000803f00000000000000000000803f0000803f0000000000004040000000000000803f0000803f0000404000002041000048420000803f0000803f000000000000803f0000803f0000803f000000000000803f0000000000000000000000000000803f0000803f0000000000004040000000000000803f0000803f000040400000204100004842000080bf0000803f000000000000803f0000803f0000803f00000000000000000000000000000000000000000000803f0000803f0000000000004040000000000000803f0000803f000040400000204100004842000080bf000080bf000000000000803f0000803f0000803f00000000000000000000803f000000000000000000000040000000400000000000004040000000000000803f0000803f0000404000002041000048420000803f000080bf000000000000803f0000803f0000803f000000000000803f0000803f000000000000000000000040000000400000000000004040000000000000803f0000803f0000404000002041000048420000803f0000803f000000000000803f0000803f0000803f000000000000803f00000000000000000000000000000040000000400000000000004040000000000000803f0000803f000040400000204100004842000080bf0000803f000000000000803f0000803f0000803f000000000000000000000000000000000000000000000040000000400000000000004040000000000000803f0000803f000040400000204100004842000080bf000080bf000000000000803f0000803f0000803f00000000000000000000803f000000000000000000004040000040400000000000004040000000000000803f0000803f0000404000002041000048420000803f000080bf000000000000803f0000803f0000803f000000000000803f0000803f000000000000000000004040000040400000000000004040000000000000803f0000803f0000404000002041000048420000803f0000803f000000000000803f0000803f0000803f000000000000803f00000000000000000000000000004040000040400000000000004040000000000000803f0000803f000040400000204100004842000080bf0000803f000000000000803f0000803f0000803f000000000000000000000000000000000000000000004040000040400000000000004040000000000000803f0000803f000040400000204100004842
- m_CompressedMesh:
- m_Vertices:
- m_NumItems: 0
- m_Range: 0
- m_Start: 0
- m_Data:
- m_BitSize: 0
- m_UV:
- m_NumItems: 0
- m_Range: 0
- m_Start: 0
- m_Data:
- m_BitSize: 0
- m_Normals:
- m_NumItems: 0
- m_Range: 0
- m_Start: 0
- m_Data:
- m_BitSize: 0
- m_Tangents:
- m_NumItems: 0
- m_Range: 0
- m_Start: 0
- m_Data:
- m_BitSize: 0
- m_Weights:
- m_NumItems: 0
- m_Data:
- m_BitSize: 0
- m_NormalSigns:
- m_NumItems: 0
- m_Data:
- m_BitSize: 0
- m_TangentSigns:
- m_NumItems: 0
- m_Data:
- m_BitSize: 0
- m_FloatColors:
- m_NumItems: 0
- m_Range: 0
- m_Start: 0
- m_Data:
- m_BitSize: 0
- m_BoneIndices:
- m_NumItems: 0
- m_Data:
- m_BitSize: 0
- m_Triangles:
- m_NumItems: 0
- m_Data:
- m_BitSize: 0
- m_UVInfo: 0
- m_LocalAABB:
- m_Center: {x: 0, y: 0, z: 0}
- m_Extent: {x: 1, y: 1, z: 1}
- m_MeshUsageFlags: 0
- m_BakedConvexCollisionMesh:
- m_BakedTriangleCollisionMesh:
- m_MeshMetrics[0]: 1
- m_MeshMetrics[1]: 1
- m_MeshOptimizationFlags: 1
- m_StreamData:
- serializedVersion: 2
- offset: 0
- size: 0
- path:
---- !u!1 &1426046382
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 1426046384}
- - component: {fileID: 1426046383}
- - component: {fileID: 1426046387}
- - component: {fileID: 1426046386}
- - component: {fileID: 1426046385}
- m_Layer: 0
- m_Name: Directional Light
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 0
---- !u!108 &1426046383
-Light:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1426046382}
- m_Enabled: 1
- serializedVersion: 10
- m_Type: 1
- m_Shape: 0
- m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
- m_Intensity: 1
- m_Range: 10
- m_SpotAngle: 30
- m_InnerSpotAngle: 21.80208
- m_CookieSize: 10
- m_Shadows:
- m_Type: 2
- m_Resolution: -1
- m_CustomResolution: -1
- m_Strength: 1
- m_Bias: 0.05
- m_NormalBias: 0.4
- m_NearPlane: 0.2
- m_CullingMatrixOverride:
- e00: 1
- e01: 0
- e02: 0
- e03: 0
- e10: 0
- e11: 1
- e12: 0
- e13: 0
- e20: 0
- e21: 0
- e22: 1
- e23: 0
- e30: 0
- e31: 0
- e32: 0
- e33: 1
- m_UseCullingMatrixOverride: 0
- m_Cookie: {fileID: 0}
- m_DrawHalo: 0
- m_Flare: {fileID: 0}
- m_RenderMode: 0
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_RenderingLayerMask: 1
- m_Lightmapping: 4
- m_LightShadowCasterMode: 0
- m_AreaSize: {x: 1, y: 1}
- m_BounceIntensity: 1
- m_ColorTemperature: 6570
- m_UseColorTemperature: 0
- m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
- m_UseBoundingSphereOverride: 0
- m_ShadowRadius: 0
- m_ShadowAngle: 0
---- !u!4 &1426046384
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1426046382}
- m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
- m_LocalPosition: {x: 0, y: 3, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 0}
- m_RootOrder: 1
- m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
---- !u!114 &1426046385
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1426046382}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 3cf420f1fcf2c7745b6f448d60827c0d, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_MeshRenderer: {fileID: 1426046386}
- m_MeshFilter: {fileID: 1426046387}
- m_Light: {fileID: 1426046383}
- OcclusionRadius: 1
- NearFadeStartDistance: 1
- NearFadeEndDistance: 3
- FarFadeStartDistance: 10
- FarFadeEndDistance: 50
- Flares:
- - RayPosition: 0
- Material: {fileID: 2100000, guid: a2538de606c59c04f9b9a86fe0869e48, type: 2}
- Color: {r: 1, g: 1, b: 1, a: 0}
- MultiplyByLightColor: 0
- Size: {x: 1, y: 1}
- Rotation: 0
- AutoRotate: 0
- - RayPosition: 0
- Material: {fileID: 2100000, guid: a2538de606c59c04f9b9a86fe0869e48, type: 2}
- Color: {r: 1, g: 1, b: 1, a: 0}
- MultiplyByLightColor: 0
- Size: {x: 2, y: 2}
- Rotation: 0
- AutoRotate: 0
- - RayPosition: 0
- Material: {fileID: 2100000, guid: a2538de606c59c04f9b9a86fe0869e48, type: 2}
- Color: {r: 1, g: 1, b: 1, a: 0}
- MultiplyByLightColor: 0
- Size: {x: 3, y: 3}
- Rotation: 0
- AutoRotate: 0
---- !u!23 &1426046386
-MeshRenderer:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1426046382}
- m_Enabled: 1
- m_CastShadows: 1
- m_ReceiveShadows: 1
- m_DynamicOccludee: 1
- m_MotionVectors: 1
- m_LightProbeUsage: 1
- m_ReflectionProbeUsage: 1
- m_RayTracingMode: 2
- m_RayTraceProcedural: 0
- m_RenderingLayerMask: 1
- m_RendererPriority: 0
- m_Materials:
- - {fileID: 2100000, guid: a2538de606c59c04f9b9a86fe0869e48, type: 2}
- - {fileID: 2100000, guid: a2538de606c59c04f9b9a86fe0869e48, type: 2}
- - {fileID: 2100000, guid: a2538de606c59c04f9b9a86fe0869e48, type: 2}
- m_StaticBatchInfo:
- firstSubMesh: 0
- subMeshCount: 0
- m_StaticBatchRoot: {fileID: 0}
- m_ProbeAnchor: {fileID: 0}
- m_LightProbeVolumeOverride: {fileID: 0}
- m_ScaleInLightmap: 1
- m_ReceiveGI: 1
- m_PreserveUVs: 0
- m_IgnoreNormalsForChartDetection: 0
- m_ImportantGI: 0
- m_StitchLightmapSeams: 1
- m_SelectedEditorRenderState: 3
- m_MinimumChartSize: 4
- m_AutoUVMaxDistance: 0.5
- m_AutoUVMaxAngle: 89
- m_LightmapParameters: {fileID: 0}
- m_SortingLayerID: 0
- m_SortingLayer: 0
- m_SortingOrder: 0
- m_AdditionalVertexStreams: {fileID: 0}
---- !u!33 &1426046387
-MeshFilter:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1426046382}
- m_Mesh: {fileID: 349238463}
---- !u!1 &1662339406
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 1662339409}
- - component: {fileID: 1662339408}
- - component: {fileID: 1662339407}
- - component: {fileID: 1662339410}
- m_Layer: 0
- m_Name: Main Camera
- m_TagString: MainCamera
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!81 &1662339407
-AudioListener:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1662339406}
- m_Enabled: 1
---- !u!20 &1662339408
-Camera:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1662339406}
- m_Enabled: 1
- serializedVersion: 2
- m_ClearFlags: 1
- m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
- m_projectionMatrixMode: 1
- m_GateFitMode: 2
- m_FOVAxisMode: 0
- m_SensorSize: {x: 36, y: 24}
- m_LensShift: {x: 0, y: 0}
- m_FocalLength: 50
- m_NormalizedViewPortRect:
- serializedVersion: 2
- x: 0
- y: 0
- width: 1
- height: 1
- near clip plane: 0.3
- far clip plane: 1000
- field of view: 60
- orthographic: 0
- orthographic size: 5
- m_Depth: -1
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_RenderingPath: -1
- m_TargetTexture: {fileID: 0}
- m_TargetDisplay: 0
- m_TargetEye: 3
- m_HDR: 1
- m_AllowMSAA: 1
- m_AllowDynamicResolution: 0
- m_ForceIntoRT: 0
- m_OcclusionCulling: 1
- m_StereoConvergence: 10
- m_StereoSeparation: 0.022
---- !u!4 &1662339409
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1662339406}
- m_LocalRotation: {x: -0.050297532, y: 0.94344944, z: 0.2807056, w: 0.16904962}
- m_LocalPosition: {x: -3.2475343, y: -3.2678928, z: 5.378398}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 0}
- m_RootOrder: 0
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!114 &1662339410
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1662339406}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_RenderShadows: 1
- m_RequiresDepthTextureOption: 2
- m_RequiresOpaqueTextureOption: 2
- m_CameraType: 0
- m_Cameras: []
- m_RendererIndex: -1
- m_VolumeLayerMask:
- serializedVersion: 2
- m_Bits: 1
- m_VolumeTrigger: {fileID: 0}
- m_RenderPostProcessing: 0
- m_Antialiasing: 0
- m_AntialiasingQuality: 2
- m_StopNaN: 0
- m_Dithering: 0
- m_ClearDepth: 1
- m_RequiresDepthTexture: 0
- m_RequiresColorTexture: 0
- m_Version: 2
diff --git a/Assets/LensFlare/New Scene.unity.meta b/Assets/LensFlare/New Scene.unity.meta
deleted file mode 100644
index bd14c01..0000000
--- a/Assets/LensFlare/New Scene.unity.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 10c4f70bad111ce40893bc4810bed116
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant: