CapsuleAO 优化

This commit is contained in:
StarBeats 2025-09-25 19:05:14 +08:00
parent b5c85039fe
commit 9db081c09e
12 changed files with 3703 additions and 510 deletions

View File

@ -1,9 +1,10 @@
using System.Linq;
using Unity.Mathematics; using Unity.Mathematics;
using UnityEditor; using UnityEditor;
using UnityEditor.IMGUI.Controls;
using UnityEditorInternal; using UnityEditorInternal;
using UnityEngine; using UnityEngine;
using UnityEngine.UIElements; using UnityEngine.UIElements;
using static Codice.Client.Commands.WkTree.WorkspaceTreeNode;
namespace X.Rendering.Scene namespace X.Rendering.Scene
{ {
@ -13,19 +14,50 @@ namespace X.Rendering.Scene
ReorderableList lightList; ReorderableList lightList;
Transform transform; Transform transform;
int selectIndex = -1; int selectIndex = -1;
Vector4 mainLightDir = Vector4.zero;
SerializedProperty boundsProperty;
private BoxBoundsHandle boundsHandle = new();
public override VisualElement CreateInspectorGUI() public override VisualElement CreateInspectorGUI()
{ {
transform = (target as MonoBehaviour).transform; transform = (target as MonoBehaviour).transform;
var mainLight = GameObject.FindGameObjectWithTag("MainLight")?.GetComponent<Light>();
if (mainLight == null )
{
mainLight = GameObject.FindObjectsOfType<Light>().Where(l => l.type == LightType.Directional).First();
}
if(mainLight != null )
{
mainLightDir = (mainLight.transform.rotation * Vector3.forward).normalized;
mainLightDir.w = 1;
}
lightList = new ReorderableList(serializedObject, serializedObject.FindProperty("capsuleLights"), true, true, true, true); lightList = new ReorderableList(serializedObject, serializedObject.FindProperty("capsuleLights"), true, true, true, true);
lightList.onSelectCallback += (_) => lightList.onSelectCallback += (_) =>
{ {
Debug.Log($"{lightList.index}"); Debug.Log($"{lightList.index}");
selectIndex = lightList.index; selectIndex = lightList.index;
}; };
lightList.onAddCallback += (_) =>
{
if (lightList.index == -1 && lightList.count == 0)
{
lightList.index = 0;
}
lightList.serializedProperty.InsertArrayElementAtIndex(lightList.index);
lightList.serializedProperty.GetArrayElementAtIndex(lightList.index).vector4Value = mainLightDir;
lightList.Select(lightList.index);
};
lightList.drawHeaderCallback = DrawHeader; lightList.drawHeaderCallback = DrawHeader;
lightList.drawElementCallback = DrawListItems; lightList.drawElementCallback = DrawListItems;
boundsProperty = serializedObject.FindProperty("Bounds");
return base.CreateInspectorGUI(); return base.CreateInspectorGUI();
} }
@ -44,43 +76,63 @@ namespace X.Rendering.Scene
public override void OnInspectorGUI() public override void OnInspectorGUI()
{ {
serializedObject.Update(); serializedObject.Update();
//base.OnInspectorGUI(); base.OnInspectorGUI();
lightList.DoLayoutList(); lightList.DoLayoutList();
serializedObject.ApplyModifiedProperties(); serializedObject.ApplyModifiedProperties();
} }
public void OnSceneGUI() public void OnSceneGUI()
{ {
if(selectIndex == -1 || selectIndex >= lightList.serializedProperty.arraySize) DrawBoundHandle();
if (selectIndex == -1 || lightList == null || selectIndex >= lightList?.serializedProperty.arraySize)
{ {
return; return;
} }
SerializedProperty element = lightList.serializedProperty.GetArrayElementAtIndex(selectIndex); SerializedProperty element = lightList.serializedProperty.GetArrayElementAtIndex(selectIndex);
var rot = new float4(element.vector4Value).xyz; var rot = new float4(element.vector4Value).xyz;
rot += DrawRotationHandle(element.vector4Value); rot += DrawRotationHandle(element.vector4Value);
element.vector4Value = new float4(rot, element.vector4Value.w); element.vector4Value = new float4(rot, element.vector4Value.w);
serializedObject.ApplyModifiedProperties(); serializedObject.ApplyModifiedProperties();
} }
protected float3 DrawRotationHandle(Vector3 rotation) protected float3 DrawRotationHandle(Vector3 vec)
{ {
EditorGUI.BeginChangeCheck(); EditorGUI.BeginChangeCheck();
var newRot = Handles.PositionHandle(rotation, Quaternion.identity); var rotation = Quaternion.LookRotation(vec);
Vector3 newEuler = Vector3.zero;
Vector3 oldEuler = rotation.eulerAngles;
var col = Handles.color;
var pos = transform.position;
if (boundsProperty != null)
{
pos = boundsProperty.boundsValue.center;
}
Handles.color = Handles.xAxisColor;
newEuler.x = Handles.Disc(Quaternion.Euler(oldEuler.x, 0, 0), pos, Vector3.left, HandleUtility.GetHandleSize(pos) * 1.5f, false, 0.1f).eulerAngles.x;
Handles.color = Handles.yAxisColor;
newEuler.y = Handles.Disc(Quaternion.Euler(0, oldEuler.y, 0), pos, Vector3.up, HandleUtility.GetHandleSize(pos) * 1.5f, false, 0.1f).eulerAngles.y;
//var newRot = Handles.RotationHandle(rotation, pos);
EditorGUI.EndChangeCheck(); EditorGUI.EndChangeCheck();
Debug.Log((newRot - transform.position).normalized);
Handles.ConeHandleCap(0, transform.position, Quaternion.EulerRotation(math.degrees((newRot-transform.position).normalized)), HandleUtility.GetHandleSize(transform.position), EventType.Repaint); Handles.ConeHandleCap(0, pos, Quaternion.Euler(newEuler), HandleUtility.GetHandleSize(pos), EventType.Repaint);
Handles.color = col;
float3 delta; float3 delta;
var newVec = (Quaternion.Euler(newEuler) * Vector3.forward).normalized;
if (newRot != rotation) if (newVec != vec)
{ {
Undo.RecordObject(target, "Rotate Handle"); Undo.RecordObject(target, "DrawRotationHandle");
// Perform the handle move and update the serialized data // Perform the handle move and update the serialized data
delta = newRot - rotation; delta = newVec - vec;
} }
else else
{ {
@ -90,21 +142,30 @@ namespace X.Rendering.Scene
return delta; return delta;
} }
private Vector3 CalculateTargetPosition() protected void DrawBoundHandle()
{ {
Vector3 handlePosition; if (boundsProperty == null)
//if (transform.parent != null)
//{
// handlePosition = transform.parent.TransformPoint(tweenPosition.TargetPosition);
//}
//else
{ {
handlePosition = transform.position; return;
} }
EditorGUI.BeginChangeCheck();
return handlePosition; var bounds = boundsProperty.boundsValue;
var col = Handles.color;
Handles.color = Color.green;
var newPos = Handles.PositionHandle(bounds.center, transform.rotation);
boundsHandle.center = bounds.center;
boundsHandle.size = bounds.size;
boundsHandle.DrawHandle();
if (EditorGUI.EndChangeCheck())
{
Undo.RecordObject(target, "DrawBoundHandle");
bounds.center = newPos;
bounds.size = boundsHandle.size;
boundsProperty.boundsValue = bounds;
}
boundsProperty.serializedObject.ApplyModifiedProperties();
Handles.color = col;
} }
} }
@ -114,4 +175,19 @@ namespace X.Rendering.Scene
{ {
} }
//[CustomPropertyDrawer(typeof(CapsuleShadowAreaSetting))]
//public class CapsuleShadowAreaSettingDrawer : PropertyDrawer
//{
// public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
// {
// EditorGUI.BeginProperty(position, label, property);
// EditorGUI.PropertyField(new Rect(position.x, position.y, 30, position.height), property.FindPropertyRelative("AmbientIntensity"), GUIContent.none);
// EditorGUI.PropertyField(new Rect(position.x + 35, position.y, 50, position.height), property.FindPropertyRelative("ShadowIntensity"), GUIContent.none);
// EditorGUI.PropertyField(new Rect(position.x + 90, position.y, position.width - 90, position.height), property.FindPropertyRelative("ShadowSharpness"), GUIContent.none);
// EditorGUI.EndProperty();
// }
//}
} }

View File

@ -3320,26 +3320,22 @@ MonoBehaviour:
Enable: 1 Enable: 1
ShadowRemapTex: {fileID: 0} ShadowRemapTex: {fileID: 0}
InjectionPoint: 0 InjectionPoint: 0
capsuleAOSettings: capsuleShadowSettings:
Enable: 1 Enable: 1
RenderPassEvent: 450 RenderPassEvent: 450
EnableShadowOffset: 0 EnableShadowOffset: 0
CascadeShadowOffset: {x: 0, y: 0, z: 0} CascadeShadowOffset: {x: 0, y: 0, z: 0}
updateInterval: 1 updateInterval: 1
a: {fileID: 1187884597} capsuleLights: []
b: {fileID: 2083859764}
capsuleLights:
- {x: -10.751781, y: -3.5166135, z: -132.89235, w: 1}
capsuleAOSetting: capsuleAOSetting:
AmbientIntensity: 0.2 AmbientIntensity: 4.6
ConeAngle: 1 ConeAngle: 1
ShadowIntensity: 0.4 ShadowIntensity: 0.4
ShadowSharpness: 20 ShadowSharpness: 20
lightStartID: 0 lightStartID: 0
lightEndID: 1 lightEndID: 0
CapsuleLightsDir: CapsuleLightsDir:
- {x: -10.751781, y: -3.5166135, z: -132.89235, w: 1} - {x: 0.16624199, y: 0.77138144, z: 0.61427546, w: 1}
- {x: 74.61474, y: 170.82616, z: 192.67233, w: 1}
- {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0}
@ -3370,19 +3366,20 @@ MonoBehaviour:
- {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0}
CapsuleLightsDirCount: 2 - {x: 0, y: 0, z: 0, w: 0}
CapsuleLightsDirCount: 1
capsuleAOAreaSettings: capsuleAOAreaSettings:
- AmbientIntensity: 0.2 - AmbientIntensity: 4.6
ConeAngle: 1 ConeAngle: 1
ShadowIntensity: 0.4 ShadowIntensity: 0.4
ShadowSharpness: 20 ShadowSharpness: 20
lightStartID: 0 lightStartID: 0
lightEndID: 1 lightEndID: 0
- AmbientIntensity: 0.2 - AmbientIntensity: 0.2
ConeAngle: 1 ConeAngle: 1
ShadowIntensity: 0.4 ShadowIntensity: 0.49
ShadowSharpness: 20 ShadowSharpness: 14.68
lightStartID: 1 lightStartID: 0
lightEndID: 1 lightEndID: 1
sceneAreaEffects: sceneAreaEffects:
- {fileID: 1215335452} - {fileID: 1215335452}
@ -5008,6 +5005,10 @@ PrefabInstance:
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 974238578668270704, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
propertyPath: m_Name
value: PlayerArmature_AO
objectReference: {fileID: 0}
- target: {fileID: 2119775930974504096, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3} - target: {fileID: 2119775930974504096, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -2.1526937 value: -2.1526937
@ -6584,7 +6585,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8428b639172492046a0d002d77fe376e, type: 3} m_Script: {fileID: 11500000, guid: 8428b639172492046a0d002d77fe376e, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
capsuleAOSettingMask: 1 capsuleAOSettingMask: 3
boneSettings: boneSettings:
- BoneName: forearm01 - BoneName: forearm01
Radius: 0.05 Radius: 0.05
@ -20543,13 +20544,13 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1215335447} m_GameObject: {fileID: 1215335447}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: 0.7395301, w: 0.6731235} m_LocalRotation: {x: -0, y: -0, z: 0.72604585, w: 0.6876464}
m_LocalPosition: {x: -10.14, y: -3.969, z: -132.664} m_LocalPosition: {x: -10.207, y: -3.969, z: -133.298}
m_LocalScale: {x: 0.36361, y: 2.6302094, z: 5.8246684} m_LocalScale: {x: 0.36361, y: 15.501928, z: 5.8246684}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 95.383} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 93.112}
--- !u!114 &1215335452 --- !u!114 &1215335452
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -20565,15 +20566,15 @@ MonoBehaviour:
capsuleAOSetting: capsuleAOSetting:
AmbientIntensity: 0.2 AmbientIntensity: 0.2
ConeAngle: 1 ConeAngle: 1
ShadowIntensity: 0.4 ShadowIntensity: 0.49
ShadowSharpness: 20 ShadowSharpness: 14.68
lightStartID: 1 lightStartID: 0
lightEndID: 1 lightEndID: 1
capsuleLights: capsuleLights:
- {x: 74.61474, y: 170.82616, z: 192.67233, w: 1} - {x: -0.16624199, y: -0.77138144, z: -0.61427546, w: 1}
Bounds: Bounds:
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: -9.399351, y: -3.5824785, z: -133.80673}
m_Extent: {x: 1, y: 1, z: 1} m_Extent: {x: 7.7215276, y: 0.5, z: 1.6906738}
--- !u!1001 &1217280026 --- !u!1001 &1217280026
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -1062,6 +1062,104 @@ MonoBehaviour:
ControllPanel: {fileID: 437836040} ControllPanel: {fileID: 437836040}
screen: {fileID: 1243478511} screen: {fileID: 1243478511}
ReferencePoint: {fileID: 1988248024} ReferencePoint: {fileID: 1988248024}
--- !u!1001 &91127586
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 383153253}
m_Modifications:
- target: {fileID: 5024475823587296273, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_Name
value: PlayerArmature_AO
objectReference: {fileID: 0}
- target: {fileID: 5024475823587296285, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_Actions
value:
objectReference: {fileID: -944628639613478452, guid: 4419d82f33d36e848b3ed5af4c8da37e, type: 3}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalPosition.x
value: 2.050251
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalPosition.y
value: -1.0913984
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalPosition.z
value: 0.1654563
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8724837009948104813, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: CameraManager
value:
objectReference: {fileID: 6556307556733515107}
m_RemovedComponents:
- {fileID: 8724837009948104813, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 5024475823587296273, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
insertIndex: 3
addedObject: {fileID: 109939548}
m_SourcePrefab: {fileID: 100100000, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
--- !u!1 &109939540 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 5024475823587296273, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
m_PrefabInstance: {fileID: 91127586}
m_PrefabAsset: {fileID: 0}
--- !u!4 &109939541 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
m_PrefabInstance: {fileID: 91127586}
m_PrefabAsset: {fileID: 0}
--- !u!114 &109939548
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 109939540}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8dd3bb5b4676f694fb04529a5609cf30, type: 3}
m_Name:
m_EditorClassIdentifier:
move: {x: 0, y: 0}
look: {x: 0, y: 0}
jump: 0
sprint: 0
analogMovement: 0
cursorLocked: 1
cursorInputForLook: 1
--- !u!1001 &110081148 --- !u!1001 &110081148
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1913,6 +2011,11 @@ CapsuleCollider:
m_Height: 0.6 m_Height: 0.6
m_Direction: 0 m_Direction: 0
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!4 &172178774 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -931296759743925520, guid: ff6fc39872c79c549b982caef1fc013a, type: 3}
m_PrefabInstance: {fileID: 1712672753}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &185609164 --- !u!1001 &185609164
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2327,6 +2430,11 @@ CapsuleCollider:
m_Height: 0.6 m_Height: 0.6
m_Direction: 0 m_Direction: 0
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!4 &195094439 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -6319293970482537725, guid: ff6fc39872c79c549b982caef1fc013a, type: 3}
m_PrefabInstance: {fileID: 1712672753}
m_PrefabAsset: {fileID: 0}
--- !u!4 &195711565 stripped --- !u!4 &195711565 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 3345604766945953572, guid: 1ae38a12a032db54a818dda18022abd8, type: 3} m_CorrespondingSourceObject: {fileID: 3345604766945953572, guid: 1ae38a12a032db54a818dda18022abd8, type: 3}
@ -4116,6 +4224,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3} m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!4 &383153253 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2119775930974504096, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
m_PrefabInstance: {fileID: 1449963300}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &389167885 --- !u!1001 &389167885
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -4399,7 +4512,7 @@ Light:
m_InnerSpotAngle: 21.80208 m_InnerSpotAngle: 21.80208
m_CookieSize: 10 m_CookieSize: 10
m_Shadows: m_Shadows:
m_Type: 0 m_Type: 2
m_Resolution: -1 m_Resolution: -1
m_CustomResolution: -1 m_CustomResolution: -1
m_Strength: 1 m_Strength: 1
@ -4876,6 +4989,11 @@ CapsuleCollider:
m_Height: 0.2 m_Height: 0.2
m_Direction: 0 m_Direction: 0
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!4 &437220749 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -1871418443397691018, guid: ff6fc39872c79c549b982caef1fc013a, type: 3}
m_PrefabInstance: {fileID: 1712672753}
m_PrefabAsset: {fileID: 0}
--- !u!1 &437836040 stripped --- !u!1 &437836040 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: 1328794821902915481, guid: 7313909bb567bec4684fdffe69460335, type: 3} m_CorrespondingSourceObject: {fileID: 1328794821902915481, guid: 7313909bb567bec4684fdffe69460335, type: 3}
@ -10460,6 +10578,11 @@ CapsuleCollider:
m_Height: 0.2 m_Height: 0.2
m_Direction: 0 m_Direction: 0
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!4 &957418062 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -4437396331760193463, guid: ff6fc39872c79c549b982caef1fc013a, type: 3}
m_PrefabInstance: {fileID: 1712672753}
m_PrefabAsset: {fileID: 0}
--- !u!1 &972107860 --- !u!1 &972107860
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -11950,10 +12073,15 @@ CapsuleCollider:
m_ProvidesContacts: 0 m_ProvidesContacts: 0
m_Enabled: 0 m_Enabled: 0
serializedVersion: 2 serializedVersion: 2
m_Radius: 0.2 m_Radius: 0.15
m_Height: 0.7 m_Height: 0.7
m_Direction: 0 m_Direction: 0
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!4 &1105308493 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2931888804514939464, guid: ff6fc39872c79c549b982caef1fc013a, type: 3}
m_PrefabInstance: {fileID: 1712672753}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1118218363 --- !u!1 &1118218363
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -13719,30 +13847,11 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 34748359} m_Father: {fileID: 34748359}
m_LocalEulerAnglesHint: {x: 17.323, y: -90.323, z: 0} m_LocalEulerAnglesHint: {x: 17.323, y: -90.323, z: 0}
--- !u!1 &1285058669 stripped --- !u!4 &1278943822 stripped
GameObject: Transform:
m_CorrespondingSourceObject: {fileID: 974238578668270704, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3} m_CorrespondingSourceObject: {fileID: 814198332548218189, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
m_PrefabInstance: {fileID: 1449963300} m_PrefabInstance: {fileID: 91127586}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &1285058677
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1285058669}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8dd3bb5b4676f694fb04529a5609cf30, type: 3}
m_Name:
m_EditorClassIdentifier:
move: {x: 0, y: 0}
look: {x: 0, y: 0}
jump: 0
sprint: 0
analogMovement: 0
cursorLocked: 1
cursorInputForLook: 1
--- !u!1001 &1296334284 --- !u!1001 &1296334284
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -14204,28 +14313,60 @@ MonoBehaviour:
Enable: 0 Enable: 0
ShadowRemapTex: {fileID: 11400000, guid: 14fe883388dd915438a4832c5ce4bbf3, type: 2} ShadowRemapTex: {fileID: 11400000, guid: 14fe883388dd915438a4832c5ce4bbf3, type: 2}
InjectionPoint: 0 InjectionPoint: 0
capsuleAOSettings: capsuleShadowSettings:
Enable: 1 Enable: 1
RenderPassEvent: 450 RenderPassEvent: 450
EnableShadowOffset: 0 EnableShadowOffset: 0
CascadeShadowOffset: {x: 0, y: 0, z: 1} CascadeShadowOffset: {x: 0, y: 0, z: 1}
updateInterval: 1 updateInterval: 1
capsuleLights: capsuleLights:
- {fileID: 397543235} - {x: 0.009531173, y: -0.76794606, z: -0.6404436, w: 1}
capsuleAOSetting: capsuleAOSetting:
AmbientIntensity: 1.19 AmbientIntensity: 3.5
ConeAngle: 9.99 ConeAngle: 9.06
ShadowIntensity: 1.28 ShadowIntensity: 0.28
ShadowSharpness: 9.6 ShadowSharpness: 10.59
lightStartID: 0 lightStartID: 0
lightEndID: 1 lightEndID: 1
CapsuleLightsDir: CapsuleLightsDir:
- {x: 85.86, y: 206.69797, z: 183.08, w: 5} - {x: -0.009531173, y: 0.76794606, z: 0.6404436, w: 1}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
CapsuleLightsDirCount: 1
capsuleAOAreaSettings: capsuleAOAreaSettings:
- AmbientIntensity: 1.19 - AmbientIntensity: 3.5
ConeAngle: 9.99 ConeAngle: 9.06
ShadowIntensity: 1.28 ShadowIntensity: 0.28
ShadowSharpness: 9.6 ShadowSharpness: 10.59
lightStartID: 0 lightStartID: 0
lightEndID: 1 lightEndID: 1
sceneAreaEffects: [] sceneAreaEffects: []
@ -14693,9 +14834,14 @@ CapsuleCollider:
m_Enabled: 0 m_Enabled: 0
serializedVersion: 2 serializedVersion: 2
m_Radius: 0.05 m_Radius: 0.05
m_Height: 0.3 m_Height: 0.2
m_Direction: 0 m_Direction: 0
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!4 &1356087220 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5090265262535612764, guid: ff6fc39872c79c549b982caef1fc013a, type: 3}
m_PrefabInstance: {fileID: 1712672753}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1357497468 --- !u!1 &1357497468
GameObject: GameObject:
m_ObjectHideFlags: 3 m_ObjectHideFlags: 3
@ -15639,10 +15785,38 @@ PrefabInstance:
propertyPath: m_IsActive propertyPath: m_IsActive
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3203261902030644824, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
propertyPath: m_LocalPosition.x
value: 2.250251
objectReference: {fileID: 0}
- target: {fileID: 3203261902030644824, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
propertyPath: m_LocalPosition.y
value: 0.28360176
objectReference: {fileID: 0}
- target: {fileID: 3203261902030644824, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
propertyPath: m_LocalPosition.z
value: -3.8345437
objectReference: {fileID: 0}
- target: {fileID: 3203261902030644825, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
propertyPath: m_Follow
value:
objectReference: {fileID: 1278943822}
- target: {fileID: 5542111180780342640, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3} - target: {fileID: 5542111180780342640, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
propertyPath: orthographic size propertyPath: orthographic size
value: 10 value: 10
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5542111180780342647, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
propertyPath: m_LocalPosition.x
value: 2.250251
objectReference: {fileID: 0}
- target: {fileID: 5542111180780342647, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
propertyPath: m_LocalPosition.y
value: 0.28360176
objectReference: {fileID: 0}
- target: {fileID: 5542111180780342647, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
propertyPath: m_LocalPosition.z
value: -3.8345437
objectReference: {fileID: 0}
- target: {fileID: 7888303496483045073, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3} - target: {fileID: 7888303496483045073, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 0 value: 0
@ -15661,12 +15835,13 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: m_RemovedComponents:
- {fileID: 3543048675319490572, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3} - {fileID: 3543048675319490572, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
m_RemovedGameObjects: [] m_RemovedGameObjects:
m_AddedGameObjects: [] - {fileID: 974238578668270704, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
m_AddedComponents: m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: 974238578668270704, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3} - targetCorrespondingSourceObject: {fileID: 2119775930974504096, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
insertIndex: 5 insertIndex: 2
addedObject: {fileID: 1285058677} addedObject: {fileID: 109939541}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3} m_SourcePrefab: {fileID: 100100000, guid: c708a3b79cd542b42bbfedb17e213bc1, type: 3}
--- !u!1 &1474557447 --- !u!1 &1474557447
GameObject: GameObject:
@ -15885,10 +16060,15 @@ CapsuleCollider:
m_ProvidesContacts: 0 m_ProvidesContacts: 0
m_Enabled: 0 m_Enabled: 0
serializedVersion: 2 serializedVersion: 2
m_Radius: 0.04 m_Radius: 0.1
m_Height: 0.42 m_Height: 0.4
m_Direction: 0 m_Direction: 0
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!4 &1498080733 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8161793777569488751, guid: ff6fc39872c79c549b982caef1fc013a, type: 3}
m_PrefabInstance: {fileID: 1712672753}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1509981466 --- !u!1001 &1509981466
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -18506,7 +18686,7 @@ PrefabInstance:
addedObject: {fileID: 2018993466} addedObject: {fileID: 2018993466}
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: ff6fc39872c79c549b982caef1fc013a, type: 3} - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: ff6fc39872c79c549b982caef1fc013a, type: 3}
insertIndex: -1 insertIndex: -1
addedObject: {fileID: 2018993468} addedObject: {fileID: 2018993467}
- targetCorrespondingSourceObject: {fileID: -1657220678678262603, guid: ff6fc39872c79c549b982caef1fc013a, type: 3} - targetCorrespondingSourceObject: {fileID: -1657220678678262603, guid: ff6fc39872c79c549b982caef1fc013a, type: 3}
insertIndex: -1 insertIndex: -1
addedObject: {fileID: 195094438} addedObject: {fileID: 195094438}
@ -21092,10 +21272,15 @@ CapsuleCollider:
m_ProvidesContacts: 0 m_ProvidesContacts: 0
m_Enabled: 0 m_Enabled: 0
serializedVersion: 2 serializedVersion: 2
m_Radius: 0.04 m_Radius: 0.1
m_Height: 0.6 m_Height: 0.4
m_Direction: 0 m_Direction: 0
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!4 &1883685997 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2249941465509908857, guid: ff6fc39872c79c549b982caef1fc013a, type: 3}
m_PrefabInstance: {fileID: 1712672753}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1884233521 --- !u!1001 &1884233521
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -22134,9 +22319,14 @@ CapsuleCollider:
m_Enabled: 0 m_Enabled: 0
serializedVersion: 2 serializedVersion: 2
m_Radius: 0.05 m_Radius: 0.05
m_Height: 0.3 m_Height: 0.2
m_Direction: 0 m_Direction: 0
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!4 &1998585706 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -2884571502003373286, guid: ff6fc39872c79c549b982caef1fc013a, type: 3}
m_PrefabInstance: {fileID: 1712672753}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1998898371 --- !u!1001 &1998898371
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -22336,7 +22526,7 @@ Animation:
m_PlayAutomatically: 1 m_PlayAutomatically: 1
m_AnimatePhysics: 0 m_AnimatePhysics: 0
m_CullingType: 0 m_CullingType: 0
--- !u!114 &2018993468 --- !u!114 &2018993467
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
@ -22359,7 +22549,7 @@ MonoBehaviour:
Height: 0.2 Height: 0.2
Direction: 0 Direction: 0
- BoneName: spine1 - BoneName: spine1
Radius: 0.2 Radius: 0.15
Height: 0.7 Height: 0.7
Direction: 0 Direction: 0
- BoneName: calf01 - BoneName: calf01
@ -22367,10 +22557,19 @@ MonoBehaviour:
Height: 0.6 Height: 0.6
Direction: 0 Direction: 0
- BoneName: thigh01 - BoneName: thigh01
Radius: 0.04 Radius: 0.1
Height: 0.4 Height: 0.4
Direction: 0 Direction: 0
capsuleTransforms: [] capsuleTransforms:
- {fileID: 195094439}
- {fileID: 957418062}
- {fileID: 1498080733}
- {fileID: 437220749}
- {fileID: 172178774}
- {fileID: 1998585706}
- {fileID: 1883685997}
- {fileID: 1356087220}
- {fileID: 1105308493}
--- !u!1 &2023108638 --- !u!1 &2023108638
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -10,8 +10,8 @@ namespace X.Rendering.Scene
internal CapsuleShadowAreaSetting capsuleAOSetting = CapsuleShadowAreaSetting.GetDefault(); internal CapsuleShadowAreaSetting capsuleAOSetting = CapsuleShadowAreaSetting.GetDefault();
[SerializeField, HideInInspector] [SerializeField, HideInInspector]
internal Vector4[] capsuleLights; internal Vector4[] capsuleLights;
[SerializeField] [SerializeField, HideInInspector]
internal Bounds Bounds; internal Bounds Bounds = new Bounds(Vector3.zero, Vector3.one);
#if UNITY_EDITOR #if UNITY_EDITOR
private void Awake() private void Awake()
@ -21,6 +21,11 @@ namespace X.Rendering.Scene
return; return;
} }
if(Bounds == new Bounds(Vector3.zero, Vector3.one))
{
Bounds.center = transform.position + new Vector3(0, 2, 0);
}
SceneEffect.Instance.AddSceneAreaEffect(this); SceneEffect.Instance.AddSceneAreaEffect(this);
} }

View File

@ -205,7 +205,6 @@ namespace X.Rendering.Assets
} }
} }
#if UNITY_EDITOR #if UNITY_EDITOR
[CustomEditor(typeof(GradientTexture), true), CanEditMultipleObjects] [CustomEditor(typeof(GradientTexture), true), CanEditMultipleObjects]
public class GradientTextureEditor : UnityEditor.Editor public class GradientTextureEditor : UnityEditor.Editor

View File

@ -18,7 +18,7 @@ namespace X.Rendering.Scene
ShadowEdgeRemapSetupPass shadowRemapPass; ShadowEdgeRemapSetupPass shadowRemapPass;
[SerializeField] [SerializeField]
private CapsuleShadowPass.CapsuleShadowSettings capsuleAOSettings = new(); private CapsuleShadowPass.CapsuleShadowSettings capsuleShadowSettings = new();
CapsuleShadowPass capsuleAOPass; CapsuleShadowPass capsuleAOPass;
[SerializeField] [SerializeField]
@ -77,7 +77,7 @@ namespace X.Rendering.Scene
if (enable) if (enable)
{ {
shadowRemapPass ??= new(shadowRemapSettings, this); shadowRemapPass ??= new(shadowRemapSettings, this);
capsuleAOPass ??= new(capsuleAOSettings, this); capsuleAOPass ??= new(capsuleShadowSettings, this);
RenderPipelineManager.beginCameraRendering += OnBeginCamera; RenderPipelineManager.beginCameraRendering += OnBeginCamera;
UpdateRenderAssetsSettings(); UpdateRenderAssetsSettings();
#if UNITY_EDITOR #if UNITY_EDITOR
@ -94,7 +94,11 @@ namespace X.Rendering.Scene
#if UNITY_EDITOR #if UNITY_EDITOR
internal void AddSceneAreaEffect(CapsuleShadowAreaEffect sceneAreaEffect) internal void AddSceneAreaEffect(CapsuleShadowAreaEffect sceneAreaEffect)
{ {
sceneAreaEffects.Add(sceneAreaEffect); if(!sceneAreaEffects.Contains(sceneAreaEffect))
{
sceneAreaEffects.Add(sceneAreaEffect);
}
UpdateCapsuleLights(); UpdateCapsuleLights();
} }
@ -123,15 +127,14 @@ namespace X.Rendering.Scene
for (int i = 0; i < capsuleLights?.Length; i++) for (int i = 0; i < capsuleLights?.Length; i++)
{ {
var light = capsuleLights[i]; var light = capsuleLights[i];
var v = -Vector3.Normalize(light);
lightDirs.Add(new Vector4() lightDirs.Add(new Vector4()
{ {
x = light.x, x = v.x,
y = light.y, y = v.y,
z = light.z, z = v.z,
w = 1 w = light.w
}); });
} }
capsuleAOSetting.lightStartID = 0; capsuleAOSetting.lightStartID = 0;
capsuleAOSetting.lightEndID = lightDirs.Count; capsuleAOSetting.lightEndID = lightDirs.Count;
@ -145,18 +148,17 @@ namespace X.Rendering.Scene
for (int j = 0; j < sceneAreaEffect.capsuleLights.Length; j++) for (int j = 0; j < sceneAreaEffect.capsuleLights.Length; j++)
{ {
var light = sceneAreaEffect.capsuleLights[j]; var light = sceneAreaEffect.capsuleLights[j];
var v = -Vector3.Normalize(light);
lightDirs.Add(new Vector4() lightDirs.Add(new Vector4()
{ {
x = light.x, x = v.x,
y = light.y, y = v.y,
z = light.z, z = v.z,
w = 1 w = light.w
}); });
} }
aoSetting.lightEndID = lightDirs.Count - 1; aoSetting.lightEndID = lightDirs.Count;
capsuleAOAreaSettings.Add(aoSetting); capsuleAOAreaSettings.Add(aoSetting);
} }
@ -218,7 +220,7 @@ namespace X.Rendering.Scene
rdr.EnqueuePass(shadowRemapPass); rdr.EnqueuePass(shadowRemapPass);
} }
if (capsuleAOSettings.Enable) if (capsuleShadowSettings.Enable)
{ {
rdr.EnqueuePass(capsuleAOPass); rdr.EnqueuePass(capsuleAOPass);
} }
@ -230,20 +232,10 @@ namespace X.Rendering.Scene
{ {
UpdateCapsuleShadow(); UpdateCapsuleShadow();
} }
if(a && b)
{
//CapsuleLightsDir[0] = new float4(/*(a.position - b.position).normalized*/a.rotation.eulerAngles, 1);
//Debug.Log(a.rotation.eulerAngles);
}
} }
#region CapsuleAO #region CapsuleAO
[SerializeField] [SerializeField , HideInInspector]
public Transform a;
[SerializeField]
public Transform b;
[SerializeField ]//, HideInInspector]
private Vector4[] capsuleLights; private Vector4[] capsuleLights;
[SerializeField] [SerializeField]
private CapsuleShadowAreaSetting capsuleAOSetting = CapsuleShadowAreaSetting.GetDefault(); private CapsuleShadowAreaSetting capsuleAOSetting = CapsuleShadowAreaSetting.GetDefault();
@ -328,7 +320,7 @@ namespace X.Rendering.Scene
{ {
if (!CapsuleArray.IsCreated || CapsuleArray.Length == 0) if (!CapsuleArray.IsCreated || CapsuleArray.Length == 0)
{ {
capsuleAOSettings.Enable = false; capsuleShadowSettings.Enable = false;
return; return;
} }
SceneEffectCharacter sceneEffectCharacter = null; SceneEffectCharacter sceneEffectCharacter = null;
@ -342,7 +334,7 @@ namespace X.Rendering.Scene
var sceneAreaEffect = sceneAreaEffects[i]; var sceneAreaEffect = sceneAreaEffects[i];
if (sceneAreaEffect.Bounds.Contains(sceneEffectCharacter.transform.position)) if (sceneAreaEffect.Bounds.Contains(sceneEffectCharacter.transform.position))
{ {
sceneEffectCharacter.capsuleAOSettingMask |= (uint)1 << i; sceneEffectCharacter.capsuleAOSettingMask |= (uint)1 << (i + 1);
} }
} }

View File

@ -23,9 +23,11 @@ Transform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8047161636021232021} m_GameObject: {fileID: 8047161636021232021}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.92999995, z: 0} m_LocalPosition: {x: 0, y: 0.92999995, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 5542111180780342647} - {fileID: 5542111180780342647}
- {fileID: 3203261902030644824} - {fileID: 3203261902030644824}
@ -33,178 +35,405 @@ Transform:
- {fileID: 4072154296131656415} - {fileID: 4072154296131656415}
- {fileID: 6858111992258843779} - {fileID: 6858111992258843779}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &3515378425540693942 --- !u!1001 &3515378425540693942
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Modification: m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2119775930974504096} m_TransformParent: {fileID: 2119775930974504096}
m_Modifications: m_Modifications:
- target: {fileID: 1992104595683069851, guid: f0271df749728104eac22c3d897fd8ce, - target: {fileID: 1992104595683069851, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
propertyPath: m_Name propertyPath: m_Name
value: UI_EventSystem value: UI_EventSystem
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, - target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 4 value: 4
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, - target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
propertyPath: m_LocalScale.x propertyPath: m_LocalScale.x
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, - target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
propertyPath: m_LocalScale.y propertyPath: m_LocalScale.y
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, - target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
propertyPath: m_LocalScale.z propertyPath: m_LocalScale.z
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, - target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, - target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: -0.92999995 value: -0.92999995
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, - target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, - target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, - target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, - target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, - target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, - target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, - target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.y propertyPath: m_LocalEulerAnglesHint.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, - target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f0271df749728104eac22c3d897fd8ce, type: 3} m_SourcePrefab: {fileID: 100100000, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
--- !u!4 &6858111992258843779 stripped --- !u!4 &6858111992258843779 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, m_CorrespondingSourceObject: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
type: 3}
m_PrefabInstance: {fileID: 3515378425540693942} m_PrefabInstance: {fileID: 3515378425540693942}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1001 &3515378426657685153 --- !u!1001 &3515378427008540405
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Modification: m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2119775930974504096} m_TransformParent: {fileID: 2119775930974504096}
m_Modifications: m_Modifications:
- target: {fileID: 3893294197879345259, guid: 64dce48905ffd9b4293e595fa6941544, - target: {fileID: 1663187150, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
type: 3} propertyPath: thirdPersonInputs
propertyPath: m_RootOrder value:
value: 2 objectReference: {fileID: 3543048675319490572}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3893294197879345259, guid: 64dce48905ffd9b4293e595fa6941544, - target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
type: 3} propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3893294197879345259, guid: 64dce48905ffd9b4293e595fa6941544, - target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: -0.92999995 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3893294197879345259, guid: 64dce48905ffd9b4293e595fa6941544, - target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3893294197879345259, guid: 64dce48905ffd9b4293e595fa6941544, - target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3893294197879345259, guid: 64dce48905ffd9b4293e595fa6941544, - target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: -0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3893294197879345259, guid: 64dce48905ffd9b4293e595fa6941544, - target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: -0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3893294197879345259, guid: 64dce48905ffd9b4293e595fa6941544, - target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: -0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3893294197879345259, guid: 64dce48905ffd9b4293e595fa6941544, - target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
type: 3} propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3893294197879345259, guid: 64dce48905ffd9b4293e595fa6941544, - target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.y propertyPath: m_LocalEulerAnglesHint.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3893294197879345259, guid: 64dce48905ffd9b4293e595fa6941544, - target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4416926081852918481, guid: 64dce48905ffd9b4293e595fa6941544, - target: {fileID: 6751388636123340836, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
type: 3} propertyPath: m_Name
value: UI_Canvas_StarterAssetsInputs_Joysticks
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
--- !u!224 &4072154296131656415 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
m_PrefabInstance: {fileID: 3515378427008540405}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3515378427225392744
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2119775930974504096}
m_Modifications:
- target: {fileID: 8944336655422409496, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
propertyPath: far clip plane
value: 500
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409496, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
propertyPath: orthographic size
value: 10
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409498, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
propertyPath: m_Name
value: MainCamera
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
propertyPath: m_LocalPosition.x
value: 0.20000005
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
propertyPath: m_LocalPosition.y
value: 0.44500005
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
propertyPath: m_LocalPosition.z
value: -4
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
--- !u!4 &5542111180780342647 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
m_PrefabInstance: {fileID: 3515378427225392744}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3515378427639998752
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2119775930974504096}
m_Modifications:
- target: {fileID: 2070925441746177671, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
propertyPath: m_Name
value: PlayerFollowCamera
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
propertyPath: m_LocalPosition.x
value: 0.20000005
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
propertyPath: m_LocalPosition.y
value: 0.44500005
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
propertyPath: m_LocalPosition.z
value: -4
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177913, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
propertyPath: m_Follow
value:
objectReference: {fileID: 4860276692040879404}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
--- !u!4 &3203261902030644824 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
m_PrefabInstance: {fileID: 3515378427639998752}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &5206080867838292065
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2119775930974504096}
m_Modifications:
- target: {fileID: 5024475823587296273, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_Name propertyPath: m_Name
value: PlayerArmature value: PlayerArmature
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalPosition.y
value: -0.92999995
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 64dce48905ffd9b4293e595fa6941544, type: 3} m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
--- !u!4 &490576248761790154 stripped --- !u!4 &490576248761790154 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 3893294197879345259, guid: 64dce48905ffd9b4293e595fa6941544, m_CorrespondingSourceObject: {fileID: 5688422949108178603, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
type: 3} m_PrefabInstance: {fileID: 5206080867838292065}
m_PrefabInstance: {fileID: 3515378426657685153}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &3543048675319490572 stripped --- !u!114 &3543048675319490572 stripped
MonoBehaviour: MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 135756642000475821, guid: 64dce48905ffd9b4293e595fa6941544, m_CorrespondingSourceObject: {fileID: 8724837009948104813, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
type: 3} m_PrefabInstance: {fileID: 5206080867838292065}
m_PrefabInstance: {fileID: 3515378426657685153}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0} m_GameObject: {fileID: 0}
m_Enabled: 1 m_Enabled: 1
@ -214,296 +443,6 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!4 &4860276692040879404 stripped --- !u!4 &4860276692040879404 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 8338988566280778637, guid: 64dce48905ffd9b4293e595fa6941544, m_CorrespondingSourceObject: {fileID: 814198332548218189, guid: 775ed8cbe21d25a4aa76b335f958d711, type: 3}
type: 3} m_PrefabInstance: {fileID: 5206080867838292065}
m_PrefabInstance: {fileID: 3515378426657685153}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3515378427008540405
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2119775930974504096}
m_Modifications:
- target: {fileID: 1663187150, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
propertyPath: thirdPersonInputs
value:
objectReference: {fileID: 3543048675319490572}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6751388636123340836, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
propertyPath: m_Name
value: UI_Canvas_StarterAssetsInputs_Joysticks
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2f7f3dde7ae722a4aafffe20691ad702, type: 3}
--- !u!224 &4072154296131656415 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 597308369130767402, guid: 2f7f3dde7ae722a4aafffe20691ad702,
type: 3}
m_PrefabInstance: {fileID: 3515378427008540405}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3515378427225392744
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2119775930974504096}
m_Modifications:
- target: {fileID: 8944336655422409496, guid: f6d148d888ffbf54b9afe9936dfaec1f,
type: 3}
propertyPath: far clip plane
value: 500
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409498, guid: f6d148d888ffbf54b9afe9936dfaec1f,
type: 3}
propertyPath: m_Name
value: MainCamera
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f,
type: 3}
propertyPath: m_LocalPosition.x
value: 0.20000005
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.44500005
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f,
type: 3}
propertyPath: m_LocalPosition.z
value: -4
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f6d148d888ffbf54b9afe9936dfaec1f, type: 3}
--- !u!4 &5542111180780342647 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8944336655422409503, guid: f6d148d888ffbf54b9afe9936dfaec1f,
type: 3}
m_PrefabInstance: {fileID: 3515378427225392744}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3515378427639998752
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2119775930974504096}
m_Modifications:
- target: {fileID: 2070925441746177671, guid: a1a802ecaf6775746bb2a929fb554ad8,
type: 3}
propertyPath: m_Name
value: PlayerFollowCamera
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8,
type: 3}
propertyPath: m_LocalPosition.x
value: 0.20000005
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.44500005
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8,
type: 3}
propertyPath: m_LocalPosition.z
value: -4
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2070925441746177913, guid: a1a802ecaf6775746bb2a929fb554ad8,
type: 3}
propertyPath: m_Follow
value:
objectReference: {fileID: 4860276692040879404}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a1a802ecaf6775746bb2a929fb554ad8, type: 3}
--- !u!4 &3203261902030644824 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2070925441746177912, guid: a1a802ecaf6775746bb2a929fb554ad8,
type: 3}
m_PrefabInstance: {fileID: 3515378427639998752}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 775ed8cbe21d25a4aa76b335f958d711
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -230,14 +230,13 @@ bool IsInBounds(float3 p, float3 c, float b, out float intensity)
float4 GetConeProperties(float3 lightDir, float coneAngle) float4 GetConeProperties(float3 lightDir, float coneAngle)
{ {
float4 cone = float4(lightDir.xyz, radians(coneAngle) * 0.5); float4 cone = float4(lightDir.xyz, radians(coneAngle) * 0.5);
cone.xyz = normalize(cone.xyz);
return cone; return cone;
} }
float CalcCapsuleShadow(float3 worldPos, float3 worldNormal) void CalcCapsuleShadow(float3 worldPos, float3 worldNormal, out float shadow, out float occlusion)
{ {
float shadow = 1.0; shadow = 1.0;
float occlusion = 1.0; occlusion = 1.0;
#if _MultiCapsule_Shadow_AO_ON || _MultiCapsule_AO_ON #if _MultiCapsule_Shadow_AO_ON || _MultiCapsule_AO_ON
for (uint i = 0; i < _CharactersCount; ++i) for (uint i = 0; i < _CharactersCount; ++i)
{ {
@ -256,7 +255,7 @@ float CalcCapsuleShadow(float3 worldPos, float3 worldNormal)
CapsuleShadowArea area = _CapsuleShadowData[index]; CapsuleShadowArea area = _CapsuleShadowData[index];
for (uint b = area.lightStartID; b < area.lightEndID; ++b) for (uint b = area.lightStartID; b < area.lightEndID; ++b)
{ {
float4 lightDir = _CapsuleLightsDir[a]; float4 lightDir = _CapsuleLightsDir[b];
float4 cone = GetConeProperties(lightDir.xyz, area.ConeAngle); float4 cone = GetConeProperties(lightDir.xyz, area.ConeAngle);
float tempIntensity = intensity / saturate(1 * smoothstep(0.1, 2, lightDir.w)); float tempIntensity = intensity / saturate(1 * smoothstep(0.1, 2, lightDir.w));
float tempShadow = CalcCapsuleShadowByIndex(worldPos, cone.xyz, c.capsuleStartID, c.capsuleEndID, area.ShadowSharpness, tempIntensity, area.ShadowIntensity); float tempShadow = CalcCapsuleShadowByIndex(worldPos, cone.xyz, c.capsuleStartID, c.capsuleEndID, area.ShadowSharpness, tempIntensity, area.ShadowIntensity);
@ -264,16 +263,14 @@ float CalcCapsuleShadow(float3 worldPos, float3 worldNormal)
shadow = min(shadow, tempShadow); shadow = min(shadow, tempShadow);
} }
} }
//occlusion *= CalcCapsuleOcclusionByIndex(worldPos, worldNormal, c.capsuleStartID, c.capsuleEndID, intensity, _CapsuleShadowData[0].AmbientIntensity); occlusion *= CalcCapsuleOcclusionByIndex(worldPos, worldNormal, c.capsuleStartID, c.capsuleEndID, intensity, _CapsuleShadowData[0].AmbientIntensity);
//occlusion *= CalcCapsuleOcclusionByIndexV2(worldPos, worldNormal, c.capsuleStartID, c.capsuleEndID, intensity, _CapsuleShadowData[0].AmbientIntensity); //occlusion *= CalcCapsuleOcclusionByIndexV2(worldPos, worldNormal, c.capsuleStartID, c.capsuleEndID, intensity, _CapsuleShadowData[0].AmbientIntensity);
#elif defined(_MultiCapsule_AO_ON) #elif defined(_MultiCapsule_AO_ON)
// occlusion *= CalcCapsuleOcclusionByIndex(worldPos, worldNormal, c.capsuleStartID, c.capsuleEndID, intensity, _CapsuleShadowData[0].AmbientIntensity); occlusion *= CalcCapsuleOcclusionByIndex(worldPos, worldNormal, c.capsuleStartID, c.capsuleEndID, intensity, _CapsuleShadowData[0].AmbientIntensity);
#endif #endif
} }
} }
#endif #endif
return shadow * occlusion;
} }
#endif #endif

View File

@ -194,6 +194,13 @@ half4 CalculateFinalColor(LightingData lightingData, half alpha)
return half4(finalColor, alpha); return half4(finalColor, alpha);
} }
half4 CalculateFinalColor(LightingData lightingData, half3 albedo, half alpha)
{
half3 finalColor = CalculateLightingColor(lightingData, albedo);
return half4(finalColor, alpha);
}
half4 CalculateFinalColor(LightingData lightingData, half3 albedo, half alpha, float fogCoord) half4 CalculateFinalColor(LightingData lightingData, half3 albedo, half alpha, float fogCoord)
{ {
#if defined(_FOG_FRAGMENT) #if defined(_FOG_FRAGMENT)

View File

@ -230,9 +230,11 @@ Shader "Universal Render Pipeline/Lit"
// lerp(0, half3(0.5, 0, 0) * (1 - mainLight.shadowAttenuation), mainLight.shadowAttenuation) * 0 : 1); // lerp(0, half3(0.5, 0, 0) * (1 - mainLight.shadowAttenuation), mainLight.shadowAttenuation) * 0 : 1);
float ao = CalcCapsuleShadow(inputData.positionWS.xyz, inputData.normalWS); float ao = 1;
// ao = lerp(ao, 1, step(0.5, mainLight.shadowAttenuation)); float shadow = 1;
lightingData.mainLightColor *= ao; CalcCapsuleShadow(inputData.positionWS.xyz, inputData.normalWS, shadow, ao);
// ao = lerp(shadow, 1, step(0.99, mainLight.shadowAttenuation)) * ao;
lightingData.mainLightColor *= ao * shadow;
#ifdef _ShadowRemapON #ifdef _ShadowRemapON
half4 remapValue = tex2D(_ShadowRemap, float3(mainLight.shadowAttenuation, 0, 0)); half4 remapValue = tex2D(_ShadowRemap, float3(mainLight.shadowAttenuation, 0, 0));