diff --git a/Assets/raymarched/Interactive/MultiObject.controller b/Assets/raymarched/Interactive/MultiObject.controller new file mode 100644 index 0000000..add7167 --- /dev/null +++ b/Assets/raymarched/Interactive/MultiObject.controller @@ -0,0 +1,468 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1107 &-8465147991303884772 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectA_Z + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: -778598287410787253} + m_Position: {x: 380, y: 120, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: -778598287410787253} +--- !u!1102 &-6509306727967814378 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectB_Z + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 1 + m_Motion: {fileID: 7400000, guid: 8a337aa4eb616aa798c89f46909f63e5, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: ObjectB_Z +--- !u!1107 &-5992346665410383487 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectB_Z + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: -6509306727967814378} + m_Position: {x: 329, y: 109, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: -6509306727967814378} +--- !u!1102 &-5684512436488358267 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectB_X + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 1 + m_Motion: {fileID: 7400000, guid: 5344abea9c8901c848f67a9d30b922b9, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: ObjectB_X +--- !u!1107 &-5096165749562391104 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectB_Y + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 1660559658912344997} + m_Position: {x: 284, y: 126, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 1660559658912344997} +--- !u!1107 &-4195430008742610051 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectA_X + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: -3176514367915262987} + m_Position: {x: 415, y: 105, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: -3176514367915262987} +--- !u!1102 &-3176514367915262987 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectA_X + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 1 + m_Motion: {fileID: 7400000, guid: a5571ae7d5c209812a40c8f41b6a6851, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: ObjectA_X +--- !u!1107 &-2261036627937079202 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectB_X + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: -5684512436488358267} + m_Position: {x: 391, y: 92, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: -5684512436488358267} +--- !u!1102 &-778598287410787253 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectA_Z + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 1 + m_Motion: {fileID: 7400000, guid: c34c55c9c7ed1f610951f9850dc0c865, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: ObjectA_Z +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MultiObject + serializedVersion: 5 + m_AnimatorParameters: + - m_Name: ObjectA_X + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + - m_Name: ObjectA_Y + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + - m_Name: ObjectA_Z + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + - m_Name: ObjectB_X + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + - m_Name: ObjectB_Y + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + - m_Name: ObjectB_Z + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 1873914384603339509} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} + - serializedVersion: 5 + m_Name: ObjectA_X + m_StateMachine: {fileID: -4195430008742610051} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 1 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} + - serializedVersion: 5 + m_Name: ObjectA_Y + m_StateMachine: {fileID: 8920307797793888464} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 1 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} + - serializedVersion: 5 + m_Name: ObjectA_Z + m_StateMachine: {fileID: -8465147991303884772} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 1 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} + - serializedVersion: 5 + m_Name: ObjectB_X + m_StateMachine: {fileID: -2261036627937079202} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 1 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} + - serializedVersion: 5 + m_Name: ObjectB_Y + m_StateMachine: {fileID: -5096165749562391104} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 1 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} + - serializedVersion: 5 + m_Name: ObjectB_Z + m_StateMachine: {fileID: -5992346665410383487} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 1 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &847829751511545519 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectA_X + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: a5571ae7d5c209812a40c8f41b6a6851, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1102 &1660559658912344997 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectB_Y + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 1 + m_Motion: {fileID: 7400000, guid: ebff5c7ef55eb1fe7bc622d035417528, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: ObjectB_Y +--- !u!1107 &1873914384603339509 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 847829751511545519} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 847829751511545519} +--- !u!1102 &8417450941949904896 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectA_Y + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 1 + m_Motion: {fileID: 7400000, guid: 42aaa2b5056e60bbe88027e8ed332747, type: 2} + m_Tag: + m_SpeedParameter: ObjectA_Y + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: ObjectA_Y +--- !u!1107 &8920307797793888464 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectA_Y + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 8417450941949904896} + m_Position: {x: 370, y: 120, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 8417450941949904896} diff --git a/Assets/raymarched/Interactive/MultiObject.controller.meta b/Assets/raymarched/Interactive/MultiObject.controller.meta new file mode 100644 index 0000000..f83cd9f --- /dev/null +++ b/Assets/raymarched/Interactive/MultiObject.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5a951e59572a58b05b49eb62effc41f7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/raymarched/Interactive/ObjectA_X.anim b/Assets/raymarched/Interactive/ObjectA_X.anim new file mode 100644 index 0000000..6f41edc --- /dev/null +++ b/Assets/raymarched/Interactive/ObjectA_X.anim @@ -0,0 +1,116 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectA_X + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ObjectA.x + path: Main + classID: 23 + script: {fileID: 0} + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 521822810 + attribute: 20465042 + script: {fileID: 0} + typeID: 23 + customType: 22 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ObjectA.x + path: Main + classID: 23 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/raymarched/Interactive/ObjectA_X.anim.meta b/Assets/raymarched/Interactive/ObjectA_X.anim.meta new file mode 100644 index 0000000..bd5d76b --- /dev/null +++ b/Assets/raymarched/Interactive/ObjectA_X.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a5571ae7d5c209812a40c8f41b6a6851 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/raymarched/Interactive/ObjectA_Y.anim b/Assets/raymarched/Interactive/ObjectA_Y.anim new file mode 100644 index 0000000..702642c --- /dev/null +++ b/Assets/raymarched/Interactive/ObjectA_Y.anim @@ -0,0 +1,116 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectA_Y + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ObjectA.y + path: Main + classID: 23 + script: {fileID: 0} + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 521822810 + attribute: 288900498 + script: {fileID: 0} + typeID: 23 + customType: 22 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ObjectA.y + path: Main + classID: 23 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/raymarched/Interactive/ObjectA_Y.anim.meta b/Assets/raymarched/Interactive/ObjectA_Y.anim.meta new file mode 100644 index 0000000..890268e --- /dev/null +++ b/Assets/raymarched/Interactive/ObjectA_Y.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 42aaa2b5056e60bbe88027e8ed332747 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/raymarched/Interactive/ObjectA_Z.anim b/Assets/raymarched/Interactive/ObjectA_Z.anim new file mode 100644 index 0000000..6da8acb --- /dev/null +++ b/Assets/raymarched/Interactive/ObjectA_Z.anim @@ -0,0 +1,116 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectA_Z + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ObjectA.z + path: Main + classID: 23 + script: {fileID: 0} + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 521822810 + attribute: 557335954 + script: {fileID: 0} + typeID: 23 + customType: 22 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ObjectA.z + path: Main + classID: 23 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/raymarched/Interactive/ObjectA_Z.anim.meta b/Assets/raymarched/Interactive/ObjectA_Z.anim.meta new file mode 100644 index 0000000..d7d0d4d --- /dev/null +++ b/Assets/raymarched/Interactive/ObjectA_Z.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c34c55c9c7ed1f610951f9850dc0c865 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/raymarched/Interactive/ObjectB_X.anim b/Assets/raymarched/Interactive/ObjectB_X.anim new file mode 100644 index 0000000..8234c50 --- /dev/null +++ b/Assets/raymarched/Interactive/ObjectB_X.anim @@ -0,0 +1,116 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectB_X + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ObjectB.x + path: Main + classID: 23 + script: {fileID: 0} + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 521822810 + attribute: 137434152 + script: {fileID: 0} + typeID: 23 + customType: 22 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ObjectB.x + path: Main + classID: 23 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/raymarched/Interactive/ObjectB_X.anim.meta b/Assets/raymarched/Interactive/ObjectB_X.anim.meta new file mode 100644 index 0000000..04c8a1e --- /dev/null +++ b/Assets/raymarched/Interactive/ObjectB_X.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5344abea9c8901c848f67a9d30b922b9 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/raymarched/Interactive/ObjectB_Y.anim b/Assets/raymarched/Interactive/ObjectB_Y.anim new file mode 100644 index 0000000..42d093f --- /dev/null +++ b/Assets/raymarched/Interactive/ObjectB_Y.anim @@ -0,0 +1,116 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectB_Y + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ObjectB.y + path: Main + classID: 23 + script: {fileID: 0} + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 521822810 + attribute: 405869608 + script: {fileID: 0} + typeID: 23 + customType: 22 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ObjectB.y + path: Main + classID: 23 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/raymarched/Interactive/ObjectB_Y.anim.meta b/Assets/raymarched/Interactive/ObjectB_Y.anim.meta new file mode 100644 index 0000000..9c43d12 --- /dev/null +++ b/Assets/raymarched/Interactive/ObjectB_Y.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ebff5c7ef55eb1fe7bc622d035417528 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/raymarched/Interactive/ObjectB_Z.anim b/Assets/raymarched/Interactive/ObjectB_Z.anim new file mode 100644 index 0000000..fbc83a7 --- /dev/null +++ b/Assets/raymarched/Interactive/ObjectB_Z.anim @@ -0,0 +1,116 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ObjectB_Z + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ObjectB.z + path: Main + classID: 23 + script: {fileID: 0} + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 521822810 + attribute: 674305064 + script: {fileID: 0} + typeID: 23 + customType: 22 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 2 + outSlope: 2 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ObjectB.z + path: Main + classID: 23 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/raymarched/Interactive/ObjectB_Z.anim.meta b/Assets/raymarched/Interactive/ObjectB_Z.anim.meta new file mode 100644 index 0000000..0d6cc6f --- /dev/null +++ b/Assets/raymarched/Interactive/ObjectB_Z.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8a337aa4eb616aa798c89f46909f63e5 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/raymarched/Interactive/Raymarch_multi.mat b/Assets/raymarched/Interactive/Raymarch_multi.mat index 7491234..483d7b9 100644 --- a/Assets/raymarched/Interactive/Raymarch_multi.mat +++ b/Assets/raymarched/Interactive/Raymarch_multi.mat @@ -78,4 +78,5 @@ Material: m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _ObjectA: {r: -0.07, g: 0, b: 0, a: 1} + - _ObjectA: {r: 0.5, g: 0.4, b: 0, a: 1} + - _ObjectB: {r: -0.05, g: 0.13, b: 0, a: 1} diff --git a/Assets/raymarched/Interactive/rm_combined.shader b/Assets/raymarched/Interactive/rm_combined.shader index a9a39cf..43af9c4 100644 --- a/Assets/raymarched/Interactive/rm_combined.shader +++ b/Assets/raymarched/Interactive/rm_combined.shader @@ -2,8 +2,9 @@ { Properties { - [Header(Object positions)] - _ObjectA ("Object A", Vector) = (0, 0, 0) + [Header(Object positions)] + _ObjectA ("Object A", Vector) = (0, 0, 0) + _ObjectB ("Object B", Vector) = (0, 0, 0) [Header(Raymarcher Properties)] _MaxSteps ("Max steps", Int) = 256 _MaxDist ("Max distance", Float) = 100 @@ -21,172 +22,193 @@ #pragma fragment frag - #include "UnityCG.cginc" - #include "UnityLightingCommon.cginc" + #include "UnityCG.cginc" + #include "UnityLightingCommon.cginc" - struct appdata - { - float4 vertex : POSITION; - }; + struct appdata + { + float4 vertex : POSITION; + }; - struct v2f - { - float4 vertex : SV_POSITION; - float3 ro : TEXCOORD1; - float3 hitPos : TEXCOORD2; - }; + struct v2f + { + float4 vertex : SV_POSITION; + float3 ro : TEXCOORD1; + float3 hitPos : TEXCOORD2; + }; - struct fragOut - { - fixed4 col : SV_Target; - float depth : SV_Depth; - }; + struct fragOut + { + fixed4 col : SV_Target; + float depth : SV_Depth; + }; - int _MaxSteps; - float _MaxDist; - float _SurfDist; - float3 _ObjectA; + int _MaxSteps; + float _MaxDist; + float _SurfDist; + float3 _ObjectA; + float3 _ObjectB; - v2f vert (appdata v) { - v2f o; - o.vertex = UnityObjectToClipPos(v.vertex); - //object space - o.ro = mul(unity_WorldToObject, float4(_WorldSpaceCameraPos, 1)); - o.hitPos = v.vertex; - //world space - //o.ro = _WorldSpaceCameraPos; - //o.hitPos = mul(unity_ObjectToWorld, v.vertex); - return o; - } + v2f vert (appdata v) { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + //object space + o.ro = mul(unity_WorldToObject, float4(_WorldSpaceCameraPos, 1)); + o.hitPos = v.vertex; + //world space + //o.ro = _WorldSpaceCameraPos; + //o.hitPos = mul(unity_ObjectToWorld, v.vertex); + return o; + } - float smin(float a, float b, float k) { - return min(a, b) - pow(max(k - abs(a-b), 0), 3)/(6*k*k); - } + float smin(float a, float b, float k) { + return min(a, b) - pow(max(k - abs(a-b), 0), 3)/(6*k*k); + } - float sdSphere(float3 p, float3 o, float r) { - return length(p - o) - r; - } + float sdSphere(float3 p, float3 o, float r) { + return length(p - o) - r; + } - float sdBox(float3 p, float3 dim) { - return length(float3( - max(abs(p.x) - dim.x/2.0, 0), - max(abs(p.y) - dim.y/2.0, 0), - max(abs(p.z) - dim.z/2.0, 0))); - } + float sdBox(float3 p, float3 dim) { + return length(float3( + max(abs(p.x) - dim.x/2.0, 0), + max(abs(p.y) - dim.y/2.0, 0), + max(abs(p.z) - dim.z/2.0, 0))); + } - float sdLine(float3 p, float3 a, float3 b, float r) { - float3 pa = p - a; - float3 ba = b - a; - float h = clamp(dot(pa, ba) / dot(ba, ba), 0, 1); - return length(pa - ba * h) - r; - } + float sdLine(float3 p, float3 a, float3 b, float r) { + float3 pa = p - a; + float3 ba = b - a; + float h = clamp(dot(pa, ba) / dot(ba, ba), 0, 1); + return length(p- a - (b-a) * h) - r; + } - float sdCappedTorus( float3 p, float2 sc, float ra, float rb) { - p.x = abs(p.x); - float k = (sc.y*p.x>sc.x*p.y) ? dot(p.xy,sc) : length(p.xy); - return sqrt( dot(p,p) + ra*ra - 2.0*ra*k ) - rb; - } + float sdCappedTorus( float3 p, float2 sc, float ra, float rb) { + p.x = abs(p.x); + float k = (sc.y*p.x>sc.x*p.y) ? dot(p.xy,sc) : length(p.xy); + return sqrt( dot(p,p) + ra*ra - 2.0*ra*k ) - rb; + } - float3 RotateY(float3 p, float a) { - return mul(float3x3(cos(a), 0, sin(a), 0, 1, 0, -sin(a), 0, cos(a)), p); - } + float sdTorus( float3 p, float2 t) { + float2 q = float2(length(p.xz) - t.x, p.y); + return length(q) - t.y; + } - float Kijetesantakalu(float3 p, float r) { - float d = sdSphere(p, float3(0, 0, 0.2f), r);// left eye - d = min(d, sdSphere(p, float3(0.15f, 0, 0.2f), r)); // right eye - d = min(d, sdLine(p, float3(0, 0, -0.4f), float3(-0.35f, 0, -0.4f), r)); // bottom line - d = smin(d, sdLine(p, float3(0, 0, -0.4f), float3(-0.1f, 0, -0.15f), r), 0.003f); // leg hook - d = min(d, sdLine(p, float3(0.15f, 0, -0.4f), float3(0.15f, 0, -0.1f), r)); // middle leg - d = min(d, sdLine(p, float3(0.3f, 0, -0.4f), float3(0.3f, 0, 0), r)); // front leg - d = smin(d, sdLine(p, float3(0.45f, 0, 0.1f), float3(0.3f, 0, 0), r), 0.003f); // lower snout - d = smin(d, sdLine(p, float3(0.45f, 0, 0.1f), float3(0.2f, 0, 0.35f), r), 0.003f); // upper snout - d = smin(d, sdLine(p, float3(0.2f, 0, 0.45f), float3(0.2f, 0, 0.35f), r), 0.003f); // ear - float an = 0.9; - d = smin(d, sdCappedTorus((RotateY(p, 0.8f) - float3(0.15f, 0, -0.05f)).xzy, float2(sin(an),cos(an)), 0.4, r), 0.003f); // ear - d = smin(d, sdLine(p, float3(-0.25f, 0, 0), float3(-0.25f, 0, -0.4f), r), 0.003f); // back - d = smin(d, sdLine(p, float3(-0.25f, 0, -0.1f), float3(-0.35f, 0, -0.1f), r), 0.003f); // tail top - d = smin(d, sdLine(p, float3(-0.35f, 0, -0.1f), float3(-0.35f, 0, -0.4f), r), 0.003f); // stripe - an = 3.1415f*0.5; - d = smin(d, sdCappedTorus((RotateY(p, an) - float3(-0.25f, 0, 0.35f)).xzy, float2(sin(an),cos(an)), 0.15f, r), 0.003f); // tail + float3 RotateY(float3 p, float a) { + return mul(float3x3(cos(a), 0, sin(a), 0, 1, 0, -sin(a), 0, cos(a)), p); + } - return d; - } + float Kijetesantakalu(float3 p, float r) { + float d = sdSphere(p, float3(0, 0, 0.2f), r);// left eye + d = min(d, sdSphere(p, float3(0.15f, 0, 0.2f), r)); // right eye + d = min(d, sdLine(p, float3(0, 0, -0.4f), float3(-0.35f, 0, -0.4f), r)); // bottom line + d = smin(d, sdLine(p, float3(0, 0, -0.4f), float3(-0.1f, 0, -0.15f), r), 0.003f); // leg hook + d = min(d, sdLine(p, float3(0.15f, 0, -0.4f), float3(0.15f, 0, -0.1f), r)); // middle leg + d = min(d, sdLine(p, float3(0.3f, 0, -0.4f), float3(0.3f, 0, 0), r)); // front leg + d = smin(d, sdLine(p, float3(0.45f, 0, 0.1f), float3(0.3f, 0, 0), r), 0.003f); // lower snout + d = smin(d, sdLine(p, float3(0.45f, 0, 0.1f), float3(0.2f, 0, 0.35f), r), 0.003f); // upper snout + d = smin(d, sdLine(p, float3(0.2f, 0, 0.45f), float3(0.2f, 0, 0.35f), r), 0.003f); // ear + float an = 0.9; + d = smin(d, sdCappedTorus((RotateY(p, 0.8f) - float3(0.15f, 0, -0.05f)).xzy, float2(sin(an),cos(an)), 0.4, r), 0.003f); // ear + d = smin(d, sdLine(p, float3(-0.25f, 0, 0), float3(-0.25f, 0, -0.4f), r), 0.003f); // back + d = smin(d, sdLine(p, float3(-0.25f, 0, -0.1f), float3(-0.35f, 0, -0.1f), r), 0.003f); // tail top + d = smin(d, sdLine(p, float3(-0.35f, 0, -0.1f), float3(-0.35f, 0, -0.4f), r), 0.003f); // stripe + an = 3.1415f*0.5; + d = smin(d, sdCappedTorus((RotateY(p, an) - float3(-0.25f, 0, 0.35f)).xzy, float2(sin(an),cos(an)), 0.15f, r), 0.003f); // tail - float FirstShape(float3 p) { - return Kijetesantakalu(p, 0.05f); - } + return d; + } - float SecondShape(float3 p) { - // return sdBox(p, 0.3f) - 0.01f; - // return Kijetesantakalu(p, 0.04f) - 0.01f; - return sdSphere(p, 0, 0.3f); - } + float FirstShape(float3 p) { + return Kijetesantakalu(p, 0.05f); + } + + float SecondShape(float3 p) { + // return sdBox(p, 0.3f) - 0.01f; + // return Kijetesantakalu(p, 0.04f) - 0.01f; + // return sdSphere(p, 0, 0.3f); + + float3 a =_ObjectA; + float3 b =_ObjectB; + + float o = sdLine(p, a, b, 0.1); + o = smin(o, sdSphere(p, a, 0.2), 0.05); + o = smin(o, sdSphere(p, b, 0.2), 0.05); + return o; + // return sdTorus(p - _ObjectA, float2(, 0.2f)); + } - float GetDist(float3 p) { + float GetDist(float3 p) { - float first = FirstShape(p); - // float3 second_pos = mul(unity_WorldToObject, _WorldSpaceLightPos0); - float second = SecondShape(p - _ObjectA); - return smin(first, second, 0.15f); + float first = FirstShape(p); + // float3 second_pos = mul(unity_WorldToObject, _WorldSpaceLightPos0); + float second = SecondShape(p); + return smin(first, second, 0.15f); - } + } - //marches a ray through the scene - float Raymarch(float3 ro, float3 rd) { - float rayLen = 0;// total distance marched / distance from origin - float dist; // distance from the raymarched scene - for ( int i = 0; i < _MaxSteps; i++) - { - //position = origin + distance * direction - float3 p = ro + rayLen * rd; - dist = GetDist(p); - rayLen += dist;// move forward - if (dist < _SurfDist || rayLen > _MaxDist) { - break; - } - } + //marches a ray through the scene + float Raymarch(float3 ro, float3 rd) { + float rayLen = 0;// total distance marched / distance from origin + float dist; // distance from the raymarched scene + for ( int i = 0; i < _MaxSteps; i++) + { + //position = origin + distance * direction + float3 p = ro + rayLen * rd; + dist = GetDist(p); + rayLen += dist;// move forward + if (dist < _SurfDist || rayLen > _MaxDist) { + break; + } + } - return rayLen; - } + return rayLen; + } - float3 GetNormal(float3 p) { - float2 e = float2(0.001, 0); - float3 n = GetDist(p) - float3( - GetDist(p-e.xyy), - GetDist(p-e.yxy), - GetDist(p-e.yyx)); - return normalize(n); - } + float3 GetNormal(float3 p) { + float2 e = float2(0.001, 0); + float3 n = GetDist(p) - float3( + GetDist(p-e.xyy), + GetDist(p-e.yxy), + GetDist(p-e.yyx)); + return normalize(n); + } - fragOut frag (v2f i) { - float3 ro = i.ro; - float3 rd = normalize(i.hitPos - ro); + fragOut frag (v2f i) { + float3 ro = i.ro; + float3 rd = normalize(i.hitPos - ro); - float d = Raymarch(ro, rd); - fixed4 col = 1; + float d = Raymarch(ro, rd); + fixed4 col = 1; - if (d >= _MaxDist) - { - discard; - } - float3 p = ro + rd * d; - float3 n = GetNormal(p); + if (d >= _MaxDist) + { + discard; + } + float3 p = ro + rd * d; + float3 n = GetNormal(p); - // col.rgb = max(dot(n, normalize(float3(1,0.5,1))), 0.05f); + // col.rgb = max(dot(n, normalize(float3(1,0.5,1))), 0.05f); - col.rgb = lerp(0, float3(0,1,1), pow(1 - dot(-rd, n), 2)); + // float3 edgeCol = float3(0,1,1); + float3 edgeCol = abs(p); + col.rgb = lerp(0.001, edgeCol, pow(1 - dot(-rd, n), 2)); - // col *= float4(d, 1, 1, 1); - fragOut o; - o.col = col; - // o.col = _LightColor0; - float4 vClipPos = mul(UNITY_MATRIX_VP, mul(unity_ObjectToWorld, float4(p, 1))); - o.depth = (vClipPos.z / vClipPos.w + 1.0) * 0.5; - return o; - } + // col *= float4(d, 1, 1, 1); + fragOut o; + o.col = col; + // o.col = _LightColor0; + float4 vClipPos = mul(UNITY_MATRIX_VP, mul(unity_ObjectToWorld, float4(p, 1))); + float zDepth = vClipPos.z / vClipPos.w; + #if !defined(UNITY_REVERSED_Z) // basically only OpenGL (unity editor on linux) + zDepth = zDepth * 0.5 + 0.5; // remap -1 to 1 range to 0.0 to 1.0 + #endif + o.depth = zDepth; + return o; + } ENDCG } - } + } } \ No newline at end of file diff --git a/Assets/raymarched/Raymarching.unity b/Assets/raymarched/Raymarching.unity index e3fe342..86442c1 100644 --- a/Assets/raymarched/Raymarching.unity +++ b/Assets/raymarched/Raymarching.unity @@ -121,6 +121,262 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &244150317 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 244150318} + - component: {fileID: 244150319} + m_Layer: 0 + m_Name: TriggerA_Y + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &244150318 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 244150317} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -10, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 779234489} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &244150319 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 244150317} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 81194749cc874e87b95c7b486517c3a9, type: 3} + m_Name: + m_EditorClassIdentifier: + areaSize: {x: 2, y: 2, z: 2} + areaOffset: {x: 0, y: 0, z: 0} + settingIndex: -1 + settingValue: 0 + useAdvancedTrigger: 1 + allowedTypes: + - RaymarcherObjectA + allowParticleInteraction: 0 + enterTasks: [] + exitTasks: [] + stayTasks: + - settingIndex: 1 + minValue: 0 + maxValue: 1 + updateMethod: 1 + sampleDirection: 2 +--- !u!1 &249645324 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 249645325} + - component: {fileID: 249645328} + - component: {fileID: 249645327} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &249645325 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 249645324} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.1, y: 1, z: 0.1} + m_Children: [] + m_Father: {fileID: 831474226} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &249645327 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 249645324} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + 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 +--- !u!33 &249645328 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 249645324} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &307897118 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 307897119} + - component: {fileID: 307897120} + m_Layer: 0 + m_Name: TriggerB_Z + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &307897119 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 307897118} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -10, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 779234489} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &307897120 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 307897118} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 81194749cc874e87b95c7b486517c3a9, type: 3} + m_Name: + m_EditorClassIdentifier: + areaSize: {x: 2, y: 2, z: 2} + areaOffset: {x: 0, y: 0, z: 0} + settingIndex: -1 + settingValue: 0 + useAdvancedTrigger: 1 + allowedTypes: + - RaymarcherObjectB + allowParticleInteraction: 0 + enterTasks: [] + exitTasks: [] + stayTasks: + - settingIndex: 5 + minValue: 0 + maxValue: 1 + updateMethod: 1 + sampleDirection: 4 +--- !u!1 &393448822 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 393448823} + - component: {fileID: 393448824} + m_Layer: 0 + m_Name: TriggerB_Y + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &393448823 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 393448822} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -10, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 779234489} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &393448824 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 393448822} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 81194749cc874e87b95c7b486517c3a9, type: 3} + m_Name: + m_EditorClassIdentifier: + areaSize: {x: 2, y: 2, z: 2} + areaOffset: {x: 0, y: 0, z: 0} + settingIndex: -1 + settingValue: 0 + useAdvancedTrigger: 1 + allowedTypes: + - RaymarcherObjectB + allowParticleInteraction: 0 + enterTasks: [] + exitTasks: [] + stayTasks: + - settingIndex: 4 + minValue: 0 + maxValue: 1 + updateMethod: 1 + sampleDirection: 2 --- !u!1 &453749071 GameObject: m_ObjectHideFlags: 0 @@ -132,11 +388,11 @@ GameObject: - component: {fileID: 453749072} - component: {fileID: 453749075} - component: {fileID: 453749074} - - component: {fileID: 453749073} - component: {fileID: 453749077} - component: {fileID: 453749076} + - component: {fileID: 453749073} m_Layer: 0 - m_Name: Cube (1) + m_Name: ObjectA m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -150,14 +406,15 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 453749071} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.623, y: 0, z: 0} + m_LocalPosition: {x: 0.5, y: 0.4, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] + m_Children: + - {fileID: 831474226} m_Father: {fileID: 779234489} - m_RootOrder: 0 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &453749073 -BoxCollider: +--- !u!135 &453749073 +SphereCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} @@ -167,7 +424,7 @@ BoxCollider: m_IsTrigger: 1 m_Enabled: 1 serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} + m_Radius: 0.2 m_Center: {x: 0, y: 0, z: 0} --- !u!23 &453749074 MeshRenderer: @@ -215,20 +472,26 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 453749071} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &453749076 -MonoBehaviour: + m_Mesh: {fileID: 4393975565123819156, guid: 955b9c52fc0be3217a2074e1e2169b9d, type: 3} +--- !u!1818360609 &453749076 +RotationConstraint: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 453749071} m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 39d87b8783794dfd81ce396483019cbb, type: 3} - m_Name: - m_EditorClassIdentifier: - type: RaymarcherObjectA + m_Weight: 1 + m_RotationAtRest: {x: 0, y: 0, z: 0} + m_RotationOffset: {x: 0, y: 0, z: 0} + m_AffectRotationX: 1 + m_AffectRotationY: 1 + m_AffectRotationZ: 1 + m_IsContraintActive: 1 + m_IsLocked: 1 + m_Sources: + - sourceTransform: {fileID: 779234489} + weight: 1 --- !u!114 &453749077 MonoBehaviour: m_ObjectHideFlags: 0 @@ -248,6 +511,99 @@ MonoBehaviour: snappingReferences: [] autoHold: 0 ikReference: {fileID: 0} +--- !u!1 &683266143 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 683266147} + - component: {fileID: 683266146} + - component: {fileID: 683266145} + - component: {fileID: 683266144} + m_Layer: 0 + m_Name: Cube (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!65 &683266144 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683266143} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &683266145 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683266143} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 162568fe26f57e5c5acca748512ee245, 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 +--- !u!33 &683266146 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683266143} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &683266147 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683266143} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.754, y: -0.24626623, z: 0.587} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &695617482 GameObject: m_ObjectHideFlags: 0 @@ -340,6 +696,65 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &703968045 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 703968046} + - component: {fileID: 703968047} + m_Layer: 0 + m_Name: TriggerB_X + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &703968046 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 703968045} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -10, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 779234489} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &703968047 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 703968045} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 81194749cc874e87b95c7b486517c3a9, type: 3} + m_Name: + m_EditorClassIdentifier: + areaSize: {x: 2, y: 2, z: 2} + areaOffset: {x: 0, y: 0, z: 0} + settingIndex: -1 + settingValue: 0 + useAdvancedTrigger: 1 + allowedTypes: + - RaymarcherObjectB + allowParticleInteraction: 0 + enterTasks: [] + exitTasks: [] + stayTasks: + - settingIndex: 3 + minValue: 0 + maxValue: 1 + updateMethod: 1 + sampleDirection: 0 --- !u!1 &779234488 GameObject: m_ObjectHideFlags: 0 @@ -351,13 +766,14 @@ GameObject: - component: {fileID: 779234489} - component: {fileID: 779234491} - component: {fileID: 779234490} + - component: {fileID: 779234492} m_Layer: 0 m_Name: MultiObject m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!4 &779234489 Transform: m_ObjectHideFlags: 0 @@ -366,12 +782,18 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 779234488} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.044, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 453749072} - {fileID: 884043982} + - {fileID: 453749072} + - {fileID: 950930977} - {fileID: 2089960366} + - {fileID: 244150318} + - {fileID: 1960976045} + - {fileID: 703968046} + - {fileID: 393448823} + - {fileID: 307897119} m_Father: {fileID: 0} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -401,23 +823,121 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: a37fd8d654d5c2840a0ab3a5ad65a5ae, type: 3} m_Name: m_EditorClassIdentifier: - spawnHeight: 0 + spawnHeight: 0.5 useAdditionalValues: 1 syncValues: - - name: + - name: A_X startValue: 0 updatedBy: 0 updateMethod: 1 - animator: {fileID: 0} - animatorParameterName: -none- + animator: {fileID: 779234492} + animatorParameterName: ObjectA_X + - name: A_Y + startValue: 0 + updatedBy: 0 + updateMethod: 1 + animator: {fileID: 779234492} + animatorParameterName: ObjectA_Y + - name: A_Z + startValue: 0 + updatedBy: 0 + updateMethod: 1 + animator: {fileID: 779234492} + animatorParameterName: ObjectA_Z + - name: B_X + startValue: 0 + updatedBy: 0 + updateMethod: 1 + animator: {fileID: 779234492} + animatorParameterName: ObjectB_X + - name: B_Y + startValue: 0 + updatedBy: 0 + updateMethod: 1 + animator: {fileID: 779234492} + animatorParameterName: ObjectB_Y + - name: B_Z + startValue: 0 + updatedBy: 0 + updateMethod: 1 + animator: {fileID: 779234492} + animatorParameterName: ObjectB_Z propPrivacy: 1 subSyncs: - transform: {fileID: 453749072} - syncedValues: 0 + syncedValues: 14 + precision: 4 + syncBoundary: 0.5 + - transform: {fileID: 950930977} + syncedValues: 14 precision: 4 syncBoundary: 0.5 spawnableType: 0 preGeneratedInstanceId: +--- !u!95 &779234492 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 779234488} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 5a951e59572a58b05b49eb62effc41f7, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 +--- !u!1 &831474225 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 831474226} + - component: {fileID: 831474227} + m_Layer: 0 + m_Name: Pointer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &831474226 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 831474225} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -10, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 249645325} + m_Father: {fileID: 453749072} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &831474227 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 831474225} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 39d87b8783794dfd81ce396483019cbb, type: 3} + m_Name: + m_EditorClassIdentifier: + type: RaymarcherObjectA --- !u!1 &845829380 GameObject: m_ObjectHideFlags: 0 @@ -510,6 +1030,51 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 124.6, y: -30, z: 0} +--- !u!1 &849578981 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 849578982} + - component: {fileID: 849578983} + m_Layer: 0 + m_Name: Pointer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &849578982 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 849578981} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -10, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1764646628} + m_Father: {fileID: 950930977} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &849578983 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 849578981} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 39d87b8783794dfd81ce396483019cbb, type: 3} + m_Name: + m_EditorClassIdentifier: + type: RaymarcherObjectB --- !u!1 &884043981 GameObject: m_ObjectHideFlags: 0 @@ -521,7 +1086,6 @@ GameObject: - component: {fileID: 884043982} - component: {fileID: 884043985} - component: {fileID: 884043984} - - component: {fileID: 884043983} m_Layer: 0 m_Name: Main m_TagString: Untagged @@ -541,21 +1105,8 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 779234489} - m_RootOrder: 1 + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!135 &884043983 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 884043981} - m_Material: {fileID: 0} - m_IsTrigger: 1 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} --- !u!23 &884043984 MeshRenderer: m_ObjectHideFlags: 0 @@ -602,7 +1153,141 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 884043981} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} + m_Mesh: {fileID: 4393975565123819156, guid: ef0474244602536ba83b1af50ff39b9a, type: 3} +--- !u!1 &950930976 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 950930977} + - component: {fileID: 950930982} + - component: {fileID: 950930981} + - component: {fileID: 950930980} + - component: {fileID: 950930979} + - component: {fileID: 950930978} + m_Layer: 0 + m_Name: ObjectB + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &950930977 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 950930976} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 849578982} + m_Father: {fileID: 779234489} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!135 &950930978 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 950930976} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.2 + m_Center: {x: 0, y: 0, z: 0} +--- !u!1818360609 &950930979 +RotationConstraint: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 950930976} + m_Enabled: 1 + m_Weight: 1 + m_RotationAtRest: {x: 0, y: 0, z: 0} + m_RotationOffset: {x: 0, y: 0, z: 0} + m_AffectRotationX: 1 + m_AffectRotationY: 1 + m_AffectRotationZ: 1 + m_IsContraintActive: 1 + m_IsLocked: 1 + m_Sources: + - sourceTransform: {fileID: 779234489} + weight: 1 +--- !u!114 &950930980 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 950930976} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 12974925555b471580cacf5d2d5fa9e3, type: 3} + m_Name: + m_EditorClassIdentifier: + gripType: 1 + gripOrigin: {fileID: 0} + disallowTheft: 0 + maximumGrabDistance: 0 + snappingReferences: [] + autoHold: 0 + ikReference: {fileID: 0} +--- !u!23 &950930981 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 950930976} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + 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 +--- !u!33 &950930982 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 950930976} + m_Mesh: {fileID: 4393975565123819156, guid: 955b9c52fc0be3217a2074e1e2169b9d, type: 3} --- !u!1 &1450495540 GameObject: m_ObjectHideFlags: 0 @@ -625,7 +1310,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &1450495541 MonoBehaviour: m_ObjectHideFlags: 0 @@ -831,7 +1516,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!65 &1485771012 BoxCollider: m_ObjectHideFlags: 0 @@ -1010,7 +1695,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &1651833085 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1137,6 +1822,144 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1764646627 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1764646628} + - component: {fileID: 1764646630} + - component: {fileID: 1764646629} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1764646628 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1764646627} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.1, y: 1, z: 0.1} + m_Children: [] + m_Father: {fileID: 849578982} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1764646629 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1764646627} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + 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 +--- !u!33 &1764646630 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1764646627} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1960976044 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1960976045} + - component: {fileID: 1960976046} + m_Layer: 0 + m_Name: TriggerA_Z + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1960976045 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1960976044} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -10, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 779234489} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1960976046 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1960976044} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 81194749cc874e87b95c7b486517c3a9, type: 3} + m_Name: + m_EditorClassIdentifier: + areaSize: {x: 2, y: 2, z: 2} + areaOffset: {x: 0, y: 0, z: 0} + settingIndex: -1 + settingValue: 0 + useAdvancedTrigger: 1 + allowedTypes: + - RaymarcherObjectA + allowParticleInteraction: 0 + enterTasks: [] + exitTasks: [] + stayTasks: + - settingIndex: 2 + minValue: 0 + maxValue: 1 + updateMethod: 1 + sampleDirection: 4 --- !u!1 &2089960365 GameObject: m_ObjectHideFlags: 0 @@ -1148,7 +1971,7 @@ GameObject: - component: {fileID: 2089960366} - component: {fileID: 2089960367} m_Layer: 0 - m_Name: GameObject + m_Name: TriggerA_X m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1162,11 +1985,11 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2089960365} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: -10, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 779234489} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &2089960367 MonoBehaviour: @@ -1180,7 +2003,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 81194749cc874e87b95c7b486517c3a9, type: 3} m_Name: m_EditorClassIdentifier: - areaSize: {x: 10, y: 0.05, z: 0} + areaSize: {x: 2, y: 2, z: 2} areaOffset: {x: 0, y: 0, z: 0} settingIndex: -1 settingValue: 0 @@ -1191,7 +2014,7 @@ MonoBehaviour: enterTasks: [] exitTasks: [] stayTasks: - - settingIndex: -1 + - settingIndex: 0 minValue: 0 maxValue: 1 updateMethod: 1 diff --git a/Assets/raymarched/lib.meta b/Assets/raymarched/lib.meta new file mode 100644 index 0000000..4a3c4cd --- /dev/null +++ b/Assets/raymarched/lib.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9d363cc3e7dc48602b2b2a482eaba095 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/raymarched/lib/GarbageExample.mat b/Assets/raymarched/lib/GarbageExample.mat new file mode 100644 index 0000000..27e3981 --- /dev/null +++ b/Assets/raymarched/lib/GarbageExample.mat @@ -0,0 +1,80 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: GarbageExample + m_Shader: {fileID: 4800000, guid: 7d4f97b3ee7613d9ba63c8ab411721a1, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _MaxDist: 256 + - _MaxSteps: 256 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SurfDist: 0.001 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/raymarched/lib/GarbageExample.mat.meta b/Assets/raymarched/lib/GarbageExample.mat.meta new file mode 100644 index 0000000..8548752 --- /dev/null +++ b/Assets/raymarched/lib/GarbageExample.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 162568fe26f57e5c5acca748512ee245 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/raymarched/lib/libgarbage.cginc b/Assets/raymarched/lib/libgarbage.cginc new file mode 100644 index 0000000..17ba790 --- /dev/null +++ b/Assets/raymarched/lib/libgarbage.cginc @@ -0,0 +1,61 @@ +struct appdata +{ + float4 vertex : POSITION; +}; + +struct v2f +{ + float4 vertex : SV_POSITION; + float3 vCamPos : TEXCOORD1; + float3 vHitPos : TEXCOORD2; +}; + +struct fragOut +{ + fixed4 col : SV_Target; + // float depth : SV_Depth; +}; + +v2f vert (appdata v) +{ + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); +#ifdef USE_WORLD_SPACE + o.vCamPos = _WorldSpaceCameraPos; + o.vHitPos = mul(unity_ObjectToWorld, v.vertex); +#else + o.vCamPos = mul(unity_WorldToObject, float4(_WorldSpaceCameraPos, 1)); + o.vHitPos = v.vertex; +#endif + return o; +} + +fragOut frag (v2f i) +{ + fragOut o; + o.col = 1; + o.col.r = 0; + return o; +} + +// #define SOME_MAGIC(main_fn) float3 main1()\ +// main_fn \ + +#define SOME_MAGIC(PASS, function_definition) float3 main##PASS() function_definition + +#define DO_MAGIC MAIN_FN(1) + +// #define SECOND_PASS 1 +// #define AA MAIN_FN +// #define BB MAIN_FN + + +// float3 main2() \ +// main_fn + +// \ +// float3 main2() \ +// main_fn\ + + +// #define SECOND_PASS \ diff --git a/Assets/raymarched/lib/libgarbage.cginc.meta b/Assets/raymarched/lib/libgarbage.cginc.meta new file mode 100644 index 0000000..a3595e9 --- /dev/null +++ b/Assets/raymarched/lib/libgarbage.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1b7c0fe7c2a1f3e5bb00d9fc04e6c43c +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/raymarched/lib/libgarbage_end.cginc b/Assets/raymarched/lib/libgarbage_end.cginc new file mode 100644 index 0000000..ee953f0 --- /dev/null +++ b/Assets/raymarched/lib/libgarbage_end.cginc @@ -0,0 +1 @@ +#define DO_MAGIC(p) MAIN_FN(p) \ No newline at end of file diff --git a/Assets/raymarched/lib/libgarbage_end.cginc.meta b/Assets/raymarched/lib/libgarbage_end.cginc.meta new file mode 100644 index 0000000..549f561 --- /dev/null +++ b/Assets/raymarched/lib/libgarbage_end.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 26203816190e7e521a12959d895d68a3 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/raymarched/lib/libgarbage_example.shader b/Assets/raymarched/lib/libgarbage_example.shader new file mode 100644 index 0000000..84e10d7 --- /dev/null +++ b/Assets/raymarched/lib/libgarbage_example.shader @@ -0,0 +1,44 @@ +Shader "CrispyPin/LibGarbageExample" +{ + Properties + { + + [Header(Raymarcher Properties)] + _MaxSteps ("Max steps", Int) = 256 + _MaxDist ("Max distance", Float) = 256 + _SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001 + + } + SubShader + { + Tags { "RenderType"="Opaque" } + Cull Off + LOD 100 + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "libgarbage.cginc" + + // #define MAIN_FN(PASS) float3 main##PASS ()\ + + #define MAIN_FN(PASS) SOME_MAGIC(PASS,\ + {\ + return float3(1,0,0);\ + }\ + ) + // #include "libgarbage_end.cginc" + // #define DO_MAGIC(p) MAIN_FN(p) + DO_MAGIC + + // {return 0;} + // MAIN_FN(1) {return 0;} + + + ENDCG + } + } +} diff --git a/Assets/raymarched/lib/libgarbage_example.shader.meta b/Assets/raymarched/lib/libgarbage_example.shader.meta new file mode 100644 index 0000000..c8902e7 --- /dev/null +++ b/Assets/raymarched/lib/libgarbage_example.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7d4f97b3ee7613d9ba63c8ab411721a1 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/raymarched/sphere_0.2m.fbx b/Assets/raymarched/sphere_0.2m.fbx new file mode 100644 index 0000000..615b703 Binary files /dev/null and b/Assets/raymarched/sphere_0.2m.fbx differ diff --git a/Assets/raymarched/sphere_0.2m.fbx.meta b/Assets/raymarched/sphere_0.2m.fbx.meta new file mode 100644 index 0000000..e434572 --- /dev/null +++ b/Assets/raymarched/sphere_0.2m.fbx.meta @@ -0,0 +1,97 @@ +fileFormatVersion: 2 +guid: 955b9c52fc0be3217a2074e1e2169b9d +ModelImporter: + serializedVersion: 19301 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 1 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 0.1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 0.1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/raymarched/sphere_2m.fbx b/Assets/raymarched/sphere_2m.fbx new file mode 100644 index 0000000..615b703 Binary files /dev/null and b/Assets/raymarched/sphere_2m.fbx differ diff --git a/Assets/raymarched/sphere_2m.fbx.meta b/Assets/raymarched/sphere_2m.fbx.meta new file mode 100644 index 0000000..cb5b061 --- /dev/null +++ b/Assets/raymarched/sphere_2m.fbx.meta @@ -0,0 +1,97 @@ +fileFormatVersion: 2 +guid: ef0474244602536ba83b1af50ff39b9a +ModelImporter: + serializedVersion: 19301 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 1 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 2 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 2 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/test/Demo4.shader b/Assets/test/Demo4.shader index a5e4c30..fe9f76c 100644 --- a/Assets/test/Demo4.shader +++ b/Assets/test/Demo4.shader @@ -14,7 +14,7 @@ SubShader { Tags { "RenderType"="Opaque" } - Cull Off + Cull Front LOD 100 Pass @@ -26,7 +26,7 @@ #define USE_DYNAMIC_QUALITY // #define USE_WORLD_SPACE #define USE_REFLECTIONS - #define MAX_REFLECTIONS 5 + #define MAX_REFLECTIONS 3 #define DISCARD_ON_MISS //#define CONSTRAIN_TO_MESH #include "RayMarchLib.cginc" @@ -50,7 +50,7 @@ o = sdfAdd(p, o, sdfTorus(rotX(p, _Time* 40), 5, 0.5, m), 0.5); o = sdfAdd(p, o, sdfTorus(rotZ(p, _Time* 40), 5, 0.5, m), 0.5); - o = sdfAdd(p, o, sdfSphere(abs(rotY(p, -20 * _Time)) - float3(1.5,2,1.5), 1, mMetal), 0.2); + o = sdfAdd(p, o, sdfSphere(abs(rotY(p, -20 * _Time)) - float3(1.5, sin(_Time.y*5) +1,1.5), 0.7, mMetal), 0.2); return o; } @@ -66,11 +66,11 @@ fixed4 col = 0; col = ray.mat.col * lightSun(ray.vNorm, vSunDir); - col *= lightShadow(ray.vHit, vSunDir, 50); + col *= lightShadow(ray.vHit + ray.vNorm * _SurfDist, vSunDir, 50); col += ray.mat.col * lightSky(ray.vNorm, 1); - col *= lightAO(ray.vHit, ray.vNorm); + // col *= lightAO(ray.vHit, ray.vNorm); - col = pow(col, 0.5); + // col = pow(col, 0.5); return col; } ENDCG diff --git a/Assets/test/spinny.mat b/Assets/test/FleshCube.mat similarity index 96% rename from Assets/test/spinny.mat rename to Assets/test/FleshCube.mat index 357b633..5a20c9f 100644 --- a/Assets/test/spinny.mat +++ b/Assets/test/FleshCube.mat @@ -7,7 +7,7 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: spinny + m_Name: FleshCube m_Shader: {fileID: 4800000, guid: 26b714026d4c6e2dc8fefdbcf28344fd, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 @@ -63,8 +63,8 @@ Material: - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 - - _MaxDist: 256 - - _MaxSteps: 219.31 + - _MaxDist: 40 + - _MaxSteps: 128 - _Metallic: 0 - _Mode: 0 - _OcclusionStrength: 1 @@ -72,7 +72,7 @@ Material: - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SurfDist: 0.001 + - _SurfDist: 0.01 - _UVSec: 0 - _ZWrite: 1 m_Colors: diff --git a/Assets/test/spinny.mat.meta b/Assets/test/FleshCube.mat.meta similarity index 100% rename from Assets/test/spinny.mat.meta rename to Assets/test/FleshCube.mat.meta diff --git a/Assets/test/Demo3.shader b/Assets/test/FleshCube.shader similarity index 82% rename from Assets/test/Demo3.shader rename to Assets/test/FleshCube.shader index 5c78b28..65c2f1c 100644 --- a/Assets/test/Demo3.shader +++ b/Assets/test/FleshCube.shader @@ -1,4 +1,4 @@ -Shader "Demo/pulsating" +Shader "RayMarching/FleshCube" { Properties { @@ -26,7 +26,7 @@ // #define USE_WORLD_SPACE #define DYNAMIC_QUALITY #define USE_REFLECTIONS - // #define CONSTRAIN_TO_MESH + #define CONSTRAIN_TO_MESH #define MAX_REFLECTIONS 1 #include "RayMarchLib.cginc" @@ -58,7 +58,12 @@ o = sdfAdd(p, o, sdfSphere(p, 6 + bias*3, mRed), 5); // o = sdfInter(p, o, sdfSphere(p, 50, mat(0.04, 0.005, 0.035)), 1.1); - o = sdfInter(p, o, sdfBox(p, 20, mRed)); + sdfData gyroid = o; + o = sdfAdd(p, + sdfInter(p, gyroid, sdfBox(p, 30, mRed)), + sdfSub(p, gyroid, sdfBox(p, 30, mRed)) + ); + // o = p, o, sdfBox(p, 20, mRed)); //sdfData bobby = sdfSphere(p, 51, col(0.5, 0.25, 0.001)); //bobby = sdfAdd(p, bobby, sdfSphere(p, 50.5, col(.5,.01,.01))); //bobby = sdfSub(p, bobby, sdfSphere(p, 50)); @@ -71,19 +76,22 @@ { float3 vSunDir = normalize(_SunPos); + float4 fogCol = col(0.2, .05, 0.001); + if (ray.bMissed) { - return 0.1; + // discard; + return fogCol; } fixed4 col = 0; - col = ray.mat.col * lightSun(ray.vNorm, vSunDir, col(5, 2, 0.1)); + col += ray.mat.col * lightSun(ray.vNorm, vSunDir, col(5, 2, 0.1)); col += ray.mat.col * lightSky(ray.vNorm, 1); col *= lightAO(ray.vHit, ray.vNorm, 0.05); col = pow(col, 0.7); - //col = lightFog(col, col(0.3, .17, 0.001), ray.dist, 0, 48); + col = lightFog(col, fogCol, ray.dist, 0.5, 16); return col; } ENDCG diff --git a/Assets/test/Demo3.shader.meta b/Assets/test/FleshCube.shader.meta similarity index 100% rename from Assets/test/Demo3.shader.meta rename to Assets/test/FleshCube.shader.meta diff --git a/Assets/test/Spinny.mat b/Assets/test/Spinny.mat new file mode 100644 index 0000000..70ec8ce --- /dev/null +++ b/Assets/test/Spinny.mat @@ -0,0 +1,81 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Spinny + m_Shader: {fileID: 4800000, guid: d83b23d955f9dc5739d0827cd507a63e, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _MaxDist: 400 + - _MaxSteps: 128 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SurfDist: 0.001 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SunPos: {r: 8, g: 4, b: 2, a: 1} diff --git a/Assets/test/Spinny.mat.meta b/Assets/test/Spinny.mat.meta new file mode 100644 index 0000000..7277249 --- /dev/null +++ b/Assets/test/Spinny.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c5afce7a29c155681939e1ad4f96dc18 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/test/TestProps.unity b/Assets/test/TestProps.unity index 91e5136..ac6d800 100644 --- a/Assets/test/TestProps.unity +++ b/Assets/test/TestProps.unity @@ -417,6 +417,154 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &627535768 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 627535775} + - component: {fileID: 627535774} + - component: {fileID: 627535773} + - component: {fileID: 627535772} + - component: {fileID: 627535771} + - component: {fileID: 627535770} + - component: {fileID: 627535769} + m_Layer: 0 + m_Name: Spinny + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &627535769 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 627535768} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 20, y: 20, z: 20} + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &627535770 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 627535768} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 990f6f4efb7f4ec98ad99f6dff1bc6f6, type: 3} + m_Name: + m_EditorClassIdentifier: + type: 3 + objectId: 267a3820-e773-4d80-aa35-8f7551bc813a +--- !u!114 &627535771 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 627535768} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a37fd8d654d5c2840a0ab3a5ad65a5ae, type: 3} + m_Name: + m_EditorClassIdentifier: + spawnHeight: 0 + useAdditionalValues: 0 + syncValues: [] + propPrivacy: 1 + subSyncs: [] + spawnableType: 0 + preGeneratedInstanceId: +--- !u!114 &627535772 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 627535768} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 12974925555b471580cacf5d2d5fa9e3, type: 3} + m_Name: + m_EditorClassIdentifier: + gripType: 1 + gripOrigin: {fileID: 0} + disallowTheft: 0 + maximumGrabDistance: 0 + snappingReferences: [] + autoHold: 0 + ikReference: {fileID: 0} +--- !u!23 &627535773 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 627535768} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: c5afce7a29c155681939e1ad4f96dc18, 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 +--- !u!33 &627535774 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 627535768} + m_Mesh: {fileID: -5495902117074765545, guid: 85702488cb92b9182a44437d143f9fc4, type: 3} +--- !u!4 &627535775 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 627535768} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1, y: 0, z: -3} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &766214507 GameObject: m_ObjectHideFlags: 0 @@ -673,7 +821,7 @@ GameObject: - component: {fileID: 889393502} - component: {fileID: 889393505} m_Layer: 0 - m_Name: Sphere (1) + m_Name: FleshCube m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0